refactor(progress): one number instead of three that had to agree #358

Merged
coilyco-ops merged 1 commit from fix/one-number-for-the-progress-cadence into main 2026-08-13 11:02:38 +00:00
Member

closes #359

Part of #354 — the "less numbers to move around" half. It does not close 354; harness-level thread creation is the rest and is not here.

Correction: this body first read closes #357, an issue number I wrote before filing the issue and which was already taken by unrelated work. Corrected before merge. #357 is untouched by this PR.

What changed

The wait, the beat, and the long-reply window were three independent constants whose relationship existed only in whoever remembered it:

turnProgressAfter  = 3 * time.Second
turnProgressEvery  = turnProgressAfter * 2
turnLongReplyAfter = turnProgressAfter + turnProgressEvery*2

Values are unchanged — 3, 6, and 15 seconds, which is the 3 + 6 + 6 the issue names. This is arithmetic that was already true, written down. One edit now moves all three.

Why it has tests at all

A derivation that quietly stopped deriving would look identical at today's numbers. So one test pins the values, and a change to the base reports exactly what it moved; the other pins the relationships, so the constants cannot drift back into three coincidences that happen to agree.

The naming

turnLongReplyAfter is named here and used by nothing yet. That is deliberate rather than an oversight: it is the threshold the thread decision needs, and putting it beside the two it derives from is where it belongs. If a reviewer would rather it arrive with its consumer, say so and I will hold it back.

ward exec gate green: build, policy-check, vet, test, test-skips, pre-commit.

closes #359 Part of https://forgejo.coilysiren.me/coilyco-gaming/sirens-echo/issues/354 — the *"less numbers to move around"* half. **It does not close 354**; harness-level thread creation is the rest and is not here. > **Correction:** this body first read `closes #357`, an issue number I wrote before filing the issue and which was already taken by unrelated work. Corrected before merge. https://forgejo.coilysiren.me/coilyco-gaming/sirens-echo/issues/357 is untouched by this PR. ## What changed The wait, the beat, and the long-reply window were three independent constants whose relationship existed only in whoever remembered it: ```go turnProgressAfter = 3 * time.Second turnProgressEvery = turnProgressAfter * 2 turnLongReplyAfter = turnProgressAfter + turnProgressEvery*2 ``` **Values are unchanged** — 3, 6, and 15 seconds, which is the `3 + 6 + 6` the issue names. This is arithmetic that was already true, written down. One edit now moves all three. ## Why it has tests at all A derivation that quietly stopped deriving would look identical at today's numbers. So one test pins the values, and a change to the base reports exactly what it moved; the other pins the relationships, so the constants cannot drift back into three coincidences that happen to agree. ## The naming `turnLongReplyAfter` is named here and used by nothing yet. That is deliberate rather than an oversight: it is the threshold the thread decision needs, and putting it beside the two it derives from is where it belongs. If a reviewer would rather it arrive with its consumer, say so and I will hold it back. `ward exec gate` green: build, policy-check, vet, test, test-skips, pre-commit.
refactor(progress): one number instead of three that had to agree
All checks were successful
ci / test (pull_request) Successful in 3m32s
ci / publish-echo-image (pull_request) Has been skipped
ci / publish-observed (pull_request) Has been skipped
ci / image-build (pull_request) Successful in 24s
cf6f353a24
The wait, the beat, and the long-reply window were three independent constants
whose relationship existed only in whoever remembered it. Now the beat is twice
the wait and the window is the wait plus two beats, so one edit moves all three.

Values are unchanged: 3, 6, and 15 seconds, which is the 3 + 6 + 6 the issue
names. This is arithmetic that was already true, written down.

Two tests, because a derivation that quietly stopped deriving would look
identical at today's numbers. One pins the values so a change to the base
reports what it moved. The other pins the relationships so the constants cannot
drift back into three coincidences.

The long-reply window is named here and used by nothing yet. Harness-level
thread creation is the rest of that issue and is not in this commit.

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
1 participant
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!358
No description provided.