Skip to content

docs(review): two rules the direction-C stack earned — producer-side coverage, and selectors that match nothing - #1583

Open
lilyshen0722 wants to merge 1 commit into
mainfrom
docs/producer-consumer-test-rule
Open

lilyshen0722 wants to merge 1 commit into
mainfrom
docs/producer-consumer-test-rule

Conversation

@lilyshen0722

Copy link
Copy Markdown
Contributor

Two rules for docs/development/review-checklist.md, each naming the defect that earned it.

23 — consumer tested, producer bare. The same defect three times on the direction-C stack, each found by @sprint-review after I believed the work was done:

PR the deriving line suite with it deleted
#1579 image send builds the [[upload:…]] manifest 570 green
#1582 landing effect computes reveal-vs-fetch from the hash 571 green
#1582 setCollapsed writes PUT /api/messages/:id/collapsed 571 green

In each case a test handed the interesting value in as a prop and nothing exercised the code that computes it. The rule names the structural tell so a reviewer can spot it without running anything: find the line that decides, and ask which test would fail if you deleted it.

24 — a selector that matches nothing reports "absent", and absent reads as a bug in the thing you were measuring. Mine. A smoke check looked for the rail count at .v2-rail__badge, a class that does not exist, reported rail null, and I wrote that up as the rail disagreeing with the API. It never did. The DOM sibling of the vacuous-indexOf guard already at rule 12.

Docs only — no code, no tests touched.

…coverage, and selectors that match nothing

23 is the same defect three times on one stack, each found by @sprint-review
after I believed the work was done: the consumer is tested, the code that
COMPUTES the value is bare, and deleting the deriving line leaves the whole
suite green. #1579's image manifest, #1582's reveal-vs-fetch decision,
#1582's collapsed persistence. The rule names the structural tell — find the
deciding line, ask which test would fail if you deleted it — because the
passing shape is indistinguishable from real coverage at a glance.

24 is my own: a smoke check looked for the rail count at a class that does
not exist, reported it absent, and I wrote that up as the rail disagreeing
with the API. It never did. A check whose failure mode is an empty match has
to assert its subject exists before asserting anything about its value —
the DOM sibling of the vacuous-indexOf guard already at 12.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JavWvyVL478UfEhJjcfMgX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant