Skip to content

fix(ci): release validation fails during branch and tag checks - #136372

Closed
steipete wants to merge 3 commits into
mainfrom
codex/release-frv-ref-auth
Closed

steipete wants to merge 3 commits into
mainfrom
codex/release-frv-ref-auth

Conversation

@steipete

@steipete steipete commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Resolves a problem where full release validation stops while checking an exact source against its release branch or tag, even after authenticated checkout succeeds. The first failed run and fresh recovery run both failed in Validate release inputs with could not read Username, before product validation could start.

Why This Change Was Made

GH_TOKEN authenticates gh, not a subsequent git ls-remote. Checkout intentionally uses persist-credentials: false, so those later Git reads were anonymous. Use the existing step-scoped token with GitHub's commit API, passing fully qualified, encoded branch/tag refs. Keep exact tag/correction-source equality and branch ancestry checks unchanged; resolve the default branch once and carry that verified SHA into cache classification.

Correction-base lookup now runs in a trusted producer before candidate-owned scope or manifest code. Only its SHA crosses into the manifest step; its token does not. The producer reads candidate package JSON as data and imports only trusted workflow helpers. This credential boundary accounts for the net +12 workflow LOC; there is no application-runtime growth. Workflow inputs, permissions, runner/timeout settings, and public CLI/config interfaces are unchanged. No credentials are persisted, no retries are added, and acceptance guards are not weakened.

User Impact

Release operators can validate the declared immutable source through authenticated ref reads without relying on anonymous Git transport. Wrong sources and missing refs still fail closed. The runs do not establish why the Git endpoint issued an authentication challenge; this change removes that anonymous dependency rather than claiming a provider outage or credential rotation fixed it.

Evidence

The original anonymous-Git failure is reproduced by existing executable workflow fixtures. New coverage checks fully qualified identities, annotated tags, API failures, default-branch fact reuse, and the trusted-producer ordering before candidate execution. The earlier local ordering attempt failed an executable synthetic-token test; the final ordering passes. Production orchestration is +51/-39 (net +12); tests and test support are +588/-262 (net +326).

Fifteen read-only live cases passed against five v2 workflow-step bodies executed without harness edits: CI and FRV accepted release/2026.9.1 at d3deb20a, its bdf508b8 ancestor, and annotated v2026.8.2 peeled to 0965053f. CI rejected wrong heads, wrong tag targets, unrelated ancestry, and missing refs. Missing refs returned HTTP422 with no eligibility output. Direct correction-producer and ordinary-version no-op cases also passed.

The Git-network negative control failed as intended; no workflow step used Git network access. Source/helper hashes and the index remained unchanged. This used the existing configured gh credential, not an Actions token; existing shared-cache routing was preserved. It is direct-step API proof, not a full Actions/FRV run or release-artifact proof. The complete two-file owner suite passed 669 tests with 2 skips on the same frozen workflow bytes (node scripts/run-vitest.mjs test/scripts/ci-workflow-guards.test.ts test/scripts/package-acceptance-workflow.test.ts). The changed-code gate and canonical workflow checks passed. The first workflow-check attempt used host Python 3.9, which cannot install the pinned pre-commit 4.6.2 (Python >=3.10); rerunning with the task's Python 3.12 passed without source changes. Independent Codex autoreview returned scoped-clean at its P0 threshold; it is not a full Actions or release qualification. The final test-only follow-up applies the existing Win32 POSIX-child-shim boundary to the credential-ordering fixture, preserving all assertions and Linux/macOS execution. Its complete owner-suite rerun again passed 669 tests with two existing skips on Node24.19/pnpm12.1; no Windows runtime proof is claimed. An initial follow-up run failed an existing partial-clone fixture because its launcher injected GIT_NO_LAZY_FETCH=1; removing only that operator-added setting restored the normal fixture contract and the full suite passed without a source change. The follow-up also passed the changed-code gate and a separate scoped P0 Codex review. That earlier CI run is retained below; the new exact-head run remains required before landing.

Named follow-up: audit named-ref authentication in scripts/github/resolve-openclaw-ref.sh while preserving its arbitrary OPENCLAW_REF_REMOTE contract. That generic resolver is unchanged here; the canonical full-SHA release path does not perform its remote lookup.

CI closeout at 95eea60

The hosted recovery of the earlier head finished with 159 successful jobs, two test failures, the correctly failing aggregate, and ten skips. Security checks passed on an actual GitHub-hosted runner; the original screenshot was a dependency-fetch failure before the private-key scan, not a detected private key. No failed required check is waived.

