Skip to content

refactor(reef): consolidate transport protocol test fixtures - #118281

Merged
steipete merged 1 commit into
mainfrom
codex/goal100k-reef-transport-wave21-2d45
Aug 2, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/goal100k-reef-transport-wave21-2d45

Conversation

@steipete

@steipete steipete commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

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

  • Exact head: e30a77af0fdec8725a389f434aabcf28a5532960
  • Test-title census: all 54 titles preserved byte-for-byte and in the original order
  • Local focused proof: 3 files, 54/54 tests passed
  • Blacksmith Testbox tbx_01kz29x8mawv9nj5dqxc5r70jw: focused 54/54; full Reef 287/287; pnpm check:changed passed including extension-test typecheck and lint
  • Blacksmith run: https://github.com/openclaw/openclaw/actions/runs/30770454325
  • Diff: 295 insertions, 629 deletions; net -334 test LOC; production delta 0
  • Synthetic merge with current origin/main (adedc323b689f5c71684211eb5b08f00371fb0f8) is clean

@openclaw-barnacle openclaw-barnacle Bot added channel: reef Channel integration: reef size: L maintainer Maintainer-authored PR labels Aug 2, 2026
@steipete
steipete marked this pull request as ready for review August 2, 2026 22:56
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Aug 2, 2026
@clawsweeper

clawsweeper Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed August 2, 2026, 7:01 PM ET / 23:01 UTC.

ClawSweeper review

What this changes

The branch replaces repeated Reef protocol, receipt-flow, and relay-client test setup with local typed fixture helpers while retaining the existing scenario assertions.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

The 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 maintainer label appropriately keeps the final merge decision with maintainers.

Priority: P3
Reviewed head: e30a77af0fdec8725a389f434aabcf28a5532960

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, production-neutral test refactor with preserved scenario coverage and no concrete review findings.
Proof confidence 🌊 off-meta tidepool Not applicable: This is an internal test-fixture refactor with no changed user-visible or production runtime path; the PR body additionally reports focused and full Reef test execution.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This is an internal test-fixture refactor with no changed user-visible or production runtime path; the PR body additionally reports focused and full Reef test execution.
Evidence reviewed 6 items Test-only scope: The PR commit changes only three Reef test files; no production source, dependency, configuration, workflow, or package file is touched.
Scenario parity: The three changed suites retain 14, 12, and 28 test cases respectively; a title-only comparison between current main and the PR head produced no differences.
Fixture contracts remain explicit: The new pipeline helpers retain scenario overrides for timestamps, guards, audits, replay stores, envelopes, and verdicts; the receiving production APIs still own validation and replay behavior.
Findings None None.
Security None None.

How this fits together

Reef’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
Loading

Before merge

  • Add real behavior proof - Not applicable: This is an internal test-fixture refactor with no changed user-visible or production runtime path; the PR body additionally reports focused and full Reef test execution.
  • Complete next step (P2) - No mechanical repair is needed; the protected maintainer label reserves the final merge decision for a maintainer after normal check completion.
Agent review details

Security

None.

PR surface

Tests -334. Total -334 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 3 295 629 -334
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 295 629 -334

Review metrics

None.

Technical review

Best 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.

Labels

Label changes:

  • add P3: This is a focused test-only cleanup with no production or user-facing behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This is an internal test-fixture refactor with no changed user-visible or production runtime path; the PR body additionally reports focused and full Reef test execution.

Label justifications:

  • P3: This is a focused test-only cleanup with no production or user-facing behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This is an internal test-fixture refactor with no changed user-visible or production runtime path; the PR body additionally reports focused and full Reef test execution.

Evidence

What I checked:

Likely related people:

  • steipete: Current-main blame for the inspected Reef protocol, transport, and flow contract regions points to Peter Steinberger, and this focused test refactor follows that same area history. (role: recent area contributor; confidence: high; commits: 27d1f1afd527, e30a77af0fde; files: extensions/reef/protocol/pipeline.ts, extensions/reef/src/flow.ts, extensions/reef/src/transport.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit b7f9cd0 into main Aug 2, 2026
152 of 159 checks passed
@steipete
steipete deleted the codex/goal100k-reef-transport-wave21-2d45 branch August 2, 2026 23:39
@steipete

steipete commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: reef Channel integration: reef maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant