Repository navigation
refactor(core): deslop forwarding layers - #165567
Conversation
Inline private forwarding functions and parameter/result adapters into existing runtime owners. Remove five internal forwarding modules while preserving public SDK, lazy loading, authority, cleanup, prompt text, and wire/config/state contracts.
|
🦞👀 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. Reviewed October 5, 2026, 9:36 AM ET / 13:36 UTC (Revision 3). ClawSweeper reviewWhat this changesThe branch removes private forwarding helpers across agent execution, Gateway requests, message delivery, plugin loading, and updates while preserving their existing behavior. Merge readiness✅ Ready for maintainer review Keep open: the refactor remains useful, and no concrete introduced defect was found. The earlier migration-proof warning is unsupported by the current diff and should not remain a blocker. Required CI still gates landing. Likely related people: steipete (medium-confidence routing) and obviyus (low-confidence routing), based on prior merged work. Priority: P3 Review scores
Verification
How this fits togetherCore runtime owners turn agent requests, configuration, and connected-device state into model calls, messages, plugin operations, and update steps. This refactor moves parameter and result construction directly into those owners. flowchart TD
A[Agent and operator requests] --> B[Runtime configuration]
B --> C[Existing core owners]
D[Connected devices and plugins] --> C
C --> E[Authorization and lifecycle checks]
E --> F[Model and transport operations]
F --> G[Replies and operation results]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -1001, Tests +16, Other -1. Total -986 across 63 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep parameter construction with the existing runtime owners while preserving lazy loading, prompt bytes, wire contracts, authorization, and cleanup ordering. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR proposes behavior-preserving cleanup rather than a reported runtime defect; no tests or target code were executed during this read-only review. Is this the best way to solve the issue? Yes: directly using the existing owners removes redundant projections without creating competing policy or API surfaces. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7dbeb96c3981. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
Restore the PR tooling closure and private node-queue pruning boundary. Inline eligible agent diagnostics, Talk projections, and ClawHub result adapters instead, retaining behavior and the batch reduction.
|
Admin-merge evidence for head Every failing job on this head was attributed individually. The only non-aggregate failure is check-test-types-core-5: This is main-red and unrelated to this PR:
A main fix for the fixture is in progress separately. |
* refactor(core): deslop forwarding layers Inline private forwarding functions and parameter/result adapters into existing runtime owners. Remove five internal forwarding modules while preserving public SDK, lazy loading, authority, cleanup, prompt text, and wire/config/state contracts. * refactor(core): avoid shadowing captured tool input * refactor(core): preserve protected forwarding boundaries Restore the PR tooling closure and private node-queue pruning boundary. Inline eligible agent diagnostics, Talk projections, and ClawHub result adapters instead, retaining behavior and the batch reduction.
What Problem This Solves
Private core flows rebuild parameter bags and result objects through forwarding functions that add no decision or invariant.
User Impact
No user-visible change is intended. Configuration, persisted data, protocol payloads, CLI output, model-facing text, public Plugin SDK surfaces, and runtime authority/lifecycle boundaries remain unchanged.
Why This Change Was Made
One batch removes 1,001 net production lines across 63 changed files, excluding tests and baselines:
Four private forwarding modules are removed. Existing consumer/schema fixtures remain; assertions for deleted node DTO builders are covered by retained NodeRegistry wire tests. No skips, timeout increases, retries, or weakened failure thresholds are added. Assertion baselines only shrink. The protected PR-tooling closure, private node-queue pruning boundary, and peer-owned paths are unchanged from the base.
Evidence
pnpm test src/plugins/config-policy.test.ts --maxWorkers=1, 8.50s wall time.pnpm buildpassed in 3,395.92s before the final protected-boundary restoration and replacement inlining. Targeted lint and both import-cycle checks passed before that correction. Final affected proof is recorded below when complete.check-deprecated-api-usage.mts --rule=internal-config-apiscan passed directly. Original failures remain recorded; hosted CI supplies Linux acceptance.nice -n 15, one heavy command at a time.Initial hosted failures and correction
The previous CI run used merge ref
2d24037341d218e1a3e9644621f169c428a5d311(PR headc085dec018381803ae67d032b04425bc119d8ea0merged into main223f6e44). Its state-migration import cycle was fixed on main by21901766c53433f1f269e996055ffc617a1766e7; none of the 17 cycle members are changed in this PR. Main2fec39f57319be5b6e0b20b5305665ed1ff5e685also contains the Copilot cancellation and Codex thread-cleanup fixes corresponding to four provider-harness failures. The next hosted merge-ref run must verify those fixes; these commits are not substitutes for passing CI. A separate 120s session-projection timeout remains unclassified, with no inherited-failure waiver claimed.A supplemental local PR-provisioning run recorded a 120s macOS sparse-transition timeout and was interrupted. Its source-integrity check also detected a restoration made during the run, so that run is not accepted as final proof. No fixture, assertion, timeout, scanner, or protected tooling source was changed to accommodate it. Final focused proof runs against the unchanged committed source.
Final correction proof
On
edf83589ba4f1af0bcfde27088830b4bd70edeec, eight focused files passed: 299 tests in 483.35s wall time. This covers CLI spawning/log redaction, model diagnostics/hooks, Talk handlers/configuration, ClawHub install validation, package installation, and the restored config-policy boundary. The runner verified the unchanged source generation at completion.The final local lint invocation was interrupted during Plugin SDK declaration preparation after 345.43s; no final lint pass is claimed. Hosted lint on the pushed head remains required.
Both final import-cycle checks passed on
edf83589ba4f1af0bcfde27088830b4bd70edeec: Madge zero cycles (144.36s), runtime values zero cycles (173.34s).