Repository navigation
Conversation
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.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed September 2, 2026, 2:14 PM ET / 18:14 UTC. ClawSweeper reviewWhat this changesThe 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 provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readinessKeep 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 Review scores
Verification
How this fits togetherRelease 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]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +326, Config +12. Total +338 across 7 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest 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. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
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]>
|
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. |
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 inputswithcould not read Username, before product validation could start.Why This Change Was Made
GH_TOKENauthenticatesgh, not a subsequentgit ls-remote. Checkout intentionally usespersist-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.1atd3deb20a, itsbdf508b8ancestor, and annotatedv2026.8.2peeled to0965053f. 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
ghcredential, 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 injectedGIT_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.shwhile preserving its arbitraryOPENCLAW_REF_REMOTEcontract. 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.