Skip to content

fix: preserve diagnostics for unresponsive state lease heartbeats - #170835

Merged
steipete merged 1 commit into
mainfrom
codex/qa1118-lease-diagnostics
Oct 13, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/qa1118-lease-diagnostics

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

State-lease responsiveness failures during native PR worktree provisioning currently report only a generic error, losing the evidence needed to distinguish an unanswered request from expired response, operation, or lease budgets.

User Impact

Operators can diagnose a recurrence from the existing redacted error output. Timeout, ownership, lease authority, and recovery behavior are unchanged; no migration or configuration action is required.

Why This Change Was Made

Capture the request phase, failure trigger, elapsed time, remaining budgets, and shared counters before failure overwrites heartbeat status. All three existing responsiveness failure paths use the same bounded diagnostics, which survive the existing error-graph transport. Document how to interpret them without treating a successful retry as proof of a fix.

This follows an observed provisioning failure after the source-checkout callback completed. Subsequent reuse and fresh provisioning passed, but the original intermittent cause remains unproven. This PR repairs the missing diagnostics; it does not claim to resolve that timeout.

Evidence

  • The existing final-verification regression failed before the change specifically because the error lacked diagnostics.
  • 53 focused tests passed across heartbeat lifetime, startup, worker diagnostics, and native provisioning/error formatting. The command took 36.13 seconds, including 17.74 seconds of cold worker compilation. Lifetime cases took 2–49 ms; the existing real corrupt-database/lock-release integration case took 8.245 seconds.
  • Production core, state-test, and PR-tooling-test typechecks passed, as did targeted lint, formatting, and git diff --check.
  • Independent Codex review found no actionable P0–P2 findings. Broad proof and CI timings will come from this PR's checks.
  • The diagnostics contain timing and counters only; no database paths, lease identities, or credentials are added.

Record phase, request counters and remaining budgets before failure overwrites shared status. Preserve timeout, authority and recovery behavior so a repeated provisioning failure can be diagnosed without weakening lease checks.
@clawsweeper

clawsweeper Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@steipete
steipete marked this pull request as ready for review October 13, 2026 08:36
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T08:40:27.694214Z 4ede24b Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: S labels Oct 13, 2026
@steipete
steipete enabled auto-merge (squash) October 13, 2026 08:39
@steipete
steipete merged commit aea10c9 into main Oct 13, 2026
189 of 190 checks passed
@steipete
steipete deleted the codex/qa1118-lease-diagnostics branch October 13, 2026 08:50
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash auto-merge.

