Repository navigation
refactor: consolidate one-consumer internal surfaces - #180786
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. |
Security-sensitive guard clearedCurrent revision: This PR no longer changes files in the maintainer security-review tier. Separate CODEOWNERS requirements still apply to security policy and enforcement files. |
|
Codex review: needs changes before merge. What this changesThis PR folds private single-consumer helpers and modules into their existing production owners while retaining public contracts. Example: An execution allowlist contains /tmp/a?b.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep this maintainer-authored PR open: the consolidation is coherent, and no actionable introduced defect was found; GitHub currently reports a merge conflict. Priority: P3 Before merge
FindingsNone. Agent review detailsHow this fits togetherCLI commands, agent events, provider requests, and UI projections enter existing owners that prepare results, enforce established checks, and return unchanged public output. flowchart TD
A[CLI and Gateway inputs] --> B[Existing runtime owners]
C[Plugin requests] --> D[Plugin execution owners]
E[UI events and catalogs] --> F[Plain TypeScript projections]
B --> G[Existing checks and effects]
D --> G
F --> H[User presentation]
G --> H
Technical reviewBest possible solution: Land the consolidation through the existing owners after resolving the reported conflict while preserving current-main contracts. Do we have a high-confidence way to reproduce the issue? This is a behavior-preserving refactor, so there is no reported user bug to reproduce; no target code was executed during review. Is this the best way to solve the issue? Moving single-consumer implementations into their existing owners completes the cutovers without adding competing state or public surfaces. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7f4cbc1e2a1a. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource -501, Tests +22, Other -2. Total -481 across 73 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 Reviewed October 22, 2026, 12:56 PM ET / 16:56 UTC. |
f418593 to
cb61c9b
Compare
|
Merged via squash.
|
* refactor(xai): localize video preparation and poll frames * refactor(agents): rank recovery suggestions at their sole caller * refactor(onboarding): keep browser handoff frames in their owner * refactor(infra): keep allowlist matching in its sole owner * refactor(clickclack): prepare activity text in its sole handlers * refactor(agents): keep nested lifecycle in its subscriber * refactor(foundry): register image provider in its sole owner * refactor(agents): prepare diagnostic records at their owner * refactor(file-transfer): prepare directory results at execution * refactor(ui): prepare Activity previews in the reducer * refactor(cli): render dry-run failures at their public entry * refactor(ui): keep model display preparation with its callers * refactor(commands): keep heartbeat and TTY preparation local * refactor(auto-reply): prepare media notes in their projection * refactor(infra): filter process warnings in the installed callback * refactor(cli): keep help and display decisions in their owners * refactor: render private profile and cleanup results at their callers * refactor: keep avatar and model projections with their callers * refactor(gateway): format startup summaries at their logging phase * refactor(reply): keep chunk planning in its public owners * refactor: localize steering and cold status preparation * refactor(providers): localize catalog projection callbacks * refactor: localize transcript actions and attachment presentation * refactor: localize search presence and UTF-8 phases * refactor(cli): fold JSON mode frames into output detection * refactor(imap): own email prompt at admitted dispatch * refactor(agents): retire internal runner re-export barrel * refactor(cli): own failure reporting inside update triage * refactor: isolate unproven gateway cleanup slice * refactor: isolate unproven UI cleanup slice
What Problem This Solves
Single-consumer internal modules and forwarding frames expose APIs with no independent owner and obscure the code that actually uses them.
What Changed
Place provider registration/catalog projection, bounded directory-result preparation, IMAP prompts, onboarding presentation and CLI command construction in their existing production owners. Retire the private Foundry factory module and IMAP prompt module. Their meaningful assertions now enter existing public owners; no test-only production seam is added.
Public CLI, SDK, protocol, configuration, persisted-data and user-visible contracts remain intact. Dynamic-import boundaries, security checks and the standalone session-memory backend are unchanged.
Net production LOC: 159 removed (+720 / -879), across 17 production paths; 21 total changed paths. Test/support delta: +19 lines. Counts exclude tests, support, fixtures, generated files, declarations and tooling metadata; relocated bodies are not deletion credit.
Best-effort tradeoffs accepted
Evidence
Each retained implementation packet passed focused owner/consumer tests, targeted native types, typed lint, formatting, diff inspection and independent P0–P2 review. The IMAP source-size assertion passed through real protocol parsing on unchanged production before its private seam retired. Foundry factory assertions now run through real provider registration. No suppression, timeout, retry or skip was added.
Recovery from CI run 39818723583: three update-runtime jobs, the Gateway exec-completion job, and the real-Gateway managed-media recap job failed. Local update head/base runs matched each other but not Linux CI. Both Gateway cases passed on both head and base; that does not establish a fix. The UI recap timeout did not match the older registered same-case failures; all 12 real-Gateway jobs in the six latest completed scheduled runs passed. Local browser E2E is outside the campaign proof budget.
Under the campaign's reachable-slice rule, remove every changed production file reachable from those failed flows, not the whole PR: the union of head/base Gateway graphs plus the browser application graph. Restore their obsolete test migrations and inventory rows. Every restored production blob equals both base 068c4d8 and fetched main b2094b6. The original 500-line candidate is preserved on the pushed parked branch deslop/z25-parked-ci100-gateway-20261015, without a PR; the 341-line dropped slice still needs attributable platform proof before recovery. This smaller PR is the mandatory CI-attribution split, not an exhaustion claim.
Focused restoration proof: runner/fork/prefix/import-boundary and CLI recovery/settlement/diagnostics passed 63 cases in nine files; targeted native types and typed lint passed. The six UI restorations passed 106 cases in seven focused files, targeted native types, typed lint and independent P0–P2 review. Runtime and static cycles are zero; assertion-safety, mock-export, wrapper/eager-import closure and line-cap gates passed. The required suppression suite has 13 passing cases and an investigated inherited inventory mismatch (103 versus 100), naming unchanged cron, transcript test-support and UI sessions files; no allowance was changed.
Exact-head hosted CI remains the broad landing gate. No broad local suite, build, E2E, whole-graph typecheck or live-provider/device proof is claimed.