Skip to content

refactor: consolidate single-consumer core command helpers - #176771

Merged
steipete merged 9 commits into
mainfrom
deslop/z25-29-core-owners-isolated-20261015
Oct 19, 2026
Merged

steipete merged 9 commits into
mainfrom
deslop/z25-29-core-owners-isolated-20261015

Conversation

@steipete

@steipete steipete commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Core command and runtime owners forward their own data through private leaf modules with one production consumer. Direct helper tests also keep those internal surfaces exported.

User Impact

No user-visible behavior change is intended. CLI options/output, model lists, session suggestions, worktree removal settlement, tool-call decoding, and Node service installation keep their existing contracts.

Why This Change Was Made

Keep model-list rendering with the list command, cron edit preparation with the edit command, suggestion dispatch with its resolution owner, worktree finalization with removal, content traversal with the decoder, and Node installation preparation with the installation command. Remove the retired modules and move retained tests through those real entrypoints. Banner formatting now consumes its already-typed options directly.

This is the core/CLI area slice of the single-consumer family split across registration, channel, and core owners under campaign rule 11. Public SDK/protocol/config contracts and lazy-import boundaries remain unchanged. Phase E is untouched.

Best-effort tradeoffs accepted

  • Banner options no longer pass through a redundant internal whitelist and object copy. The former persisted-option reader was already removed in refactor(config): config-surface reduction tranche 3 — product consolidations (review request) #111527; the remaining caller passes TaglineOptions. An invalid internal mode still falls through to the same random-mode path, as before.
  • The installation message is always a nonempty string constructed by this command, so logging no longer checks whether the optional helper result exists. That optional-result check came from the helper DTO introduced in fix(node): keep npx-installed services outside the npm cache #168644; its implementation unconditionally supplied the message, rather than handling an observed missing-message failure. The same diagnostic lines are now logged directly. No service-install, authority, token-reuse, restore, durability, or settlement guard was removed.

Net LOC

185 net production lines removed across 14 production paths; 23 total paths. Tests and three exact shrink-only inventory/guard entries are excluded from the production count.

Evidence

Fresh independent P0–P2 review of the complete production candidate completed scoped-clean with final source verification. The coordinator-requested tooling rebase onto b69943d completed without conflicts; all seven production commits are patch-identical to their reviewed predecessors according to range-diff. A subsequent test-only fixture repair also completed independent P0–P2 review, scoped-clean, with final source verification.

Focused type-aware lint found three owned issues in the moved code: provider-name shadowing, conditional object-spread construction in a map, and redundant string conversion after a type check. The repair keeps serialized JSON fields, order and values unchanged and passes the already-narrowed string directly to the duration parser. A fresh independent review of these production repairs and the Node fixture delta completed scoped-clean through P2 with final source verification.

Frozen/prefer-offline dependency refresh completed in 1m17s with the new pinned native checker and no manifest or lockfile changes. Isolated, nice10, single-worker proof across 16 owner/consumer files initially passed 250 cases and exposed four owned fixture failures: migrated tests used the Bun worker's executable as an explicit Node pin. Production validation correctly rejected that mismatch. Mocked tests now name their intended runtime explicitly, and the generated-command subprocess test uses the existing real-Node resolver. The repair keeps every runtime-pin, wrapper, PATH, TLS, credential-source and generated-command assertion; it also avoids formatting inherited environment data on assertion failure.

The affected two files plus mandatory suppression check then passed all 60 selected cases (14 suppression, 45 CLI, one generated-command subprocess), including worker-cache verification and cleanup, in 423.2 seconds wall time. Vitest group durations were 42.04, 129.11 and 151.17 seconds respectively; most wall time was transform/import overhead on the shared host. Unaffected passing results are reused, not claimed as a second full run. Gateway authority/privacy/delivery, worktree recovery/settlement, model rendering, cron preparation and tool decoding coverage remain.

The lint-repair replay then passed all 90 selected cases: 14 suppression, 61 cron edit and 15 model-list cases. The three single-worker shards completed with worker-cache verification and cleanup in 854.8 seconds wall time (835.38 seconds of shards); cron and model-list Vitest durations were 323.64 and 311.53 seconds. No timeout or retry was added.

Normal focused type-aware lint passed on both repaired production files. The unchanged passing lint evidence for the other nine surviving TypeScript paths is reused. Formatting and git diff --check passed.

Initial exact-head CI exposed one owned annotation defect (TS2559), repeated by six type jobs: the inlined cron callback's explicit option type omitted the schedule resolver's fields. A private type now composes the existing Gateway RPC and schedule-owner input types, with no cast, export, or runtime change. Fresh P0–P2 review of that erased-type delta completed scoped-clean. The native checker passed the cron-owning services-cron test graph, and the mandatory suppression suite passed all 14 cases. The 90-case runtime proof is reused because this repair changes only erased types. No CI rerun was requested; the repair receives new exact-head CI.

Complete architecture/build proof remains an exact-head hosted CI gate. No local build, E2E, full suite, whole-graph typecheck, operator state, retry, skip, timeout increase, or expanded allowance was used.

@clawsweeper

clawsweeper Bot commented Oct 19, 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.

@steipete
steipete marked this pull request as ready for review October 19, 2026 01:38
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 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-19T01:42:00.259057Z 4d8d68f 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.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime cli CLI command changes scripts Repository scripts commands Command implementations agents Agent runtime and tooling size: XL labels Oct 19, 2026
@steipete
steipete merged commit 8028470 into main Oct 19, 2026
158 of 160 checks passed
@steipete
steipete deleted the deslop/z25-29-core-owners-isolated-20261015 branch October 19, 2026 02:08
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Oct 19, 2026
The banner parser that imported this alias was intentionally removed by #176771. Keep mode checking within TaglineOptions without exporting the private alias.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 19, 2026
…176771)

* refactor(cli): trust typed banner options

* refactor(models): keep list rendering with command owner

Remove the private one-consumer table export and render prepared rows in the existing list command. Preserve JSON, plain, rich text, provider outcomes, sanitization, and one-shot exit. Exercise the two terminal contracts through the real command and existing Gateway fixture without changing their assertions.

* refactor(cli): keep cron edit preparation with command owner

* refactor(gateway): keep suggestion dispatch with resolution owner

* refactor(agents): finalize worktree removal in its owner

* refactor(agents): visit tool-call content in decoder owner

* refactor(node): prepare service installation in command owner

* refactor(cli): finish owner folds with typed inputs and runtime fixtures

* fix(cli): preserve cron schedule input type after owner fold
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 19, 2026
The banner parser that imported this alias was intentionally removed by openclaw#176771. Keep mode checking within TaglineOptions without exporting the private alias.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling cli CLI command changes commands Command implementations gateway Gateway runtime scripts Repository scripts size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant