Repository navigation
refactor: consolidate single-consumer internal surfaces - #180641
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 folds private helpers into their existing consumers and replaces the internal Workboard barrel with direct imports. Example: A Twitch status probe receives an authentication failure.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this maintainer-directed PR open: the consolidation removes redundant internal surfaces, and review found no actionable introduced defect. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherCLI commands, Gateway preparation, channel plugins, and Control UI owners consume configuration and runtime facts to produce commands, status, delivery results, and presentation. flowchart LR
A[CLI and UI requests] --> B[Existing command and presentation owners]
C[Configuration and runtime facts] --> B
B --> D[Gateway and plugin operations]
D --> E[Transport and filesystem effects]
D --> F[Status and presentation results]
Technical reviewBest possible solution: Retain the consolidation and fixture repairs under the existing exact-head CI gates. Do we have a high-confidence way to reproduce the issue? This is a behavior-preserving refactor; source inspection confirms the two stale fixture expectations, and no target code was executed during this read-only review. Is this the best way to solve the issue? Inlining into existing owners and deleting the retired modules is a complete consolidation without new state, wrappers, or public contracts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 09e09dcdf71e. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceWhat I checked:
PR surfaceSource -427, Tests +14, Other 0. Total -413 across 63 files. Added test files: 0. View PR surface stats
LabelsLabel changes: No label 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 HistoryReview history (1 earlier review cycle)
Reviewed October 22, 2026, 9:52 AM ET / 13:52 UTC (Revision 2). |
df73746 to
301e51c
Compare
|
@clawsweeper re-review CI repair is now at |
|
🦞👀 Re-review progress:
|
301e51c to
990cc9d
Compare
|
Merged via squash.
|
) * refactor(gateway): localize workspace inventory command stages * refactor(infra): inline Windows process executable paths * refactor(gateway): own session preamble normalization * refactor(workboard): import internal browser owners directly * refactor(retry): localize private jitter preparation * refactor(agents): localize OAuth registry identity comparison * refactor(cli): localize device command preparation frames * refactor(ui): localize single-consumer owner preparation * refactor(browser): localize snapshot and version probe frames * refactor(infra): localize discovery and diagnostic preparation * refactor(msteams): localize formatter preparation frames * refactor(whatsapp): localize requester call preparation frames * refactor(skills): localize single-consumer status assembly * refactor(cli): localize agent command preparation and presentation * refactor(ui): localize custom theme import preparation * refactor(status): localize channel account presentation frames * refactor(mattermost): localize preview preparation frames * refactor: localize numeric and startup preparation frames * refactor(presence): keep grouping type module private * refactor(twitch): own private actions and status in plugin * refactor(media): resolve read policy at sole call site * refactor(ui): inline private update and auth projections * refactor(update): validate child grants in delegated executor * refactor(infra): locate disk ancestor in public reader * fix(test): preserve utility exports in update recovery clock fixture * test(twitch): inline retired target assertions in normalization cases
What Problem This Solves
Internal helpers and re-export modules expose APIs used by only one production caller, spreading a single responsibility across unnecessary boundaries.
User Impact
No user-visible change. Public CLI, configuration, protocol, Plugin SDK, and package entry points stay intact. Lazy-import boundaries, authorization, durable state, and normal concurrent behavior are preserved; no migration or operator action is required.
Why This Change Was Made
Fold private single-call preparation and presentation into their existing owners, remove the internal Workboard barrel, and absorb the Twitch action/status leaves into their sole plugin owner. Tests that imported those leaves now exercise existing public plugin operations with their assertions retained.
The narrowed cut removes 427 net production lines across 52 production paths (63 paths overall), measured against
f5388585ceb2fe2737bece066e86ef3bbd1f2907, excluding tests, fixtures, test support, generated files, and declarations. Relocated algorithm bodies are not counted as deleted behavior. Phase E session memory is untouched. The original cut met the 500-line floor; campaign rule 8 removed only the paths reachable from inconclusive CI failures, preserving the other cleanup.Best-effort tradeoffs accepted
No protective guard is removed. Private async-return hops disappear when their sole caller absorbs the body; exact microtask interleavings at those internal call frames are not retained as a contract. Actual I/O waits, live effect-authority checks, cancellation, child settlement, and cleanup remain. The Twitch authentication-success fix remains enforced.
Evidence
Focused public-boundary suites, targeted native typechecks, formatting, and line caps passed for the touched owners. Retained packets include 56 Twitch cases, 36 media-access cases, 49 update/auth UI cases, and 95 Workboard cases across eight suites. Existing platform skips remain; they are not native Windows proof.
CI repair: the local-service shutdown and handoff-reclamation cases passed in one serial exact-head/base replay each, which was inconclusive rather than proof of a fix. The browser executable fixture also failed on both heads, but additional Linux cases were not fully attributed. Runtime import closures identified the exact reachable changed paths: retry jitter, disk ancestor lookup, Windows executable paths, browser version probing, and the delegated-grant fold. These cuts and the corresponding grant test migration were removed, with their original postimages preserved on
deslop/z25-parked-local-service-20261015(no PR; 76 net production lines).Two concrete stale test fixtures are repaired without weakening assertions: the update recovery clock now preserves real utility exports after main #180552 added a
tryParseJsonimport (the original failure reproduced on the exact base; all 20 process-output cases now pass, 141.7s runner wall time); the Twitch outbound normalization cases now use the same direct success/error assertions as their siblings instead of two helpers removed by #180424 before #178480 landed. The latter failed targeted typing on unchanged main before repair; all 89 focused Twitch cases across five suites and targeted native typing pass afterward. The earlier Workboard All boards fixture correction is now already on main and is no longer part of this diff; its existing mounted-page heading contract passed, while actual routing remains an exact-head hosted E2E gate.GitHub then reported a conflict with main's Twitch target-normalization fix. The conflict-only rebase preserves main's shared
target.tsowner and outbound behavior; it does not restore the old private target parser. Range-diff shows 24 unchanged patches, the reviewed Twitch import resolution, and the already-landed Workboard fixture patch skipped. Fresh independent P0–P2 review is clean for both the resolved Twitch fold and the adjacent test repair.Independent P0–P2 review passed for each packet and the complete signed branch. Runtime and static cycle checks both report zero cycles. No new assertion allowance, mock baseline, lint suppression, timeout, retry, or skip was added.
Local limitations: imported-type typed-lint diagnostics in unchanged Workboard, WhatsApp, and Twitch annotations reproduce on the clean tooling checkout. The suppression inventory reports the same three unchanged baseline extras in cron, transcript test support, and the sessions view (103 versus 100); no allowlist was widened. Wrapper/eager-import closure, assertion safety, and mock-export ratchets passed. Exact-head hosted CI is the broad proof. No local build, broad typecheck, E2E, paired-device, or live channel claim is made under the campaign's CPU budget. The opt-in Workboard mock fixture build remains a hosted proof gap. This is not a visual change.