Repository navigation
chore: remove unused test support exports - #183134
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 makes module-local test declarations private and removes unused test-support helpers. Example: The team-reports benchmark loads its fixture transport in direct and worker modes.
Review scores
ProductKind: Maintenance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR is a focused, maintainer-authored cleanup with no actionable findings; active fixtures and their consumers remain intact. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThese modules supply fixtures, mocks, and assertions to existing test suites; they do not define public plugin APIs or change shipped runtime behavior. flowchart LR
A[Test suites] --> B[Retained support exports]
B --> C[Private fixture helpers]
C --> D[Existing runtime owners]
E[Benchmark transport loader] --> F[Retained transport export]
F --> C
Technical reviewBest possible solution: Merge the focused cleanup while retaining the existing fixture entry points and dynamic benchmark transport export. Do we have a high-confidence way to reproduce the issue? There is no reported runtime defect to reproduce; source inspection confirms the unused or module-local declarations, and no target code was executed during this read-only review. Is this the best way to solve the issue? The patch uses the smallest existing-owner cleanup: remove unnecessary exports and unreachable helpers without adding abstractions, analyzer exceptions, or compatibility paths. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a3f44fb8a9f6. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource 0, Tests -64. Total -64 across 17 files. Added test files: 0. View PR surface stats
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 Reviewed October 24, 2026, 10:19 PM ET / October 25, 2026, 02:19 UTC. |
|
Simplified: Test-support helpers now expose only their live cross-module surface while retired declarations are removed. |
Test-support helpers now expose only their live cross-module surface while retired declarations are removed.
Three fork test files merged cleanly but broke against seams upstream changed in the jump window: - session-recipient-authority.caller-thread: the maintenance owner fixture now provides assertCurrent, which OpenClawStateLeaseContext requires since openclaw#183336 (tsgo:core:test TS2741 at the merge). - session-delivery-queue-runtime: upstream removed withRuntime and builds the runtime fixture through withSessionDeliveryQueue (openclaw#183214). The capacity retry case does the same: each bound still gets a fresh queue and clock, with the same teardown order. The clock-jump case takes upstream's r.start() back: the wake assertion that the fork's pendingSweep: false served was removed upstream. - diagnostic.continuation-queue: upstream dropped the startDiagnosticHeartbeat test-support export (openclaw#183134); the enabled-config variant is the same call. RED at the merge 86ed749: withRuntime is not defined; startDiagnosticHeartbeatForTest is not a function; TS2741. GREEN: 20/20, 2/2, 9/9 solo, and tsgo:core:test passes. Assertions are unchanged. Refs karmaterminal/openclaw-bootstrap#1727 Co-Authored-By: Claude Opus 5.5 <[email protected]>
What Problem This Solves
OpenClaw's full-tree export analysis reports test-support declarations that are either used only inside their defining module or have no remaining consumer. Leaving those declarations exported makes internal fixture implementation look like a supported cross-module surface and keeps retired helpers in the source tree.
User Impact
There is no user-visible behavior change. Active test fixtures, assertions, timeouts, cleanup paths, and runtime behavior remain unchanged. The team-reports benchmark's dynamically loaded
fetchWithSsrFGuardexport is explicitly preserved for both direct and worker modes.Why This Change Was Made
The change removes the export modifier from 15 declarations whose only callers are in the same module. It also deletes nine source-qualified zero-consumer declarations and the three private types/constants that become unreachable with the retired Gateway-node MCP helper cluster.
This keeps the cleanup at the existing test-support owners: no analyzer ignores, compatibility shims, new abstractions, configuration changes, or test-only production seams are introduced.
Evidence
fetchWithSsrFGuardexport and unrelated existing residuals elsewhere, so this does not claim a globally green unused-export scan.