refactor(SM-20): wire SemanticModel as first-class resolution input#885
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@claude Act as a senior reviewer for GitNexus. Your job is to determine whether this PR is production-ready for this repo, not to give a generic code review. You are reviewing a PR in the GitNexus monorepo:
Your task has 2 phases, in this exact order: PHASE 1 — DEFINE THE BAR PHASE 2 — REVIEW THE PR AGAINST THAT BAR CONTEXT TO LOAD FIRST
Additional context:
PRIMARY OBJECTIVE Do not optimize for completeness at the expense of signal. REVIEW RULES
For each finding, assign one severity:
REPO-SPECIFIC REVIEW CHECKLIST 1. Correctness & functional completenessCheck:
2. Code clarity & clean codeCheck:
3. Test coverage & change safetyEvaluate against TESTING.md:
4. PerformanceInspect for:
5. Operational riskCheck:
6. MaintainabilityCheck:
NON-NEGOTIABLES TO VERIFY
OUTPUT FORMAT Production-ready bar for this PRGive a concise repo-specific definition in 5–10 bullets. FindingsFor each finding, use this structure exactly: [BLOCKING|NON-BLOCKING|NIT] Short title
Only include findings that are real and supported.
What I could not fully verifyList any behavior you could not prove from the diff, tests, or available context. Final verdictChoose exactly one:
If verdict is not ready, list the blocking items in priority order. IMPORTANT REVIEW BEHAVIOR
|
|
Claude finished @magyargergo's task in 3m 16s —— View job PR Review:
|
| Check | Status |
|---|---|
| No secrets/tokens committed | ✅ |
| No blind find-and-replace renames | ✅ (import paths, not symbol renames) |
Symbol renames via gitnexus_rename |
N/A — no symbols renamed |
| Upstream impact considered | ✅ — only import paths changed |
| No HIGH/CRITICAL impact unaddressed | ✅ — all changes are internal to ingestion |
| PR title: conventional-commit format | ✅ refactor(SM-20): ... |
| PolyForm license untouched | ✅ |
No // removed comments |
✅ |
What I could not fully verify
tsc --noEmitresult — cannot run the compiler in this context. The barrel re-exports are textually correct, but type-check is the authoritative gate. CIci-quality.ymlis the gate to trust here.vitest run test/unitresult — CI was blocked by a network firewall error (extension.ladybugdb.comdns block) on this PR. This appears to be an infrastructure constraint on the agent runner, not a code issue. The test results are not available to confirm.- MRO integration coverage for
gatherAncestors— the function is exercised via integration tests (Python MRO, C3 linearization paths) but I did not trace which specific test fixtures exercise multi-level BFS to confirm the head-pointer produces identical results.
Final verdict
✅ Ready to merge — no blocking issues.
This is a tight, correct, low-risk refactoring:
- The BFS fix is provably correct and a genuine O(n²) → O(n) improvement for deep hierarchies.
- Barrel export additions are purely additive and non-breaking.
- Import consolidation is mechanical with no behavioral change.
- Graph schema, node IDs, edge types, and all MCP contracts are untouched.
The one NON-BLOCKING finding (missing unit test for gatherAncestors) is worth tracking as follow-up but does not block merge.
Bumps gitnexus to v1.6.2 and adds the matching CHANGELOG entry. Highlights since v1.6.1 (61 commits): - Docker support (#848) - Language-agnostic heritage / call / variable extractors (config+factory pattern, #877 #878 #890) - AST-aware embedding chunking (#889) - jQuery / axios HTTP consumer detection (#887) - SemanticModel wired as first-class resolution input, SM-20 (#885) - ImportSemantics split into per-strategy hooks (#886) - Python dotted-import fix (#899); worker warnings non-terminal (#900 / #261); global-install ENOTEMPTY fixes (#843 #846); embeddings staleness fix (#831) See gitnexus/CHANGELOG.md for the full list. After merge, tag `v1.6.2` triggers publish.yml which runs CI, verifies tag↔package.json match, publishes to npm with provenance, and creates the GitHub Release using the extracted CHANGELOG body.
Bumps gitnexus to v1.6.2 and adds the matching CHANGELOG entry. Highlights since v1.6.1 (61 commits): - Docker support (#848) - Language-agnostic heritage / call / variable extractors (config+factory pattern, #877 #878 #890) - AST-aware embedding chunking (#889) - jQuery / axios HTTP consumer detection (#887) - SemanticModel wired as first-class resolution input, SM-20 (#885) - ImportSemantics split into per-strategy hooks (#886) - Python dotted-import fix (#899); worker warnings non-terminal (#900 / #261); global-install ENOTEMPTY fixes (#843 #846); embeddings staleness fix (#831) See gitnexus/CHANGELOG.md for the full list. After merge, tag `v1.6.2` triggers publish.yml which runs CI, verifies tag↔package.json match, publishes to npm with provenance, and creates the GitHub Release using the extracted CHANGELOG body.
…bhigyanpatwari#885) * Initial plan * refactor(SM-20): fix O(n²) BFS in gatherAncestors, complete barrel exports, consolidate imports Agent-Logs-Url: https://github.com/abhigyanpatwari/GitNexus/sessions/1246d49e-6c67-4c79-935a-4732394b9a7a --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Bumps gitnexus to v1.6.2 and adds the matching CHANGELOG entry. Highlights since v1.6.1 (61 commits): - Docker support (abhigyanpatwari#848) - Language-agnostic heritage / call / variable extractors (config+factory pattern, abhigyanpatwari#877 abhigyanpatwari#878 abhigyanpatwari#890) - AST-aware embedding chunking (abhigyanpatwari#889) - jQuery / axios HTTP consumer detection (abhigyanpatwari#887) - SemanticModel wired as first-class resolution input, SM-20 (abhigyanpatwari#885) - ImportSemantics split into per-strategy hooks (abhigyanpatwari#886) - Python dotted-import fix (abhigyanpatwari#899); worker warnings non-terminal (abhigyanpatwari#900 / abhigyanpatwari#261); global-install ENOTEMPTY fixes (abhigyanpatwari#843 abhigyanpatwari#846); embeddings staleness fix (abhigyanpatwari#831) See gitnexus/CHANGELOG.md for the full list. After merge, tag `v1.6.2` triggers publish.yml which runs CI, verifies tag↔package.json match, publishes to npm with provenance, and creates the GitHub Release using the extracted CHANGELOG body.

Completes Phase 6 of the fuzzy-lookup elimination roadmap. Prior phases extracted registries into
model/behind aSemanticModelinterface and migrated call sites toctx.model.*— this PR fixes remaining review findings and consolidates the module surface.O(n²) BFS fix in
gatherAncestorsresolve.tsstill usedqueue.shift()(O(n) per dequeue) while the adjacentbuildParentMapFromHeritagewas already fixed. Replaced with head-pointer:Complete
model/index.tsbarrel exportsAdded missing types that external consumers were importing by reaching past the barrel into individual subfiles:
SymbolDefinition,AddMetadata,HeritageMapCLASS_TYPES,CALL_TARGET_TYPES,FREE_CALLABLE_TYPESand their tuple/label-type companionsConsolidate external consumer imports
Migrated
call-processor.ts,type-env.ts,parsing-processor.ts,field-types.tsfrom direct./model/symbol-table.js/./model/heritage-map.js/./model/resolve.jsimports to the barrel (./model/index.js).Verified already-complete items (no changes needed)
ctx.model.types/methods/fields.*lookupMethodByOwnerWithMROalready takesmodel: SemanticModelmethodByOwnervia registration-tableWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
extension.ladybugdb.com/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/GitNexus/GitNexus/gitnexus/node_modules/.bin/vitest run test/unit --reporter=dot 14.1/deps/uv/include git modules/@npmcli/run-script/lib/node-gyp-bin/python3 get 14.1/deps/v8/inc-c st sh -c ')); git /.bin/sh _binding/src/scash credential.helpe-c on3 make(dns block)/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/GitNexus/GitNexus/gitnexus/node_modules/.bin/vitest run test/unit --reporter=dot ch-tree-sitter-swift.cjs && nodenode --64(dns block)/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/GitNexus/GitNexus/gitnexus/node_modules/.bin/vitest run test/unit/symbol-table.test.ts --reporter=verbose HEAD gs.cjs cal/bin/git ite(sys.executab/opt/hostedtoolcache/node/24.14.1/x64/bin/node build p/bin/as rks.js rev-�� HEAD 6c3960ccb62272a4--conditions k/_temp/ghcca-nodevelopment e_sitter_proto_bgit git xus/node_modules--is-inside-work-tree git(dns block)If you need me to access, download, or install something from one of these locations, you can either: