Skip to content

fix(release): retry unstarted FRV reruns after 5xx - #178160

Merged
RomneyDa merged 1 commit into
mainfrom
fix/rri-395-rerun-5xx-retry
Oct 20, 2026
Merged

RomneyDa merged 1 commit into
mainfrom
fix/rri-395-rerun-5xx-retry

Conversation

@RomneyDa

Copy link
Copy Markdown
Member

Summary

  • Related: RRI-395
  • After an FRV rerun POST fails with a GitHub 5xx, keep reconciling long enough to adopt an attempt that GitHub may already have started.
  • If no newer attempt appears, prove the source is still the exact terminal attempt and retry the same child job, child run, or parent run once.
  • Reconcile the retry normally and never issue a third POST.

Safety

The retry is limited to errors classified as GitHub server errors. Before the second POST, FRV revalidates the exact source attempt and immutable run identity; child retries also revalidate the authenticated parent binding. Mutation-result/run alignment is asserted explicitly. Any provenance change, newer attempt, hard failure, or repeated 5xx fails closed.

Validation

  • pnpm exec vitest run test/scripts/frv.test.ts — 98 passed
  • pnpm exec oxlint scripts/frv.mjs test/scripts/frv.test.ts — clean
  • pnpm exec oxfmt --check scripts/frv.mjs test/scripts/frv.test.ts — clean
  • git diff --check — clean

Focused regression coverage proves one child retry, one parent retry, adoption without reposting when the first mutation actually starts an attempt, exact-provenance refusal, and the one-retry ceiling.

Review

Independent semantic review found no P0/P1 issue. Its duplicate-rerun and positional-alignment concerns were addressed with an immediate per-mutation exact-state re-read and an explicit result-count invariant. GitHub mutation commands retain their existing 60-second process timeout, which is stricter than the default FRV operation deadline.

The canonical Codex Auto Review command could not be run because this environment has no codex executable.

@clawsweeper

clawsweeper Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@RomneyDa

Copy link
Copy Markdown
Member Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: S labels Oct 20, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 20, 2026
@clawsweeper

clawsweeper Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR retries an FRV rerun once after a GitHub 5xx when reconciliation finds no newer attempt and fresh checks confirm the original source.

Example: Rerunning child run 101 attempt 1 returns HTTP 502 without starting attempt 2.

  • Before: FRV stops after its reconciliation window.
  • After: FRV rechecks the source, retries once, and reconciles attempt 2 without permitting a third POST.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful, focused implementation with no definite introduced defect; confidence in real GitHub recovery remains limited to source inspection and mocked-client validation.
Proof confidence 🦐 gold shrimp (3/6) Ordinary contributor behavior-proof gating is exempt for this maintainer-authored PR; supplied validation exercises continueFailed with mocked GitHub clients, and no changed authority boundary requiring separate final-effect proof was identified.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Release operators must restart recovery when GitHub returns a 5xx without actually starting the requested rerun.
Reason: The maintainer-authored direction authorizes this narrow recovery change, which preserves existing ownership and avoids repeating the entire validation graph.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR provides a focused recovery improvement, and no definite correctness or security defect was found.

Priority: P2
Reviewed head: d1255b6b3dcb161dce44fe61bdc8df40b1db85d7

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied evidence does not show real-transport recovery after an injected rerun 5xx or a recorded base-red/head-green run.
Agent review details

How this fits together

The FRV controller consumes an authenticated release-validation plan and GitHub run observations, requests child or parent reruns, and verifies the resulting attempt evidence.

flowchart TD
  A[Release operator] --> B[FRV controller]
  C[Authenticated execution plan] --> B
  B --> D[GitHub rerun endpoint]
  D --> E[Run attempt observations]
  E --> F[Bounded reconciliation]
  F --> B
  B --> G[Release evidence verifier]
Loading

Technical review

Best possible solution:

Keep bounded retry policy in the existing FRV controller, preserving exact-source admission, attempt adoption, and the two-POST ceiling.

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

Current-main source deterministically stops when a rerun fails and no successor becomes observable within reconciliation; the added fixtures model an unstarted HTTP 502, but no product execution was performed during this read-only review.

Is this the best way to solve the issue?

The change uses the existing reconciliation owner and shared server-error classifier, applies to child jobs, child runs, and parents, and bounds reposting without adding configuration or persistent state.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Raw commit f8c1398 adds scripts/frv.mjs:525 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: f8c139846718; files: scripts/frv.mjs)
  • Dallin Romney: Raw commit 5584b16 adds scripts/frv.mjs:1020 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 5584b16af910; files: scripts/frv.mjs)
  • Peter Steinberger: Raw commit 53ccbd1 adds scripts/frv.mjs:1334 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 53ccbd1b7b1f; files: scripts/frv.mjs)

PR surface

Tests +56, Other +71. Total +127 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 63 7 +56
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 72 1 +71
Total 2 135 8 +127

Labels

Label changes:

  • add P2: This improves release-operator recovery from GitHub rerun failures with limited impact outside release tooling.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: This improves release-operator recovery from GitHub rerun failures with limited impact outside release tooling.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • A production-controller trace using the real GitHub transport with an injected 5xx would strengthen confidence in recovery and the no-third-POST guarantee.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 20, 2026, 2:38 AM ET / 06:38 UTC.

@RomneyDa
RomneyDa force-pushed the fix/rri-395-rerun-5xx-retry branch from d1255b6 to ed8d50e Compare October 20, 2026 06:43
@RomneyDa

Copy link
Copy Markdown
Member Author

CI repair: constrained the parameterized target fixture to the child-or-parent literal union. The exact failing root type stripe now passes, along with all 98 focused FRV tests, lint, formatting, and diff checks. @clawsweeper re-review

@RomneyDa
RomneyDa enabled auto-merge (squash) October 20, 2026 07:17
@RomneyDa
RomneyDa merged commit fadee60 into main Oct 20, 2026
94 checks passed
@RomneyDa
RomneyDa deleted the fix/rri-395-rerun-5xx-retry branch October 20, 2026 07:18
RomneyDa added a commit that referenced this pull request Oct 20, 2026
* fix(release): retain postpublish failure causes (#178147)

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>

* fix(release): make FRV no-op commands succeed (#178149)

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>

* fix(release): reuse admitted changelog descendants

Co-authored-by: RomneyDa <[email protected]>

* fix(release): show readable SDK acknowledgement diff

Co-authored-by: RomneyDa <[email protected]>

* fix(release): retry unstarted FRV reruns after 5xx (#178160)

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>

* fix(release): report FRV plan sealing state

Co-authored-by: RomneyDa <[email protected]>

* fix(release): declare FRV plan lifecycle APIs

Declare the plan lifecycle helpers consumed by the TypeScript tests so NodeNext resolution checks the new exports.

Co-authored-by: RomneyDa <[email protected]>

* fix(release): recover every failed artifact producer

Account for npm, Docker, and candidate producer jobs during failed release continuation, binding each recovery to the authenticated workflow and exact dispatch evidence.

Co-authored-by: RomneyDa <[email protected]>

* fix(release): retain discovered artifact producers

Co-authored-by: RomneyDa <[email protected]>

* fix(release): audit backport companion closure

Add a bounded, evidence-only audit for later same-path commits, PR companions, neighbor tests, reference candidates, and candidate file/content differences.

Co-authored-by: RomneyDa <[email protected]>

* fix(release): satisfy companion scanner lint

Co-authored-by: RomneyDa <[email protected]>

* fix(release): gate integrated branch pushes

Validate a captured release SHA from an immutable detached checkout, then push that exact SHA only after static, type, dead-code, and changed-test gates pass.

Co-authored-by: RomneyDa <[email protected]>

* fix(release): gate stable branch pushes

Co-authored-by: RomneyDa <[email protected]>

* fix(release): recover FRV before plan seal

Checkpoint exact attempt-one preparation inputs before execution-plan sealing so a retry can recover pre-seal failures without rebuilding authority from live state. Bind the eventual sealer attempt into the immutable plan and authenticate it at publication and cancellation boundaries.

Co-authored-by: RomneyDa <[email protected]>

* fix(release): keep plan cache writes attempt-scoped

Co-authored-by: RomneyDa <[email protected]>

* test(release): complete batch backport fixtures

Co-authored-by: RomneyDa <[email protected]>

* fix(release): validate admitted descendant reuse at seal

Co-authored-by: RomneyDa <[email protected]>

* fix(release): accept backport companion separator

Co-authored-by: RomneyDa <[email protected]>

* fix(release): accept orchestrated stable push shape

Co-authored-by: RomneyDa <[email protected]>

* fix(release): retain legacy npm recovery

Co-authored-by: RomneyDa <[email protected]>

* fix(release): authenticate preseal checkpoint layout

Co-authored-by: RomneyDa <[email protected]>

* fix(release): adopt recovered artifact attempts

Co-authored-by: RomneyDa <[email protected]>

* fix(release): recheck producers before rerun retries

Co-authored-by: RomneyDa <[email protected]>

* test(release): type cached plan fixture explicitly

Co-authored-by: RomneyDa <[email protected]>

* fix(release): keep candidate recovery fail closed

* fix(release): adopt retried Docker architectures

* test(release): cover Docker producer jobs

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
RomneyDa added a commit that referenced this pull request Oct 21, 2026
* fix(release): retain postpublish failure causes (#178147)

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>

* fix(release): make FRV no-op commands succeed (#178149)

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>

* fix(release): reuse admitted changelog descendants

Co-authored-by: RomneyDa <[email protected]>

* fix(release): show readable SDK acknowledgement diff

Co-authored-by: RomneyDa <[email protected]>

* fix(release): retry unstarted FRV reruns after 5xx (#178160)

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>

* fix(release): report FRV plan sealing state

Co-authored-by: RomneyDa <[email protected]>

* fix(release): declare FRV plan lifecycle APIs

Declare the plan lifecycle helpers consumed by the TypeScript tests so NodeNext resolution checks the new exports.

Co-authored-by: RomneyDa <[email protected]>

* fix(release): recover every failed artifact producer

Account for npm, Docker, and candidate producer jobs during failed release continuation, binding each recovery to the authenticated workflow and exact dispatch evidence.

Co-authored-by: RomneyDa <[email protected]>

* fix(release): retain discovered artifact producers

Co-authored-by: RomneyDa <[email protected]>

* fix(release): audit backport companion closure

Add a bounded, evidence-only audit for later same-path commits, PR companions, neighbor tests, reference candidates, and candidate file/content differences.

Co-authored-by: RomneyDa <[email protected]>

* fix(release): satisfy companion scanner lint

Co-authored-by: RomneyDa <[email protected]>

* fix(release): gate integrated branch pushes

Validate a captured release SHA from an immutable detached checkout, then push that exact SHA only after static, type, dead-code, and changed-test gates pass.

Co-authored-by: RomneyDa <[email protected]>

* fix(release): gate stable branch pushes

Co-authored-by: RomneyDa <[email protected]>

* fix(release): recover FRV before plan seal

Checkpoint exact attempt-one preparation inputs before execution-plan sealing so a retry can recover pre-seal failures without rebuilding authority from live state. Bind the eventual sealer attempt into the immutable plan and authenticate it at publication and cancellation boundaries.

Co-authored-by: RomneyDa <[email protected]>

* fix(release): keep plan cache writes attempt-scoped

Co-authored-by: RomneyDa <[email protected]>

* fix(release): adapt batch backport to stable train

Co-authored-by: RomneyDa <[email protected]>

* fix(release): validate admitted descendant reuse at seal

Co-authored-by: RomneyDa <[email protected]>

* fix(release): accept backport companion separator

Co-authored-by: RomneyDa <[email protected]>

* fix(release): accept orchestrated stable push shape

Co-authored-by: RomneyDa <[email protected]>

* fix(release): retain legacy npm recovery

Co-authored-by: RomneyDa <[email protected]>

* fix(release): authenticate preseal checkpoint layout

Co-authored-by: RomneyDa <[email protected]>

* fix(release): adopt recovered artifact attempts

Co-authored-by: RomneyDa <[email protected]>

* fix(release): recheck producers before rerun retries

Co-authored-by: RomneyDa <[email protected]>

* test(release): type cached plan fixture explicitly

Co-authored-by: RomneyDa <[email protected]>

* fix(release): keep candidate recovery fail closed

* fix(release): adopt retried Docker architectures

* test(release): cover Docker producer jobs

* test(release): align 2026.10.6 CI contracts

Co-authored-by: RomneyDa <[email protected]>

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 21, 2026
RomneyDa added a commit that referenced this pull request Oct 23, 2026
* fix(release): retain postpublish failure causes (#178147)

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit f47d5d7)

* fix(release): make FRV no-op commands succeed (#178149)

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 29587f5)

* fix(release): retry unstarted FRV reruns after 5xx (#178160)

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit fadee60)

* fix(release): show readable SDK acknowledgement diff (#178158)

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit f6c0066)

* fix(release): report FRV plan sealing state (#178172)

* fix(release): report FRV plan sealing state

Co-authored-by: RomneyDa <[email protected]>

* fix(release): declare FRV plan lifecycle APIs

Declare the plan lifecycle helpers consumed by the TypeScript tests so NodeNext resolution checks the new exports.

Co-authored-by: RomneyDa <[email protected]>

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 4b065f5)

* fix(release): gate integrated branch pushes (#178202)

* fix(release): gate integrated branch pushes

Validate a captured release SHA from an immutable detached checkout, then push that exact SHA only after static, type, dead-code, and changed-test gates pass.

Co-authored-by: RomneyDa <[email protected]>

* fix(release): gate stable branch pushes

Co-authored-by: RomneyDa <[email protected]>

* fix(release): accept orchestrated stable push shape

Co-authored-by: RomneyDa <[email protected]>

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 2afc8db)

* fix(release): audit backport companion closure (#178188)

* fix(release): audit backport companion closure

Add a bounded, evidence-only audit for later same-path commits, PR companions, neighbor tests, reference candidates, and candidate file/content differences.

Co-authored-by: RomneyDa <[email protected]>

* fix(release): satisfy companion scanner lint

Co-authored-by: RomneyDa <[email protected]>

* fix(release): accept backport companion separator

Co-authored-by: RomneyDa <[email protected]>

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 0f2b5e9)

* ci(release): retain live failure diagnostics (#179097)

* ci(release): retain live failure diagnostics

Co-authored-by: RomneyDa <[email protected]>

* test(release): isolate live cache shell replay

Co-authored-by: RomneyDa <[email protected]>

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 89ee777)

* feat(release): add fast backport conflict probe (#179104)

* feat(release): add fast backport conflict probe

Co-authored-by: RomneyDa <[email protected]>

* fix(release): parse backport probe separator

Co-authored-by: RomneyDa <[email protected]>

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 3c1d486)

* fix(release): print release note verifier errors (#179077)

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 2219999)

* fix(release): verify extended stable notes context (#179083)

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 7de3a4b)

* feat(release): fetch compatibility inputs from registry (#179093)

* feat(release): fetch compatibility inputs from registry

Co-authored-by: RomneyDa <[email protected]>

* docs(release): clarify offline inventory checks

Co-authored-by: RomneyDa <[email protected]>

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit a819d2b)

* fix(release): close extended-stable FRV retry helper

Co-authored-by: RomneyDa <[email protected]>

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: S 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.

2 participants