fix: stop on a broken project config instead of ignoring it - #329
Closed
vibgrate-team wants to merge 2 commits into
Closed
vibgrate-team wants to merge 2 commits into
vibgrate-team wants to merge 2 commits into
Conversation
A malformed .vibgrate/config.yml or JSON config now makes vg scan, vg build, and vg review exit non-zero. The message names the file and, when the parser can tell, the line and the key, without printing the broken line. An exclude value that is not a list of strings is rejected. Empty files and .ts/.js configs are unchanged, and vg doctor reports the same message without exiting. Fixes #316 Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: vibgrate-team <vibgrate-team@users.noreply.github.com>
The base-branch fixture was answering every git show with review.toml text, including .vibgrate/config.yml. That file is now a hard error when it does not parse, so the fixture returns the policy only for review.toml. Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: vibgrate-team <vibgrate-team@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A malformed
.vibgrate/config.ymlorvibgrate.config.jsonused to crash with a parser dump or continue as if the file were empty.vg scan,vg build, andvg reviewnow stop with a non-zero exit. The message names the file and, when the parser can tell, the line and the key to fix. The broken line is not printed, so a token-like value on that line is not echoed.An
excludevalue that is not a list of strings is rejected instead of being treated as "exclude nothing." An empty file is still an empty config..tsand.jsconfigs are unchanged.vg doctorprints the same message and does not exit because of it.Fixes #316
Related issues
Fixes #316
Checklist
pnpm testpassespnpm lintis cleanpnpm typecheckis cleangraph.json/ report output (content-hashed IDs, stable sorts; no time, randomness, or filesystem-order dependence)git commit -s, DCO)Notes for reviewers
The error text is shared with
vg doctor, which still only reports it. Parse failures no longer include the parser's source excerpt.