fix(cli): report honest SQLite store labels and consistent build SHA in help#111659
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 20, 2026, 12:55 AM ET / 04:55 UTC. Summary PR surface: Source +42, Tests +61, Other +8. Total +111 across 11 files. Reproducibility: no. high-confidence live reproduction was available to inspect. The supplied branch and tests identify clear current paths for local sessions cleanup, delegated gateway cleanup, session JSON output, cron status, and generated group help, but they do not include a verifiable before-and-after runtime transcript. 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:
Proof guidance:
Risk before merge
Maintainer options:
Copy recommended automerge instructionNext step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Keep the SQLite-only labels and build-identity cache guard, then land only after maintainers confirm the intended JSON-output compatibility contract and attach redacted real CLI evidence for both a local store and a delegated gateway path. Do we have a high-confidence way to reproduce the issue? No high-confidence live reproduction was available to inspect. The supplied branch and tests identify clear current paths for local sessions cleanup, delegated gateway cleanup, session JSON output, cron status, and generated group help, but they do not include a verifiable before-and-after runtime transcript. Is this the best way to solve the issue? Unclear. Resolving only locally owned labels to the canonical SQLite target and preserving gateway-owned paths is the narrowest apparent fix, but replacing machine-readable JSON values is safe only if maintainers confirm the prior fields are not a supported external contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1508a586744d. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +42, Tests +61, Other +8. Total +111 across 11 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
|
b6c4b2d to
5c58545
Compare
|
/allow-security-sensitive-change 5c58545 |
|
/allow-dependencies-change 5c58545 |
|
Maintainer disposition of the current ClawSweeper rank-up moves:
|
|
Merged via squash.
|
What Problem This Solves
Two QA rounds flagged misleading CLI output:
.jsonstore paths.cron/sessionsstatus andsessions cleanupadvertised a JSON store path (e.g.cron/jobs.json,.../sessions/sessions.json) even though OpenClaw storage is SQLite-only and no such file exists — so operators were pointed at a database file that isn't there.openclaw models --helpreported a different build SHA thanopenclaw --versionand every other subcommand's help, because the models group's cached help text wasn't invalidated when the build identity changed.Why This Change Was Made
Status output should name the real storage. And a build SHA shown in help should be a single source of truth so it can't drift between the group help cache and
--version.User Impact
cron/sessionsstatus,sessions list, andsessions cleanupnow report the actual SQLite database (e.g..../agents/<id>/agent/openclaw-agent.sqlite) for locally-owned stores.sessions cleanupis delegated to a remote gateway, the gateway-owned path is passed through unchanged (never re-resolved client-side) — so a POSIX CLI won't mangle a Windows gateway's path and vice-versa.openclaw models --help,--version, and other group helps now report the same SHA; the cached group help invalidates whenever build identity changes.Evidence
src/cron/service/ops.ts(resolves on the gateway host), sessionssrc/commands/sessions.ts(local-only). Delegated-vs-local branch insrc/commands/sessions-cleanup.ts— local resolves to SQLite (:145), gateway-owned passes through (:278); the gateway RPC returns summaries directly (server-methods/sessions-read.ts).scripts/write-cli-startup-metadata.tsinvalidates cached group help on build-identity change.sessions-cleanup.test.ts(local + delegated + Windows-path pass-through, JSON + human),sessions.test.ts,write-cli-startup-metadata.test.ts(group help SHA == canonical). Testbox 25/25 + focused suites; AutoReview clean (0.93).doctorslow (~10.7s) exit was investigated and intentionally left unchanged: the two provider loads have different scopes (not a removable duplicate) and completion regen runs in a child process — deduping needs a tested doctor-scoped prepared provider context first (follow-up).