Repository navigation
refactor: deslop channels core and mid-size core dirs - #161029
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: blocked before merge. Reviewed September 29, 2026, 6:23 AM ET / 10:23 UTC (Revision 4). ClawSweeper reviewWhat this changesThe branch consolidates channel, Claw, meeting, media, plugin-state, security, and status helpers, removes redundant comments, and updates Fleet tests for a shared container argument builder. Merge readiness⛔ Blocked before merge - 4 items remain Keep open: this cleanup remains distinct from current main. The earlier security-audit conflict is resolved, and source review found no definite introduced bug. The required existing-install upgrade proof remains outstanding. Priority: P3 Review scores
Verification
How this fits togetherChannel messages pass through access decisions and delivery before reaching the Gateway and agents. Plugin setup, Claw schedules, meeting media, and stored plugin state feed that runtime, while security and status diagnostics report on it. flowchart LR
A[Channel messages] --> B[Access and delivery]
C[Plugin setup] --> B
B --> D[Gateway and agents]
E[Claw schedules] --> D
F[Meeting media and plugin state] --> D
D --> G[Security and health reports]
Before merge
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metricsNone. Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the consolidated owners while demonstrating unchanged Claw health and channel activation after an upgrade driven by a published updater. Do we have a high-confidence way to reproduce the issue? Not applicable: this refactor reports no product defect to reproduce. The review compared its changed paths with pinned source and current main. Is this the best way to solve the issue? Yes: the branch generally reuses existing owners instead of adding parallel behavior. Its existing-install behavior still needs the required upgrade check. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 5d6f464a1cb3. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
7fa68ac to
2b7da4d
Compare
* refactor: deslop channels core and mid-size core dirs * fix(types): avoid cyclic channel and media imports * refactor(channels): simplify remaining helper scaffolding
What Problem This Solves
Maintainer-requested cleanup of repeated projections, forwarding layers, duplicate local types, and narrating comments across channel core and the mid-size core directories.
User Impact
No intended behavior change. Channel transport/action shapes, security decisions and fail-closed defaults, provider request/wire formats, persisted Fleet/plugin state, and status text remain unchanged. No migration or operator action is required.
src/auditandsrc/cronare untouched.Why This Change Was Made
The final diff removes 1,000 net production lines (+564/-1,564). The two migrated Fleet tests retain every case and assertion (net +4 test lines); the assertion baseline only shrinks. Recent merged work since September 18 and #159811 were inspected first, and overlapping cleanup that landed during proof was retained at rebase.
Fixes Found Along the Way
No confirmed pre-existing product defect or flaky test was found in the lane. Hosted architecture CI caught two type-import cycles introduced by candidate type reuse. Both candidates were removed; their original declarations remain local. Two map-spread lint findings were fixed by retaining the original callback projection form. No assertions, timeouts, or coverage were weakened.
Evidence
Final head:
2b7da4dc2925b2d89f73ac74df50043f07c4b1dd. Rebase base:2993f78605b1b537042753d56e15e7ee0febe6fa. All execution used Blacksmith Testbox; source hashes were verified before execution.Refreshed after conflict resolution, on
tbx_01m3p5qwc5c0cycd8a9tkmzhtc(controller run):node scripts/check-changed.mjs --base origin/main --head HEAD: passed, 2,166 seconds, including production/test typechecks, lint, dead exports, boundary and authority guards.pnpm check:architecture: passed, 175 seconds; zero runtime and Madge cycles.pnpm build: passed, 388 seconds.src/channels,src/security,src/media-understanding,src/tts, andsrc/plugin-statesuites: 376 files / 3,992 tests passed; 1 platform file / 5 tests skipped; 460 seconds.src/infra/fs-safe-import-boundary.test.ts: 8 shards passed, 79 seconds.git diff --check: passed.The initial complete campaign also passed every touched directory plus Talk siblings (593 files / 6,750 tests; 7 platform skips), and all 132
pnpm test:extensionsshards in 4,257 seconds, including meeting audio/script and channel setup consumers. The rebase retained the newly landed overlapping cleanup and removed duplicate parts of this patch; unchanged areas retain that proof. Initial full proof lease:tbx_01m3nf8nsz3qk2edj6mvc94tx3(run).Changed test cost on Testbox with
--maxWorkers=1:pnpm test src/fleet/cell-profile.test.tspassed 65 tests in 2 seconds wall;pnpm test src/fleet/containers.runtime.test.tspassed 35 tests in 20 seconds including cold runtime preparation. No permanent tests were added.Inherited main CI failures
Final-head CI run 36554056015 tested merge
2950b38d2d163e4f0f910f56e0497656a1fa12af, whose parents are main88e0f4ac3acc0539ff05b144d8a452ebde3c4e9eand this PR's exact head2b7da4dc2925b2d89f73ac74df50043f07c4b1dd. The completed job census is 77 successful, 21 skipped, 57 cancelled, and two failed jobs (the publication shard and the derived CI gate). One cancelled shard had already recorded a separate failure; it is attributed explicitly below, not treated as passing coverage.checks-node-changed-compact-small-15(job109359477483):src/agents/subagents/registry/subagent-control.publication.test.ts, “revalidates the session after held publication preparation permits retirement,” throwsSESSION_DELIVERY_GENERATION_UNAVAILABLE. The same test, error code, and stack fail in scheduled main run 36550256341, job 109346582592, heada49e76e1862516e566de2de56b5df99b60c45756. The test removes its session during publication preparation; the unchanged generation owner rejects the now-unavailable row, while the unchanged cancellation owner catches only a revoked generation.checks-node-changed-compact-small-3(job109359477465, ultimately cancelled): sevensrc/gateway/server.incognito-lifetime.test.tsassertions fail because expiry cleanup returnsok: falseor leaves the session row present. The identical seven cases and assertions fail on the same scheduled main run in job 109346582369: 24-hour expiry, another Gateway's publication, all three sibling creation-stamp variants, and both cleanup-retry variants.Independent evidence comes from completed main job annotations, compared against the retained full PR job logs. Both failing tests and their publication/generation or Incognito expiry/deletion/lifecycle owners are byte-identical between the independent main head and the tested PR merge. This PR changes none of those owners, session storage/admission, the test configuration, or the failure branches. The Incognito fixtures exercise session deletion with synthetic state; changed channel send/setup flows and plugin-state operations do not participate in these failing assertions. The original failure monitor names job
109359477483and cancels the run; the CI gate fails downstream. Cancelled coverage remains incomplete hosted coverage, with the completed lane Testbox proof above retained separately.Current-head architecture, security-fast, all selected Security High checks, ClawSweeper review, security-sensitive approval, and dependency review passed. No CI rerun or proof-only push was requested.
Earlier head:
Prior corrected head
7fa68ac79a1133adb2796998719a2f84b9cf6f7cpassed architecture and security/dependency approval, then failed CI run 36537630985, jobchecks-node-compact-small-3, on twotest/scripts/plugin-sdk-surface-report.test.tsassertions: budgets 4,591 exports / 2,695 callables versus actual 4,594 / 2,698. Fail-fast cancelled remaining jobs and the derived CI gate failed.The identical assertions/counts fail on scheduled main run 36538101258, head
d2811224dc0deedce837aef252d97d624f8c4425, jobchecks-node-compact-small-36. Upstreamb4ae783fbfdadded three public callable exports tosrc/plugin-sdk/agent-harness-runtime.tswithout updating the budget. The tested merge parent and main proof contain that commit. This PR changes neither those exports/implementation owners nor the surface-report script or failing test.Peter explicitly authorized exact-head admin squash merge when independently proved inherited main failures are the only CI failures and lane Testbox proof passes. The exact-head REST squash merge succeeded as
f8f3bd5468458768bd76c60d672e317fb2b30e7con September 29; merge ancestry onorigin/mainwas verified. The inherited main failures remain coordinator-owned; no CI reruns or proof-only branch refreshes were requested.All task leases have been stopped. Additional completed proof leases:
tbx_01m3nnk9nx3v8ga005945xkeww(typechecks/test costs; exposed repaired lint),tbx_01m3ntsm9qh6scnx1rggwpp55v(full corrected gate), andtbx_01m3nzhzg5dp7kw924qz15ctdd(type-cycle correction).tbx_01m3nd1bve75ramdgn5kfv95p7expired before proof. Slow snapshot preparation was handled with 90-minute idle leases; no local test/check/build execution or protected staging cleanup was used.