fix(python): share import resolution with graph#255
Merged
Conversation
This was referenced Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #209
Contract
Rust graph-core is now the sole parser/resolver for repo-local Python import expectations.
@the-open-engine/opcore-graphexposes an injected, temporary-repository analyzer; validation consumes normalized directed edges and never parses Python import text.Base:
devat91955e3193ceecc72c0e1f46ce21af79d834e5edFinal commit:
b1d02384163258cf756195203f97f2ab9c485ed5Evidence
from pkg import submodule, star imports, relative imports, package initializers,.pyi, namespace packages, and src-layout imports.tests/graph-extraction-conformance.test.mjsbinds the fixture edge matrix to graph-core extraction.tests/graph-python-import-analysis.test.mjsproves canonical directed analyzer output, unavailable/malformed native failures, and temporary-repo cleanup.tests/validation-python.test.mjsproves canonical transitive source closure, an intentionally omittedIMPORTS_FROMedge yieldingPY_IMPORT_GRAPH_MISSING_EDGE, after-state overlay identity, deleted-file exclusion, missing/malformed analyzer failures, and target-worktree immutability.tests/python-import-composition.test.mjsproves injection through validation-policy, Opcore, and ASP.Verification
npm run build— passednpm run lint— passednpm run pack:check— passednode packages/opcore/dist/index.js check --changed --jsonwith isolated Pyright 1.1.411 — passedzeroshot cmdproof prove opcore-ciwith the documented cutover guardrail-reuse mode — passed, exit 0, 376955 ms, proofsha256:5f65cb778ea68cbc9d661b22f247985907e141ec0383746e430c299320511e1c, no workspace driftThe local installed
opcorepre-commit hook predates this branch's source behavior and fails inside its temporary path mapping; the source-built changed-file gate and full configured command proof above passed, so the verified commit was created without disabling or modifying the hook.