You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace the stale batch scip-python core with a pinned current Pyright semantic
exporter that shares one Program/type-evaluator state, walks each source once,
and publishes exact facts plus Any/Unknown coverage. Keep scip-python as a
navigation compatibility fallback only.
Current master baseline
Current master registers scip-python with semantic-index authority and only references. Its bundled Pyright core is historically pinned far behind
current Pyright, omits kinds/enclosing symbols/diagnostics, conflates
implementation relations, and cannot expose call-receiver typing coverage.
PR #147 measured Flask at 10.629 s through scip-python and 0.748 s
through the static fallback. The faster static cell does not have semantic
resolution. The strict cell is a useful cold navigation baseline; no resident
no-op/edit result exists.
Why Pyright is the semantic owner
Pyright is designed as a high-performance
type checker for large Python codebases. Its open-source service already owns:
configuration and execution environments;
import resolution and typeshed/custom stubs;
a Program of source files;
parse trees, symbol tables, declarations and scopes;
cached type evaluation and diagnostics; and
incremental source updates.
scip-python contains a modified historical Pyright tree. Updating and enriching
that batch artifact creates a permanent lag. A custom exporter in a pinned
current Pyright service can reuse the same program and evaluator used by the
language service and avoid one references request per symbol.
Decision: pinned Pyright command/service
Add an upstreamable samchon/graphSnapshot command or narrow maintained fork:
load the same configuration/execution environments as Pyright;
wait for analysis completion and capture one program generation;
enumerate program source files and walk parse trees once;
resolve declarations, symbols, calls and types through the existing evaluator;
verify program/config/source generation before commit.
Use the resident language service for edit/no-op mode. A batch command may serve
CI, but it must use the same exporter and schema rather than generating SCIP
and reparsing it.
Pin the Pyright release and commit, record its Python language support and
typeshed revision, and reject an unknown internal API handshake.
Facts and dynamic limits
Export:
modules, classes, functions, methods, parameters, variables, properties,
type aliases and nested/local declarations;
imports/aliases, syntactic exports and __all__ only where statically
evaluable;
resolved function/method/constructor calls;
read/write accesses and type references;
direct base classes/protocol information and overrides where Pyright proves
them;
syntactic decorators with resolved decorator expression and decorated target;
diagnostics from the same program; and
framework tests through a named pytest/unittest enricher.
Python's dynamic surface is not a provider failure. Emit unresolved records for:
Any/Unknown call receivers;
getattr/setattr, __getattr__, __getattribute__;
monkey-patching and metaclass-synthesized members;
Publish both counts and denominators for call receivers typed concrete,
union/protocol, explicit Any, implicit Unknown, and unresolved. Do not merge Any and Unknown: one is an explicit escape, the other missing information.
Potential override/duck-typing candidates are not executed dispatches.
Only a statically closed exact target may emit that edge.
Identity and environment
Use distribution/module identity, qualified owner path, declaration kind and
canonical signature/type-parameter structure. Include:
execution environment/root and --project-namespace equivalent;
source module versus stub module and stub-to-implementation relation;
decorated function's source identity distinct from the runtime wrapper;
document/owner-scoped locals;
nested definitions and comprehensions; and
generation-scoped identity for dynamic/synthetic entities that cannot be
stable.
Python has no source-level overload definitions in the Java sense, but @overload declarations, implementation bodies and stub/source pairs require
one canonical callable with all declaration spans and signatures.
The universe includes Pyright config/pyproject, execution environment,
interpreter version/platform, import paths, venv, installed distributions,
typeshed/custom stubs, Python version, define constants, strictness settings and
all imported source/stub digests.
Incremental and performance behavior
no-op: reuse the resident Program generation and graph manifest;
body edit: Pyright invalidates affected files/types; export their shards;
public type/import/stub/config change: re-export the reported dependent
closure;
environment/package/typeshed change: select a new universe;
create/delete/rename: explicit shard update/removal; and
No call to find references per declaration is allowed. Cold overhead is
measured against the same Pyright analysis without graph export. Target no-op
p95 below 250 ms and ordinary body edit below 2 s on the pinned fixture.
Outcome
Replace the stale batch scip-python core with a pinned current Pyright semantic
exporter that shares one
Program/type-evaluator state, walks each source once,and publishes exact facts plus
Any/Unknowncoverage. Keep scip-python as anavigation compatibility fallback only.
Current master baseline
Current master registers scip-python with
semantic-indexauthority and onlyreferences. Its bundled Pyright core is historically pinned far behindcurrent Pyright, omits kinds/enclosing symbols/diagnostics, conflates
implementation relations, and cannot expose call-receiver typing coverage.
PR #147 measured Flask at 10.629 s through scip-python and 0.748 s
through the static fallback. The faster static cell does not have semantic
resolution. The strict cell is a useful cold navigation baseline; no resident
no-op/edit result exists.
Why Pyright is the semantic owner
Pyright is designed as a high-performance
type checker for large Python codebases. Its open-source service already owns:
Programof source files;scip-python contains a modified historical Pyright tree. Updating and enriching
that batch artifact creates a permanent lag. A custom exporter in a pinned
current Pyright service can reuse the same program and evaluator used by the
language service and avoid one
referencesrequest per symbol.Decision: pinned Pyright command/service
Add an upstreamable
samchon/graphSnapshotcommand or narrow maintained fork:Use the resident language service for edit/no-op mode. A batch command may serve
CI, but it must use the same exporter and schema rather than generating SCIP
and reparsing it.
Pin the Pyright release and commit, record its Python language support and
typeshed revision, and reject an unknown internal API handshake.
Facts and dynamic limits
Export:
type aliases and nested/local declarations;
__all__only where staticallyevaluable;
them;
Python's dynamic surface is not a provider failure. Emit unresolved records for:
Any/Unknowncall receivers;getattr/setattr,__getattr__,__getattribute__;importlib,__import__, dynamic__all__;eval/exec;*args/**kwargsforwarding;static proof.
Publish both counts and denominators for call receivers typed concrete,
union/protocol, explicit
Any, implicitUnknown, and unresolved. Do not mergeAnyandUnknown: one is an explicit escape, the other missing information.Potential override/duck-typing candidates are not executed
dispatches.Only a statically closed exact target may emit that edge.
Identity and environment
Use distribution/module identity, qualified owner path, declaration kind and
canonical signature/type-parameter structure. Include:
--project-namespaceequivalent;stable.
Python has no source-level overload definitions in the Java sense, but
@overloaddeclarations, implementation bodies and stub/source pairs requireone canonical callable with all declaration spans and signatures.
The universe includes Pyright config/pyproject, execution environment,
interpreter version/platform, import paths, venv, installed distributions,
typeshed/custom stubs, Python version, define constants, strictness settings and
all imported source/stub digests.
Incremental and performance behavior
Programgeneration and graph manifest;closure;
No call to
find referencesper declaration is allowed. Cold overhead ismeasured against the same Pyright analysis without graph export. Target no-op
p95 below 250 ms and ordinary body edit below 2 s on the pinned fixture.
Implementation map
fake-protocol tests.
Acceptance
packages, stubs/source, overloads, decorators, protocols, generics,
properties, async, comprehensions, dynamic imports, monkey-patching and
tests.
or SCIP markdown.
Any/Unknownreceiver coverage and every unresolved dynamic class aremachine-readable.
stub change, error, cancel, crash and retry are atomic.
measured separately.
pnpm build,pnpm test, andpnpm coveragepass.Primary references