Repository navigation
refactor(matrix): simplify send and shutdown test fixtures - #156383
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR replaces copied Matrix readiness policy with configurable test outcomes and removes mock-manufactured shutdown assertions. Example: Sending file:///tmp/secret.png when room preparation fails after loading.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR provides useful test cleanup, with no actionable defect found at the reviewed head; exact-head CI remains pending. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherMatrix outbound tests exercise message preparation and media uploads through sendMessageMatrix; monitor tests exercise shutdown callbacks, while SDK and shared-client suites own encryption policy and client retirement. flowchart TD
A[Send fixtures] --> B[Matrix send owner]
B --> C[SDK readiness boundary]
C --> D[Upload and message effects]
E[Monitor fixtures] --> F[Monitor retirement callbacks]
F --> G[Shared client retirement owner]
Technical reviewBest possible solution: Merge the focused fixture cleanup once the existing exact-head CI gates permit it. Do we have a high-confidence way to reproduce the issue? No runtime bug is claimed; source inspection confirms copied readiness policy and a shutdown assertion driven by its own mock. Is this the best way to solve the issue? The change uses existing owners, removes copied policy, and retains distinct rejection, payload, and lifecycle contracts without adding production machinery. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 52da7f61d3aa. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceTests +6, Other +1. Total +7 across 5 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (6 earlier review cycles)
Reviewed November 4, 2026, 12:24 AM ET / 05:24 UTC (Revision 7). |
Baseline-Refresh: 1eab158b7d7a993c226121aa76692825b0ea8f0a
|
ClawSweeper reviews are opt-in for maintainers. If a review is required, finish the work and validation first, then comment |
|
@clawsweeper re-review Please review exact head add3a34. The reconciled scope is four Matrix test/support files plus the exact six-line allocation. The prior runner/trace migration and its trace-validation rank-up work are outside this scope; those paths remain at the frozen base. The PR body records fresh send proof, unchanged sibling proof, measured case durations, types/static results, and the investigated Knip subprocess-entry failure. Exact-head CI is now running. |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
…156383) * refactor(matrix): test send preparation at the SDK boundary * refactor(matrix): remove simulated decrypt-drain assertions * fix(matrix): preserve send fixture recovery contracts * fix(matrix): isolate steering fixture retries * refactor(matrix): exercise real inbound turn ownership * test(matrix): simplify send and shutdown fixtures * test(matrix): reference typed preparation mocks
What Problem This Solves
Matrix send fixtures copied room-preparation policy, while a shutdown test asserted drain ordering manufactured by its own mock.
User Impact
No user-visible behavior changes. This updates test fixtures and assertions only.
Why This Change Was Made
Use configurable readiness outcomes at the send boundary and keep policy coverage with the real SDK owner. Preserve exact error propagation, side-effect suppression, and the final mixed-attachment check after thumbnail upload. Remove only synthetic shutdown evidence; meaningful shared-client retirement checks remain.
The final scope is four test/support files. The original broader real-runner migration is not included. Production delta is zero; tests are +88/−82 lines. The exact six-line allocation covers isolated clients and stronger boundary assertions; the shared scalar baseline is unchanged.
Evidence
add3a344: send 46/46, affected Oxlint and plugin test types passed.b96cb404: SDK 97/97, monitor 25/25, shared-client 25/25; these test files are unchanged. These are prior-head executions, not a new 193-case run.Remaining local failure: the unused-file scan reports
test/scripts/fixtures/mantis-telegram-failure.mts. Its existing test launches it as a subprocess; the fixture, caller and Knip inputs are unchanged from the frozen base. This is a source-attributed missing entry declaration, not proof of a failing baseline run. Follow-up: register Mantis subprocess fixture as Knip entry. The failed gate remains recorded.Focused proof ran on macOS using the pinned Bun runtime after remote capacity was unavailable; no Linux or live Matrix result is claimed. Exact-head CI passed. The ClawSweeper review reports no findings, pre-merge actions or remaining rank-up moves. Merge awaits Vincent’s approval.
Measured focused case durations
add3a344b96cb404b96cb404b96cb404These are measured case durations, not end-to-end command times or a performance comparison.