Skip to content

chore(loop): a review body has no budget kind, so reviews cut their own evidence to fit #145

Description

@sydevs-bot

Third week reported, 8 sessions across four days in the week to 2026-10-03. Named in #118's and #132's reflection bodies and carried both times, because CLAUDE.md forbids a ceiling change riding a skill PR and every reflection PR is a skill PR. Filing it is the only way it stops being carried.

Summary

writing.budgets has no kind for a submitted review body, so adversarial-review measures its body as comment (1200) while prescribing three required sections plus ranked findings. Sessions have dropped a finding and shipped a review with no attribution to fit. The fix is one new kind, its fallback constant, and the one skill line that binds it — the number is yours.

The gap

writing.budgets has three kinds: comment 1200, reviewReply 600, journalEntry 1500. A submitted review body is none of them, so adversarial-review measures it as comment — while prescribing a body that carries a holistic assessment, ranked findings and a What-was-checked section, plus identity.commentMarker and the harness's own footer.

What it costs, with the calls

Session What the budget did
sydevs/SahajAtlasWeb#237 "Landed at 1200/1200 only after cutting evidence from What-was-checked" — budget.mjs --kind comment
sydevs/SahajCloud#874 Eight budget.mjs runs on a 148-file PR, and "the PR-size note was dropped to fit, not because it was wrong"
sydevs/SahajAtlasWeb#233 The review shipped with no identity.commentMarker — the body measured 1197 of 1200 and the marker is 124 characters. adversarial-review asks for the marker on inline comments; handler-preflight asks for it on every comment
sydevs/SahajCloud#861 Nine trim passes for three required sections plus five findings
sydevs/SahajAtlasWordpress#58 Seven trim rounds
sydevs/SahajAtlasWordpress#53 Five, and "writing.budgets has no kind for a review body or a thread-starting comment"

reviewReply's 600 has the same shape at smaller scale: 182 of it goes to the marker and the footer, so four technical replies on SahajCloud#861 were each cut to about 420 characters, and SahajAtlasWeb#248's fitted at 587/600 only by dropping the footer.

The budget is doing its job and the number is wrong. Trimming prose is what it is for. Dropping a finding, and shipping a review with its attribution missing, are not.

Approach

Phase 1 — the value

  • loop-config.json:287 writing.budgets — add reviewBody.
  • workflow/lib/budget.mjs:38-42 DEFAULT_BUDGETS — add the identical number. The file's own comment at budget.mjs:30-37 requires the fallback to equal the config, and the CLI names which path it took.
  • No other code change. check() looks the limit up by key at budget.mjs:51, so --kind reviewBody resolves from config the moment the key exists. This ticket's "budget.mjs must know the kind" holds only for that fallback constant.
  • Not fit(). It cuts list items from the end of 📄 Did (budget.mjs:71, budget.mjs:114) and is journal-only. A review body is checked, never fitted.

Measured in this run, so the number is set against prose rather than boilerplate:

Piece Characters
identity.commentMarker 124 — not the 118 this ticket first claimed
Harness attribution footer 58
review.bodyHeader 24
Before one word of review 206

Observed prose: 1318–1913, from SahajCloud#861's four rounds. 1913 + 206 = 2119.

Recommendation: reviewBody: 2000. It clears the 1318–1659 band with room (1659 + 206 = 1865) and still binds at the 1913 outlier, so the budget keeps doing the job docs/why.md#budgets-not-adjectives gives it. A budget that never binds is not one.

Phase 2 — the rule that binds it

  • workflow/skills/handler-preflight/SKILL.md:92-94 enumerates the kinds. A run uses reviewBody only because a skill names it.
  • workflow/skills/adversarial-review/SKILL.md:79-90 is where the body is written, and is the alternative home for the line.

The order is load-bearing. Until a skill names it, the kind is inert: --kind reviewBody returns UNBUDGETED and exits 0 (budget.mjs:194). So Phase 1 alone changes no run's output, and Phase 2 alone would leave the review body effectively unmeasured. Land Phase 1 first. Revert Phase 2 first.

Phase 3 — reviewReply, only with evidence

Out of scope unless the Open question below is answered. reflect/SKILL.md:197 forbids raising a threshold without evidence it was the binding constraint, and the cited replies live in repos this run cannot read.

Acceptance criteria

  • loop-config.json writing.budgets.reviewBody exists and is an integer.
  • DEFAULT_BUDGETS in workflow/lib/budget.mjs carries the identical number.
  • node workflow/lib/budget.mjs --kind reviewBody reports OK or OVER against that number, names (config), and never reports UNBUDGETED.
  • writing.budgets.comment is still 1200.
  • One commit per phase, each named in the PR body, with Phase 1's commit first.
  • node --test workflow/lib/budget.test.mjs passes.
  • claude plugin validate ./workflow --strict reports no finding the base branch does not already report.

