fix(parser): expose parser coverage for unsupported file extensions (#1076)#1428
fix(parser): expose parser coverage for unsupported file extensions (#1076)#1428ZakAnun wants to merge 23 commits into
Conversation
- Register --json; print stats (incl. parserCoverage) as JSON on success - Unit test: mixed .ts + unsupported extensions assert parserCoverage counts Co-authored-by: Cursor <cursoragent@cursor.com>
|
@ZakAnun is attempting to deploy a commit to the NexusCore Team on Vercel. A member of the Team first needs to authorize it. |
CI Report✅ All checks passed Pipeline Status
Test Results
✅ All 11305 tests passed 16 test(s) skipped — expand for details
Code CoverageTests
📋 View full run · Generated by CI |
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com> # Conflicts: # gitnexus/src/core/ingestion/pipeline-phases/parse-impl.ts # gitnexus/src/core/ingestion/pipeline-phases/parse.ts
|
The coverage type in this PR is doing more work than it looks like.
If you take that step, the cluster of open language requests collapses into one architectural change:
All of them become community plugins instead of maintainer-bundled grammars. Bandwidth bottleneck disappears. The MCP context surface already exposes the right field for agents to discover what's installed. Either way — thanks for picking this up. The coverage signal alone unblocks the agent use case that surfaced #1076. |
Co-authored-by: Cursor <cursoragent@cursor.com>
✨ PR AutofixFound fixable formatting / unused-import issues across 92 changed lines. Comment |
|
/autofix |
|
✅ Applied autofix and pushed a commit. (apply run) |
Summary
Fix #1076
Surfaces parser coverage for files with extensions that have no bundled grammar (e.g.
.sh): warn during parse, show counts inanalyzeoutput, persiststats.parserCoveragein.gitnexus/meta.json, and exposeparser_coverage/unsupported_filesin MCP resources. Addsgitnexus analyze --json(stdout JSON includesparserCoverage) and a unit test forparserCoverageinparse-impl-fallback.test.ts.Motivation / context
Fixes the “silent partial graph” problem described in #1076: bash (and similar) files were visible as files but produced no symbols, so agents and humans had no signal that a large part of the repo was not symbolically indexed.
Areas touched
gitnexus/(CLI / core / MCP server)gitnexus-web/(Vite / React UI).github/(workflows, actions)eval/or other toolingAGENTS.md,CLAUDE.md,.cursor/,llms.txt, etc.)Scope & constraints
In scope
parserCoverage(totals + unsupported-by-extension breakdown).--jsonsuccess output includingparserCoverage.meta.jsonstats.parserCoverage.contextYAML blockparser_coverage:whenunsupported > 0;reposunsupported_fileswhen present.parserCoveragefromrunChunkedParseAndResolve.Explicitly out of scope / not done here
parser_status(or similar) on everyFilegraph node (optional alternative in Bash files indexed as File nodes but produce zero symbols, leading to misleading partial graph coverage #1076).Implementation notes
getLanguageFromFilename→ null (unknown extension in supported-language map), matching the Bash files indexed as File nodes but produce zero symbols, leading to misleading partial graph coverage #1076.sh-style gap.--jsonprints{ repoPath, totalTime, ...stats }on success; default output remains human-readable.Testing & verification
cd gitnexus && npm testcd gitnexus && npm run test:integration(if core/indexing/MCP paths changed)(core parse / pipeline / MCP resources / CLI paths changed; run if your policy requires it — local full suite was
npm testonly; add integration run if needed.)cd gitnexus && npx tsc --noEmitcd gitnexus-web && npm test(sanity — nogitnexus-web/code changes in this PR)cd gitnexus-web && npx tsc -b --noEmit(sanity — no web code changes)gitnexus-web/e2e/) — N/A (no web UI changes)Commands run (example)
Risk & rollout
Risk: Low — additive stats/logging and optional resource fields; supported-language parse path unchanged.
Rollout: No migration. Users may run npx gitnexus analyze to refresh indexes; older clients should tolerate unknown meta.json fields.
Checklist
AGENTS.md/ overlays changed: headers, scope block, and changelog updated per project conventions