test(reactions): a reaction nobody emits is a state no member ever sees #474

Merged
coilyco-ops merged 1 commit from qa/pin-every-reaction-is-emitted into main 2026-08-13 14:14:48 +00:00
Member

0e3fccb found reactionRefused declared, meaningful, and fired by nothing on the content boundary it exists for:

the state most specifically about a content boundary was silent on the only content boundary in the harness

It found that by reading. No test failed. And deleting the emission it added leaves the whole suite green today, so the fix can revert to the defect as quietly as it arrived.

Generalised rather than pinned

Rather than guard that one call site, this asserts the property the commit discovered: every declared reaction is emitted somewhere outside the file that declares it. A state a member cannot reach is either unwired or dead, and both want the same answer — wire it or delete it.

That covers the case 447 fixed, the three it did not touch, and any reaction added later.

The list is hand-kept, so the list is checked

A second test asserts the names this test knows match what reactions.go declares. Without it, a fifth reaction added tomorrow is silently exempt from the check that matters — which is the same shape as the glyph drift 447 fixed, arriving one level up.

Both directions verified

remove the content-gate emission
  reactionRefused is declared and never emitted, so the state it names
  cannot reach a member. Wire it or delete it

add a fifth constant without listing it
  reactions.go declares [...reactionQueued...] and this test knows [...]
  A reaction missing from the list is exempt from the emission check

Why this shape

This is the second unguarded wiring I have found in an hour — #208's sandbox label was the first, where the policy had five tests and the line invoking it had none. Both are cases where the component is correct and nothing checks that anything calls it.

The difference here is that the invariant generalises. reactionRefused firing on nothing was findable only by someone reading the file and noticing; the next one is findable by running the suite.

Test-only. No production change.

Refs #447

`0e3fccb` found `reactionRefused` declared, meaningful, and **fired by nothing** on the content boundary it exists for: > the state most specifically about a content boundary was silent on the only content boundary in the harness It found that by reading. No test failed. And **deleting the emission it added leaves the whole suite green today**, so the fix can revert to the defect as quietly as it arrived. ## Generalised rather than pinned Rather than guard that one call site, this asserts the property the commit discovered: **every declared reaction is emitted somewhere outside the file that declares it.** A state a member cannot reach is either unwired or dead, and both want the same answer — wire it or delete it. That covers the case 447 fixed, the three it did not touch, and any reaction added later. ## The list is hand-kept, so the list is checked A second test asserts the names this test knows match what `reactions.go` declares. Without it, a fifth reaction added tomorrow is silently exempt from the check that matters — which is the same shape as the glyph drift 447 fixed, arriving one level up. ## Both directions verified ``` remove the content-gate emission reactionRefused is declared and never emitted, so the state it names cannot reach a member. Wire it or delete it add a fifth constant without listing it reactions.go declares [...reactionQueued...] and this test knows [...] A reaction missing from the list is exempt from the emission check ``` ## Why this shape This is the second unguarded wiring I have found in an hour — https://forgejo.coilysiren.me/coilyco-gaming/sirens-echo/issues/208's sandbox label was the first, where the policy had five tests and the line invoking it had none. Both are cases where the component is correct and nothing checks that anything calls it. The difference here is that the invariant generalises. `reactionRefused` firing on nothing was findable only by someone reading the file and noticing; **the next one is findable by running the suite.** Test-only. No production change. Refs https://forgejo.coilysiren.me/coilyco-gaming/sirens-echo/issues/447
test(reactions): a reaction nobody emits is a state no member ever sees
All checks were successful
ci / image-build (pull_request) Successful in 20s
ci / test (pull_request) Successful in 35s
ci / publish-echo-image (pull_request) Has been skipped
ci / publish-observed (pull_request) Has been skipped
d879e0234f
0e3fccb found reactionRefused declared, meaningful, and fired by nothing on the
content boundary it exists for. It found it by reading. No test failed, and
deleting the emission it added leaves the suite green today, so the fix can
revert to the defect as quietly as it arrived.

Rather than pin that one call site, this asserts the property the commit
discovered: every declared reaction is emitted somewhere outside the file that
declares it. A state the member cannot reach is either unwired or dead, and
both want the same answer.

The list of names is hand-kept, so a second test asserts it matches what
reactions.go declares. Without it a fifth reaction added tomorrow would be
exempt from the check that matters, which is the same shape as the drift 447
fixed in the glyphs.

Both directions verified. Removing the content-gate emission names
reactionRefused and says to wire it or delete it. Adding a fifth constant
without listing it fails with both sets printed.

Refs sirens-echo#447

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
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!474
No description provided.