Skip to content

fix(update): show progress while staging Git runtimes - #155671

Merged
vincentkoc merged 2 commits into
mainfrom
fix/update-runtime-staging-progress
Sep 23, 2026
Merged

vincentkoc merged 2 commits into
mainfrom
fix/update-runtime-staging-progress

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Git source updates can appear idle while preparing the built runtime because that filesystem phase has no recorded update step.

User Impact

Operators see runtime staging start, elapsed time, and a public failure reason before cleanup. The step keeps the update heartbeat active while the old Gateway serves. This improves visibility; it does not reduce copying time.

The running installed updater owns this behavior. An older driver selecting this candidate gains the new progress on later updates driven by the repaired build.

Why This Change Was Made

Wrap runtime staging with the existing step lifecycle and register preflight-runtime-stage as a public identity. Preserve the original error and activation/cleanup ordering.

The staging tests use the candidate fixture's existing registration pattern, retaining real activation Doctor execution and inspection-root cleanup.

Adapts the runtime-staging instrumentation from #153407 by @RomneyDa. That broader PR is uneditable and conflicts with the current updater API; its CLI/status changes remain separate.

Evidence

  • Fresh landing review found no actionable P0–P2 issues in the unchanged aggregate diff. Signed head: e355e8f86a70295b5ee0631465c499fa9972a769.
  • Current CI, attempt 1, passed the full formatter, production/test types, and required CI gate. Its checked merge contains that head; logs verify 51 candidate activation tests, 18 public-failure tests, and 60 heartbeat/lifecycle tests.
  • Focused test-cost proof at the same head passed both files separately with pnpm test <file> --maxWorkers=1 (Node 24.19.0, pnpm 12.4.0, Linux x86_64, 4 CPUs): candidate activation, 51/51 in 26.890 s command wall; public failures, 18/18 in 20.141 s command wall. Existing CI reported 33.631 s and 0.001 s respectively as summed, millisecond-rounded test-case times in shared two-worker shards; these CI figures exclude import/worker startup and are not focused wall measurements.
  • Package Acceptance, attempt 1 at the same head, passed all nine required jobs for published [email protected] → installed 2026.9.5 with legacy-operator-state. Update/manual restart, migrations, cron retention before later Doctor, state survival, health/provider/plugin checks, no-op update, and backup rollback passed. Package artifact; tarball SHA-256: 9c2b92a8070ceb3c87791520bb3f51030bca59a3a47b6b3f54060e714e4c8f2b.

Compatibility limit: firstHopPostCore was unavailable (No complete exit snapshot), so the original child terminal outcome is unknown; the captured published update.json was redacted/truncated at 16 KiB. This establishes package-driver compatibility, not a captured child terminal receipt, first-time Git conversion, live-supervisor behavior, or latency improvement.

Follow-up: the unchanged browser relay coexistence fixture has a getFreePort → listener race observed in prior CI. Its formerly failing case passed in the current run.

@vincentkoc vincentkoc self-assigned this Sep 22, 2026
@clawsweeper

clawsweeper Bot commented Sep 22, 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 size: M maintainer Maintainer-authored PR labels Sep 22, 2026
Record runtime staging through the existing update step owner, including elapsed time, heartbeat and public failure identity before cleanup. Keep the original staging error and activation boundary intact.

Adapt the runtime-staging step approach from #153407 to the current updater. This adds observability; it does not change copy performance.

Co-authored-by: Dallin Romney <[email protected]>
@vincentkoc
vincentkoc force-pushed the fix/update-runtime-staging-progress branch from 68dd059 to 128429c Compare September 22, 2026 10:59
@vincentkoc
vincentkoc marked this pull request as ready for review September 22, 2026 10:59
@clawsweeper

clawsweeper Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 23, 2026, 5:49 AM ET / 09:49 UTC (Revision 2).

ClawSweeper review

What this changes

The PR adds progress, elapsed-time reporting, heartbeat coverage, and public failure identification while Git updates stage their built runtime.

Merge readiness

✅ Ready for maintainer review

