ci(gate): make policy-budget see the file batten.toml declares as its input - #654
Conversation
CLOUD-899 `policy-budget`'s step glob names a directory that has never existed and omits the file `batten.toml` declares as its input
Why
Two defects in one three-entry list, pointing opposite ways. 1. The gate cannot see a file it budgets
The step glob does not name that path. So a commit that changes
This is the shape It is load-bearing now — PR #638 landed at CLOUD-864's acceptance §4 requires 2. A dead entry survived CLOUD-298 on the hk side
CLOUD-298 fixed the engine-side copy: The two halves are one edit and are filed together: splitting them would leave whichever landed second re-opening the same three-entry list. Refinement — Ready Refinement gate: Definition of Ready & Done. This body carries only specializations.
Acceptance
Filed from an audit of the Serena ticket set, 2026-08-22, while PR #638 was still a draft. Found by reading the gate wiring against Updated after #638 merged the same morning. The original closing line read "nothing is red today, which is the point." True of a prospective defect; the merge made the budgeted string real — nothing is red because nothing is looking. Kept visible rather than edited away, because the deferral this row could have absorbed ("it costs nothing yet") expired at Claimed under |
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
… input The step globbed AGENTS.md, .serena/memories/always/*.md and batten.toml. The first and third are inputs; the second has never existed, and the file it omitted is one that batten.toml declares as counted. [[budget.instructions.embedded]] counts .serena/project.yml's initial_prompt, so a commit changing that string is exactly what this gate exists to price -- and the step did not list it, so it never fired at the pre-commit tier. batten-check globs the path but is slow-profile and skipped at commit time, so coverage held under verify and ci only. That was invisible while the value was empty; CLOUD-864 put a line in it, and the budget became real while nothing re-ran the gate. .serena/memories/always/*.md is dropped. batten.toml states the directory has never existed, and CLOUD-298 removed the engine-side copy of the same dead entry; this one survived, matching nothing. Closes CLOUD-899.
f514bc0 to
28309e8
Compare
|
|
/fast-forward |



Closes CLOUD-899.
hk.pkl'spolicy-budgetstep globbedAGENTS.md,.serena/memories/always/*.mdand
batten.toml. The first and third are inputs. The second has never existed. Thefile it omitted is one
batten.tomldeclares as counted.The gate could not see the file it budgets
batten.toml:1147-1149declares.serena/project.yml'sinitial_promptan embeddedbudget entry, so a commit changing that string is exactly what this gate exists to
price — and the step did not list it.
batten-checkglobs the path (hk.pkl:857) butis
slow-profile and skipped at commit time, so coverage held underverifyandciwhile the pre-commit tier stayed blind.
That was invisible while the value was empty. CLOUD-864 put a line in it on
2026-08-22 at
07:16:51Z, and the budget became real while nothing re-ran the gate —so that issue's acceptance §4 was satisfied by a hand-run and held by nothing.
Same shape
hk.pkl:236-239already records for CLOUD-770: "a step that does not listit never fires on a memory-only commit."
The dead entry
.serena/memories/always/*.mdmatches nothing.batten.toml:1092-1097says thedirectory has never existed, and CLOUD-298 removed the engine-side copy of the same
dead entry —
[budget.instructions].filesis["AGENTS.md"]alone. This copysurvived, matching nothing and reading to the next author as evidence of an
always/convention.
Shown able to fail, both halves
The discriminating case for a glob change is whether the step is selected, which
inspection cannot answer. Measured with
hk check --step policy-budget -vover a.serena/project.yml-only diff:DEBUG policy-budget: no file matches for steppolicy-budget – 1 file – AGENTS.md .serena/project.yml batten.toml→✔And the gate itself, with five scratch lines added to
initial_prompt:Exit 2, naming the embedded entry. Reverted; green at 198/199.
Dropping the dead entry changes no verdict, which is its own assertion — a removal
that altered a result would mean it had been matching after all.
Two corrections to CLOUD-899's own body
1. Measured: exit2, which is correctper the exit contract for a policy verdict (CLOUD-292). The Ready text is what was
wrong.
BATTEN_CLAIM_CHECK_BYPASS.claim-checkrefused itcorrectly: CLOUD-431 asks whether the story was refined before the session
implementing it, and it was not — the same session filed it and pulled it. Recorded
on the row and in the receipt.
Provenance
Found by auditing the Serena ticket set against the tree rather than by a failure —
nothing was red, because nothing was looking.