Repository navigation
refactor(core): deslop skills, acp, logging, process, flows and wizard second pass - #158906
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: blocked before merge. Reviewed September 26, 2026, 11:50 AM ET / 15:50 UTC (Revision 4). ClawSweeper reviewWhat this changesThe branch consolidates internal skill, ACP session, logging, process, setup, and wizard paths while correcting skill-scanner truncation accounting and an environment-sensitive setup test. Merge readiness⛔ Blocked before merge - 3 items remain Keep open for normal maintainer review. Current main does not contain this second cleanup pass, and the earlier merged passes cover distinct work. No actionable introduced defect was confirmed. The reported restart failure occurs in an unchanged emulator that cannot attest native service membership. Priority: P3 Review scores
Verification
How this fits togetherThese subsystems turn setup choices, plugin skills, and user commands into Gateway sessions, process work, and diagnostics. Their outputs affect configuration, session updates, command results, and support logs. flowchart LR
A[User commands and configuration] --> B[Setup flows]
A --> C[Skill loading and scanning]
B --> D[Gateway and ACP sessions]
C --> D
D --> E[Process execution]
D --> F[Diagnostic logging]
E --> G[Results and status]
F --> G
Before merge
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metricsNone. Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Retain the consolidated owners and scanner cap repair while preserving existing session, SecretRef, redaction, and Gateway setup contracts. Do we have a high-confidence way to reproduce the issue? Not applicable to the cleanup as a whole. The included scanner defect has a precise source-level negative control: 40 aliased dangerous-exec calls exceed the 32-finding cap and previously double-counted omitted matches. Is this the best way to solve the issue? Yes. The inspected changes reuse existing owners, and the scanner alias test protects the claimed accounting repair without adding a new policy surface. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 3f10eb70e8ce. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
@clawsweeper re-review The Evidence section now records the published 2026.9.6 updater installing the exact candidate, followed by passing automatic-migration, Doctor, config/state preservation, strict candidate The separate synthetic future-version restart hop is explicitly recorded as failed, not passing proof: the unchanged source-owned emulator deliberately supplies no native ControlGroup, so the native membership guard from #158314 correctly refuses it. No native automatic-restart or serving-turn success is claimed, and no ownership guard was weakened. The patch changes no schema, persisted format, config key, default, retention, or migration policy. Exact-head CI and the combined gate passed. |
|
🦞👀 Re-review progress:
|
What Problem This Solves
This second pass removes redundant forwarding, repeated projections, and duplicate control flow across skills, ACP, logging, process execution, setup flows, and onboarding.
User Impact
The refactors preserve skill instruction bytes, ACP behavior, log redaction, process ownership and signals, wizard copy and step order, and configuration keys. No migration or operator action is required.
Fixes found along the way
The skill scanner counted omitted dangerous-exec findings twice when an imported alias also matched a literal rule after the 32-finding cap. For 40 calls through
execFile as spawn, it reported 16 omitted findings instead of 8. Deduplication now records every literal match independently of the reporting cap; the existing bounded-report test covers this case.The search setup credential-required label test inherited
XAI_API_KEYfrom its host, making it fail in authenticated environments. It now scopes the missing-key condition through the existing environment helper and restores the original value without changing assertions.Why This Change Was Made
This maintainer-requested sweep read the production files largest-first and checked callers, public exports, and the earlier passes (#157765, #157748, #157982). It removes 1,174 net production lines and adds 9 net test lines. Audit and cron sources are untouched.
Simplifications and retained boundaries
_metaremain excluded by the retained exact field allowlists; no redaction patterns are removed.Watcher custody, process extinction, storage admission, revision pinning, rollback, public SDK compatibility, and distinct redaction coordinate passes remain with their existing owners.
Codex source was inspected directly for turn start/interrupt, model discovery, web-search configuration, and device-code prompts. Relevant contracts:
codex-rs/app-server-protocol/src/protocol/v2/turn.rs,codex-rs/app-server-protocol/src/protocol/v2/model.rs,codex-rs/protocol/src/config_types.rs,codex-rs/core/src/config/mod.rs,codex-rs/app-server/src/bespoke_event_handling.rs, andcodex-rs/login/src/device_code_auth.rsat sibling revision8f38d5a877da8c5c2c0b5158e72bb5f2290a3157.Evidence
Final validation used Blacksmith Testbox
tbx_01m3erw8sbwdw7w5bcdg9gqgk2, run 36240114837, with installed frozen-lockfile dependencies, verified source base3b829ce81bd7d7678858351b83070591a9ce5a58, and candidate tree3698501b09ad378d59f17a0ab3f493a953175082. The lease was stopped after successful proof.node scripts/run-vitest.mjs: 5,683 passed, 77 existing skips; 411 passing files across 11 shards in 432.71 s. Covers all six subtrees plus model-picker, hosted setup, chat wizard, guided memory import, and Gateway wizard-session callers.pnpm test src/skills/security/scanner.test.ts --maxWorkers=1: 1.47 s wall.XAI_API_KEY. The repaired full file passed 20 consecutive Linux runs, 16 tests each, under that same environment.pnpm test src/flows/search-setup.test.ts --maxWorkers=1: 14.83 s wall, 2.76 s Vitest duration. The original 40-file infra selection also passed twice separately (673 tests each; 152.70 s and 143.39 s) and again in the final cross-shard run.node scripts/run-vitest.mjsproof passed 9 shards in 105.96 s; after the first base refresh, wizard/scanner/logging regressions passed 3 shards in 17.77 s. Final full-subtree proof above covers the final candidate.node scripts/check-changed.mjs: passed, including all 25 core-test typecheck graphs, lint, dead-export scans, and boundary guards.pnpm build: passed in 7m36.9s. The complete remote command exited 0.openclaw/ci-gate: passed for0b0730ecca081f0191a9b3390a993976bc0beac9, including macOS and Windows jobs. The added scanner alias case took 0.001 s in the Bun shard; the repaired search-provider label case took 0.003 s in the Node shard. These are reported test-body durations; full-file serial wall costs are recorded above.git diff --checkpassed. All tests, lint, typechecking, and builds ran remotely.Upgrade compatibility follow-up
ClawSweeper found no actionable code or security defect and requested the repository's published-updater proof. On Blacksmith Testbox
tbx_01m3ezc7nj08wzwj1assjzhvk6(run 36246182684), the published[email protected]updater installed this exact candidate successfully over the harness's existing-user state. The remote checkout was explicitly pinned to0b0730ecca081f0191a9b3390a993976bc0beac9and tree3698501b09ad378d59f17a0ab3f493a953175082before packaging.The recorded first-hop phases passed: candidate package identity, package update (148.03 s), installed package identity, automatic migration, plugin-registry requests, Doctor (14.36 s), post-Doctor config validation, and state-survival assertions. The installed candidate then started through the existing service fixture in 14 s, passed its strict
/readyzcheck, preserved its unit/environment bytes, and answered authenticated Gateway status in 1 s. No live model-provider turn is claimed.Supplemental restart limitation: the full
pnpm test:docker:update-restart-authlane did not pass. Its later, separate candidate-to-synthetic-future-version hop refused withservice-membership-unverified. The source-owned systemd emulator deliberately returns an emptyControlGroup(scripts/e2e/lib/upgrade-survivor/update-restart-auth.sh:401); the native membership guard introduced by merged #158314 correctly refuses that unverifiable service. Both the emulator and guard are unchanged by this PR. This is an unsupported native-ownership proof environment, not evidence of a regression in this patch. The existing first-hop, Doctor, state, readiness, and authentication results above are preserved; native automatic-restart success is not claimed. No ownership check, assertion, retry, or timeout was weakened.The wrapper's SSH transport returned 255 during packaging while the remote harness continued; its completed log and structured summary were recovered from the same owned lease. Earlier attempts stopped before baseline installation on synthetic sync-commit identity checks. The final attempt fetched and checked out the pinned public commit before building, keeping package and plugin-registry provenance aligned. The lease was stopped after collecting the completed result.
This patch changes no schema, persisted format, config key, default, retention, or migration policy. Doctor's lazy callbacks still call the same runtime owners; the Workshop query still reads the same stored fields.
The first cold source capture expired before any test executed; later leases used a longer idle window. Gates caught and corrected a callback type mismatch, an exhaustive return, and exact baseline shrink/lint cleanup. Unrelated line-cap failures were already owned by #158778 and #158820; the final base includes both merged fixes. The search-fixture failure was reproduced and repaired before the stability runs. No failed test was retried merely to obtain green.