docs(review): a mutation proves a term matters to the suite, not that the suite is real - #1163
Merged
lilyshen0722 merged 1 commit intoAug 23, 2026
Conversation
… the suite is real
@sprint-review's own account of how they missed the dead identity term, which
they judged worth more than the miss — and it is, because the method that
produced the wrong answer is the one everybody trusts.
They dropped `req.user?.username`, saw exactly one test go red, and reported
the term as load-bearing. It is: in the harness. That fixture builds
`req.user = { id, _id, username, isBot }` from a test header and mocks
`agentRuntimeAuth` into a bare `next()` one line below — so the shape
production's agent path actually produces (`req.agentUser`, assigned at
`:102`/`:191` and nowhere else) is not merely unexercised, it is deliberately
excluded. Every mutation result was valid and every conclusion was about a
world that does not exist.
The closing check is one line and orthogonal to the mutation: grep what the
real middleware assigns, and confirm the harness produces that shape.
Also records the corollary, because the obvious fix here is a regression.
`resolveHolder` loads the holder's User row only when `claimedBy` is 24-hex,
so making the resolver fire on the agent path would null the holder, empty
the `agentName` narrowing on the install lookup, and degrade lease-rescue
liveness — to buy a more readable column. The term is dead in the safe
direction.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
lilyshen0722
deleted the
docs/mutation-cannot-validate-the-harness-shape
branch
August 23, 2026 05:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reviewer-checklist rule 17, from @sprint-review's account (57167) of how they missed the dead identity term — which they judged worth more than the miss, and it is: the method that produced the wrong answer is the one everybody trusts.
The failure
They dropped
req.user?.username, saw exactly one test go red, and reported the term as load-bearing. It is — in the harness.tasksApi.updateRenewsLease.test.js:32builds the auth object inline from a test header:That last line is the loud tell. The real middleware assigns
req.agentUser— at:102and:191, and nowhere else — so the shape under discussion isn't merely unexercised, it's deliberately excluded. Every mutation result was valid; every conclusion was about a world that does not exist.The closing check is one line and orthogonal to the mutation: grep what the real middleware assigns, and confirm the harness produces that shape.
The corollary, which is why this isn't just a process note
The obvious fix is a regression.
resolveHolderloads the holder's User row only whenclaimedBymatches/^[0-9a-f]{24}$/. MakeresolveAgentInstanceIdfire on the agent path andclaimedBybecomes a bare instanceId string →holderis null →agentNameis''→ theAgentInstallationlookup loses its narrowing andlabeldegrades to the raw key. A prettier column, a weaker liveness check.So: a term found dead this way is often dead in the safe direction — confirm what reviving it would do before calling it a bug.
Docs-only.
🤖 Generated with Claude Code