Repository navigation
Add experimental Claw lifecycle diagnostics - #102427
Conversation
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Codex review: found issues before merge. Reviewed July 20, 2026, 5:34 PM ET / 21:34 UTC. Summary PR surface: Source +586, Tests +800, Docs +3. Total +1389 across 16 files. Reproducibility: not applicable. as a defect report; the PR includes a credible real terminal demonstration of the new gated diagnostic behavior and its read-only state guarantee. Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review findings
Review detailsBest possible solution: A maintainer should explicitly sponsor the experimental core Claws lifecycle direction, land or rebase on the prerequisite ownership work, and correct the CLI documentation to state the gate before this diagnostics slice is considered for merge. Do we have a high-confidence way to reproduce the issue? Not applicable as a defect report; the PR includes a credible real terminal demonstration of the new gated diagnostic behavior and its read-only state guarantee. Is this the best way to solve the issue? Unclear pending sponsorship: reusing the canonical lifecycle status model is the right implementation shape if maintainers approve core Claws, but the core-versus-extension product boundary is still a maintainer decision. Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 0d3cbae6a16a. Label changesLabel justifications:
Evidence reviewedPR surface: Source +586, Tests +800, Docs +3. Total +1389 across 16 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
Review history (37 earlier review cycles; latest 8 shown)
|
430b524 to
24c0e32
Compare
b00b2ba to
9e4311e
Compare
24c0e32 to
794cbe6
Compare
9e4311e to
74a53bb
Compare
794cbe6 to
6c61f3c
Compare
74a53bb to
d154612
Compare
6c61f3c to
76caf2c
Compare
d154612 to
d47b47c
Compare
|
Addressed on exact head Omar's requested boundaries are now covered:
Validation: 311 affected tests passed in WSL; current-head CI is fully green, including test/prod types, lint, max-lines, all compact shards, and @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
ed35bfc to
ec41651
Compare
|
Final review update on exact head
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Signed-history proof carry-forward:
The rewrite only compacted iterative fix commits and replaced commit identity/signatures; the PR's source tree and diff are unchanged. The existing Real behavior proof remains applicable. This attestation does not claim a new runtime execution; fresh CI is validating the rewritten SHA. |
|
Independent review refresh applied at |
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: Add experimental Claw lifecycle diagnostics This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: Add experimental Claw lifecycle diagnostics This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
Merged via squash.
|
Summary
OPENCLAW_EXPERIMENTAL_CLAWS=1.Contract
claws statusownership states instead of independently interpreting managed resources.${ENV_VAR}placeholders remain unexpanded.unknown, never healthy.Verification
Exact head:
4e522994bf2c713d4fb948f1833e211adc0beea2git diff --check origin/main...HEAD: passednode scripts/report-test-temp-creations.mjs --base origin/main --head HEAD --no-merge-base: passedpnpm db:kysely:check: passedpnpm tsgo:core: passednode scripts/run-oxlint.mjs ...: passed with 0 warnings/errorsReal behavior proof
Behavior or issue addressed:
openclaw doctorcan report gated Claw lifecycle drift and incomplete ownership state using the same status model asclaws status, while read-only state observation avoids creating or mutating Claw state for absent/pre-Claws installs.Real environment tested:
WSL Ubuntu checkout at exact head
4e522994bf2c713d4fb948f1833e211adc0beea2, using OpenClaw's real Claws source harness, Doctor health contribution path, SQLite state schema/read-only open path, Gateway cron inventory test doubles, source MCP config helpers, and Vitest fixtures.Exact steps or command run after this patch:
pnpm db:kysely:checkpnpm tsgo:corepnpm exec vitest run src/claws/doctor.test.ts src/flows/doctor-health-contributions.test.ts src/flows/doctor-core-checks.test.ts src/state/openclaw-state-db.test.ts src/claws/lifecycle-state.test.ts src/claws/workspace.test.ts src/claws/provenance.test.ts src/claws/mcp.test.ts src/claws/cron.test.ts src/cli/claws-cli.test.ts --reporter=dotnode scripts/run-oxlint.mjs src/claws/cron.ts src/claws/doctor.test.ts src/claws/doctor.ts src/claws/lifecycle-state.ts src/claws/lifecycle-status.ts src/claws/mcp.ts src/claws/provenance.ts src/claws/workspace.ts src/flows/doctor-core-checks.test.ts src/flows/doctor-core-checks.ts src/flows/doctor-gateway-exec-credential.ts src/flows/doctor-health-contributions.ts src/state/openclaw-state-db-contract.ts src/state/openclaw-state-db.test.ts src/state/openclaw-state-db.tsEvidence after fix:
Terminal output showed generated Kysely verification passed, core typecheck passed, changed-file Oxlint finished with
Found 0 warnings and 0 errors, and Vitest reportedTest Files 10 passed (10)/Tests 335 passed (335).Observed result after fix:
The source harness produced structured Claw doctor findings for missing/modified agent state, workspace/package/MCP/cron drift, incomplete lifecycle records, invalid/newer state databases, and orphaned subordinate rows. Absent/pre-Claws state remained read-only with no state creation or byte changes.
What was not tested:
A live external Gateway service or external MCP process was not launched; Gateway inventory and source MCP reads are exercised through the source harness/test doubles for this read-only doctor projection slice.
Stack
Doctor lands after every add/remove owner so it can reuse one authoritative status model instead of inventing partial resource checks. The Claws CLI and doctor surface remain gated by
OPENCLAW_EXPERIMENTAL_CLAWS=1.Documentation
Extends
/cli/clawswith the gatedopenclaw doctordiagnostics that project the same lifecycle and ownership model.