Skip to content

refactor: consolidate command, CLI, cron, and channel paths - #173036

Merged
steipete merged 3 commits into
mainfrom
deslop/y10-commands-cli-cron-channels-20261015
Oct 15, 2026
Merged

steipete merged 3 commits into
mainfrom
deslop/y10-commands-cli-cron-channels-20261015

Conversation

@steipete

@steipete steipete commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Commands, CLI registration, cron payload handling, and channel setup repeat internal validation and forwarding paths that obscure their actual owners.

User Impact

No intended user-visible feature change. CLI commands/flags/text, public SDK exports, supported migrations, persisted shapes, security effect checks, FIFO ordering, and shutdown settlement remain. No schema, durability, retention, permission, configuration, or dependency change.

Why This Change Was Made

Use one subcommand catalog and shared lazy method binder, one cron payload merge path, existing migration visitors, and boundary-validated internal adapters. Remove speculative lifecycle/reentry guards without weakening real admission or security effects. Preserve the measured lazy-loading boundaries.

Net production reduction: 471 lines across 25 paths (+537/-1008), excluding tests, fixtures, support, generated files, and declarations. The campaign coordinator explicitly waived the floor for this branch.

Coverage: recent three-day and fourteen-day history, then largest-file and sole-caller/dead-export sweeps across commands, CLI, cron, and channels. Retained credential/migration receipts, real service shutdown/restart authority, ingress durability/FIFO, versioned streaming/SDK contracts, measured caches, cron billing/session ownership, and future-slot repair justified by human report #77867. Phase E memory code is untouched.

Evidence

  • Pre-CI targeted lint, core types, formatting, runtime and Madge cycles (zero), line-cap/assertion ratchets, and export-collision checks passed. The corrective candidate restores the compositor file exactly to base, changes no imports, and otherwise retains those production inputs.
  • Final-source focused cohorts: cron normalization/merge 54 tests; daemon lifecycle/foreground ownership 43 tests; mandatory lint-suppressions 3 tests. Doctor reported 22 individual passing cases before a bounded stop; its full cohort and bundled-channel tests remain incomplete locally.
  • Earlier unchanged-input proof includes CLI catalog/logging/registration 41 tests, account/setup 16 tests, and retained log shutdown/cancellation cases. These are not promoted to complete current-head coverage.
  • Independent full-candidate review completed. Its sole final P2 concerned stale log probe replacement; rejected after tracing every assignment: cancellation retains the sole pending promise, replacement requires idle, and the serial consumer resets only after settlement. The finding assumes the pre-fix: finish shutdown without disabling V8 compilers #168587 lifecycle. No accepted actionable finding remains.
  • Prior local catalog and Gateway-budget cases hit unchanged timeouts; attribution remains unresolved. Full build/CLI smoke, broad changed-check execution, test-graph types, and remaining owner cohorts are local proof gaps. No timeouts, retries, skips, budgets, or lint suppressions were added to obtain green. Exact-head PR CI is the broad proof; changed-path failures will be replayed at head/base serially, with inconclusive hunks dropped under the campaign rule.
  • Known main CI failures will use the native inherited-failure exception only after individual exact-head attribution against the latest scheduled main run. No reruns for green.
  • Initial exact-head CI run 38720810766 found two PR-caused roots: one obsolete mock-export allowance left by the removed Jiti fixture, and Mattermost's retiring-publication variant. The exact baseline row is removed; the local mock-export ratchet passes with 9586 grandfathered factories. Serial local replays at head and exact branch base were inconclusive before a verdict under load, so the compositor hunks were dropped under the coordinator rule. The compositor is byte-identical to base and every Mattermost test remains unchanged. The corrective push receives its own exact-head CI; no jobs are rerun for green.

Best-effort tradeoffs accepted

Keep one sub-CLI metadata/registration catalog, common cron payload updates,
canonical agent migration visitors, and shared account-state projection.
Trust typed internal adapters while retaining external validation, effect
authority, cancellation settlement, supported migrations and path containment.

Wave-5 y10: BELOW-500, 353 net production lines removed (+440/-793 in 19 files).
Branch-only handoff for the coordinator's bundle; no standalone PR.

