Skip to content

fix(release): refuse unsafe consumed npm producer reruns - #180246

Merged
RomneyDa merged 17 commits into
mainfrom
tideclaw/rri-211-consumed-producer-preflight
Oct 29, 2026
Merged

RomneyDa merged 17 commits into
mainfrom
tideclaw/rri-211-consumed-producer-preflight

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Summary

  • inspect the exact failed FRV attempt before retrying producers
  • refuse only a failed npm preparation job whose bytes are already bound into sealed candidate evidence
  • permit carried-forward successful npm preparation and independent Docker producer retries
  • fail before GitHub mutation and direct unsafe recovery to a fresh all-group FRV with authenticated reuse_evidence=true

Why

Rerunning a failed npm byte producer after its output has already been consumed can create a different producer identity and make the later seal fail. This guard saves time only in that doomed recovery case; it does not add a general compatibility gate or block independent producers.

Testing

  • test/scripts/frv.test.ts: 115 passed
  • scripts typecheck
  • oxlint and oxfmt checks
  • git diff --check

Closes RRI-211.

@clawsweeper

clawsweeper Bot commented Oct 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 scripts Repository scripts size: XS labels Oct 22, 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. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. 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 22, 2026
@clawsweeper

clawsweeper Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR checks npm preparation identity before retrying artifact producers and rejects retries that would replace bytes already consumed by candidate evidence.

Example: Npm producer run 81 has supplied candidate bytes, but a later attempt replaces its original preparation execution.

  • Before: Continuation can retry the producer before eventually failing to seal the changed package identity.
  • After: Continuation refuses before mutation and directs the operator to a fresh all-group validation with reuse_evidence=true.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and source-consistent, with meaningful recovery regressions; evidence remains fixture-based and current-head CI is incomplete.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor-proof gate; supplied validation covers production owners through fixtures, without a recorded live contract-2 continuation.
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 can spend time retrying a producer whose replacement package identity cannot be sealed against already-consumed candidate evidence.
Reason: The maintainer-authored direction narrowly avoids doomed recovery while retaining safe npm qualification and independent Docker retries.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it addresses a valid release-recovery failure, fixes the prior finding, and introduces no remaining actionable correctness or security defect; current-head CI is still running.

Priority: P2
Reviewed head: 254ea5cc0ae4a1b1668709345ad8053f65027201

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied fixtures do not show a live contract-2 FRV refusing consumed-byte replacement while permitting safe npm and Docker retries.
Agent review details

How this fits together

The FRV controller reads frozen execution plans, dispatch logs, producer attempts, and package descriptors to select safe GitHub retries and collect release qualification evidence.

flowchart LR
  A[Frozen FRV plan] --> B[Controller preflight]
  C[Dispatch logs and job history] --> B
  B --> D[Safe producer retries]
  D --> E[Artifact collector]
  F[Immutable npm descriptors] --> E
  E --> G[Candidate and qualification evidence]
Loading

Technical review

Best possible solution:

Keep recovery in the existing controller and artifact collector, using immutable descriptors and the shared execution fingerprint to preserve consumed npm bytes.

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

Current-main source lacks the consumed-preparation preflight and can request a producer retry that later fails immutable-byte checks; this read-only review executed no target code.

Is this the best way to solve the issue?

The change preserves the existing recovery owners and historical carried-job contract while moving the refusal before mutation, and the latest correction restores safe retries before candidate consumption.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Npm preparation adoption keeps the original intent (14edef7: Permit qualification retries without replacing successful package bytes already consumed by the candidate.)
  • Carried-forward preparation executions keeps the original intent (3150853: GitHub re-lists retained successful jobs with new IDs but unchanged execution timestamps.)
  • Artifact producer recovery keeps the original intent (10f76c5: Recover failed npm and Docker producers using authenticated frozen workflow and dispatch identities.)
  • Test-line ceiling changes intended behavior with a stated reason (7f84371: The PR retains main's ceiling and records a narrowly justified additional allowance for descriptor-recovery regressions.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Dallin Romney: Raw commit 14edef7 adds scripts/full-release-artifacts.mjs:311 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 14edef7f0677; files: scripts/full-release-artifacts.mjs)
  • Peter Steinberger: Raw commit 52df844 adds scripts/frv.mjs:511 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 52df8444f85d; files: scripts/frv.mjs)
  • Vincent Koc: Raw commit 6670690 adds scripts/frv.mjs:404 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 667069055284; files: scripts/frv.mjs)

PR surface

Tests +220, Config 0, Other +123. Total +343 across 6 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 226 6 +220
Docs 0 0 0 0
Config 1 1 1 0
Generated 0 0 0 0
Other 3 155 32 +123
Total 6 382 39 +343

Review metrics

Metric Value Why it matters
Production versus test changes Production +154/-31 lines; tests +226/-6 lines Growth supports descriptor-backed recovery and distinct consumption, replacement, pending-job, and failed-preparation regressions within existing owners.

Labels

Label changes:

  • 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.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove merge-risk: 🚨 automation: Current PR review selected no merge-risk labels.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This improves maintainer-operated release recovery with a limited blast radius.
  • 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.

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.

History

Review history (8 earlier review cycles)
  • reviewed 2026-10-22T03:33:48.997Z sha 2ec0ba3 :: needs changes before merge. :: [P2] Restrict refusal to producers that would replace consumed bytes | [P2] Construct the candidate-bearing test plan without an invalid assignment
  • reviewed 2026-10-22T04:48:38.538Z sha f274c4c :: needs maintainer review before merge. :: none
  • reviewed 2026-10-23T03:08:58.288Z sha 8d7e2f3 :: needs changes before merge. :: [P2] Preserve carried preparation across later failed attempts | [P2] Restore early reporting of failed raw preparation | [P2] Check replacement executions before adopting an old descriptor
  • reviewed 2026-10-24T01:57:12.361Z sha 6caa6c9 :: needs changes before merge. :: [P2] Keep polling until the preparation job completes | [P2] Exclude failed preparations when selecting frozen descriptors
  • reviewed 2026-10-24T02:03:17.973Z sha 6caa6c9 :: needs changes before merge. :: [P2] Keep polling until the preparation job completes | [P2] Exclude failed preparations when selecting frozen descriptors
  • reviewed 2026-10-27T23:11:00.092Z sha ab875d0 :: needs changes before merge. :: [P2] Allow missing preparation identity before candidate consumption
  • reviewed 2026-10-27T23:25:05.860Z sha 0412775 :: needs changes before merge. :: [P2] Allow missing preparation identity before candidate consumption
  • reviewed 2026-10-29T03:35:44.980Z sha d9314f0 :: needs changes before merge. :: [P2] Allow missing preparation identity before candidate consumption

Reviewed October 28, 2026, 11:55 PM ET / October 29, 2026, 03:55 UTC (Revision 9).

@RomneyDa RomneyDa changed the title fix(release): refuse consumed producer reruns fix(release): refuse unsafe consumed npm producer reruns Oct 22, 2026
@RomneyDa

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. 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 rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 22, 2026
Resolve the test-line baseline against current main while preserving its existing slack.

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

Copy link
Copy Markdown
Member Author

Latest-main conflict and ratchet follow-up validated at exact head 549a846. @clawsweeper re-review

Resolve the test-line baseline against current main while preserving its existing slack.

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

Copy link
Copy Markdown
Member Author

Latest-main conflict and ratchet follow-up validated at exact head 449fd97. @clawsweeper re-review

…umed-producer-preflight

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

# Conflicts:
#	config/test-lines-baseline.txt
@RomneyDa

Copy link
Copy Markdown
Member Author

Current-main conflict and test-line baseline reconciled at exact head 3a39286; 169 targeted tests pass. @clawsweeper re-review

@RomneyDa

Copy link
Copy Markdown
Member Author

Current-main conflict resolved at exact head d9314f05e76757320346317f077b462e95d9ee43; test-line ratchet and 168 focused tests pass.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 29, 2026
@RomneyDa

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. labels Oct 29, 2026
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: 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.

2 participants