Skip to content

fix(parser): expose parser coverage for unsupported file extensions (#1076)#1428

Open
ZakAnun wants to merge 23 commits into
abhigyanpatwari:mainfrom
ZakAnun:fix/1076-parser-coverage
Open

fix(parser): expose parser coverage for unsupported file extensions (#1076)#1428
ZakAnun wants to merge 23 commits into
abhigyanpatwari:mainfrom
ZakAnun:fix/1076-parser-coverage

Conversation

@ZakAnun

@ZakAnun ZakAnun commented May 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix #1076
Surfaces parser coverage for files with extensions that have no bundled grammar (e.g. .sh): warn during parse, show counts in analyze output, persist stats.parserCoverage in .gitnexus/meta.json, and expose parser_coverage / unsupported_files in MCP resources. Adds gitnexus analyze --json (stdout JSON includes parserCoverage) and a unit test for parserCoverage in parse-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 tooling
  • Docs / agent config only (AGENTS.md, CLAUDE.md, .cursor/, llms.txt, etc.)

Scope & constraints

In scope

  • Parse-time stats: parserCoverage (totals + unsupported-by-extension breakdown).
  • CLI: end-of-run summary line; --json success output including parserCoverage.
  • On-disk: meta.json stats.parserCoverage.
  • MCP: context YAML block parser_coverage: when unsupported > 0; repos unsupported_files when present.
  • Unit test guarding parserCoverage from runChunkedParseAndResolve.

Explicitly out of scope / not done here

Implementation notes

Testing & verification

  • cd gitnexus && npm test
  • cd 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 test only; add integration run if needed.)
  • cd gitnexus && npx tsc --noEmit
  • cd gitnexus-web && npm test (sanity — no gitnexus-web/ code changes in this PR)
  • cd gitnexus-web && npx tsc -b --noEmit (sanity — no web code changes)
  • Manual / Playwright E2E (note environment — see gitnexus-web/e2e/)N/A (no web UI changes)

Commands run (example)

cd gitnexus && npx tsc --noEmit && npm test
cd ../gitnexus-web && npx tsc -b --noEmit && npm test

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

  • PR body meets repo minimum length (workflow may label short descriptions)
  • If AGENTS.md / overlays changed: headers, scope block, and changelog updated per project conventions
  • No secrets, tokens, or machine-specific paths committed

ZakAnun and others added 3 commits May 7, 2026 21:13
- 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>
@vercel

vercel Bot commented May 8, 2026

Copy link
Copy Markdown

@ZakAnun is attempting to deploy a commit to the NexusCore Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

github-actions Bot commented May 8, 2026

Copy link
Copy Markdown
Contributor

CI Report

All checks passed

Pipeline Status

Stage Status Details
✅ Typecheck success tsc --noEmit
✅ Tests success unit tests, 3 platforms
✅ E2E success gitnexus-web changes only

Test Results

Tests Passed Failed Skipped Duration
11321 11305 0 16 583s

✅ All 11305 tests passed

16 test(s) skipped — expand for details
  • COBOL pipeline benchmark > scales with file count
  • C++ ADL emit benchmark > emit phase scales sub-quadratically with co-scaled files and sites
  • C++ pipeline benchmark > scales with file count
  • C# pipeline benchmark > scales with file count — namespaces spread across the solution
  • C# pipeline benchmark > scales with file count — all types in one (global) namespace bucket
  • C# pipeline benchmark > scales with file count — all types in one (named) namespace bucket
  • Go pipeline benchmark > scales with file count (workers enabled)
  • Go pipeline benchmark — worker pool (issue Worker idle timeout kills long Go scope extraction and surfaces as Napi::Error during analyze #1848) > does not quarantine the large generated Go file on sub-batch idle timeout
  • Go structural interface detection benchmark > scales linearly with interface × struct count
  • Go structural interface detection split-phase benchmark > separates index-build and detection time
  • PHP pipeline benchmark > scales with file count (workers enabled)
  • Ruby pipeline benchmark > scales with file count (workers enabled)
  • Rust pipeline benchmark > scales with file count (workers enabled)
  • Vue pipeline benchmark > scales with component count
  • run.cjs direct-exec entrypoint (fix(cli): steer docs, skills, and hooks through a CLI-neutral project-local runner (#1939) #1945) > resolves a .cmd shim via the Windows shell branch, passing args and exit code
  • buildTypeEnv > known limitations (documented skip tests) > Ruby block parameter: users.each { |user| } — closure param inference, different feature

Code Coverage

Tests

Metric Coverage Covered Base Delta Status
Statements 75.76% 37336/49280 N/A% 🟢 ███████████████░░░░░
Branches 63.6% 23134/36373 N/A% 🟢 ████████████░░░░░░░░
Functions 81.44% 4025/4942 N/A% 🟢 ████████████████░░░░
Lines 79.47% 33711/42419 N/A% 🟢 ███████████████░░░░░

📋 View full run · Generated by CI

@cogpros

cogpros commented May 18, 2026

Copy link
Copy Markdown

The coverage type in this PR is doing more work than it looks like.

parserCoverage.unsupportedByExtension is shaped like a registry. Each entry is "extension X, count N, no parser." That's the same lookup table a third party would need to register a parser for .sh or .dart or .sol without forking — registration says "I handle this extension," parse phase consults the same map and routes there instead of bumping the counter.

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>
@github-actions

Copy link
Copy Markdown
Contributor

✨ PR Autofix

Found fixable formatting / unused-import issues across 92 changed lines. Comment /autofix on this PR to apply them, or run npm run lint:fix && npm run format locally.

{"schema":"gitnexus.pr-autofix/v2","state":"fixes-available","pr_number":1428,"changed_lines":92,"head_sha":"3ae6c7a31e708a7039e54eff02250a88386999b1","run_id":"26717894723","apply_command":"/autofix"}

@ZakAnun

ZakAnun commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

/autofix

@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

✅ Applied autofix and pushed a commit. (apply run)

@ZakAnun ZakAnun requested a review from magyargergo as a code owner June 10, 2026 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bash files indexed as File nodes but produce zero symbols, leading to misleading partial graph coverage

3 participants