Repository navigation
fix: a gourmand sidecar with no gourmand.toml stops the gate - #29
Merged
Merged
Conversation
gourmand resolves gourmand-exceptions.toml and its two siblings RELATIVE TO gourmand.toml. With no gourmand.toml the sidecar is found on disk, never parsed, and nothing is printed about it. The gate then goes red listing violations that were already justified, which looks exactly like a wrong justification -- so the natural response is to rewrite the justification, and then rewrite it again. That is an evening on this repository before the cause was spotted, and 26 repositories in the fleet carry an exceptions file. A 2, not a warning. This repository's own argument: a check that cannot do what it was configured to do must not report as though it did, and a warning scrolls past on a long run with the violation list printed underneath it. Verified in the image rather than argued. A tree with the sidecar and no config exits 2 with "found gourmand-exceptions.toml but no gourmand.toml beside it, so no entry in it would be loaded"; a tree with both runs gourmand and exits 0. The real fix belongs upstream in mattdm/gourmand and is tracked in crunchtools/gourmand#31. This is the part we control, and it covers every repo because sdlc is the only place in the fleet that invokes gourmand. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R7Y1jg2DfucoFv7VrzzwVR
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.
For Scott
What: the gate now says when an exceptions file is being silently ignored, instead of showing you violations you already justified.
Why it matters: the output was indistinguishable from a wrong justification, so the natural response was to rewrite the justification — repeatedly. It cost an evening on this repository, and 26 repositories carry an exceptions file.
Recommendation: merge. Size S.
Needs from you: nothing.
Where it fits
Closes #25. The real fix belongs upstream and is tracked in
crunchtools/gourmand#31; this is the part we control, andsdlcis the only place in the fleet that invokes gourmand, so one guard covers every repo.For the agent
Problem: gourmand resolves
gourmand-exceptions.toml,gourmand-patterns.tomlandgourmand-audit-ledger.tomlrelative togourmand.toml. With nogourmand.tomlthe sidecar is found on disk, never parsed, and nothing is printed.Files:
sdlc(t_gourmand, around line 908),tests/test_gourmand_sidecar.py,.github/workflows/container.yml(the unit-test list),CHANGELOG.md.Proposed fix: a preflight before
gourmand check --fullthat callscannot(...)— exit 2, "gate cannot run" — naming the sidecar it found and the config it wanted. Non-zero, not a warning: a warning scrolls past on a long run with the violation list underneath it.Done when: a tree with a sidecar and no config exits 2 naming both files; a tree with both is unchanged; a tree with neither is unchanged; and a test covers each. Verified in the image:
exit=2with the message, andexit=0with both files present.Out of scope: auto-loading a sidecar without a config, which would change which violations are suppressed in every repo at once. Changing gourmand itself.