Skip to content

fix(release): preserve canonical candidate requests - #132293

Merged
vincentkoc merged 1 commit into
mainfrom
fix/frv-candidate-canonical-20260829
Aug 29, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/frv-candidate-canonical-20260829

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Aug 29, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Full Release Validation passed a canonical candidate request into candidate discovery. Discovery rebuilt that canonical object as raw CLI input, dropping array-valued survivor policy and changing the request digest before acquisition could start.

Run https://github.com/openclaw/openclaw/actions/runs/33228807189 reproduced the failure in Acquire full release candidate / Find trusted release candidate.

Why This Change Was Made

Discovery now validates and digests the canonical request directly. It no longer routes canonical JSON through the raw-input builder.

The subprocess regression generates canonical JSON with nonempty baseline and scenario arrays through the real contract CLI, passes its exact digest into discovery, and verifies the unchanged request identity plus the digest-qualified artifact lookup.

User Impact

Fresh Full Release Validation runs can acquire or prepare the exact requested candidate instead of failing before selected-lane execution with a false digest mismatch.

Scope

  • Production/tooling: +1/-4
  • Tests: +93/-4
  • No workflow, dependency, configuration, publication, tag, registry, or compatibility change

Evidence

  • Pre-fix regression: failed with full release candidate request digest does not match the expected request digest.
  • Post-fix reuse suite: 28 tests passed.
  • Contract suite: 52 tests passed.
  • Formatting and git diff --check: passed.
  • Changed-surface gate: all preceding guards passed; root test typecheck stopped on the unrelated current-main pako declaration baseline in ui/vite.config.ts.
  • Autoreview: clean, no accepted P0/P1 findings.
  • Fresh Full Release Validation: pending after merge and subject to the six-hour controller throttle.

@clawsweeper

clawsweeper Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@vincentkoc vincentkoc self-assigned this Aug 29, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review August 29, 2026 02:41
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: S maintainer Maintainer-authored PR labels Aug 29, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. 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 Aug 29, 2026
@clawsweeper

clawsweeper Bot commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 28, 2026, 10:59 PM ET / August 29, 2026, 02:59 UTC.

ClawSweeper review

What this changes

This PR makes release-candidate discovery validate and hash the canonical request it receives, rather than rebuilding it as raw CLI input, with regression coverage for survivor-policy arrays.

Regression provenance

Possible regression — probable (reviewed change; failure trace). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open. The pinned PR removes a source-proven digest mismatch at the canonical-request consumer boundary and adds focused regression coverage; it is member-authored and maintainer-labeled, so normal human review and exact-head CI should gate landing.

Priority: P1
Reviewed head: 314fd9438d83425ff21168b18b7b6f4d51c899e5
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A small, source-proven repair with focused regression coverage and no blocking correctness finding.
Proof confidence 🌊 off-meta tidepool Not applicable: This member-authored PR is exempt from the external-contributor proof gate. Its new regression test exercises the real contract and discovery CLIs but mocks GitHub artifact listing, so it is focused coverage rather than a fresh production workflow trace.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This member-authored PR is exempt from the external-contributor proof gate. Its new regression test exercises the real contract and discovery CLIs but mocks GitHub artifact listing, so it is focused coverage rather than a fresh production workflow trace.
Evidence reviewed 6 items Current-main failure mechanism: The current main/base implementation rebuilds the already canonical request before comparing the supplied digest, while the raw builder only parses string-valued survivor fields; canonical arrays are consequently dropped and the digest changes.
Canonical contract boundary: The raw-input builder accepts only string survivor-policy fields, whereas canonical validation requires arrays and the candidate digest hashes canonical JSON; discovery is therefore the correct validation consumer for canonical workflow output.
Caller supplies canonical JSON: The release workflow creates canonical JSON through the contract CLI and passes that JSON together with its digest into the reusable candidate workflow, whose input contract explicitly calls it canonical.
Findings None None.
Security None None.

How this fits together

Full Release Validation builds a canonical candidate request, then candidate discovery hashes it to find a matching trusted artifact before release-validation lanes run. The discovery result feeds either artifact reuse or candidate preparation.

flowchart LR
  A[Release validation inputs] --> B[Canonical request builder]
  B --> C[Canonical request JSON and digest]
  C --> D[Candidate discovery]
  D --> E[Digest-qualified artifact lookup]
  E --> F[Reuse or candidate preparation]
  F --> G[Release validation lanes]
Loading

Decision needed

Question Recommendation
Should this member-owned release-validation fix be approved once exact-head CI completes successfully? Approve after exact-head CI: Land the focused consumer-boundary fix after required checks complete green on the pinned head.

Why: The code path is source-proven and has focused coverage, but the maintainer label requires explicit human handling before landing.

Before merge

  • Complete next step (P2) - This active member-owned PR already contains the focused repair; the remaining action is ordinary maintainer review and exact-head CI, not an automated replacement.
Agent review details

Security

None.

PR surface

Tests +89, Other -3. Total +86 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 93 4 +89
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 4 -3
Total 2 94 8 +86

Review metrics

Metric Value Why it matters
Production vs test LOC production -3, tests +89 The production repair removes the incorrect transformation; added lines are focused regression coverage.

Technical review

Best possible solution:

Keep raw-input normalization at the request producer and canonical validation plus hashing at discovery, then land once exact-head checks are green.

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

Yes, source reproducibly establishes the failure: canonical survivor arrays reach a raw-input builder that discards them before digest comparison. The supplied workflow-run link reports the same failure, though GitHub DNS was unavailable for independent inspection.

Is this the best way to solve the issue?

Yes. The workflow contract supplies canonical JSON, so validating and hashing it directly at discovery preserves identity; adding reverse coercion at this consumer would be the wrong boundary.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 5d8ef653cd71.

Labels

Label justifications:

  • P1: Without this repair, release-candidate acquisition can stop Full Release Validation before selected lanes execute.
  • 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: This member-authored PR is exempt from the external-contributor proof gate. Its new regression test exercises the real contract and discovery CLIs but mocks GitHub artifact listing, so it is focused coverage rather than a fresh production workflow trace.

Evidence

What I checked:

  • Current-main failure mechanism: The current main/base implementation rebuilds the already canonical request before comparing the supplied digest, while the raw builder only parses string-valued survivor fields; canonical arrays are consequently dropped and the digest changes. (scripts/full-release-candidate-reuse.mjs:193, 5d8ef653cd71)
  • Canonical contract boundary: The raw-input builder accepts only string survivor-policy fields, whereas canonical validation requires arrays and the candidate digest hashes canonical JSON; discovery is therefore the correct validation consumer for canonical workflow output. (scripts/full-release-candidate-contract.mjs:128, 314fd9438d83)
  • Caller supplies canonical JSON: The release workflow creates canonical JSON through the contract CLI and passes that JSON together with its digest into the reusable candidate workflow, whose input contract explicitly calls it canonical. (.github/workflows/full-release-candidate.yml:88, 5d8ef653cd71)
  • Introduced repair: The pinned head removes only the erroneous raw rebuild; requestContract continues to validate, canonicalize, and hash the received request before artifact lookup. (scripts/full-release-candidate-reuse.mjs:192, 314fd9438d83)
  • Regression coverage: The new test uses the real contract and discovery CLIs, creates a canonical request with nonempty policy arrays, asserts the expected digest and unchanged request bytes, and verifies the digest-qualified artifact lookup. (test/scripts/full-release-candidate-reuse.test.ts:348, 314fd9438d83)
  • Feature history: The candidate-reuse pipeline path appears to date to the full-release-validation integration commit; the current PR is a narrowly scoped correction to that consumer path. (scripts/full-release-candidate-reuse.mjs:193, f30e480a7064)

Likely related people:

  • Vincent Koc: Authored the candidate-reuse feature, the subsequent full-release-validation pipeline integration, and this correction. (role: feature owner and recent area contributor; confidence: high; commits: 944cff7cefe2, f30e480a7064, 314fd9438d83; files: scripts/full-release-candidate-reuse.mjs, scripts/full-release-candidate-contract.mjs)

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-08-29T02:48:00.828Z sha eac2f68fc6b9f381c575cce85c621abcd014c365 :: needs maintainer review before merge. :: none

@vincentkoc
vincentkoc force-pushed the fix/frv-candidate-canonical-20260829 branch from eac2f68 to 314fd94 Compare August 29, 2026 02:50
@vincentkoc
vincentkoc marked this pull request as draft August 29, 2026 02:51
@vincentkoc
vincentkoc marked this pull request as ready for review August 29, 2026 02:52
@vincentkoc
vincentkoc merged commit 6bfaa05 into main Aug 29, 2026
207 of 218 checks passed
@vincentkoc
vincentkoc deleted the fix/frv-candidate-canonical-20260829 branch August 29, 2026 03:04
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P1 High-priority user-facing bug, regression, or broken workflow. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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.

1 participant