refactor(community): let the tuning numbers move without a test sweep #947

Merged
coilysiren merged 5 commits from task/free-the-config-numbers into main 2026-08-18 16:07:13 +00:00
Owner

Moving SIRENS_ECHO_PROGRESS_AFTER from 8s to 10s (5806c24) broke four tests. The ask: any number in config.go movable without a test failing on the old value.

Swept mechanically before and after. Perturb one default, run go test ./..., record, restore, for all 90 knobs.

  • Before - all 90 broke the generated knob reference, and 15 broke something else on top of it.
  • After - 85 fully green. A separate probe moved 12 knobs by large amounts at once, also green.

What changed

  • Pins deleted: the cadence want-vars, the progress-threshold test, and a model-client test that compared a client it built itself to a literal. The derivation checks stay.
  • Fixtures derived: truncation payloads, worklog rows, redaction blocks, object emoji, repair and raise call counts, and ladder ceilings expressed in rungs rather than literal tokens.
  • agent/rendered/knobs.txt and the bounds capability.md states to the model are rewritten by the tests that read them, so a moved number carries its own update.

Two bugs the sweep found

  • ModelBudget.ladderTop repeated the doubling instead of clamping to the ceiling the way nextCompletionBudget does, so the validator and the runtime disagreed for any step that did not land exactly.
  • A tool result over the scratch file cap cannot spill at all. The fixture hid it at twice the tool bound. A named check reports the constraint now.

Five knobs still constrained, each for a reason that is not a restated default

  • MAX_COMPLETION_TOKENS - LoadConfig itself refuses a ceiling the ladder cannot reach.
  • THREAD_NAME_RUNES and THREAD_ARCHIVE_MINUTES - Discord's own limits.
  • THREAD_TITLE_RUNES - the declared 40 to 60 range.
  • MENTION_NAME_RUNES - eight tests whose fixtures are three-rune names colliding with URL components.

Notes

just test-skips is red on unmodified main already and unrelated: TestTheGateReadsTheDeclaredWorkflow skips while AGENTS.md sits on the temporary merge-remote-main lane.

This repo's lane lands on main, but the sandbox classifier blocks my push there, so the work is a branch and therefore owes this PR.

Moving `SIRENS_ECHO_PROGRESS_AFTER` from 8s to 10s (5806c24) broke four tests. The ask: any number in `config.go` movable without a test failing on the old value. Swept mechanically before and after. Perturb one default, run `go test ./...`, record, restore, for all 90 knobs. * **Before** - all 90 broke the generated knob reference, and 15 broke something else on top of it. * **After** - 85 fully green. A separate probe moved 12 knobs by large amounts at once, also green. ## What changed * Pins deleted: the cadence want-vars, the progress-threshold test, and a model-client test that compared a client it built itself to a literal. The derivation checks stay. * Fixtures derived: truncation payloads, worklog rows, redaction blocks, object emoji, repair and raise call counts, and ladder ceilings expressed in rungs rather than literal tokens. * `agent/rendered/knobs.txt` and the bounds `capability.md` states to the model are rewritten by the tests that read them, so a moved number carries its own update. ## Two bugs the sweep found * `ModelBudget.ladderTop` repeated the doubling instead of clamping to the ceiling the way `nextCompletionBudget` does, so the validator and the runtime disagreed for any step that did not land exactly. * A tool result over the scratch file cap cannot spill at all. The fixture hid it at twice the tool bound. A named check reports the constraint now. ## Five knobs still constrained, each for a reason that is not a restated default * `MAX_COMPLETION_TOKENS` - `LoadConfig` itself refuses a ceiling the ladder cannot reach. * `THREAD_NAME_RUNES` and `THREAD_ARCHIVE_MINUTES` - Discord's own limits. * `THREAD_TITLE_RUNES` - the declared 40 to 60 range. * `MENTION_NAME_RUNES` - eight tests whose fixtures are three-rune names colliding with URL components. ## Notes `just test-skips` is red on unmodified `main` already and unrelated: `TestTheGateReadsTheDeclaredWorkflow` skips while AGENTS.md sits on the temporary `merge-remote-main` lane. This repo's lane lands on `main`, but the sandbox classifier blocks my push there, so the work is a branch and therefore owes this PR.
5806c24 raised SIRENS_ECHO_PROGRESS_AFTER from 8s to 10s. The beat and the
long-reply window derive from it, so the pinned cadence, the generated knob
reference, and the progress page moved with it.

Co-authored-by: Kai Siren <coilysiren@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
A default is meant to be edited, and 15 of the 90 knobs could not be edited
without a test failing on the old value. Every test that restated a default now
derives it: fixtures size themselves off the bound, call counts off the
allowance, and the cadence keeps its derivation without pinning today's values.

The generated knob reference and the bounds capability.md states to the model
are rewritten by the tests that read them, so a number carries its own update
instead of failing until someone runs the verb.

ModelBudget.ladderTop walked its own doubling and the proxy clamps to the
ceiling, so the two disagreed for any step that did not land exactly. It walks
nextCompletionBudget now.

Dropped: the deploy#431 model-call pin, which no knob move can satisfy, and a
model-client test that compared a client it built itself to a literal.

Co-authored-by: Kai Siren <coilysiren@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
14400 is two rungs above 3600 only while the step is 2, so the ceiling cases
and the error-message case computed their numbers from completionBudgetStep.
A step change now passes the suite.

Co-authored-by: Kai Siren <coilysiren@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
test(community): spill a result one byte over the bound, not twice it
Some checks failed
ci / image-build (pull_request) Successful in 37s
ci / test (pull_request) Failing after 55s
ci / publish-echo-image (pull_request) Has been skipped
ci / publish-observed (pull_request) Has been skipped
20ed17c87f
Twice the tool bound is over the scratch file cap once the tool bound is
raised far, so the write refused and the spill test read as a spill bug. The
fixture is now the smallest result that qualifies, and a named check reports
the real constraint: a tool result has to fit a scratch file to spill at all.

Co-authored-by: Kai Siren <coilysiren@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
coilyco-ops changed title from task/free-the-config-numbers to refactor(community): let the tuning numbers move without a test sweep 2026-08-18 02:56:38 +00:00
Merge branch 'main' into task/free-the-config-numbers
All checks were successful
ci / image-build (pull_request) Successful in 42s
ci / test (pull_request) Successful in 1m5s
ci / publish-echo-image (pull_request) Has been skipped
ci / publish-observed (pull_request) Has been skipped
8b91d2f751
main landed two changes that overlap this branch: 979073d retargeted the
cadence pins to 10/20/50, and 12999d7 derived eight knobs from the turn
budget. Both collide with the point of this branch.

* cadencederivation_test.go - the retargeted pin is the thing this branch
  deletes, so the derivation checks stand alone. Took the branch side.
* knoboverride_test.go - QUEUE_TIMEOUT stopped being a settable knob when
  it became a sixth of the turn, so the reset check rides REQUEST_TIMEOUT
  now. Kept the captured default rather than main's literal 6.
* agent/rendered/knobs.txt - regenerated from the merged table.

`just gate` passes: build, policy-check, vet, test, test-skips, pre-commit.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Kai Siren <coilysiren@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
coilyco-gaming/sirens-echo!947
No description provided.