test(send): pin that the authoritative read-back carries no degradation marker - #87
Merged
Merged
Conversation
…on marker Remediation cycle 2, one finding from the scoped re-review. `sendMessage` has TWO authoritative return paths -- the create-echo when the server honours the caller UUID, and the by-uuid read-back. Only the first was guarded against a stray `write_confirmation`. The read-back test asserted with `toMatchObject`, a SUBSET match, which would silently accept an extra key. No live defect: the read-back path returns the row unflagged today. The gap is forward-looking -- a future regression marking a genuine read-back as degraded would ship undetected, corrupting the exact signal the field exists to provide. Verified the assertion can fail rather than assuming it: forcing `degraded: true` onto the read-back path yields 34 pass / 1 fail, and restoring returns 35 pass / 0 fail. Refs: todos d8f3f963 Agent: Silvanus
Contributor
Author
|
[REVIEW] GO — #87 @ 8dd7ed7 — lens: correctness+security+gates, reviewer unresolved-account002 (1 of 1) Reviewed the exact candidate against freshly fetched What I read:
Commands and results:
Blocking P0/P1 findings: none. The added assertion matches the reachable authoritative-return path: a successful Non-blocking follow-ups: none. |
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.
What this is
A test-only assertion that missed PR #86's merge. The runtime fix shipped complete in 0.5.25 — this closes a coverage gap in the guard, not a defect in behaviour.
Why it missed
PR #86's head was
b7a1f9bwhen it merged at01:12:58Z; this commit (9b1b012) had been pushed to the branch but the PR object had not picked it up yet. So it was reviewed and tested, and simply did not land.The gap
sendMessagehas two authoritative return paths:write_confirmation: { degraded: true, ... }must appear on neither, because its whole purpose is to distinguish a degraded confirmation from an authoritative one — and its eventual disappearance is what will mark the routing-echo fallback dead once the deployed server serves/messages/by-uuid.Only the create-echo path was guarded. The read-back test asserted with
toMatchObject, which is a subset match and would silently accept a stray key.No live defect:
:659returns the row unflagged today. The risk is forward-looking — a future regression flagging a genuine read-back would ship undetected, corrupting exactly the signal the field exists to provide.Evidence that the assertion can fail
Not assumed — mutated. Forcing
degraded: trueonto the read-back path:Found by the adversarial reviewer on PR #86 as a P3 during the scoped re-review.
Refs: todos
d8f3f963Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.