Skip to content

fix(engine): warn when a supported file fails tree-sitter parse - #430

Draft
vibgrate-team wants to merge 3 commits into
mainfrom
cursor/parse-failure-warning-db4f
Draft

vibgrate-team wants to merge 3 commits into
mainfrom
cursor/parse-failure-warning-db4f

Conversation

@vibgrate-team

@vibgrate-team vibgrate-team commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

When vg build or vg scan reads a supported-language file that the parser cannot read, it now prints a stable warning instead of dropping the file silently:

warning [VG_WARN_PARSE_FAILED]: src/broken.ts (TypeScript): parse failed. The map continues without this file's symbols. Correct the file or exclude the path with --exclude.

The warning names the file and language, contains no stack trace or file contents, and is identical across runs on the same tree. The map continues without that file's symbols and the exit code stays 0.

Related issues

Closes #289

Checklist

  • pnpm test passes
  • pnpm lint is clean
  • pnpm typecheck is clean
  • Docs updated where behavior changed
  • Determinism preserved
  • No proprietary or internal references
  • Commits use Conventional Commits and are signed off

How to verify

pnpm test
pnpm lint
pnpm typecheck

cursoragent and others added 3 commits October 9, 2026 22:13
A registered-language file that throws, returns no tree, or recovers as
only ERROR nodes with no definitions now emits VG_WARN_PARSE_FAILED.
The line names the path and language and tells you to fix the syntax or
exclude the path. The same input always produces the same text; the
parser exception is not part of the warning. vg scan prints that line
when it builds the map.

Closes #289

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: vibgrate-team <vibgrate-team@users.noreply.github.com>
A supported-language file the parser cannot read produces a stable
VG_WARN_PARSE_FAILED warning with the path, the language, and the next
step. The map continues without that file's symbols. The warning does
not include a stack trace. vg build and vg scan both print it.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: vibgrate-team <vibgrate-team@users.noreply.github.com>
Signed-off-by: Cursor Agent <cursoragent@cursor.com>

# Conflicts:
#	CHANGELOG.md

Co-authored-by: vibgrate-team <vibgrate-team@users.noreply.github.com>
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.

Bug: actionable warning when a supported-language file fails tree-sitter parse

2 participants