test(matrix): delivery trace goldens for generation-scoped edit streaming#104596
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 11, 2026, 1:49 PM ET / 17:49 UTC. Summary PR surface: Source +62, Tests +362. Total +424 across 5 files. Reproducibility: not applicable. This PR records established Matrix delivery behavior rather than reporting or fixing a runtime defect. Review metrics: none identified. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Next step before merge
Security Review detailsBest possible solution: Merge the focused Matrix conformance oracle after normal protected-label review; it accurately captures current lifecycle behavior through the canonical shared harness without changing production code. Do we have a high-confidence way to reproduce the issue? Not applicable; this PR records established Matrix delivery behavior rather than reporting or fixing a runtime defect. Is this the best way to solve the issue? Yes; using the shared trace runner with the real Matrix handler and client boundary is the narrowest maintainable approach, and it complements existing focused unit tests without duplicating production logic. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 49ff54e63af5. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +62, Tests +362. Total +424 across 5 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Merged via squash.
|
Related: #104318
What Problem This Solves
Extends the delivery trace harness (#104478) to Matrix — the per-generation edit-streaming channel whose five-path finalization (in-place, replace, redact+resend on mention activation, media, abandon) is the richest lifecycle the planned core preview engine must express.
Why This Change Was Made
Four golden scenarios drive the real room-message handler deliver wiring with a recording plain-room client (E2EE out of scope) under fake timers: multi-generation streaming (per-generation preview events, cumulative slices, m.replace edits, block finalize-in-place, final replace-edit); final-in-place (live-marker clear); final-mentions-fresh (mentions-inert preview → redact → fresh event carrying m.mentions); cancel/abandon. Edit-minted event ids are canonicalized while the stable m.relates_to target is preserved — the receipt-stability seam v2's Receipt design needs. Warts pinned as oracles include: a getEvent round-trip before every edit even when the mention-diff result is unused; the abandon path flushing a throttled edit and immediately redacting it; MSC4357 marker duplication into m.new_content in plain rooms; empty m.mentions stamped on replace-edits.
User Impact
None at runtime — test infrastructure.
Evidence
tbx_01kx92tk52bh4e4e2xw9k96p6s: full matrix suite +pnpm check:changedgreen; stability runtbx_01kx937xkfkca4p3cyerrtvnsr: trace tests 4/4 twice in verify mode, goldens byte-stable, repo-wideformat:checkclean (that shard bit two sibling trace PRs — proven green here up front).