mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-09-16 23:43:12 +00:00
Promote contract knowledge that was implicit in code into the canonical docs
so future migrations and the next reviewer don't have to reverse-engineer it.
contract/scope-resolver.ts:
* Migration cookbook lists every optional hook (was: only the two
booleans), with one-line guidance per hook including when to enable
`hoistTypeBindingsToModule`.
* Contract Invariants I1-I7 are now spelled out in full (was: only
I1/I3/I5 summarized with a pointer to a plan file). Added new I8
"post-finalize hooks may mutate Scope.typeBindings and indexes.bindings;
consumers must not freeze or snapshot before all post-finalize hooks
have run".
* New "Semantic-model source of truth" section: ParsedFile is the
single semantic model; passes that need AST-level facts must reuse
the orchestrator's treeCache rather than re-parse.
* New "Same-graph guarantee" section: legacy DAG and scope-resolution
emit indistinguishable edges (node identity, edge vocabulary,
confidence). CI parity workflow enforces this.
gitnexus-shared/src/scope-resolution/parsed-file.ts:
* Added "Source-of-truth invariant" pointer paragraph.
ARCHITECTURE.md (Coexistence section):
* Updated migrated-language list (Python + C#).
* Added "Same-graph guarantee" subsection.
* Added "Semantic-model source of truth" subsection.
* Filled in the ScopeResolver hook table with the five optional hooks
that landed in this branch (unwrapCollectionAccessor,
collapseMemberCallsByCallerTarget, populateNamespaceSiblings,
hoistTypeBindingsToModule, fieldFallbackOnMethodLookup).
* Added C# rows to the code-references table.
Verified:
- npx tsc --noEmit clean
- C# + Python integration 393/393 passing
|
||
|---|---|---|
| .. | ||
| src | ||
| package-lock.json | ||
| package.json | ||
| tsconfig.json | ||