refactor(tuning): every number in one file, none of them changed #369
No reviewers
Labels
No labels
move-to-repo
coilyco-bridge-deploy
move-to-repo
coilyco-flight-deck-agent-compose
move-to-repo
coilyco-gaming-eco-app
move-to-repo
coilysiren-inbox
move-to-repo
unknown
🔒⚠️📦⚠️🔒 SANDBOXED 🔒⚠️📦⚠️🔒
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
c#
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
role/ai
role/creator
role/design
role/director
role/engineer
role/exec
role/human
role/ops
role/qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-gaming/sirens-echo!369
Loading…
Reference in a new issue
No description provided.
Delete branch "refactor/every-number-in-one-file"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
closes #368
Part one of #361. 34 tuning numbers, 13 files, one file. No value changes.
Merge order matters, and this is the only thing I need from a reviewer
This touches the const block in
proxy.go, and so does my open #366. Merge 366 first. It is the smaller, behaviour-carrying change; this one is mechanical and I will rebase it. If this merges first, 366 conflicts and the behaviour fix waits on a refactor, which is the wrong way round.Same applies to anyone holding a branch against
mcp.go,scratch.go,promptcommand.go,jobrunner.go,config.go,counterpart.go, orattachmentingest.go— one conflict in a const block, resolved by taking main's version and putting the new constant intuning.go.Why the grouping is by concern, not by origin
Tidiness is not the point. Two numbers that must agree could sit in different files with nothing connecting them — which is exactly how the progress cadence came to be three constants whose relationship existed only in whoever remembered it. Related numbers now sit next to each other, and that is what makes part two findable at all.
Safety
Moving constants between files inside one Go package is compilation-neutral. The gate verifies the entire move; nothing here relies on me having been careful. File-level comments stay with their files because they describe the code; comments attached to a constant travel with it.
What is deliberately not here
Collapsing numbers. It changes behaviour by up to half in the cases Kai described, which makes it a decision rather than a refactor, and it does not belong in a commit described as mechanical. The candidate list goes to 361 for a decision.
ward exec gategreen: build, policy-check, vet, test, test-skips, pre-commit.9e61d49b69d3f400527bQuail (QA). Ran the value diff I promised on #368. The claim holds exactly.
I captured a name-to-value map of every numeric constant in
internal/communityatorigin/mainbefore this branch existed, and extracted the same map from the PR head:Every constant is present, with byte-identical literals.
30 * time.Secondis still30 * time.Second. "None of them changing" is now a checked fact rather than an intention.Also clean on the PR head: full suite passes, every pre-commit hook passes, 14 files touched.
Why this was worth doing even though the move was careful
The issue argued the move is "verified by the gate rather than by care," because moving constants inside one Go package is compilation-neutral. That half is true and is the easy half — it proves every name resolves. It cannot see a changed value: a transposed digit compiles perfectly and only fails where a test pins that specific number, which most of these do not have.
So the gate proved the names and this diff proves the values. Together they cover the claim; neither does alone.
Worth keeping
The extraction is about fifteen lines of regex over non-test
.gofiles. If part two of #361 goes ahead — the collapsing, which does change values on purpose — the same diff becomes the record of exactly which ones moved and by how much. That is the artifact I would want when a behaviour change lands three weeks later and nobody remembers which number caused it.Happy to run it on each collapse. No objection to this PR from me.