test(replay-test): pin the retry-path reporter hint - #1516
Merged
Conversation
`emitReplayTestRetryProgress` publishes `hint` on every retried failure (session-test-attempt.ts), and nothing asserted it. The existing hint coverage coming out of #1505 pins only the final-attempt emit site, so deleting the retry line left the entire suite green. The retry fixture's first-attempt error carried no hint, so no assertion could have caught it even in principle. It now carries one, and the retry result value asserts it. Counterfactual, run rather than assumed — with `hint: attempt.outcome.error.hint` deleted from the retry emit site: ✓ a reporter sees the shipped suite-start, skip, and test-start values × reporter step and result sessions track the running attempt, not the start value ✓ a failing suite reaches the reporter with the failure message, hint fields, and exit code ✓ sharded runs give the reporter shard-scoped sessions and device identity - "hint": "retry hint from the failed attempt", + "hint": undefined, Only the new pin fails; the final-path hint test keeps passing, which is the gap. Production code is unchanged — `git diff` on session-test-attempt.ts is empty. This lands before P3b relocates session-test-attempt.ts into packages/replay-test, so the move cannot drop the field silently. Refs #1478 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RXQLYV7etZx3gcXsUsrQJ8
Size Report
Startup median (7 runs, lower is better):
Top changed chunks: no changes in the largest emitted chunks. |
Member
Author
|
Reviewed at |
|
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.
A one-assertion ratchet that has to land before P3b relocates
session-test-attempt.tsintopackages/replay-test, so the move cannot drop a shipped reporter field silently.The gap
hintreaches reporters from two emit sites insrc/daemon/handlers/session-test-attempt.ts:emitReplayTestRetryProgress(~:287)#1505 added hint coverage, but only for the final path. The retry emit site was reachable by no assertion at all — and could not have been caught even in principle, because the retry fixture's first-attempt error carried no
hintfor the scheduler to forward.Change
runRetrySuite's first-attempt error now carries a hint, and the retry result value asserts it. Test-only;git diffonsession-test-attempt.tsis empty.Counterfactual — run, not assumed
Deleting
hint: attempt.outcome.error.hintfrom the retry emit site:Only the new pin fails. The existing final-path hint test keeps passing — which is precisely the gap being closed. Restored afterwards; production diff empty; both reporter suites green (6/6).
Why now
P3b moves this file. A field that no test asserts is a field a large mechanical move can drop without any gate objecting — the exact failure mode #1505's ratchet exists to prevent, left half-covered. Cheaper to pin it here than to detect it after a 3,000-line relocation.
Refs #1478
Generated by Claude Code