The change remains useful on current main, and no blocking defect was found. The added test-cost evidence resolves the previous review’s required follow-up.

Priority: P2
Reviewed head: e355e8f86a70295b5ee0631465c499fa9972a769

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with meaningful regression coverage, clear upgrade limits, and the previous evidence follow-up addressed.
Proof confidence 🌊 off-meta tidepool Not applicable: The ordinary contributor-proof gate does not apply to this MEMBER-authored PR. Candidate tests exercise staging callbacks and failure ordering; reported package acceptance covers published-driver compatibility, not a live Git-staging demonstration. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The ordinary contributor-proof gate does not apply to this MEMBER-authored PR. Candidate tests exercise staging callbacks and failure ordering; reported package acceptance covers published-driver compatibility, not a live Git-staging demonstration. No stored-data contract changes.
Evidence reviewed 8 items Pinned production change: The introduced delta wraps the existing staging operation with the existing step owner and adds its fixed public identifier; copying, publication, and activation operations remain in their original order.
Still necessary on current main: The supplied current-main revision still calls runtime staging directly, without this progress wrapper. The related open PR #153407 also addresses redirected progress and historical timestamps; its supplied body establishes partial overlap, not a merged replacement.
Failure and heartbeat lifecycle: The step owner starts progress, maintains its heartbeat while awaiting work, clears the timer, reports completion and failure facts, then rethrows the original exception. Candidate cleanup runs afterward through the existing preflight finally block.
Findings None None.
Security None None.

How this fits together

The Git updater builds and validates a candidate before staging its runtime files for activation. The existing update-step lifecycle supplies progress and failure information to the CLI and update records.

flowchart TD
  A[Git update request] --> B[Build and validate candidate]
  B --> C[Stage runtime files]
  C --> D[Update progress and heartbeat]
  C --> E{Staging succeeds}
  E -->|Yes| F[Activate prepared runtime]
  E -->|No| G[Report failure and clean staging]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +8, Tests +90. Total +98 across 5 files.

View PR surface stats
Area Files Added Removed Net
Source 2 15 7 +8
Tests 3 145 55 +90
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 160 62 +98

Review metrics

Metric Value Why it matters
Focused test cost 26.890 s candidate activation; 20.141 s public failure identifiers The PR now records both required single-worker wall measurements and distinguishes them from CI test-case totals.

Technical review

Best possible solution:

Keep runtime staging within the existing update-step lifecycle while preserving installed-updater ownership and activation ordering.

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

Yes, at source level: current main awaits runtime staging outside the step lifecycle, so that phase emits no step progress or heartbeat of its own. No runtime reproduction was executed in this read-only review.

Is this the best way to solve the issue?

Yes. Reusing the existing step owner is a narrow repair that preserves staging behavior and avoids a second progress or heartbeat implementation.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 99cfeee8405b.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This fixes a bounded visibility gap during Git updates without changing installation or activation policy.
  • 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 ordinary contributor-proof gate does not apply to this MEMBER-authored PR. Candidate tests exercise staging callbacks and failure ordering; reported package acceptance covers published-driver compatibility, not a live Git-staging demonstration. No stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: 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-22T12:34:15.891Z sha e355e8f :: needs changes before merge. :: none

@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 22, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@vincentkoc
vincentkoc merged commit b411141 into main Sep 23, 2026
240 checks passed
@vincentkoc
vincentkoc deleted the fix/update-runtime-staging-progress branch September 23, 2026 11:24
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 24, 2026
* fix(update): show progress while staging Git runtimes

Record runtime staging through the existing update step owner, including elapsed time, heartbeat and public failure identity before cleanup. Keep the original staging error and activation boundary intact.

Adapt the runtime-staging step approach from openclaw#153407 to the current updater. This adds observability; it does not change copy performance.

Co-authored-by: Dallin Romney <[email protected]>

* style(update): format runtime staging regression fixture

---------

Co-authored-by: Dallin Romney <[email protected]>
@roboclaw-bot roboclaw-bot mentioned this pull request Sep 24, 2026
2 of 8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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