Skip to content

fix: preserve current update availability alongside update history - #139501

Merged
steipete merged 2 commits into
mainfrom
codex/stable91-cli-update-status-ready-20260905
Sep 6, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/stable91-cli-update-status-ready-20260905

Conversation

@steipete

@steipete steipete commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where users running openclaw status --all would see a retained update outcome instead of current update availability when update history existed. A successful older update could therefore hide a newer available version or fresh Git/dependency status.

Why This Change Was Made

Update availability and update history answer different questions. The status presentation owner now builds shared history rows for standard and all-status reports while leaving the fresh Update row intact. This removes duplicated history selection and scalar override plumbing.

Update run shows the active run, or otherwise the latest recorded run. Update restart separately preserves an update sentinel unless its authoritative runId matches the selected run. Older updater versions can leave a sentinel without a run ID alongside retained history, so matching prose or timestamps must not erase a distinct result. Sentinel-only reports keep their existing label and diagnosis.

No config, schema, protocol, or persistence semantics change. Standard footer, JSON, active-run precedence, no-history behavior, and detailed restart diagnosis remain covered.

Production: +30/-31 (net -1). Tests: +145/-54 (net +91). Docs: +3.

User Impact

Operators can see whether an update is available now and what happened during the previous or active update at the same time. A distinct restart failure remains visible even when an older recorded update succeeded.

Release-note context: Keep current update availability visible in status reports alongside update-run history, preserving distinct legacy restart outcomes and deduplicating only the same authoritative run.

Evidence

Captured the stale-availability regression before production changes, then verified the same real row/report builders after the fix. Compatibility coverage also checks mixed history/sentinel states, matching versus different run IDs, identical prose from separate occurrences, sentinel-only and non-update sentinel inputs.

All verification passed in a normal isolated checkout with its own dependencies installed using the pinned pnpm 12.3.4 and Node 24.20.0, ordinary install --frozen-lockfile, and no dependency or guard overrides:

  • Full scoped node scripts/check-changed.mjs -- <all eight changed paths>: passed, including core/core-test typechecks, format/lint, all three Knip scans, and remaining guards.
  • node scripts/run-vitest.mjs src/commands/status-all/report-data.test.ts src/commands/status-overview-rows.test.ts src/commands/status.command-report-data.test.ts src/commands/status-json-command.test.ts src/commands/status-all/diagnosis.test.ts src/commands/status.test.ts: 80 tests passed, six files, three shards.
  • Canonical node scripts/run-node.mjs --version build: passed.
  • Four real node openclaw.mjs status --timeout 1000 runs with disposable synthetic config/state: passed; fixtures removed afterward.
Synthetic state Fresh Update Update run Update restart
Retained success + distinct legacy failure preserved success failure visible
Sentinel linked to the selected run ID preserved one result deduplicated
Same success prose, no shared run ID preserved one occurrence distinct occurrence retained
Legacy failure sentinel only preserved absent original label and failure retained

The real-process fixture uses standard status: --all performs a Git fetch. The actual all-status row/report builders are exercised by the regression tests; this is not a full --all subprocess or live-provider/Gateway claim. Exact candidate source hashes were unchanged after verification and normal commit hooks. Current main was checked before publication: no changes in the affected status owners or ledger/sentinel contracts.

@clawsweeper

clawsweeper Bot commented Sep 5, 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 docs Improvements or additions to documentation commands Command implementations size: M maintainer Maintainer-authored PR labels Sep 5, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 5, 2026
@clawsweeper

clawsweeper Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 5, 2026, 10:01 PM ET / September 6, 2026, 02:01 UTC.

ClawSweeper review

What this changes

The PR keeps current update availability visible in CLI status reports while displaying update-run history and distinct restart outcomes in separate rows.

Merge readiness

✅ Ready for maintainer review

This remains a useful, focused fix: current main still allows retained update history to obscure fresh availability. No actionable introduced defects were found, and the previous review recorded no findings.

Priority: P2
Reviewed head: c25917721efe2877bb96f8c5faf7a79b8ba4ebb5

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with meaningful regression coverage, reported CLI observations, and no actionable correctness or security findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied MEMBER author classification exempts this PR from the external-contributor proof gate; no authority change triggers an exception. The body nevertheless reports four isolated real CLI runs through the changed presentation owner, with all-status coverage explicitly limited to report-builder tests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied MEMBER author classification exempts this PR from the external-contributor proof gate; no authority change triggers an exception. The body nevertheless reports four isolated real CLI runs through the changed presentation owner, with all-status coverage explicitly limited to report-builder tests.
Evidence reviewed 9 items Current main still contains the defect: The all-status report passes the selected historical run headline as updateValue, overriding the fresh installation update summary.
Shared presentation repair: The shared helper selects the active or latest run, preserves legacy restart results without shared identity, and suppresses only a restart result naming the selected run. Both text report paths consume its rows; standard status retains the fresh update summary.
Behavioral regression coverage: Nine table-driven states exercise the actual all-status row builder, asserting that registry availability and Git lag remain visible alongside active, completed, absent, legacy, matching-ID, different-ID, and non-update history inputs.
Findings None None.
Security None None.

How this fits together

OpenClaw’s CLI status reports combine installation update checks with recorded update runs and restart results. These inputs become operator-facing availability, progress, and diagnostic rows.

flowchart TD
  A[Installation update check] --> B[Current Update row]
  C[Recorded update runs] --> D[Select active or latest run]
  D --> E[Update run row]
  F[Restart result] --> G[Compare run identity]
  D --> G
  G --> H[Distinct Update restart row]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -1, Tests +91, Docs +3. Total +93 across 8 files.

View PR surface stats
Area Files Added Removed Net
Source 5 30 31 -1
Tests 2 145 54 +91
Docs 1 3 0 +3
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 8 178 85 +93

Review metrics

None.

Technical review

Best possible solution:

Keep fresh availability and historical outcomes independently visible through the shared presentation owner, preserving legacy results unless run identity proves duplication.

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

Yes, from source: provide retained update history alongside a newer registry version or Git lag, and current main substitutes the historical headline into the Update row. No runtime reproduction was executed during this review.

Is this the best way to solve the issue?

Yes. Separating historical rows at the shared presentation owner removes the conflicting override while reusing existing availability checks, report wording, and read-only storage APIs.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This repairs misleading CLI update diagnostics without changing update execution or stored configuration.
  • 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: The supplied MEMBER author classification exempts this PR from the external-contributor proof gate; no authority change triggers an exception. The body nevertheless reports four isolated real CLI runs through the changed presentation owner, with all-status coverage explicitly limited to report-builder tests.

Evidence

What I checked:

  • Current main still contains the defect: The all-status report passes the selected historical run headline as updateValue, overriding the fresh installation update summary. (src/commands/status-all/report-data.ts:237, 4bb95eb02ced)
  • Shared presentation repair: The shared helper selects the active or latest run, preserves legacy restart results without shared identity, and suppresses only a restart result naming the selected run. Both text report paths consume its rows; standard status retains the fresh update summary. (src/commands/status-update-restart.ts:29, c25917721efe)
  • Behavioral regression coverage: Nine table-driven states exercise the actual all-status row builder, asserting that registry availability and Git lag remain visible alongside active, completed, absent, legacy, matching-ID, different-ID, and non-update history inputs. (src/commands/status-all/report-data.test.ts:88, c25917721efe)
  • Existing read-only storage boundary: The ledger readers use the existing read-only database helper and tolerate an absent update_runs table. The patch changes presentation, without introducing writes, migration changes, or authorization decisions. (src/infra/update-run-ledger.ts, c25917721efe)
  • Supplied execution evidence: The captured PR body reports four real standard-status processes using disposable synthetic state, with observed availability preservation, same-run deduplication, distinct identical-prose outcomes, and sentinel-only failure display. It separately reports 80 passing tests and explicitly limits all-status evidence to its actual report builders rather than a full subprocess. These executions were not repeated during this read-only review. (ef1b0f5f7a77)
  • Re-review continuity: The affected production files are unchanged from the previously reviewed head. The supplied completed review contains no findings or published rank-up moves. (c25917721efe)