This follow-up changes test/support code only. Obsolete Git-transport fixtures are consolidated under the authenticated API owner, retaining process-writer drain, identity, ancestry, error and credential-boundary coverage. The complete owner suite passed on real Linux: 479 tests, no failures or skips. The final mechanical style delta also passed its affected cases and the combined changed-code gate.

The built SQLite lifecycle check exposed a separate helper defect: a successful CLI command returned 305,748 bytes of valid plugin JSON, but a 256-KiB diagnostic-tail helper corrupted it before the lifecycle test began. The helper now uses the existing bounded command-capture owner: complete stdout up to its existing 16-MiB budget, explicit overflow failure, bounded stderr diagnostics, exact environment isolation, and process-tree timeout cleanup. Two real-child regressions failed before the repair and passed after it. The six helper/process suites passed 123 tests with one existing Windows-only skip, and the full unchanged built-CLI SQLite lifecycle passed. There is no application-runtime change.

The follow-up passed the combined changed-code gate and independent scoped P0 Codex autoreview with no findings. Exact-head CI for 95eea60c is pending and must pass before native prepare/merge. These local proofs do not replace final release validation or publication verification.

Resolve release branch, tag, correction, and manual default-branch identities
through the authenticated commit API instead of anonymous Git transport.
Keep correction credentials in a trusted producer before candidate execution
and pass only the resolved commit to the manifest and cache consumers.

Cover failed anonymous transport, exact identity and ancestry admission,
annotated tags, API errors, and candidate-before-token ordering.
@steipete steipete self-assigned this Sep 2, 2026
@clawsweeper

clawsweeper Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added size: L maintainer Maintainer-authored PR labels Sep 2, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 2, 2026
@clawsweeper

clawsweeper Bot commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 2, 2026, 2:14 PM ET / 18:14 UTC.

ClawSweeper review

What this changes

The PR replaces anonymous branch and tag lookups in release validation with authenticated GitHub commit-API requests, and updates the shared test CLI helper to preserve complete machine-readable stdout with bounded diagnostics.

Regression provenance

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

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

Keep this PR open: current main still performs the anonymous ref lookups, while the PR has a coherent owner-boundary repair and no concrete introduced correctness defect was found. The queued exact-head Actions run remains the appropriate final automation check.

Priority: P2
Reviewed head: 95eea60c0e068e84dac45d60e6293ce13d0533e1

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is a focused, well-covered automation repair with one remaining hosted external-contract confirmation.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored CI/test-helper PR is outside the external-contributor proof gate; its body records direct workflow-step and real-child evidence, while queued exact-head Actions remains the final hosted confirmation.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored CI/test-helper PR is outside the external-contributor proof gate; its body records direct workflow-step and real-child evidence, while queued exact-head Actions remains the final hosted confirmation.
Evidence reviewed 7 items Current main remains affected: Current main still uses anonymous ci-git-owner.py ... ls-remote for the manual default branch, historical tag, release branch, and target-context branch, so the central release-validation failure is not already fixed.
Introduced workflow repair: The initial PR commit replaces the anonymous manual default-branch lookup with an encoded authenticated commit-API request and records the verified SHA for the later cache-trust decision.
Trusted correction lookup: The correction-base lookup runs before the manifest step, imports the workflow-pinned release-context helper, and passes only the resolved SHA to candidate-manifest validation.
Findings None None.
Security None None.

How this fits together

Release validation resolves a selected branch or release tag, verifies its identity and ancestry, then starts CI and release gates. The shared test helper launches isolated OpenClaw CLI processes and returns their result output and diagnostics to test suites.

flowchart LR
  A[Release input] --> B[Authenticated reference lookup]
  B --> C[Identity and ancestry checks]
  C --> D[CI and release validation]
  E[Test CLI command] --> F[Bounded command capture]
  F --> G[CLI result and diagnostics]
Loading

Before merge

  • Resolve merge risk (P1) - The review environment could not reach api.github.com, so it could not independently exercise the encoded full-ref commits endpoint; the PR's direct-step evidence and queued exact-head Actions run remain the available confirmation for that automation contract.
Agent review details

Security

None.

PR surface

Tests +326, Config +12. Total +338 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 5 588 262 +326
Docs 0 0 0 0
Config 2 51 39 +12
Generated 0 0 0 0
Other 0 0 0 0
Total 7 639 301 +338

Review metrics

Metric Value Why it matters
Production vs test delta production workflows +51/-39 (net +12); tests and test support +588/-262 (net +326) The small workflow increase establishes the pre-candidate credential boundary, while the larger test change exercises ref identity, failures, output preservation, and process cleanup.

Merge-risk options

Maintainer options:

  1. Confirm the exact head in Actions (recommended)
    Allow the queued exact-head workflow to verify authenticated branch and tag resolution before merging this release-validation change.

Technical review

Best possible solution:

Keep the authenticated commit-API path and trusted pre-manifest correction lookup, then let exact-head hosted CI confirm branch and annotated-tag validation with the workflow token before merge.

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

No independent high-confidence live reproduction was possible because this review environment cannot reach GitHub; current main source nevertheless retains the anonymous lookups and the supplied workflow-step evidence exercises the affected paths.

Is this the best way to solve the issue?

Yes: the existing authenticated GitHub API path removes the anonymous transport dependency while preserving the release identity, ancestry, and candidate-code token-boundary checks.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 1212f991db46.

Labels

Label justifications:

  • P2: The PR repairs release-validation orchestration and does not alter product runtime behavior.
  • merge-risk: 🚨 automation: It changes the authenticated reference-resolution and cache-trust path used by CI and full release validation.
  • 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 maintainer-authored CI/test-helper PR is outside the external-contributor proof gate; its body records direct workflow-step and real-child evidence, while queued exact-head Actions remains the final hosted confirmation.

Evidence

What I checked:

  • Current main remains affected: Current main still uses anonymous ci-git-owner.py ... ls-remote for the manual default branch, historical tag, release branch, and target-context branch, so the central release-validation failure is not already fixed. (.github/workflows/ci.yml:810, 1212f991db46)
  • Introduced workflow repair: The initial PR commit replaces the anonymous manual default-branch lookup with an encoded authenticated commit-API request and records the verified SHA for the later cache-trust decision. (.github/workflows/ci.yml:810, ea947e7891a6)
  • Trusted correction lookup: The correction-base lookup runs before the manifest step, imports the workflow-pinned release-context helper, and passes only the resolved SHA to candidate-manifest validation. (.github/workflows/ci.yml:923, 95eea60c0e06)
  • Workflow-boundary coverage: The workflow fixture verifies that the token-bearing correction lookup occurs before candidate code can overwrite the trusted helper path; package-acceptance fixtures cover tag, branch, ancestry, correction, and API-error outcomes. (test/scripts/ci-workflow-guards.test.ts:3867, 95eea60c0e06)
  • Shared command-capture owner: The helper now delegates CLI process lifetime, isolated base environment, stdout preservation, stderr tailing, and process-tree cleanup to the existing command runner; the added regression uses a real child process and checks both complete JSON output and explicit overflow failure. (test/helpers/openclaw-test-instance.ts:672, 95eea60c0e06)
  • Release and current-main provenance: Neither the initial workflow repair nor the current PR head is contained in the available stable release tag; current main is therefore the relevant unresolved behavior, not a shipped replacement. (.github/workflows/full-release-validation.yml:390, 95eea60c0e06)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Dallin Romney: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

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

  • Let the queued exact-head Actions run complete to exercise the real workflow-token branch and tag lookups.

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 (2 earlier review cycles)
  • reviewed 2026-09-02T15:07:15.183Z sha ea947e7 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-02T15:34:46.515Z sha d1c9df3 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added the merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. label Sep 2, 2026
steipete added a commit that referenced this pull request Sep 2, 2026
Combine authenticated release ref checks with checkout-owned comparison
base prefetch, complete CLI output capture, and focused fixture repairs.
Accept the current disabled Codex owner diagnostic in the uninstall proof
without weakening its nonzero exit or plugin-removal checks.

Includes the release ref work from #136372 in #136434. Reuses only the CI
owner changes from29bf3e8c9f8aba323ad92a63571588e92dc0bd53 and the
CLI fixture cleanup from667ce2bf86157ca7e2414efbe6a203da77e3afb6.

Co-authored-by: Masato Hoshino <[email protected]>
Co-authored-by: Ayaan Zaidi <[email protected]>
@steipete

steipete commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

Consolidated this release-ref repair into #136434 at ba9b1b9d9b9b97a8b802cc80a3698db339acd994, retaining this PR's exact head as a parent. The combined owner tests, changed-file gate, and independent scoped review passed.

Closing this separate repair path so the release proceeds through one tooling PR. This is superseded, not merged; #136434 still requires its exact-head CI and native landing gates. No release publication is claimed.

@steipete steipete closed this Sep 2, 2026
@RomneyDa
RomneyDa deleted the codex/release-frv-ref-auth branch October 22, 2026 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L 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