Verification checklist

  • printf 'x' | node workflow/lib/budget.mjs --kind reviewBody → exit 0, prints OK — 1/<N> (config)
  • node -e 'process.stdout.write("x".repeat(<N>+1))' | node workflow/lib/budget.mjs --kind reviewBody → exit 1, verdict OVER
  • The fallback matches the config:
    node --input-type=module -e 'import {DEFAULT_BUDGETS} from "./workflow/lib/budget.mjs"; import {readFileSync} from "node:fs"; const c=JSON.parse(readFileSync("loop-config.json","utf8")).writing.budgets; const bad=Object.keys({...c,...DEFAULT_BUDGETS}).filter(k=>c[k]!==DEFAULT_BUDGETS[k]); if(bad.length){console.error("drift:",bad);process.exit(1)} console.log("fallback matches config")'
  • node --test workflow/lib/budget.test.mjs → 6 of 6 pass, or more
  • claude plugin validate ./workflow --strict → compare its output against the same command on main

Downstream impact

Reviews in all five repos change on the first run after Phase 2 merges. No consumer repo file changes, so contractSync is not involved.

Open questions

  • Does the hard split apply here? CLAUDE.md and reflect/SKILL.md:196 forbid a skill change and a ceiling change in one PR, which would put the number and the line that binds it weeks apart. The split's reason is attribution, and neither phase moves a run's output alone — so two commits on one PR, Phase 1 first, each named in the body, may satisfy it. Your call, and the PR body must state which reading it took.
  • The number. 2000 above is a recommendation, not a decision.
  • Does a loop comment carry the harness attribution footer? The 182 this ticket quotes for reviewReply is exactly commentMarker (124) plus that footer (58). No comment on this repo's own issues carries it — this ticket's body and the dispatcher's status comment both end at the marker. If the footer does not belong on a review body, 58 characters come back and the number drops.
  • Does the marker belong on a review body at all? adversarial-review/SKILL.md:76 asks for it on every inline comment. handler-preflight/SKILL.md:107 asks for it on every comment. A submitted review body is explicitly neither. Settling this is worth 124 characters, and it is the same question SahajAtlasWeb#233 lost its attribution to.

Notes

  • Refused explicitly: raising comment to buy room for one body. It would loosen every ticket and PR comment the loop writes.
  • Named, not filed (revise-ticket allows one incidental ticket and names the rest): budget.mjs's CLI exits 0 on UNBUDGETED (budget.mjs:194), so a typo'd or unnamed kind passes silently. That is the mechanism that kept this gap invisible for three weeks, and it will hide the next one. fit()'s UNBUDGETED is deliberate and tested (budget.test.mjs:74); the CLI's exit code is the gap.
  • Verified in this run: the three character counts, that check() resolves any config key, that fit() is journal-only, and all five checklist commands. claude plugin validate ./workflow --strict already fails on main on three unquoted-${CLAUDE_PLUGIN_ROOT} hook warnings, which is why the criterion above is worded against the base branch.
  • Not verified: the six cited PRs. They live in repos outside this run's scope, so their measurements stand as the filing session's own.

🤖 Written by the sydevs autonomous loop — see what this is

Activity

  1. added
    proposal
    on Oct 4, 2026
  2. added
    bot:working
    and removed on Oct 4, 2026
  3. sydevs-bot commented on Oct 4, 2026

    @sydevs-bot
    ContributorAuthor

    🤖 no session running

    recent dispatches
    • 23:29Z implement · attempt 1 · session · done
    • 23:29Z implement · attempt 1 · session
    • 08:28Z revise · attempt 1 · session · done
    • 08:28Z revise · attempt 1 · session

    Written by the sydevs dispatcher. Sessions never edit this comment.

  4. added theissue type on Oct 4, 2026
  5. sydevs-bot commented on Oct 4, 2026

    @sydevs-bot
    ContributorAuthor

    Revised from the code. The gap is real and the fix is smaller than filed.

    Corrected. budget.mjs needs no kind-handling: check() reads any key from writing.budgets (budget.mjs:51), so the only code edit is keeping DEFAULT_BUDGETS equal to the config. The marker is 124 characters, not 118. fit() is journal-only, so a review body is checked, never fitted.

    Added. Overhead measured at 206 characters before a word of review, so reviewBody: 2000 is the recommendation — it clears the observed band and still binds at 1913. The phase order is load-bearing: an unnamed kind exits 0 (budget.mjs:194), so the skill line lands after the number and reverts first.

    Yours. The number, whether the hard split allows two commits on one PR, and whether a review body carries the marker and the harness footer at all. That last one is 182 characters of the answer.

    Priority Medium, Effort Easy, type Task. @sydevs-bot implement starts the work.

    🤖 Written by the sydevs autonomous loop — see what this is


    Generated by Claude Code

  6. added and removed
    bot:working
    on Oct 4, 2026
  7. Ardnived commented on Oct 5, 2026

    @Ardnived
    Contributor

    @sydevs-bot implement

  8. added
    bot:working
    and removed
    proposal
    bot:working
    on Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    Priority

    Medium

    Hold Until

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions