Skip to content

refactor(release): share agent turn retry lifecycle - #147076

Merged
vincentkoc merged 1 commit into
mainfrom
refactor/cross-os-agent-turn-retries-20260913
Sep 13, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
refactor/cross-os-agent-turn-retries-20260913

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 13, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Runtime and installed release checks duplicate the agent-turn retry lifecycle.

User Impact

No behavior change. Both adapters retain two attempts, fresh sessions and log windows, existing deadlines and retry messages, and explicit optional skipping only after exhaustion.

Why This Change Was Made

Move the lifecycle into the existing agent owner and inject each adapter's command runner. Session generation remains outside the catch boundary; per-attempt log offsets prevent stale success markers from qualifying a retry. Production changes: −23 lines; tests: +170 lines.

Evidence

  • At f30e8da246692af2467f1d683ccf849fd7692651, normal CI 34762087915, attempt 1 and aggregate gate 103738285524 passed, including selected types, lint and formatting.
  • Hosted coverage passed all 10 new adapter cases, 129 existing release-check cases and 20 Windows release-workflow tests.
  • Supplemental actual-helper/adapter comparisons passed 2,720 scenarios and 12 independent expectations. Real bounded log fixtures exercised log windows; command and UUID behavior used explicit seams. This does not establish live provider, subprocess or release-installation execution.
  • These results cover this PR independently; they do not qualify a future combined-main tree with PR147077.
  • Root and independent source reviews and final P2 passed. The latest exact-head ClawSweeper review has no findings, Before merge items or Rank-up moves.

@clawsweeper

clawsweeper Bot commented Sep 13, 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.

@vincentkoc vincentkoc self-assigned this Sep 13, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review September 13, 2026 14:14
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: M maintainer Maintainer-authored PR labels Sep 13, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 2:57 PM ET / 18:57 UTC (Revision 2).

ClawSweeper review

What this changes

Shares the retry lifecycle for packaged and installed release-check agent turns and adds adapter-level coverage while preserving existing behavior.

Merge readiness

✅ Ready for maintainer review

Keep open: this is a useful, behavior-preserving consolidation that current main does not contain. No actionable correctness or security findings remain, consistent with the prior review of the same head.

Priority: P3
Reviewed head: f30e8da246692af2467f1d683ccf849fd7692651

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused consolidation with meaningful adapter coverage, successful exact-head CI, and no supported blocking findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored refactor is exempt from the external contributor proof gate and changes no authority boundary; its adapter tests and reported comparisons cover retry behavior but do not establish live subprocess, provider, or installation execution.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored refactor is exempt from the external contributor proof gate and changes no authority boundary; its adapter tests and reported comparisons cover retry behavior but do not establish live subprocess, provider, or installation execution.
Evidence reviewed 7 items Introduced lifecycle preserves existing behavior: The complete pinned introduction moves both existing loops into the agent owner, preserving two attempts, session generation outside the catch boundary, per-attempt log offsets, command deadlines, retry classification, optional skipping, and adapter-specific messages.
Current-main necessity: The affected production files are unchanged between the pinned merge base and fetched main, so main still has the separate retry loops. The supplied related PR remains open and addresses model-configuration command construction instead.
Release comparison: The v2026.9.4 agent module has the existing classification and output helpers but lacks the shared lifecycle introduced here; no shipped implementation of this consolidation was established.
Findings None None.
Security None None.

How this fits together

Cross-platform release checks run agent commands against packaged and installed OpenClaw candidates. The retry lifecycle evaluates command output and fresh log entries, then returns success, retries a transient failure, or reports failure or an explicitly enabled skip.

flowchart TD
  A[Packaged release check] --> C[Shared retry lifecycle]
  B[Installed release check] --> C
  C --> D[Adapter runs agent command]
  D --> E[Check output and fresh logs]
  E --> F[Success or optional skip]
  E --> G[Retryable failure]
  G --> C
  G --> H[Failure after attempt limit]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +170, Other -23. Total +147 across 5 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 172 2 +170
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 3 68 91 -23
Total 5 240 93 +147

Review metrics

None.

Technical review

Best possible solution:

Keep one retry owner in the release agent module, with packaged and installed adapters retaining their command-launch responsibilities.

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

Not applicable: this PR consolidates existing behavior rather than reporting a runtime defect; the duplicated loops are directly visible on current main.

Is this the best way to solve the issue?

Yes: extracting the identical lifecycle into its existing owner removes duplication while preserving both command adapters and their observable contracts.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P3: This is internal release-tooling cleanup with no intended user-visible behavior change.
  • 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 maintainer-authored refactor is exempt from the external contributor proof gate and changes no authority boundary; its adapter tests and reported comparisons cover retry behavior but do not establish live subprocess, provider, or installation execution.

Evidence

What I checked:

  • Introduced lifecycle preserves existing behavior: The complete pinned introduction moves both existing loops into the agent owner, preserving two attempts, session generation outside the catch boundary, per-attempt log offsets, command deadlines, retry classification, optional skipping, and adapter-specific messages. (scripts/lib/cross-os-release-checks/agent.ts:7, f30e8da24669)
  • Current-main necessity: The affected production files are unchanged between the pinned merge base and fetched main, so main still has the separate retry loops. The supplied related PR remains open and addresses model-configuration command construction instead. (scripts/lib/cross-os-release-checks/runtime.ts:346, c560e8141243)
  • Release comparison: The v2026.9.4 agent module has the existing classification and output helpers but lacks the shared lifecycle introduced here; no shipped implementation of this consolidation was established. (scripts/lib/cross-os-release-checks/agent.ts:7, c560e8141243)
  • Adapter-boundary coverage: The new parameterized tests exercise both production adapters with a mocked command boundary and real temporary log fixtures. They cover invocation contracts, stale success rejection, distinct retry sessions, original error propagation, and optional skipping after exhaustion. These are supplemental tests, not live subprocess or provider proof. (test/scripts/cross-os-release-agent-turn.test.ts:36, f30e8da24669)
  • Exact-head CI: GitHub reports normal CI run 34762087915, attempt 1, completed successfully at the reviewed head. No tests or target code were executed during this read-only review. (f30e8da24669)
  • Existing area history: Current-main history identifies prior work by Peter Steinberger on retry classification and Vincent Koc on the installed release harness. GitHub commit patches confirm those connections. Deeper local follow/blame inspection encountered unavailable historical objects, so original feature introduction is not claimed. (scripts/lib/cross-os-release-checks/agent.ts:119, e1ff65fb77af)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincentkoc: 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-13T14:23:21.696Z sha f30e8da :: needs maintainer review before merge. :: none

@vincentkoc
vincentkoc merged commit 4394ad5 into main Sep 13, 2026
143 of 144 checks passed
@vincentkoc
vincentkoc deleted the refactor/cross-os-agent-turn-retries-20260913 branch September 13, 2026 21:09
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit to Alix-007/openclaw that referenced this pull request Sep 13, 2026
…1-prep

* commit '912ae8d96e5964dfdcdf419b79613fb941cdf0a8': (350 commits)
  fix: keep workspace preparation responsive during cleanup (openclaw#147358)
  docs: alphabetize donors and sponsors and add Red Hat logo (openclaw#147302)
  fix(plugins): retain update authority through doctor effects (openclaw#144316)
  refactor(qa): share Multipass mount retry lifecycle (openclaw#147084)
  fix(memory): emit one JSON result for command failures (openclaw#147366)
  improve(plugins): speed up cold metadata loading (openclaw#147411)
  fix(sessions): avoid duplicate work after waited child replies (openclaw#147394)
  fix(agents): retain outstanding child results in parent context (openclaw#112623)
  test: preserve native workflow loader selection (openclaw#147403)
  fix: reduce repeated work while polling session pull requests (openclaw#147373)
  test(qa): preserve task cancellation across process replacement (openclaw#147382)
  fix: prevent sidebar refresh storms during session activity (openclaw#147400)
  refactor: simplify skills CLI formatting (openclaw#147368)
  fix: prevent Git checkout certificate failures behind egress proxy (openclaw#147410)
  fix(qa): stop live threads after their process leader exits (openclaw#147386)
  refactor(release): share agent turn retry lifecycle (openclaw#147076)
  fix(ui): keep uploaded images aligned with their prompts (openclaw#147389)
  fix(fs): guard skill reads and bound worker bundle staging (openclaw#147336)
  fix(ci): restore Linux service ownership fixtures (openclaw#147398)
  fix(plugins): preserve manifest permissions when building plugins (openclaw#147393)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts 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