Best-effort tradeoffs accepted:
- Cron mid-setup reload recovery (#146582): synthetic retirement, no human
  incident. Setup may fail; the next invocation refreshes the cache.
- Recursive shared preparation retry (#102494/#138337): synthetic concurrent
  callers; production serializes same-job work. Duplicate direct callers may
  share cancellation. Failed-owner eviction preserves the next sequential run.
- Progress publication generation (#143621): synthetic held update/reset.
  Presentation dedupe may briefly be stale until a subsequent render/reset.
- Doctor adapter schema mirror (#69919): malformed synthetic hooks. Invalid
  executable adapters fail visibly; missing-hook fallbacks and config checks stay.
- Setup adapter schema mirror (#165492): typed internal union. Invalid internal
  adapters fail when used; both supported wizard forms remain.
- Injected process schema mirror (#84381): malformed injection was not human
  SIGTERM report #71710. Invalid adapters fail registration; cancellation stays.
- Loaded registry row revalidation/copy (#114942/#158830/#114476): rows already
  admitted/normalized. Corrupt trusted rows can fail; first-wins authority stays.
- Custom compatibility duplicate check (#14223): all callers parse/type it.
  Hand-crafted invalid JS uses the default branch; external flags still reject it.
- Log probe identity matching (#88159, superseded by #168587): abort now joins
  the sole probe, so replacement cannot race its result. Recovery/settlement stay.
- Whole-config deep copy (#71218): no detached-copy incident. Structural copy
  updates agents/defaults; unrelated future mutation must respect config ownership.
- Repeated plugin-root probes (#70012): no disappearing-root incident. Resolve
  roots once; root replacement can fail discovery. Symlink containment stays.
- Second payload getter read (#135319): synthetic review/corpus, not a human
  report. Ordinary decoded records are read once; stateful accessors may differ.

Proof: fresh independent review clean; core types, targeted lint/format, runtime
and static cycles, assertion/line-cap ratchets, and suppression suite passed.
Focused CLI cohort: 8 files / 41 tests passed. Earlier unchanged account/setup
and cold-import checks passed. Cron and commands cohorts were interrupted after
partial results; complete owner tests, payload merging, test-graph types, broad
check-changed and build/smoke remain unproved at commit preparation.

Unattributed local 120-second timeouts retained: two root-command-descriptions
catalog cases and agent-via-gateway's Gateway attempt-budget case. No timeout,
retry, skip or kept-behavior expectation changes. Env-name budget mismatch
(455 vs 454) also exists at original HEAD and pinned main 7dccff5.
All runtime proof used isolated HOME/OpenClaw/XDG state; Phase E untouched.
Share daemon and cron method forwarding through the existing lazy binder,
remove the cron CLI reexport shim, and consolidate normalization and merge
handling without changing public fields, explicit clears, or effect authority.
Remove the obsolete bundled discovery reentry mechanism and impossible Doctor
issue helper. The full lane now removes 475 net production lines.

Best-effort tradeoffs accepted:
- Unknown Doctor issue variants supplied by hand-crafted JavaScript return the
  invalid value rather than a custom error. Typed local producers and exhaustive
  switches remain; reporting feature #95979 cites no human unknown-kind incident.
- Synchronous bundled-module self-discovery may fail through the existing loader
  diagnostic instead of returning empty inventory. Commit 65f18d6 only pins
  injected Jiti reentry, not a human incident; ordinary caches remain.
- Cron defaults trust staggerMs normalized earlier in the same synchronous call.
  No await or mutation boundary intervenes; externally supplied invalid values
  remain rejected by the normalizer.
@clawsweeper

clawsweeper Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes commands Command implementations size: XL labels Oct 15, 2026
@steipete
steipete marked this pull request as ready for review October 15, 2026 10:30
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T10:35:18.677710Z 217cfcb Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 15, 2026
@clawsweeper

clawsweeper Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

This PR consolidates CLI registration, cron payload handling, channel adapters, and Doctor migration helpers while removing redundant internal checks.

Example: A cron job changes from a command payload to a script payload with timeoutSeconds set to 30.

  • Before: Separate payload-construction code preserves the 30-second timeout.
  • After: The shared payload-merge path preserves the same 30-second timeout.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Useful, owner-directed consolidation with focused supporting tests, but a definite ratchet failure and incomplete upgrade validation prevent a ready verdict.
Proof confidence 🦪 silver shellfish (2/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🦪 silver shellfish (2/6) 2 actionable review findings remain.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Duplicate internal registration, migration, and preparation paths make consistent command and automation behavior harder to maintain.
Reason: The existing area owner directs the consolidation and records the accepted recoverable edge cases; no additional product approval is needed.

Merge readiness

⛔ Blocked before merge - 3 items remain

Keep this maintainer-directed refactor open; the consolidation is useful, but deleted test coverage leaves stale ratchet entries that fail required CI.

Priority: P3
Reviewed head: 217cfcb194ab0d7d6a3f00a3779d293e60446d7b

Before merge

  • Prune baseline entries for the removed test mechanisms (P2) - Removing the bundled-channel test's max-lines suppression leaves this allowance stale, which the max-lines ratchet rejects and the exact-head CI annotation confirms. The deleted reentry case also removes the file's sole channel-catalog-registry mock while its exact-factory allowance remains in config/test-mock-exports-baseline.txt. Remove those obsolete entries without changing unrelated allowances; otherwise the required ratchet check remains red.
  • Remove the cache state left behind by the reentry guard (P3) - The deleted guard was the only functional reader and writer of artifactLoadsInProgress. PluginRootArtifactCache still requires it, getPluginCacheRoot allocates a Set for every root, and bindPluginCacheRoot still merges it. Remove the field, allocation, and merge loop with this cutover, as required by the root policy to remove superseded state and machinery.
  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.

Findings

  • [P2] Prune baseline entries for the removed test mechanisms — config/max-lines-baseline.txt:290
  • [P3] Remove the cache state left behind by the reentry guard — src/channels/plugins/bundled.ts:327-328

Tests

  • Missing end-to-end proof: Supply an isolated upgrade from v2026.10.3 through the changed Doctor/onboarding paths, showing existing settings, agent configuration, and cron data preserved; no failing-base/passing-head regression run was supplied for this behavior-preserving refactor.
Agent review details

How this fits together

CLI commands and scheduled jobs enter shared registration, configuration, and execution owners, which produce command output, repaired configuration, channel status, and guarded tool effects.

flowchart TD
  A[User commands] --> B[CLI catalog]
  B --> C[Command owners]
  C --> D[Doctor config repairs]
  C --> E[Channel registry]
  F[Cron payload owner] --> G[Run admission]
  G --> H[Guarded tool effects]
Loading

Technical review

Best possible solution:

Keep the shared owners, remove obsolete cache state and ratchet allowances, and verify existing-install preservation through Doctor.

Do we have a high-confidence way to reproduce the issue?

No underlying product bug is claimed; source inspection and exact-head CI annotations establish the stale-baseline defect without executing target code.

Is this the best way to solve the issue?

The consolidation fits the existing owners and documented trust boundary, and the maintainer explicitly accepts the narrower best-effort lifecycle behavior.

Full review comments:

  • [P2] Prune baseline entries for the removed test mechanisms — config/max-lines-baseline.txt:290
    Removing the bundled-channel test's max-lines suppression leaves this allowance stale, which the max-lines ratchet rejects and the exact-head CI annotation confirms. The deleted reentry case also removes the file's sole channel-catalog-registry mock while its exact-factory allowance remains in config/test-mock-exports-baseline.txt. Remove those obsolete entries without changing unrelated allowances; otherwise the required ratchet check remains red.
    Confidence: 0.99
  • [P3] Remove the cache state left behind by the reentry guard — src/channels/plugins/bundled.ts:327-328
    The deleted guard was the only functional reader and writer of artifactLoadsInProgress. PluginRootArtifactCache still requires it, getPluginCacheRoot allocates a Set for every root, and bindPluginCacheRoot still merges it. Remove the field, allocation, and merge loop with this cutover, as required by the root policy to remove superseded state and machinery.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.93

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against b1dc7eff4d71.

Provenance checked

  • CLI descriptors and lazy registration keeps the original intent (c8ddcd1: Keep import-light root help aligned with live command descriptions and completion; the new catalog preserves descriptions and lazy registrars.)
  • Daemon runtime forwarding keeps the original intent (5de949f: Keep installed update recovery imports cheap and defer service implementations until invocation; the shared binder retains dynamic loading.)
  • Log recovery probe custody keeps the original intent (98813c2: Retain admitted work through cancellation and shutdown settlement; cancellation still retains the sole probe and the consumer settles it serially.)
  • Cron setup recovery changes intended behavior with a stated reason (5c81503: Recover retired plugin preparation once before executing scripts; the current body explicitly accepts next-invocation recovery instead.)
  • Cron payload tool restrictions keeps the original intent (864bb18: Keep creator tool caps across payload shapes and updates; the merged path retains restrictions and explicit clearing.)
  • Doctor agent workspace and heartbeat repairs keeps the original intent (14ff866: Repair invalid values on the canonical roster while retaining legacy-list repair; the replacement visitor covers both supported shapes.)
  • Channel Doctor hook selection changes intended behavior with a stated reason (a197b54: Use setup or loaded hooks when read-only discovery lacks them; missing-hook fallback remains, while malformed typed adapters now fail under the recorded maintainer decision.)
  • Progress publication deduplication changes intended behavior with a stated reason (8436617: Prevent retired preview publication from reclaiming deduplication state; the body explicitly accepts best-effort presentation caching across reset.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Introduced patch verified: Read the pinned merge-base-to-head diff; the verified synthetic merge carries the same changed paths without treating base movement as PR edits. (217cfcb194ab)
  • Patch-caused ratchet failure: The exact-head check annotates the stale bundled-channel max-lines entry. The patch removes that test's suppression and its sole channel-catalog mock, while both baseline allowances remain; the ratchet implementations reject stale entries. (config/max-lines-baseline.txt:290, 217cfcb194ab)
  • Retired state remains allocated: Removing the bundled discovery reentry guard leaves artifactLoadsInProgress without a functional consumer, while plugin-cache construction and alias merging still maintain it. (src/plugins/plugin-cache-artifacts.ts:28, 217cfcb194ab)
  • Accepted lifecycle tradeoff: The current maintainer-authored body explicitly accepts losing same-invocation setup recovery while preserving next-invocation refresh; the original purpose was checked against fix(cron): recover automations after plugin reloads #146582. (src/cron/trigger-script.ts:526, 217cfcb194ab)
  • Authority remains at execution: Cron retains admitted-run assertions and binds them to tool execution; channel registration still normalizes plugin records and binds plugin lifecycle ownership before publishing them. (src/cron/trigger-script.ts:562, 217cfcb194ab)
  • Migration compatibility evidence: Doctor now uses the existing visitor for workspace and heartbeat repairs. Added tests cover record and legacy-list inputs, but the full body and comments supply no latest-stable upgrade execution preserving existing settings and data. (src/commands/doctor/shared/legacy-config-core-migrate.ts:48, 217cfcb194ab)

PR surface

Source -475, Tests -171, Other -2. Total -648 across 40 files. Added test files: 2.

View PR surface stats
Area Files Added Removed Net
Source 26 540 1015 -475
Tests 13 232 403 -171
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 4 -2
Total 40 774 1422 -648

Review metrics

Metric Value Why it matters
Production versus test/support changes Production +539/-1014; tests/support +233/-404 The net reduction comes from consolidating owners and removing redundant paths; added cases protect payload fields, immutable config updates, and path containment.

Labels

Label changes:

  • add P3: This is internal consolidation with no intended feature change or established urgent user-facing regression.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P3: This is internal consolidation with no intended feature change or established urgent user-facing regression.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 15, 2026, 6:49 AM ET / 10:49 UTC.

Withdraw the progress compositor generation removal after the Mattermost
retiring-publication case failed CI and bounded serial head/base replays
remained inconclusive under load. Restore that file exactly to the branch
base and keep all Mattermost tests unchanged, following the campaign fallback.

Prune the single obsolete mock-export allowance left by the removed bundled
discovery reentry fixture. The local mock ratchet passes with 9586 factories.
The remaining lane reduction is 471 net production lines across 25 paths.
@steipete

Copy link
Copy Markdown
Contributor Author

Final disposition for head ac21e48a181c469ffd0892ca23f027c6e5c83531:

The exact-head CI run 38724998058 completed successfully, with 61 passing jobs including openclaw/ci-gate. No CI jobs were rerun. The earlier mock-factory ratchet failure was fixed by removing its obsolete exact allowance. The Mattermost draft-stream failure could not be attributed conclusively by serial head/base local replays under host load, so the progress-deduplication hunk was withdrawn entirely; its production file now matches the base and its tests are unchanged. Net production reduction is 471 lines.

The review of the prior head raised two additional cleanup items. The stale bundled-test max-lines allowance is real, but the claim that it blocks hosted CI is incorrect: scripts/lib/check-limits.mts explicitly makes measured-limit violations advisory in GitHub Actions, and both CI runs passed that ratchet portion. Treating this as a nonblocking metadata follow-up rather than replacing the now-green head. The unused artifactLoadsInProgress field/allocation/merge lives in src/plugins, outside this lane's authorized production scope; it remains a small plugins-owner follow-up, not a runtime correctness failure.

No persisted shape, schema, config contract, or supported migration was removed. Canonical and legacy agent-roster migration coverage remains. A full latest-stable upgrade was not run; that gap and incomplete local cohorts remain disclosed in the PR. The generic upgrade request identifies no concrete incompatible data transformation, so it does not expand this scoped refactor into a release-validation campaign.

The two cancelled control jobs are superseded on this same head: PR context/evidence run 38724994476 by successful 38725013859, and dispatch run 38724994239 by successful 38725013995. They are not cancelled test suites or inherited-red claims. CodeQL concluded neutral. No inherited-failure admin exception is needed.

@steipete
steipete merged commit 729e65e into main Oct 15, 2026
142 of 144 checks passed
@steipete
steipete deleted the deslop/y10-commands-cli-cron-channels-20261015 branch October 15, 2026 11:31
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Oct 15, 2026
#173036 consolidated typed payload merging while retaining authored-input
validation. The persistence fixture injected env:null through an as-never
cast and expected the typed service to reject it after the conversion.

Exercise normalizeCronJobPatch, the owner used by Gateway cron.update,
for that malformed input instead. Keep every persisted payload, inherited
tool allowlist and failed-edit non-mutation assertion. No production or
authority behavior changes.

Proof: adjacent parent passes and #173036 fails the original case; corrected
normalization, merge and delivery-status cohort passes all 69 cases.
steipete added a commit that referenced this pull request Oct 15, 2026
Keep actual catalog metadata and argv parsing while making unused lazy
registrar imports fail-fast fixture modules. The single-catalog change in
#173036 intentionally preserves lazy loading, but inline esbuild fixtures
started bundling the unrelated command graph. That caused a duplicate
createRequire declaration and pulled in ws's optional bufferutil import.

Preserve the builtin-only dependency guard and every launcher, rollback,
selector, cache, and worker assertion. Production update behavior is
unchanged; the packaged bootstrap passes the same managed-update controls.

Proof: both helper consumers pass in their owning configs (12 managed-node
and 133 launcher cases). Unexpected registration fails explicitly. Targeted
tooling/E2E types, typed lint, formatting and P2 review pass.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 16, 2026
…#173036)

* refactor: consolidate command and cron preparation paths

Keep one sub-CLI metadata/registration catalog, common cron payload updates,
canonical agent migration visitors, and shared account-state projection.
Trust typed internal adapters while retaining external validation, effect
authority, cancellation settlement, supported migrations and path containment.

Wave-5 y10: BELOW-500, 353 net production lines removed (+440/-793 in 19 files).
Branch-only handoff for the coordinator's bundle; no standalone PR.

Best-effort tradeoffs accepted:
- Cron mid-setup reload recovery (openclaw#146582): synthetic retirement, no human
  incident. Setup may fail; the next invocation refreshes the cache.
- Recursive shared preparation retry (openclaw#102494/openclaw#138337): synthetic concurrent
  callers; production serializes same-job work. Duplicate direct callers may
  share cancellation. Failed-owner eviction preserves the next sequential run.
- Progress publication generation (openclaw#143621): synthetic held update/reset.
  Presentation dedupe may briefly be stale until a subsequent render/reset.
- Doctor adapter schema mirror (openclaw#69919): malformed synthetic hooks. Invalid
  executable adapters fail visibly; missing-hook fallbacks and config checks stay.
- Setup adapter schema mirror (openclaw#165492): typed internal union. Invalid internal
  adapters fail when used; both supported wizard forms remain.
- Injected process schema mirror (openclaw#84381): malformed injection was not human
  SIGTERM report openclaw#71710. Invalid adapters fail registration; cancellation stays.
- Loaded registry row revalidation/copy (openclaw#114942/openclaw#158830/openclaw#114476): rows already
  admitted/normalized. Corrupt trusted rows can fail; first-wins authority stays.
- Custom compatibility duplicate check (openclaw#14223): all callers parse/type it.
  Hand-crafted invalid JS uses the default branch; external flags still reject it.
- Log probe identity matching (openclaw#88159, superseded by openclaw#168587): abort now joins
  the sole probe, so replacement cannot race its result. Recovery/settlement stay.
- Whole-config deep copy (openclaw#71218): no detached-copy incident. Structural copy
  updates agents/defaults; unrelated future mutation must respect config ownership.
- Repeated plugin-root probes (openclaw#70012): no disappearing-root incident. Resolve
  roots once; root replacement can fail discovery. Symlink containment stays.
- Second payload getter read (openclaw#135319): synthetic review/corpus, not a human
  report. Ordinary decoded records are read once; stateful accessors may differ.

Proof: fresh independent review clean; core types, targeted lint/format, runtime
and static cycles, assertion/line-cap ratchets, and suppression suite passed.
Focused CLI cohort: 8 files / 41 tests passed. Earlier unchanged account/setup
and cold-import checks passed. Cron and commands cohorts were interrupted after
partial results; complete owner tests, payload merging, test-graph types, broad
check-changed and build/smoke remain unproved at commit preparation.

Unattributed local 120-second timeouts retained: two root-command-descriptions
catalog cases and agent-via-gateway's Gateway attempt-budget case. No timeout,
retry, skip or kept-behavior expectation changes. Env-name budget mismatch
(455 vs 454) also exists at original HEAD and pinned main 89f8219.
All runtime proof used isolated HOME/OpenClaw/XDG state; Phase E untouched.

* refactor: consolidate cron payload and lazy CLI paths

Share daemon and cron method forwarding through the existing lazy binder,
remove the cron CLI reexport shim, and consolidate normalization and merge
handling without changing public fields, explicit clears, or effect authority.
Remove the obsolete bundled discovery reentry mechanism and impossible Doctor
issue helper. The full lane now removes 475 net production lines.

Best-effort tradeoffs accepted:
- Unknown Doctor issue variants supplied by hand-crafted JavaScript return the
  invalid value rather than a custom error. Typed local producers and exhaustive
  switches remain; reporting feature openclaw#95979 cites no human unknown-kind incident.
- Synchronous bundled-module self-discovery may fail through the existing loader
  diagnostic instead of returning empty inventory. Commit ca10460 only pins
  injected Jiti reentry, not a human incident; ordinary caches remain.
- Cron defaults trust staggerMs normalized earlier in the same synchronous call.
  No await or mutation boundary intervenes; externally supplied invalid values
  remain rejected by the normalizer.

* fix(channels): retain replacement preview deduplication

Withdraw the progress compositor generation removal after the Mattermost
retiring-publication case failed CI and bounded serial head/base replays
remained inconclusive under load. Restore that file exactly to the branch
base and keep all Mattermost tests unchanged, following the campaign fallback.

Prune the single obsolete mock-export allowance left by the removed bundled
discovery reentry fixture. The local mock ratchet passes with 9586 factories.
The remaining lane reduction is 471 net production lines across 25 paths.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 16, 2026
openclaw#173036 consolidated typed payload merging while retaining authored-input
validation. The persistence fixture injected env:null through an as-never
cast and expected the typed service to reject it after the conversion.

Exercise normalizeCronJobPatch, the owner used by Gateway cron.update,
for that malformed input instead. Keep every persisted payload, inherited
tool allowlist and failed-edit non-mutation assertion. No production or
authority behavior changes.

Proof: adjacent parent passes and openclaw#173036 fails the original case; corrected
normalization, merge and delivery-status cohort passes all 69 cases.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 16, 2026
Keep actual catalog metadata and argv parsing while making unused lazy
registrar imports fail-fast fixture modules. The single-catalog change in
openclaw#173036 intentionally preserves lazy loading, but inline esbuild fixtures
started bundling the unrelated command graph. That caused a duplicate
createRequire declaration and pulled in ws's optional bufferutil import.

Preserve the builtin-only dependency guard and every launcher, rollback,
selector, cache, and worker assertion. Production update behavior is
unchanged; the packaged bootstrap passes the same managed-update controls.

Proof: both helper consumers pass in their owning configs (12 managed-node
and 133 launcher cases). Unexpected registration fails explicitly. Targeted
tooling/E2E types, typed lint, formatting and P2 review pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes commands Command implementations P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant