Repository navigation
test(infra): consolidate abort relay coverage at its owner - #134266
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 31, 2026, 12:28 PM ET / 16:28 UTC. ClawSweeper reviewWhat this changesThe PR deletes a standalone abort-relay test suite and retains its two helper contracts in the fetch-timeout owner suite. Merge readinessNo introduced correctness or security defect found. Keep this maintainer-labeled PR open for explicit maintainer handling and completion of exact-head checks. Priority: P3 Review scores
Verification
How this fits togetherThe fetch timeout utility provides abort-signal helpers used by the fetch adapter when it adapts foreign signals for native fetch. The moved tests verify that relay behavior before the adapter dispatches network work. flowchart LR
A[Foreign abort signal] --> B[Fetch adapter]
B --> C[Abort relay helper]
C --> D[Native abort controller]
D --> E[Fetch implementation]
F[Owner test suite] --> C
Decision needed
Why: The diff is behavior-neutral and has no actionable defect, but the protected maintainer label requires explicit human handling rather than automated cleanup. Before merge
Agent review detailsSecurityNone. PR surfaceTests -60. Total -60 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the two owner-boundary assertions, keep the dedicated foreign-signal adapter coverage, and land after exact-head CI and the latest review guidance are confirmed. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR reorganizes existing unit coverage and does not report a current product failure. Is this the best way to solve the issue? Yes. The retained assertions now live with the helper that owns the listener contract, while the fetch adapter's foreign-signal and cleanup behaviors remain covered separately. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d27cc02f5981. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Maintainer-directed review accepts this test consolidation. The latest ClawSweeper review found no introduced correctness or security defect. Its current-main verification gap is now resolved: commit The unchanged PR head passed CI run 33413615172 and native preparation. Local proof passed 48 tests before and 45 after; the difference is exactly three redundant/platform cases, while both actual helper contracts remain. Full changed-file checks and structured Codex review passed. Production +0/-0; tests +27/-87. The latest review guidance has been read and its ordinary review/check-completion steps are addressed. Proceeding through the native merge gate. |
|
Merged via squash.
|
What Problem This Solves
The standalone abort-pattern suite mixes useful OpenClaw regressions with native JavaScript demonstrations and duplicates the helper's reason-preservation assertion.
Why This Change Was Made
Move the two independent
bindAbortRelaycontracts into the existing fetch-timeout owner suite: event delivery must preserve the defaultAbortError, and removing the saved relay reference must prevent forwarding. Delete the redundant platform-only binding/timer demonstrations and the repeated raw-bind comparison.The real foreign-signal fetch adapter still calls the unchanged helper. Its separate suite continues to cover native versus foreign signals and listener cleanup on resolution, rejection, and synchronous failure. The moved tests run outside the timeout suite's fake-clock setup.
User Impact
One fewer collected test file and less misleading test scaffolding. Production behavior is unchanged. The deleted historical commentary did not constitute memory-retention or garbage-collection proof; no such claim is made here.
Evidence
node scripts/run-vitest.mjs src/infra/abort-pattern.test.ts src/infra/fetch.test.ts src/utils/fetch-timeout.test.tspassed 48 tests.node scripts/run-vitest.mjs src/infra/fetch.test.ts src/utils/fetch-timeout.test.tspassed 45 tests. Exactly three redundant/platform cases were removed; both helper contracts remain.