Skip to content

fix(release): dispatch validation through a client-pushed target ref - #120613

Merged
steipete merged 1 commit into
mainfrom
fix/release-dispatch-temp-ref
Aug 8, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/release-dispatch-temp-ref

Conversation

@steipete

@steipete steipete commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

scripts/full-release-validation-at-sha.mjs fails when --sha targets a GitHub-API-created squash-merge commit on a release branch: both the script's local git preflight and every actions/checkout ref=<sha> in the workflow die with upload-pack: not our ref <sha> — persistently, even when the SHA is the advertised branch tip. Client-pushed SHAs fetch fine; API-created squash commits (8ff1724, 0cd3075, 06ceff1) consistently refuse. This silently consumed three dispatch attempts during the 2026.8.1-beta.1 push (runner-side failures: run 31256980937); ref-name dispatch (run 31257301355) went fully green and proved the mechanism.

Why This Change Was Made

The script now pushes the exact target SHA to a script-owned temporary ref (validation/target-<sha12>-<ts>) and dispatches that ref name, preserving the canonical target_context_ref. Exact-SHA pinning is kept (the temp ref is immutable and script-owned) and the workflow's seven internal bare-SHA checkouts become safe because the client-pushed ref advertises that exact object for the run's lifetime. Both temporary refs (workflow branch + target ref) share the existing cleanup and --keep-branch semantics; refs are retained after failed runs for rerun/diagnosis. Ergonomics hardened per the script-wrapper rule: the parent run URL prints to stdout before any waiting, and every fatal path ends with a single reason-bearing FAILED (exit 1) stderr trailer.

Sibling audit: scripts/release-candidate-checklist.mjs:1566 is a separate bare-SHA dispatcher with the same latent exposure — flagged as follow-up, not changed here.

User Impact

Release operators can dispatch validation for any candidate SHA — including squash-merged release-branch tips — without silent fetch failures.

Evidence

  • Mocked dispatch-harness tests: 19/19 green covering temp-ref shape/push args, ref-name dispatch args, cleanup + --keep-branch, loud-failure trailer, and stdout run URL.
  • pnpm tsgo:core + tsgo:core:test, dead-export scans, script-declaration contracts (254 matched), formatting, git diff --check: all green.
  • Codex autoreview (gpt-5.6-sol, high): clean (0.98).
  • Production +56/−15; tests +253/−3. Real-world mechanism proof: green run 31257301355.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: M maintainer Maintainer-authored PR labels Aug 8, 2026
@steipete
steipete marked this pull request as ready for review August 8, 2026 15:22
@steipete
steipete merged commit 18dd70c into main Aug 8, 2026
72 checks passed
@steipete
steipete deleted the fix/release-dispatch-temp-ref branch August 8, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR scripts Repository scripts size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant