Repository navigation
fix(ci): dependency checks fail on reply-admission leftovers - #176447
Conversation
#175837 moved reply admission into the session controller. It left two orphaned files, re-exports with no consumer, dead helpers, and helpers that only tests now call. check-dependencies fails on all of them. - Delete reply-admission-ticket.ts and reply-turn-admission-owner.ts. - Delete helpers with no caller: claimAgentSessionWriterFromAdmission, assertSingleAdmissionOwner, resolveOverflowSummaryInboundEventKind, completeFollowupRuns, isRpcSourceQueuedForSession, collectSessionIdentityTargets, abortReplyRunBySessionId, and two dead test-support helpers. - Drop facade re-exports with no production consumer from session-controller.ts, session-controller.lifecycle.ts, stop.ts, chat-abort.ts, queue.ts, directives.ts, run.runtime.ts, gateway-transport.ts and session-accessor.sqlite-entry-admission.ts. Tests now import the defining module. - Make module-local helpers private. - Mark eight test-only hooks @internal, the pattern main uses for test hooks (#176285). No runtime behavior changes.
|
🦞👀 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 deletes unused admission code and exports, redirects test imports, and preserves real exports in the cron runtime mock. Example: A contributor checks dependency hygiene after the session-controller migration.
Review scores
ProductKind: Maintenance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it completes useful dead-code cleanup, resolves the previous mock-export finding, and has no remaining actionable findings. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe session controller owns turn admission, queues, cancellation, and settlement; dependency checks inspect its modules and consumers for obsolete code. flowchart LR
A[Incoming messages] --> B[Session controller]
B --> C[Queue and lifecycle owners]
C --> D[Agent runtime]
E[Dependency checks] --> B
F[Behavioral tests] --> C
Technical reviewBest possible solution: Retain this focused cleanup and the corrected cron mock, completing the existing controller ownership cutover. Do we have a high-confidence way to reproduce the issue? The orphaned modules and unused implementations are directly verifiable in the pinned base and fetched main; no target code was executed during this review. Is this the best way to solve the issue? Deleting unreachable code, narrowing internal exports, and redirecting test imports is the smallest complete fix using the existing owners. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5a0fb5a7f579. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -161, Tests -78, Other -1. Total -240 across 79 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 HistoryReview history (1 earlier review cycle)
Reviewed October 18, 2026, 7:39 PM ET / 23:39 UTC (Revision 2). |
Account for the intentional worker postMessage spy suppression from #175927. Remove unused daemon/auth helper exports and the unused Copilot test bridge. Leave overlapping reply-admission cleanup to #176447. The manifest baseline, shell-owned entries, and FRV deadline fixture already landed separately.
## What Problem This Solves Fixes: Knip `deadcode:exports` on main reports four exports that recent refactors left without a consumer. #176447 does not cover them. ## User Impact No user-visible change. ## Why This Change Was Made - `src/cron/service.test-harness.ts: createCronServiceStateWithJobs`: #175975 removed its last callers, so it is deleted. - `extensions/copilot/src/attempt.test-support.ts: createStubToolBridge`: #176003 added an exported copy that nothing imports, so it is deleted. The file is back to its state before #176003. - `src/daemon/inspect-markers.ts: classifyGatewayCommand`: #176469 removed the only outside import, so it is now module-private. - `src/gateway/server-cron.events.test-support.ts: CRON_WAIT_TIMEOUT_MS`: #176399 removed the last outside caller, so it is now module-private. No ignores were added. ## Evidence - `pnpm run deadcode:exports` on this branch, diffed against main `48439195832`: only these four entries disappear. - `extensions/copilot/src/attempt.test.ts` and `src/daemon/inspect.test.ts` pass in full. `oxfmt` and `oxlint` are clean. Co-authored-by: Ayaan Zaidi <[email protected]>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Landed as dc6b38a. Bug: after #175837, Knip reported 2 orphaned files and about 60 exports with no production consumer, so |
Account for the intentional worker postMessage spy suppression from openclaw#175927. Remove unused daemon/auth helper exports and the unused Copilot test bridge. Leave overlapping reply-admission cleanup to openclaw#176447. The manifest baseline, shell-owned entries, and FRV deadline fixture already landed separately.
…6562) ## What Problem This Solves Fixes: Knip `deadcode:exports` on main reports four exports that recent refactors left without a consumer. openclaw#176447 does not cover them. ## User Impact No user-visible change. ## Why This Change Was Made - `src/cron/service.test-harness.ts: createCronServiceStateWithJobs`: openclaw#175975 removed its last callers, so it is deleted. - `extensions/copilot/src/attempt.test-support.ts: createStubToolBridge`: openclaw#176003 added an exported copy that nothing imports, so it is deleted. The file is back to its state before openclaw#176003. - `src/daemon/inspect-markers.ts: classifyGatewayCommand`: openclaw#176469 removed the only outside import, so it is now module-private. - `src/gateway/server-cron.events.test-support.ts: CRON_WAIT_TIMEOUT_MS`: openclaw#176399 removed the last outside caller, so it is now module-private. No ignores were added. ## Evidence - `pnpm run deadcode:exports` on this branch, diffed against main `7451c5780e5`: only these four entries disappear. - `extensions/copilot/src/attempt.test.ts` and `src/daemon/inspect.test.ts` pass in full. `oxfmt` and `oxlint` are clean. Co-authored-by: Ayaan Zaidi <[email protected]>
…w#176447) ## What Problem This Solves Fixes: `check-dependencies` fails on main after openclaw#175837. The reply-admission refactor left 2 files with no importer (`reply-admission-ticket.ts`, `reply-turn-admission-owner.ts`) and about 60 exports with no production consumer: facade re-exports, helpers that only tests call, and new helpers that nothing calls. ## User Impact No user-visible change. The deadcode scans pass for these findings. ## Why This Change Was Made - Deletes the orphaned files and the dead re-exports and helpers. - Tests that imported through the removed re-exports now import from the module that defines each function. - Eight helpers that only tests use are marked `/** @internal */`, the existing pattern for test hooks. No Knip ignores are added. ## Evidence - Before: hourly CI run 39154686674, `check-dependencies`. All of these findings first appear after openclaw#175837. - After: `deadcode:unused-files`, `deadcode:exports` and `deadcode:dependencies` report 0 entries for these findings. One newer unrelated entry from openclaw#175975 (`createCronServiceStateWithJobs`) remains. - Affected unit tests: 40 files, 829/830 pass. The one failure, `dispatch-from-config.reply-dispatch.test.ts > retains a frozen finalizing dispatch until its actual producer settles`, also fails on main without this change. `oxfmt`, `oxlint` and the line-cap check pass. Co-authored-by: Ayaan Zaidi <[email protected]>
Requested by Ayaan
What Problem This Solves
Fixes:
check-dependenciesfails on main after #175837. The reply-admission refactor left 2 files with no importer (reply-admission-ticket.ts,reply-turn-admission-owner.ts) and about 60 exports with no production consumer: facade re-exports, helpers that only tests call, and new helpers that nothing calls.User Impact
No user-visible change. The deadcode scans pass for these findings.
Why This Change Was Made
/** @internal */, the existing pattern for test hooks. No Knip ignores are added.Evidence
check-dependencies. All of these findings first appear after refactor(sessions)!: give each session one controller for turns, queues, and Stop #175837.deadcode:unused-files,deadcode:exportsanddeadcode:dependenciesreport 0 entries for these findings. One newer unrelated entry from test: remove low-value tests (batch d249) #175975 (createCronServiceStateWithJobs) remains.dispatch-from-config.reply-dispatch.test.ts > retains a frozen finalizing dispatch until its actual producer settles, also fails on main without this change.oxfmt,oxlintand the line-cap check pass.