vincentkoc added a commit that referenced this pull request Oct 13, 2026
* commit '7ae69497bec4d9c37f170f046a3cbbf954ff19a7': (6238 commits)
  refactor(ui): replace Systems filters with native menu (#170786)
  fix(browser): browser open honors timeoutMs for its opening navigation (#170053)
  refactor: deslop old Apple shared/macOS and Control UI code (#170823)
  perf(memory): reuse pooled origin readers (#170795)
  fix(crabbox): preserve project snapshots across runtime updates (#170780)
  fix: prevent chat image loading from shifting messages (#170819)
  refactor(ui): use native menus for Secret Store actions (#170663)
  fix(gateway): keep chat metadata available during model reloads (#170805)
  fix: preserve diagnostics for unresponsive state lease heartbeats (#170835)
  fix(test): prepare runtime config for corpus revision proof
  test: give credential fixtures database ownership
  perf(auth): unblock session writes during health preparation (#170807)
  fix(ci): use smaller runners for selected Gateway client tests (#170821)
  fix: use same-commit plugins in development macOS builds (#170776)
  perf(github): share cached reads across sessions and searches (#170825)
  fix(projects): keep listings stable during unrelated session changes (#170824)
  fix(update): update repair fails after Doctor completes on busy macOS hosts (#170779)
  fix(heartbeat): suppress truncated NO_REPLY finals such as NO_R (#170190)
  perf(sessions): reduce read transaction overhead (#170745)
  refactor: simplify older plugin and package lifecycles (#170800)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 14, 2026
…enclaw#170835)

Record phase, request counters and remaining budgets before failure overwrites shared status. Preserve timeout, authority and recovery behavior so a repeated provisioning failure can be diagnosed without weakening lease checks.
vincentkoc added a commit that referenced this pull request Oct 18, 2026
* feat(qa): report scorecard evidence gaps

Distinguish catalog coverage, recorded attempts, and qualified evidence without changing scores or release gates.

Include the canonical compatibility migration-status correction from ec1fb60.

Co-authored-by: Patrick Erichsen <[email protected]>

* chore(qa): drop compatibility backport already on main

Keep the QA evidence-gap change scoped to its 13 paths. The canonical compatibility correction ec1fb60 and later refinements are already on main; restore the six branch preimages so the merge consumes that upstream owner state.

* chore(qa): integrate canonical worker settlement fixes

* commit '7ae69497bec4d9c37f170f046a3cbbf954ff19a7': (6238 commits)
  refactor(ui): replace Systems filters with native menu (#170786)
  fix(browser): browser open honors timeoutMs for its opening navigation (#170053)
  refactor: deslop old Apple shared/macOS and Control UI code (#170823)
  perf(memory): reuse pooled origin readers (#170795)
  fix(crabbox): preserve project snapshots across runtime updates (#170780)
  fix: prevent chat image loading from shifting messages (#170819)
  refactor(ui): use native menus for Secret Store actions (#170663)
  fix(gateway): keep chat metadata available during model reloads (#170805)
  fix: preserve diagnostics for unresponsive state lease heartbeats (#170835)
  fix(test): prepare runtime config for corpus revision proof
  test: give credential fixtures database ownership
  perf(auth): unblock session writes during health preparation (#170807)
  fix(ci): use smaller runners for selected Gateway client tests (#170821)
  fix: use same-commit plugins in development macOS builds (#170776)
  perf(github): share cached reads across sessions and searches (#170825)
  fix(projects): keep listings stable during unrelated session changes (#170824)
  fix(update): update repair fails after Doctor completes on busy macOS hosts (#170779)
  fix(heartbeat): suppress truncated NO_REPLY finals such as NO_R (#170190)
  perf(sessions): reduce read transaction overhead (#170745)
  refactor: simplify older plugin and package lifecycles (#170800)
  ...

* fix(gateway): preserve safe previews and no-op bindings

Clear only the matching pending binding operation after an authoritative unchanged settlement, preserving committed and unknown invalidation fences.

Include the canonical managed-media preview correction from 47ba0ae.

Co-authored-by: Peter Steinberger <[email protected]>

* merge(main): reconcile QA reporting with frozen main

* test(gateway): verify retained route authority after binding settlement

Co-authored-by: Patrick Erichsen <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 18, 2026
* feat(qa): report scorecard evidence gaps

Distinguish catalog coverage, recorded attempts, and qualified evidence without changing scores or release gates.

Include the canonical compatibility migration-status correction from 3f6d26f.

Co-authored-by: Patrick Erichsen <[email protected]>

* chore(qa): drop compatibility backport already on main

Keep the QA evidence-gap change scoped to its 13 paths. The canonical compatibility correction 3f6d26f and later refinements are already on main; restore the six branch preimages so the merge consumes that upstream owner state.

* chore(qa): integrate canonical worker settlement fixes

* commit '4ae87487b6eca95ac58a2f18de0e742b240772eb': (6238 commits)
  refactor(ui): replace Systems filters with native menu (openclaw#170786)
  fix(browser): browser open honors timeoutMs for its opening navigation (openclaw#170053)
  refactor: deslop old Apple shared/macOS and Control UI code (openclaw#170823)
  perf(memory): reuse pooled origin readers (openclaw#170795)
  fix(crabbox): preserve project snapshots across runtime updates (openclaw#170780)
  fix: prevent chat image loading from shifting messages (openclaw#170819)
  refactor(ui): use native menus for Secret Store actions (openclaw#170663)
  fix(gateway): keep chat metadata available during model reloads (openclaw#170805)
  fix: preserve diagnostics for unresponsive state lease heartbeats (openclaw#170835)
  fix(test): prepare runtime config for corpus revision proof
  test: give credential fixtures database ownership
  perf(auth): unblock session writes during health preparation (openclaw#170807)
  fix(ci): use smaller runners for selected Gateway client tests (openclaw#170821)
  fix: use same-commit plugins in development macOS builds (openclaw#170776)
  perf(github): share cached reads across sessions and searches (openclaw#170825)
  fix(projects): keep listings stable during unrelated session changes (openclaw#170824)
  fix(update): update repair fails after Doctor completes on busy macOS hosts (openclaw#170779)
  fix(heartbeat): suppress truncated NO_REPLY finals such as NO_R (openclaw#170190)
  perf(sessions): reduce read transaction overhead (openclaw#170745)
  refactor: simplify older plugin and package lifecycles (openclaw#170800)
  ...

* fix(gateway): preserve safe previews and no-op bindings

Clear only the matching pending binding operation after an authoritative unchanged settlement, preserving committed and unknown invalidation fences.

Include the canonical managed-media preview correction from f3260b9.

Co-authored-by: Peter Steinberger <[email protected]>

* merge(main): reconcile QA reporting with frozen main

* test(gateway): verify retained route authority after binding settlement

Co-authored-by: Patrick Erichsen <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant