Repository navigation
refactor: localize single-consumer preparation and output - #180547
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 changes before merge. What this changesThis PR moves single-consumer preparation and rendering into existing operation owners and consolidates the safe-bin implementation. Example: A configured safe-bin command runs
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep open: this maintainer-authored cleanup coherently removes private forwarding layers, with no introduced defect found; exact-head CI still has an unattributed failure. Priority: P3 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherCLI commands, agent-output parsers, and bundled plugins prepare configuration, provider requests, notifications, and rendered output before passing them to existing execution and storage owners. flowchart TD
A[CLI and plugin entry points] --> B[Existing operation owners]
B --> C[Local preparation and rendering]
C --> D[Existing authority and validation checks]
D --> E[Transport and storage owners]
E --> F[Results and user output]
Technical reviewBest possible solution: Retain the behavior-preserving consolidation and land it after the failing CI scenario has an evidence-backed disposition. Do we have a high-confidence way to reproduce the issue? This is a behavior-preserving refactor rather than a reported product bug; inspection found no concrete introduced failure. Is this the best way to solve the issue? Moving private single-consumer frames into their existing owners achieves the stated cleanup without adding a competing implementation or changing public contracts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 874e463653eb. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource -500, Tests +166, Other -3. Total -337 across 39 files. Added test files: 0. View PR surface stats
Review metrics
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, 7:29 AM ET / 11:29 UTC. |
|
Exact-head CI completed for
The latest-main classification is unknown, because its job layout has no matching job; it is not used as inheritance proof. The coordinator flake catalog and last six completed scheduled runs were checked. Historical raw replay archives were removed during their earlier authorized closeout; the durable native evidence and published report remain, and no new baseline execution is claimed here. Actual CI checkout Paginated census: 321 terminal checks, no pending checks; only the two failures above. Fourteen cancelled metadata auto-responses have successful replacements; no cancelled test-suite proof gap. Hosted lint/types, baseline ratchets, security-fast, and every other selected suite pass. Focused affected-module proof, native targeted types, independent review, runtime/static cycles (both zero), wrapper/import-closure checks and line caps are recorded in the PR. Local inherited diagnostics remain disclosed. No CI rerun, synthetic commit, branch update or repush was used to chase green. The existing auto-merge request was retired through native recovery before selecting this same reviewed head for the protected inherited-failure route. No security, review, public contract, lazy-loading, or Phase E exception is requested. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…80547) * refactor(slack): fold single-consumer preparation helpers * refactor: keep private status and release frames with callers * refactor(providers): fold private payload compatibility frames * refactor: fold private push delivery and media parsing frames * refactor(speech): fold private provider preparation frames * refactor(cli): fold hook mutation and video download frames * refactor(exec): reunite internal safe-bin policy owner * refactor(channels): fold private account projection frames * refactor(cli): fold private config preparation frames * refactor(cli): localize sandbox explanation selection * refactor(feishu): fold tool-local execution frames * refactor(cli): fold command-secret resolver frames * refactor(cli): localize command-secret target frames * refactor(agents): fold CLI output parser frames * refactor(whatsapp): localize markdown formatting frames * refactor(cli): fold model-validation preparation frames * refactor(uuid): fold the private warning frame
What Problem This Solves
Internal preparation and rendering code retains private interfaces and leaf modules used by only one production consumer.
User Impact
No intended user-visible change. Public CLI, configuration, protocol, Plugin SDK, persistence, authorization, and lazy-loading contracts remain intact.
Why This Change Was Made
Keep single-use preparation with its existing operation owner. This removes private parameter/result carriers and forwarding frames across command preparation, CLI output, push/media handling, and plugin-local delivery and speech preparation. The safe-bin aggregate now directly owns its unchanged profiles and validator, eliminating two internal leaves while preserving the aggregate's eight exports and tooling callers.
Public-entry tests retain the supported behavior. Added preservation cases cover sandbox channel/main-key selection through stored sessions, Feishu missing-scope and late partial-cleanup failures, WhatsApp escaped formatting and chunk boundaries, and secure UUID refusal with one warning. No production test-only seam is introduced.
Best-effort tradeoffs accepted
No defensive guard is removed. Private helper stack names and incidental forwarding-microtask timing are not retained contracts; actual awaited effects, security checks, cancellation, cleanup, settlement, output bytes, and ordering remain. No schema, config key, dependency, durability, permission, or public API change is included. The standalone Phase E memory backend and its machinery and tests are untouched.
Evidence
Net production LOC: 500 removed (1,826 additions / 2,326 deletions across 31 production paths, excluding tests, fixtures/support, generated files, and declarations). Tests grow by 166 net lines across six files; there are 39 paths overall. Baseline and wrapper-inventory edits only remove orphan entries.
Focused tests run serially through repository wrappers with one worker, low priority, and isolated HOME/OpenClaw/XDG state. They cover the touched preparation, provider payloads, speech factories, hooks/video, safe-bin validation, channel/account projection, config preparation and model validation, sandbox explanation, Feishu tools, scoped secret resolution/selection, CLI-output parsing, WhatsApp delivery/formatting, and UUID behavior. Native targeted types and formatting pass. Packet reviews resolve actionable findings; a max-lines finding based on raw line count was rejected because the actual rule excludes blank lines/comments and scoped lint passes without the now-unused suppression. Full-branch independent review found no actionable P0–P2 defects. Assertion safety, mock exports, wrapper/eager-import closure, and line caps pass; runtime and static cycle checks both report zero cycles.
Known local limitations are retained, not called green: Qwen typed lint has two unchanged imported StreamFn alias diagnostics, reproduced serially on the base. The suppression inventory has 13 passing cases and one inherited mismatch (expected 100, actual 103); the extra entries are in
src/cron/store/job-mutations.ts,src/transcripts/library.query-budget.test-support.ts, andui/src/pages/sessions/view.tsx. Those files, the inventory test, and its parser inputs are unchanged against the branch base. A separate max-lines suppression census reports three unchanged UI suppressions missing from its baseline; this diff adds no suppression or allowlist entry.No local broad suite, whole-graph typecheck, build, live provider/channel, or real-device proof is claimed. Exact-head hosted CI is the broad landing gate. Active lifecycle, sandboxed-provider, runtime-pinning, and other separately owned feature work is preserved rather than absorbed.