Repository navigation
refactor: keep private runtime composition with callers - #178778
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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR moves private runtime composition into existing production callers and migrates helper tests to those callers. Example: An owner runs /export-session exports/session.html.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-directed refactor removes private forwarding paths while preserving the inspected contracts; no actionable introduced bug was found. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherCLI commands, agent tools, Gateway handlers, and bundled plugins compose existing runtime operations from validated inputs and return rendered output, tool results, or delivery outcomes. flowchart TD
A[CLI and runtime requests] --> B[Existing production callers]
B --> C[Shared SDK and runtime owners]
C --> D[Storage and transport operations]
D --> B
B --> E[Command and tool results]
B --> F[Gateway and channel responses]
Technical reviewBest possible solution: Keep composition with the existing callers while preserving shared runtime contracts and completing the normal exact-head CI gate. Do we have a high-confidence way to reproduce the issue? This is a behavior-preserving refactor; inspection establishes the private forwarding paths being removed, and no target code was executed. Is this the best way to solve the issue? The changes use existing owners, retire the replaced paths, and move useful coverage to production callers without introducing competing machinery. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f6c006637e25. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource -512, Tests +244, Other -4. Total -272 across 76 files. Added test files: 1. 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 20, 2026, 5:25 PM ET / 21:25 UTC. |
|
Merged via squash auto-merge.
|
) * refactor(cli): keep private rendering frames with their callers * refactor(cli): fold one-use skill rendering definitions * refactor(agents): keep CLI compaction projections private to owner * refactor(reply): consolidate single-consumer display projections * refactor(cli): inline single-use command parsing and presentation frames * refactor(diffs-language-pack): keep asset delivery in plugin entry * refactor(agent-guidance): load instructions in plugin registration * refactor(cli): render secrets reload failures at caller * refactor(doctor): read update marker at preflight sites * refactor(gateway): bind message omission at publication * refactor(proxy): keep child capture receiver in listener owner * refactor(mcp): assemble channel server at public serving owner * refactor(doctor): keep secret diagnostics with health owner * refactor(outbound): stage gateway media in send owner * refactor(plugins): compose model auth in native loader * refactor(deepinfra): compose private provider factories at owners * refactor(media): fold single-consumer CLI and channel forwarders * refactor(agents): fold private image and export assembly * refactor(runtime): fold private pagination and failure-report frames * refactor(runtime): compose private delivery and observation frames
What Problem This Solves
Internal CLI, tool, and plugin flows expose private factories and result objects used by only one production owner, with some tests coupled to those private seams.
User Impact
User impact: no intended user-visible change, migration, or operator action.
Why This Change Was Made
Compose these operations where their inputs and lifecycle already live: CLI rendering/parsing, Doctor diagnostics, MCP serving, proxy capture, outbound media staging, native plugin authentication, provider registration, artifact pagination, and agent image/computer results. Retire the single-consumer modules and forwarding hops, and move useful private-helper coverage to the registered command, provider, or public operation.
Keep public SDK/config/protocol contracts, lazy runtime imports, effect authority, filesystem containment and permissions, image sanitization, cursor bindings and limits, encrypted-delivery worker operations, ordinary cancellation, and shutdown settlement. The standalone session memory backend is untouched.
Net production LOC: 512 removed (+1,761 / -2,273), excluding tests, fixtures, test support, generated files, declarations, and ratchet inventories. The candidate touches 76 paths. Test/support migration adds 244 net lines; the whole diff removes 272 net lines.
Best-effort tradeoffs accepted
Evidence
One local lint issue introduced by the computer projection fold was fixed by renaming a shadowed local; no suppression, timeout, retry, or skip was added.