Likely related people:

  • steipete: 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-05T23:22:05.699Z sha ef1b0f5 :: needs maintainer review before merge. :: none

@steipete
steipete merged commit 53e6662 into main Sep 6, 2026
176 checks passed
@steipete
steipete deleted the codex/stable91-cli-update-status-ready-20260905 branch September 6, 2026 02:23
@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit to ylcn91/openclaw that referenced this pull request Sep 6, 2026
* commit '6c55a99226ed0611ca088004c81b00fb296f1f71': (182 commits)
  test(ui): scope dashboard settings setup to the top frame (openclaw#139618)
  refactor(skills): share pending proposal creation (openclaw#139617)
  fix(release): accept frozen targets before worker bundles (openclaw#136699)
  fix(gateway): preserve percent sequences in media filenames (openclaw#139508)
  fix: preserve current update availability alongside update history (openclaw#139501)
  feat(diagnostics): expose garbage collection duration metrics (openclaw#139592)
  fix(ui): keep Logbook timestamps clear of the activity stripe (openclaw#139539)
  fix(ui): keep Swarm outcomes visible after completion (openclaw#139490)
  test: check file accessibility without runtime-specific return values (openclaw#139590)
  refactor(sdk): keep helper types private (openclaw#139601)
  fix(cron): preserve current-session delivery intent (openclaw#139491)
  fix: prevent browser profile permission hangs in Doctor (openclaw#139612)
  fix(agents): repair storage-failure test fixture after failover owner move (openclaw#139531)
  fix(cli): keep note text with Windows and Unicode line endings (openclaw#139512)
  fix(agents): keep isolated completion context on its admitted generation (openclaw#139607)
  fix: avoid declaration builds during source-server updates (openclaw#139392)
  fix(models): keep discovered models after catalog refresh failures (openclaw#139357)
  fix(gateway): record a transcript notice when a run fails before replying (openclaw#139439)
  refactor(ios): reuse shared integer conversion (openclaw#139581)
  fix(sessions): prevent database lock failures during reclamation (openclaw#139469)
  ...
vincentkoc added a commit that referenced this pull request Sep 6, 2026
* commit 'refs/openclaw/tasks/pr-135167-main-latest':
  test(ui): scope dashboard settings setup to the top frame (#139618)
  refactor(skills): share pending proposal creation (#139617)
  fix(release): accept frozen targets before worker bundles (#136699)
  fix(gateway): preserve percent sequences in media filenames (#139508)
  fix: preserve current update availability alongside update history (#139501)
  feat(diagnostics): expose garbage collection duration metrics (#139592)
  fix(ui): keep Logbook timestamps clear of the activity stripe (#139539)
  fix(ui): keep Swarm outcomes visible after completion (#139490)
  test: check file accessibility without runtime-specific return values (#139590)
  refactor(sdk): keep helper types private (#139601)
  fix(cron): preserve current-session delivery intent (#139491)
  fix: prevent browser profile permission hangs in Doctor (#139612)
  fix(agents): repair storage-failure test fixture after failover owner move (#139531)
  fix(cli): keep note text with Windows and Unicode line endings (#139512)
  fix(agents): keep isolated completion context on its admitted generation (#139607)
  fix: avoid declaration builds during source-server updates (#139392)
  fix(models): keep discovered models after catalog refresh failures (#139357)
  fix(gateway): record a transcript notice when a run fails before replying (#139439)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations docs Improvements or additions to documentation maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M 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