Repository navigation
refactor(reef): consolidate transport protocol test fixtures - #118281
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed August 2, 2026, 7:01 PM ET / 23:01 UTC. ClawSweeper reviewWhat this changesThe branch replaces repeated Reef protocol, receipt-flow, and relay-client test setup with local typed fixture helpers while retaining the existing scenario assertions. Merge readinessThe PR is still necessary as a focused Reef test-maintenance refactor. Direct diff review found no correctness regression: it only centralizes repeated test setup, preserves all 54 test titles in order, and leaves production files untouched; the protected Priority: P3 Review scores
Verification
How this fits togetherReef’s test suite builds signed outbound envelopes, receives and validates inbound messages, processes delivery receipts, and exercises relay transport recovery. The changed helpers feed those tests with standard identities, stores, clients, and callbacks; production protocol, flow, notifier, and transport code remain unchanged. flowchart LR
Fixtures[Shared test fixtures] --> Pipeline[Protocol pipeline tests]
Fixtures --> Receipts[Receipt flow tests]
Fixtures --> Transport[Relay transport tests]
Pipeline --> Contracts[Security and delivery contracts]
Receipts --> Contracts
Transport --> Contracts
Before merge
Agent review detailsSecurityNone. PR surfaceTests -334. Total -334 across 3 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Merge the local fixture consolidation after the protected-label maintainer review, retaining the explicit per-scenario override points and the complete existing test matrix. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR does not report a runtime defect or alter runtime behavior. Its directly inspectable contract is the existing Reef test matrix, whose 54 scenario titles remain unchanged from current main. Is this the best way to solve the issue? Yes. Local typed fixture helpers are the narrowest maintainable approach because they remove repeated setup while preserving each scenario’s explicit inputs, callback behavior, and assertions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against adedc323b689. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
What Problem This Solves
Reef receipt, transport, and protocol-pipeline tests repeated the same security-sensitive setup across 54 scenarios. That duplication made the behavioral contract harder to audit and made fixture updates unnecessarily error-prone.
Why This Change Was Made
This consolidates repeated flow, notifier, relay-client, envelope, inbound/outbound option, review-verdict, and pipeline-error setup into local canonical helpers. The helpers retain each scenario-specific signature, trust binding, replay store, audit store, cursor callback, WebSocket ordering, and assertion sequence. Production code and public behavior are unchanged.
User Impact
No user-visible runtime change. Reef maintainers get smaller, more consistent tests while preserving the complete existing behavior matrix.
Evidence
e30a77af0fdec8725a389f434aabcf28a5532960tbx_01kz29x8mawv9nj5dqxc5r70jw: focused 54/54; full Reef 287/287;pnpm check:changedpassed including extension-test typecheck and lintorigin/main(adedc323b689f5c71684211eb5b08f00371fb0f8) is clean