Skip to content

fix(ci): dependency checks fail on reply-admission leftovers - #176447

Merged
obviyus merged 3 commits into
mainfrom
fix/deadcode-reply-admission
Oct 18, 2026
Merged

obviyus merged 3 commits into
mainfrom
fix/deadcode-reply-admission

Conversation

@obviyus

@obviyus obviyus commented Oct 18, 2026

Copy link
Copy Markdown
Collaborator

Requested by Ayaan

What Problem This Solves

Fixes: check-dependencies fails 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

  • 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

#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.
@obviyus obviyus self-assigned this Oct 18, 2026
@clawsweeper

clawsweeper Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime agents Agent runtime and tooling size: L labels Oct 18, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 18, 2026
@clawsweeper

clawsweeper Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

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

  • Before: Checks report unused reply-admission-ticket.ts and reply-turn-admission-owner.ts modules.
  • After: Both orphaned modules are removed, and retained functions are imported from their defining modules.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, focused cleanup with the previous defect repaired, passing reviewed-head checks, and no remaining actionable findings.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored cleanup removes unreachable implementations and internal facade exports without changing reachable product behavior; preserved tests and reviewed-head CI support the change.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Maintenance · Worth it: Yes · Fix scope: Complete
User problem: Repository dependency checks report obsolete code remaining after the session-controller migration.
Reason: The maintainer-authored change completes an approved ownership cutover without adding configuration, public APIs, or runtime policy.

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
Reviewed head: 38867b553ba48d4735e2a9406a89c98f4f1e19f1

Before merge

None.

Findings

None.

Agent review details

How this fits together

The 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
Loading

Technical review

Best 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

  • Session-controller facades and unused writer-admission helper keeps the original intent (36e277d: Consolidate session turn, queue, cancellation, and lifecycle ownership while migrating bundled callers.)
  • Retired reply-admission ticket keeps the original intent (dba9fb8: Preserve FIFO arrival order across steering and turn boundaries; the controller cutover now owns admission and leaves this module without importers.)
  • Queue delivery and lifecycle helpers keeps the original intent (3ff30b3: Consolidate reply preparation and lifecycle bookkeeping while preserving delivery contracts; the deleted helpers have no remaining callers.)
  • Session identity grouping helper keeps the original intent (c958468: Group owner-held identity snapshots for worker-based session maintenance; its grouping operation is now unused.)

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 36e277d adds src/sessions/session-controller.ts:18 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 36e277d76147; files: src/sessions/session-controller.ts)

PR surface

Source -161, Tests -78, Other -1. Total -240 across 79 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 28 27 188 -161
Tests 50 120 198 -78
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 1 -1
Total 79 147 387 -240

Labels

Label changes:

  • add P3: This is behavior-preserving dependency-hygiene cleanup with no demonstrated user-facing runtime defect.
  • 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.
  • remove P2: Current review triage priority is P3, so this older priority label is no longer current.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove merge-risk: 🚨 automation: Current PR review selected no merge-risk labels.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P3: This is behavior-preserving dependency-hygiene cleanup with no demonstrated user-facing runtime defect.
  • 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.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-18T20:52:43.834Z sha d72a622 :: needs changes before merge. :: [P2] Satisfy the mock-export ratchet when editing the cron factory

Reviewed October 18, 2026, 7:39 PM ET / 23:39 UTC (Revision 2).

steipete added a commit that referenced this pull request Oct 18, 2026
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.
obviyus added a commit that referenced this pull request Oct 18, 2026
## 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]>
@obviyus

obviyus commented Oct 18, 2026

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Oct 18, 2026
@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 18, 2026
@obviyus
obviyus merged commit dc6b38a into main Oct 18, 2026
168 checks passed
@obviyus
obviyus deleted the fix/deadcode-reply-admission branch October 18, 2026 23:41
@obviyus

obviyus commented Oct 18, 2026

Copy link
Copy Markdown
Collaborator Author

Landed as dc6b38a. Bug: after #175837, Knip reported 2 orphaned files and about 60 exports with no production consumer, so check-dependencies failed on main. Fix: delete the dead files, re-exports and helpers, point tests at the defining modules, and mark the test-only hooks @internal. Proof: all three deadcode scans report 0 entries for these findings, the affected tests pass, and PR CI was green.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 19, 2026
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.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 19, 2026
…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]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 19, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling gateway Gateway runtime 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