Skip to content

refactor(cli): derive daemon status contract from gatherer - #148108

Merged
RomneyDa merged 1 commit into
mainfrom
refactor/daemon-status-owner
Sep 14, 2026
Merged

RomneyDa merged 1 commit into
mainfrom
refactor/daemon-status-owner

Conversation

@RomneyDa

Copy link
Copy Markdown
Member

Summary

  • derive DaemonStatus from the sole status gatherer
  • preserve the deliberately widened Doctor/readiness compatibility overlays
  • demote the now-private gateway status summary type

Deletes 52 net production LOC.

Validation

  • 295 focused tests passed; 1 platform-specific test skipped
  • core production and test typing
  • pnpm check:changed
  • pnpm check:architecture

@clawsweeper

clawsweeper Bot commented Sep 14, 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.

@RomneyDa
RomneyDa marked this pull request as ready for review September 14, 2026 08:49
@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: S maintainer Maintainer-authored PR labels Sep 14, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 14, 2026
@clawsweeper

clawsweeper Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 14, 2026, 7:50 AM ET / 11:50 UTC (Revision 2).

ClawSweeper review

What this changes

Derives the daemon status TypeScript contract from its collector, preserves partial diagnostic inputs, and makes the gateway summary type private without changing status output.

Merge readiness

✅ Ready for maintainer review

Keep open: this is a focused, maintainer-authored cleanup with no actionable correctness findings. Current main still has the separately maintained status type, so the refactor remains useful.

Priority: P3
Reviewed head: 03e9e771b47564731e51755dd0e8a42989467380

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused refactor with compatible inspected callers, reported typing/test validation, and no blocking findings.
Proof confidence 🌊 off-meta tidepool Not applicable: This MEMBER-authored internal refactor preserves the collector's runtime behavior and does not materially change authority; the external-contributor proof gate does not apply.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER-authored internal refactor preserves the collector's runtime behavior and does not materially change authority; the external-contributor proof gate does not apply.
Evidence reviewed 6 items Introduced contract change: The complete introduced patch replaces the manual type with collector-derived fields and a forwarding function; the collector's runtime body remains unchanged. Optional service, config, and RPC overlays remain explicit.
Current-main necessity: Comparison with fetched main shows the same focused contract refactor remains outstanding in these files. No merged replacement is established. Release-file inspection and the related-PR search were unavailable, so no shipped or duplicate-resolution claim is made.
Consumer compatibility: Readiness consumes partial probe facts, the printer handles optional diagnostic sections, and Doctor reads the existing plugin restart-readiness union. The inspected callers remain compatible with the derived contract; the public gatherer name and options remain available.
Findings None None.
Security None None.

How this fits together

Daemon status collects service, configuration, port, and Gateway probe information. CLI output, Doctor, and readiness checks consume those facts for diagnostics and recovery decisions.

flowchart LR
  A[Service and configuration] --> C[Status collector]
  B[Ports and Gateway probes] --> C
  C --> D[Derived status contract]
  D --> E[CLI diagnostic output]
  D --> F[Doctor and readiness checks]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -52. Total -52 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 2 42 94 -52
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 42 94 -52

Review metrics

None.

Technical review

Best possible solution:

Keep one collector-owned status shape with narrow partial-input overlays for diagnostic consumers.

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

Not applicable: this PR proposes internal cleanup rather than a reported runtime defect; source inspection found no introduced failing path.

Is this the best way to solve the issue?

Yes: deriving fields from the existing collector removes duplicate declarations while retaining the partial shapes used by diagnostic consumers.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P3: This is internal type-contract cleanup with unchanged collection and diagnostic behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This MEMBER-authored internal refactor preserves the collector's runtime behavior and does not materially change authority; the external-contributor proof gate does not apply.

Evidence

What I checked:

  • Introduced contract change: The complete introduced patch replaces the manual type with collector-derived fields and a forwarding function; the collector's runtime body remains unchanged. Optional service, config, and RPC overlays remain explicit. (src/cli/daemon-cli/status.gather.ts:642, 03e9e771b475)
  • Current-main necessity: Comparison with fetched main shows the same focused contract refactor remains outstanding in these files. No merged replacement is established. Release-file inspection and the related-PR search were unavailable, so no shipped or duplicate-resolution claim is made. (src/cli/daemon-cli/status.gather.ts, 9a5af1b95370)
  • Consumer compatibility: Readiness consumes partial probe facts, the printer handles optional diagnostic sections, and Doctor reads the existing plugin restart-readiness union. The inspected callers remain compatible with the derived contract; the public gatherer name and options remain available. (src/commands/gateway-readiness.ts:55, 03e9e771b475)
  • Validation and review continuity: The captured PR body reports 295 passing focused tests, one platform skip, production/test typing, changed checks, and architecture checks. The previous review projection contains no findings or rank-up requests. Its earlier head could not be read locally, so patch equivalence to that review is not asserted. This review ran no tests; the introduced diff passed git diff --check. (03e9e771b475)
  • Area history and routing: Current-main path history identifies Peter Steinberger's gateway projection and port-summary refactors, SunnyShu's service-derived target work, and Josh Lehman's Doctor restart-readiness work. Missing historical blobs prevented line-level introduction verification; these are routing candidates only. (src/cli/daemon-cli/status.gather.ts, 9a5af1b95370)
  • Policy and checkout integrity: Read the complete root AGENTS.md and contribution/review guidance. No applicable nested AGENTS.md or maintainer-notes directory was found. The checkout remained clean. The supplied MEMBER association and maintainer label independently protect this PR from automatic closure. (AGENTS.md:1, 03e9e771b475)

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Josh Lehman: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-14T09:19:40.816Z sha 5bf8ee1 :: needs maintainer review before merge. :: none

@RomneyDa
RomneyDa force-pushed the refactor/daemon-status-owner branch from 5bf8ee1 to 03e9e77 Compare September 14, 2026 11:25
@RomneyDa
RomneyDa merged commit 452a638 into main Sep 14, 2026
187 checks passed
@RomneyDa
RomneyDa deleted the refactor/daemon-status-owner branch September 14, 2026 15:37
vincentkoc added a commit that referenced this pull request Sep 14, 2026
* commit '3c08384584f57787a26da9998488233fc15ccf7e': (122 commits)
  fix(agents): keep tool result summaries when middleware details exceed shape limits (#147805)
  test: make full-suite fixtures portable across runtimes (#148247)
  refactor(qa): share unknown confidence results (#148200)
  chore(android): remove unused test dependencies and duplicate Wear settings (#148231)
  test: reuse compiled preflight in startup fixtures (#148330)
  test(wizard): route recovery integration through database forks (#148337)
  refactor(plugins): simplify provider auth patch recursion (#147933)
  fix(cli): drain failed web capability output (#148234)
  refactor(android): remove unused production helpers (#148233)
  fix(plugins): scope feed integrity to hosted ClawHub (#148220)
  test(qa): compare Telegram entities semantically (#148219)
  test(qa): recognize native Slack exec progress rows (#148217)
  test(cron): distinguish repeated delivery incidents (#148151)
  test(qa): preserve restart command ownership (#148218)
  test(qa): isolate bundled skill CLI gateway state (#148150)
  test(qa): align process lifecycle contracts (#148149)
  improve(media): reduce metadata fetched during orphan cleanup (#148244)
  fix(matrix): retain sync state runtime for deferred persistence (#148152)
  test: deduplicate gateway watch exit fixtures (#148237)
  refactor(cli): derive daemon status contract from gatherer (#148108)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant