Skip to content

fix: a gourmand sidecar with no gourmand.toml stops the gate - #29

Merged
fatherlinux merged 1 commit into
mainfrom
fix/25-gourmand-sidecar-without-config
Nov 6, 2026
Merged

fatherlinux merged 1 commit into
mainfrom
fix/25-gourmand-sidecar-without-config

Conversation

@fatherlinux

Copy link
Copy Markdown
Member

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, and sdlc is 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.toml and gourmand-audit-ledger.toml relative to gourmand.toml. With no gourmand.toml the 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 --full that calls cannot(...) — 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=2 with the message, and exit=0 with 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.

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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gatehouse found no issues.

Full review.

1 finding(s) dropped: their evidence is not in the diff.

@fatherlinux
fatherlinux merged commit 0f69068 into main Nov 6, 2026
10 checks passed
@fatherlinux
fatherlinux deleted the fix/25-gourmand-sidecar-without-config branch November 6, 2026 15:39
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.

A gourmand exceptions file with no gourmand.toml is ignored, and the gate does not say so

1 participant