Repository navigation
Token quick wins: no futile fix-ci re-runs, a wider critic skip, one-line config comments - #320
Conversation
12 of 25 fix-ci sessions from 2026-11-22 to 25 stood down, pushing nothing, mostly on a contract check waiting on an open producer PR. A merge of main then gave the branch a new head with the same check red, which cleared the refusal and fired fix-ci again to reach the same verdict. A repair pass now records the red check names it was fired on, and its unlock the head it ended on. While the last pass stood down, a new head with the same red checks keeps the hand-back. A person's push or a different red set asks again. Co-Authored-By: Claude Opus 5.5 <[email protected]>
review.skipWhen goes from 2 files / 40 lines to 3 / 100. Of the 45 PRs the critic read from 2026-11-22 to 25, two fall under it. 4 / 120 would have caught five, but it would also tier a four-file, 91-line migration (SahajCloud#1216, the review-scope fixture) as tiny and skip its critic. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Every dispatch reads loop-config.json first. Its $comment fields were 8.9 KB of 17.6 KB, mostly rules and history already stated in a skill or why.md. Each is now one line naming what its values mean. The originals move verbatim to docs/loop-config.md, which no run reads. This saves about 6 KB (~1.5k tokens) per run, and the config stays valid JSON with every value unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
Every figure in the body checks out: only review.skipWhen moves among the values, and all 27 comments reached the new page verbatim. The dispatcher rule is the right shape — a stand-down derived from the record already kept, and an entry from before the change carries no end head, so nothing old reads as one. Two things I would change. The match is not guarded against an empty red set, so on the merge-queue path a PR is handed back claiming checks are red when none are. And the 6 KB cut is right while its destination is not: a page mirroring the config key by key is the fourth home docs/documentation.md forbids.
Findings
should-fix— the stand-down match fires on the merge-queue path, where nothing is red →decide.mjs:298should-fix— Streamline: deletedocs/loop-config.md, a fourth home →docs/loop-config.md:1should-fix— Streamline:why.md:1222keeps a stale copy of this threshold →why.md:379should-fix— Streamline: two sentences restatefinalize-prandimprove-looprules →why.md:1234consider— the file is 19,599 bytes, not 17.6 KB →why.md:2158
What was checked
- Read whole:
repairPlanand the CI branch ofdecide.mjs,gather.mjs'sheadAuthorblock, the threerec.dispatchesappend sites inapply.mjs,predicates.mjs,review-scope.test.mjs,documentation.md, the new page. - Both gate suites pass from a
git archiveextract, never a checkout: 446 dispatcher, 184 lib. - Measured: comments 8,903 B, file 19,599 → 13,622 B, saving 5,977 B.
review-scope.test.mjspins SahajCloud#1216 at 4 files, 91 lines,FULLfrom the real threshold, so 3/100 over 4/120 holds.- Ladder: the one new piece,
stoodDownFixCi, is kept: two callers in two modules. No dependency added. Streamliner: 1 covered, 1 kept, 3 prose findings, each checked and posted.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
A merge-queue failure leaves `s.ci.failing` empty, so a `fix-ci` fired on that path recorded `failing: []`. A later queue failure then matched the stored empty set against its own, `'' === ''`, and the PR was handed back claiming "the same checks are still red" with nothing red at all. The note it wrote left a blank where the names go: "with red". `gather` fetches `headAuthor` only when `failingNames.size`, so on that path it stays null and `!isHuman(null)` holds. A person's push could never ask again: the hand-back was permanent. Two empty sets are not the same checks. The match now needs names. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjXVzHFGn5WDVDZ5GpK
The token win is the shortened `$comment`s. The page was not part of it: it mirrored the file key by key, which `docs/documentation.md` forbids — one home per fact, every other mention a link. Six of its sections both explained a thing and cited the `why.md` anchor that already owned it. Each fact the shortened comments drop already has its home beside its reader: `restLogin`'s reasoning in `predicates.mjs:44-51`, the roadmap notes `v1` fold in `implement-roadmap/SKILL.md:24`, `reconcileMaxPerEvent` in `resolve.mjs:64` and `why.md:2420`. Sentry's DE host and its missing `org:read` stay in the one-line comment, beside the values they bite. `AGENTS.md` and the two `$comment`s that pointed at the page go with it. Every value except `review.skipWhen` is still byte-identical to `main`'s, checked by diffing the parsed JSON. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjXVzHFGn5WDVDZ5GpK
Both sections retyped the threshold. §A tiny diff gets one read had to be retyped by this PR to stay true, and §The critic skips small PRs was left stale at "a two-file, twenty-line PR" — already wrong at 2/40, and wrong twice over at 3/100. `documentation.md` says name a constant, never its value. Naming the key leaves nothing for the next tuning edit to miss. No test asserts either figure out of the prose, so the Never-delete exception does not apply. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjXVzHFGn5WDVDZ5GpK
The `review.selfReview.tinyLevel` sentence restated `finalize-pr/SKILL.md:103`, and the `improve-loop` sentence its own table row at line 98. Both are rules, and each skill is their home. What a reader cannot re-derive stays: the motive, the 45-PR count, and the rejected four-file, 120-line alternative with the fixture that killed it. `documentation.md` never deletes a rejected alternative. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjXVzHFGn5WDVDZ5GpK
`loop-config.json` on `main` is 19,599 bytes, not 17.6 KB. The comments are 8,903 bytes and the cut saves 5,977, both measured again here. The exact figures replace the rounded ones, since rounding is what let the wrong one through. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjXVzHFGn5WDVDZ5GpK
|
All five findings adopted, one commit each. Nothing rebutted, nothing asked.
Lean gate green, 447 dispatcher tests, security review clean. The body is refreshed: the 17.6 KB figure and the claim that the comments moved to a page were both false after this round. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
There was a problem hiding this comment.
Approved for Ardnived, who wrote it: GitHub refuses an author's own approval. CI is green and the automated review has run. Enable auto-merge when you want it merged: the queue tests it against its base. 🤖 Written by the sydevs autonomous loop — see what this is
Three conflicts, all from #320 landing on main: - dispatcher/gather.mjs: #320 widened the head-commit read to a stood-down repair; this branch folded that read into `commitFacts`. Kept both — the helper, called under the widened condition. - dispatcher/test/decide.test.mjs: both sides appended a suite at the end of the file. Kept both suites. - loop-config.json: #320 cut the dispatch `$comment` to one line, which is what it set out to do, and the three-homes rule wants. Took main's line; `conflictQuietMinutes` keeps its story in docs/why.md. dispatcher/test: 453 pass. Lean gate green. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjZ2VcTtaLzy8VMJ15p
Summary
Three quick wins against the Routines account's usage limit, and the review round's five fixes. Each is in its own commit and can be reverted on its own.
fix(dispatcher): a fix-ci that stood down is not fired again by a merge. A repair pass records the names of the red checks it was fired on, and its unlock records the head it ended on. If the last pass pushed nothing, a new head with the same red checks keeps the hand-back. A push from a person, or a different set of red checks, fires it again.chore(config):review.skipWhen2 files / 40 lines → 3 / 100.chore(config): one-line$comments. Each comment is now one line naming what its values mean. The long text is cut, not rehoused: every fact in it already had a home in a skill, indocs/why.md, or in a code comment beside its reader. Every value exceptskipWhenis unchanged; I checked by diffing the parsed JSON.The failures these prevent
fix-cisessions stood down without pushing. Most were on a contract check waiting for an open producer PR. Each merge of main into the branch gave it a new head, which cleared the refusal, sofix-ciran again and reached the same verdict. WeMeditateWeb#321 was fired twice this way.review-scopetest fixture that must stayFULL, as tiny and skipped its critic. I stopped at 3 / 100. A small diff still gets the self-review atreview.selfReview.tinyLevel.loop-config.jsonfirst, 25 to 40 times a day, and 8,903 of its 19,599 bytes were comments. The cut saves 5,977 bytes, roughly 1,500 tokens, on every run.ci.failingis empty, so a pass fired there stored[], and a later queue failure matched'' === ''. The PR was handed back claiming "the same checks are still red" with nothing red, and the note left a blank where the names go.gatherfetchesheadAuthoronly whenfailingNames.size, so on that path it stays null and!isHuman(null)holds — a person's push could never ask again, and the hand-back was permanent.Why one PR
The owner asked for one PR. The hard split in
AGENTS.md(never a skill change and a ceiling change together) holds, because no skill file changes here. The two behaviour changes move different handlers,fix-ciandreview-pr, and the journal tallies each handler separately, so their effects stay attributable.Risks
dispatch$comment. Whichever merges second needs a one-line rebase.Not included
The nightly audit being woken by the subscription GitHub adds when it opens a PR is platform behaviour.
finish-runalready unsubscribes, and the woken session writes nothing and stops. No repo change prevents the wake.Tests
node --test dispatcher/test/*.test.mjs: 447 pass. New cases: same checks on a new head are held, a person's push fires, a different red set fires, a pass that pushed is not a stand-down, an entry from before this change is not a stand-down, and a pass fired where nothing was red does not match a later empty red set.claude plugin validate ./workflow --strict, then 184workflow/libtests.review-scopetests pass with the new threshold.rule-delta.mjs --base origin/main workflow/skills: 94 → 94 directives, none removed.Notes for reviewer
Four of the five review findings were prose, and all four are adopted rather than rebutted, so
docs/loop-config.mdis gone anddocs/why.mdnow namesreview.skipWheninstead of copying its counts. The page's deletion is the one judgement call worth a second look: I checked that each fact its long comments carried still has a home —restLogin's reasoning inpredicates.mjs:44-51, the roadmap notesv1fold inimplement-roadmap/SKILL.md:24,reconcileMaxPerEventinresolve.mjs:64andwhy.md:2420— and Sentry's DE host and missingorg:readstay in the one-line comment beside the values they bite.🤖 Generated with Claude Code
https://claude.ai/code/session_01Mg9rjXVzHFGn5WDVDZ5GpK