Skip to content

ci(nightly): accept a pre-resolved stack via source_ref - #91

Merged
incognitojam merged 1 commit into
mainfrom
ci/nightly-source-ref
Aug 11, 2026
Merged

ci(nightly): accept a pre-resolved stack via source_ref#91
incognitojam merged 1 commit into
mainfrom
ci/nightly-source-ref

Conversation

@incognitojam

Copy link
Copy Markdown
Collaborator

When the nightly rebase onto pingdotgg/t3code conflicts, the run fails in prepare and a maintainer resolves the stack locally — but the ruleset blocks force-pushing main from the CLI, so there was no way to get the resolved stack back onto main.

This adds an optional source_ref dispatch input. The run checks out that ref (a branch or SHA pushed to origin holding the resolved stack) instead of main, rebases it onto upstream (a no-op when nothing moved since, a loud conflict failure when it did), runs the full verification, publishes the release, and promotes it to main through the existing backup and lease mechanics. An invalid source_ref fails in a pre-checkout validation step with a readable message. Pairing source_ref with dry_run verifies a resolution without publishing or promoting anything.

The fork_ref split

Today the run always checks out main, so one commit serves every role. With source_ref there are three: M = origin/main's tip, R = the provided stack, C = the candidate after the rebase. fork_ref keeps its meaning as the stack source (R) and a new main_ref output carries M, resolved once in prepare so every later check compares against the same snapshot.

Role Commit Why
Checkout ref R The stack being rebased and verified.
FORK_SOURCE_REF in both changelog steps R Release notes must enumerate the stack that ships.
Backup snapshot source M The backup captures the commit being replaced; R already exists as the maintainer's branch.
Moved-main skip comparison M Compares live main against the run-start snapshot.
Lease (--force-with-lease=refs/heads/main:…) M Pins main's expected value.
Nothing-to-promote short-circuit C == M Was C == R, meaning "the rebase was a no-op". On a source_ref run C == R is the normal case and promotion still has work to do; the real question is whether main is already the candidate.

The prepare job's no-change alignment step gets the same treatment (all four of its uses are M). On scheduled runs fork_ref and main_ref are the same commit, so behaviour is unchanged.

Verified with actionlint (only the pre-existing blacksmith runner-label warning) and by extracting every run: body from both this workflow and the pre-change one and replaying them against stubbed git/gh: scheduled runs produce identical command sequences, and the source_ref paths cover promote, C == M no-op, moved main, dry_run, and invalid ref.

Model: Claude Opus 5, harness: T3 Code

When the rebase onto upstream conflicts the nightly fails in prepare, and
the ruleset stops a human from force-pushing the resolved stack to main
from the CLI. Add a source_ref dispatch input: the run checks out that
ref instead of main, rebases it onto upstream, verifies it, publishes the
release, and promotes it to main through the existing backup and lease
mechanics. Combined with dry_run it verifies a resolution without
publishing or promoting anything.

That splits what fork_ref used to cover on its own. fork_ref stays the
stack being published (the checkout, and the commits release notes
enumerate); the new main_ref output is main's tip when the run started,
read once in prepare and used for the backup snapshot, the moved-main
skip, the lease, and the nothing-to-promote short-circuit. That
short-circuit now compares the candidate against main rather than against
the stack source, since on a source_ref run the rebase is expected to be
a no-op while promotion still has work to do. On scheduled runs the two
outputs are the same commit and behavior is unchanged.

Model: Claude Opus 5, harness: T3 Code
@github-actions github-actions Bot added size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Aug 11, 2026
@incognitojam
incognitojam enabled auto-merge August 11, 2026 16:40
@incognitojam
incognitojam added this pull request to the merge queue Aug 11, 2026
Merged via the queue into main with commit 0c49105 Aug 11, 2026
9 of 10 checks passed
@incognitojam
incognitojam deleted the ci/nightly-source-ref branch August 11, 2026 16:49
incognitojam added a commit that referenced this pull request Aug 11, 2026
## Problem

The `source_ref` dispatch that fixed the conflicted patch stack promoted
a resolution cut before today's workflow PRs merged, rolling `main`'s
workflow state back: #87 (promote every verified run), #90 (require
workflow jobs directly), #91 (`source_ref` input), and #92
(yngatech-nightly app token) were dropped. The moved-main lease only
guards movement during a run, not whether the provided stack already
contained everything on `main`.

## Fix

Cherry-pick the four squash commits back onto the promoted stack, in
original merge order. The restored `.github/workflows/fork-nightly.yml`,
`.github/workflows/fork-ci.yml`, and `docs/operations/fork-nightly.md`
are byte-identical to their pre-rollback state (verified with `git diff`
against the old `main` tip).

A follow-up should make `source_ref` runs fail when the provided stack
is missing patches present on `main` (patch-id comparison in prepare).

---
Written by an agent (Claude Code, claude-fable-5).
yngatech-nightly Bot pushed a commit that referenced this pull request Aug 11, 2026
## Problem

The `source_ref` dispatch that fixed the conflicted patch stack promoted
a resolution cut before today's workflow PRs merged, rolling `main`'s
workflow state back: #87 (promote every verified run), #90 (require
workflow jobs directly), #91 (`source_ref` input), and #92
(yngatech-nightly app token) were dropped. The moved-main lease only
guards movement during a run, not whether the provided stack already
contained everything on `main`.

## Fix

Cherry-pick the four squash commits back onto the promoted stack, in
original merge order. The restored `.github/workflows/fork-nightly.yml`,
`.github/workflows/fork-ci.yml`, and `docs/operations/fork-nightly.md`
are byte-identical to their pre-rollback state (verified with `git diff`
against the old `main` tip).

A follow-up should make `source_ref` runs fail when the provided stack
is missing patches present on `main` (patch-id comparison in prepare).

---
Written by an agent (Claude Code, claude-fable-5).
yngatech-nightly Bot pushed a commit that referenced this pull request Aug 12, 2026
## Problem

The `source_ref` dispatch that fixed the conflicted patch stack promoted
a resolution cut before today's workflow PRs merged, rolling `main`'s
workflow state back: #87 (promote every verified run), #90 (require
workflow jobs directly), #91 (`source_ref` input), and #92
(yngatech-nightly app token) were dropped. The moved-main lease only
guards movement during a run, not whether the provided stack already
contained everything on `main`.

## Fix

Cherry-pick the four squash commits back onto the promoted stack, in
original merge order. The restored `.github/workflows/fork-nightly.yml`,
`.github/workflows/fork-ci.yml`, and `docs/operations/fork-nightly.md`
are byte-identical to their pre-rollback state (verified with `git diff`
against the old `main` tip).

A follow-up should make `source_ref` runs fail when the provided stack
is missing patches present on `main` (patch-id comparison in prepare).

---
Written by an agent (Claude Code, claude-fable-5).
yngatech-nightly Bot pushed a commit that referenced this pull request Aug 12, 2026
## Problem

The `source_ref` dispatch that fixed the conflicted patch stack promoted
a resolution cut before today's workflow PRs merged, rolling `main`'s
workflow state back: #87 (promote every verified run), #90 (require
workflow jobs directly), #91 (`source_ref` input), and #92
(yngatech-nightly app token) were dropped. The moved-main lease only
guards movement during a run, not whether the provided stack already
contained everything on `main`.

## Fix

Cherry-pick the four squash commits back onto the promoted stack, in
original merge order. The restored `.github/workflows/fork-nightly.yml`,
`.github/workflows/fork-ci.yml`, and `docs/operations/fork-nightly.md`
are byte-identical to their pre-rollback state (verified with `git diff`
against the old `main` tip).

A follow-up should make `source_ref` runs fail when the provided stack
is missing patches present on `main` (patch-id comparison in prepare).

---
Written by an agent (Claude Code, claude-fable-5).
yngatech-nightly Bot pushed a commit that referenced this pull request Aug 12, 2026
## Problem

The `source_ref` dispatch that fixed the conflicted patch stack promoted
a resolution cut before today's workflow PRs merged, rolling `main`'s
workflow state back: #87 (promote every verified run), #90 (require
workflow jobs directly), #91 (`source_ref` input), and #92
(yngatech-nightly app token) were dropped. The moved-main lease only
guards movement during a run, not whether the provided stack already
contained everything on `main`.

## Fix

Cherry-pick the four squash commits back onto the promoted stack, in
original merge order. The restored `.github/workflows/fork-nightly.yml`,
`.github/workflows/fork-ci.yml`, and `docs/operations/fork-nightly.md`
are byte-identical to their pre-rollback state (verified with `git diff`
against the old `main` tip).

A follow-up should make `source_ref` runs fail when the provided stack
is missing patches present on `main` (patch-id comparison in prepare).

---
Written by an agent (Claude Code, claude-fable-5).
yngatech-nightly Bot pushed a commit that referenced this pull request Aug 13, 2026
## Problem

The `source_ref` dispatch that fixed the conflicted patch stack promoted
a resolution cut before today's workflow PRs merged, rolling `main`'s
workflow state back: #87 (promote every verified run), #90 (require
workflow jobs directly), #91 (`source_ref` input), and #92
(yngatech-nightly app token) were dropped. The moved-main lease only
guards movement during a run, not whether the provided stack already
contained everything on `main`.

## Fix

Cherry-pick the four squash commits back onto the promoted stack, in
original merge order. The restored `.github/workflows/fork-nightly.yml`,
`.github/workflows/fork-ci.yml`, and `docs/operations/fork-nightly.md`
are byte-identical to their pre-rollback state (verified with `git diff`
against the old `main` tip).

A follow-up should make `source_ref` runs fail when the provided stack
is missing patches present on `main` (patch-id comparison in prepare).

---
Written by an agent (Claude Code, claude-fable-5).
yngatech-nightly Bot pushed a commit that referenced this pull request Aug 13, 2026
## Problem

The `source_ref` dispatch that fixed the conflicted patch stack promoted
a resolution cut before today's workflow PRs merged, rolling `main`'s
workflow state back: #87 (promote every verified run), #90 (require
workflow jobs directly), #91 (`source_ref` input), and #92
(yngatech-nightly app token) were dropped. The moved-main lease only
guards movement during a run, not whether the provided stack already
contained everything on `main`.

## Fix

Cherry-pick the four squash commits back onto the promoted stack, in
original merge order. The restored `.github/workflows/fork-nightly.yml`,
`.github/workflows/fork-ci.yml`, and `docs/operations/fork-nightly.md`
are byte-identical to their pre-rollback state (verified with `git diff`
against the old `main` tip).

A follow-up should make `source_ref` runs fail when the provided stack
is missing patches present on `main` (patch-id comparison in prepare).

---
Written by an agent (Claude Code, claude-fable-5).
yngatech-nightly Bot pushed a commit that referenced this pull request Aug 13, 2026
## Problem

The `source_ref` dispatch that fixed the conflicted patch stack promoted
a resolution cut before today's workflow PRs merged, rolling `main`'s
workflow state back: #87 (promote every verified run), #90 (require
workflow jobs directly), #91 (`source_ref` input), and #92
(yngatech-nightly app token) were dropped. The moved-main lease only
guards movement during a run, not whether the provided stack already
contained everything on `main`.

## Fix

Cherry-pick the four squash commits back onto the promoted stack, in
original merge order. The restored `.github/workflows/fork-nightly.yml`,
`.github/workflows/fork-ci.yml`, and `docs/operations/fork-nightly.md`
are byte-identical to their pre-rollback state (verified with `git diff`
against the old `main` tip).

A follow-up should make `source_ref` runs fail when the provided stack
is missing patches present on `main` (patch-id comparison in prepare).

---
Written by an agent (Claude Code, claude-fable-5).
yngatech-nightly Bot pushed a commit that referenced this pull request Aug 13, 2026
## Problem

The `source_ref` dispatch that fixed the conflicted patch stack promoted
a resolution cut before today's workflow PRs merged, rolling `main`'s
workflow state back: #87 (promote every verified run), #90 (require
workflow jobs directly), #91 (`source_ref` input), and #92
(yngatech-nightly app token) were dropped. The moved-main lease only
guards movement during a run, not whether the provided stack already
contained everything on `main`.

## Fix

Cherry-pick the four squash commits back onto the promoted stack, in
original merge order. The restored `.github/workflows/fork-nightly.yml`,
`.github/workflows/fork-ci.yml`, and `docs/operations/fork-nightly.md`
are byte-identical to their pre-rollback state (verified with `git diff`
against the old `main` tip).

A follow-up should make `source_ref` runs fail when the provided stack
is missing patches present on `main` (patch-id comparison in prepare).

---
Written by an agent (Claude Code, claude-fable-5).
yngatech-nightly Bot pushed a commit that referenced this pull request Aug 14, 2026
## Problem

The `source_ref` dispatch that fixed the conflicted patch stack promoted
a resolution cut before today's workflow PRs merged, rolling `main`'s
workflow state back: #87 (promote every verified run), #90 (require
workflow jobs directly), #91 (`source_ref` input), and #92
(yngatech-nightly app token) were dropped. The moved-main lease only
guards movement during a run, not whether the provided stack already
contained everything on `main`.

## Fix

Cherry-pick the four squash commits back onto the promoted stack, in
original merge order. The restored `.github/workflows/fork-nightly.yml`,
`.github/workflows/fork-ci.yml`, and `docs/operations/fork-nightly.md`
are byte-identical to their pre-rollback state (verified with `git diff`
against the old `main` tip).

A follow-up should make `source_ref` runs fail when the provided stack
is missing patches present on `main` (patch-id comparison in prepare).

---
Written by an agent (Claude Code, claude-fable-5).
yngatech-nightly Bot pushed a commit that referenced this pull request Aug 14, 2026
## Problem

The `source_ref` dispatch that fixed the conflicted patch stack promoted
a resolution cut before today's workflow PRs merged, rolling `main`'s
workflow state back: #87 (promote every verified run), #90 (require
workflow jobs directly), #91 (`source_ref` input), and #92
(yngatech-nightly app token) were dropped. The moved-main lease only
guards movement during a run, not whether the provided stack already
contained everything on `main`.

## Fix

Cherry-pick the four squash commits back onto the promoted stack, in
original merge order. The restored `.github/workflows/fork-nightly.yml`,
`.github/workflows/fork-ci.yml`, and `docs/operations/fork-nightly.md`
are byte-identical to their pre-rollback state (verified with `git diff`
against the old `main` tip).

A follow-up should make `source_ref` runs fail when the provided stack
is missing patches present on `main` (patch-id comparison in prepare).

---
Written by an agent (Claude Code, claude-fable-5).
incognitojam added a commit that referenced this pull request Aug 15, 2026
## Problem

The `source_ref` dispatch that fixed the conflicted patch stack promoted
a resolution cut before today's workflow PRs merged, rolling `main`'s
workflow state back: #87 (promote every verified run), #90 (require
workflow jobs directly), #91 (`source_ref` input), and #92
(yngatech-nightly app token) were dropped. The moved-main lease only
guards movement during a run, not whether the provided stack already
contained everything on `main`.

## Fix

Cherry-pick the four squash commits back onto the promoted stack, in
original merge order. The restored `.github/workflows/fork-nightly.yml`,
`.github/workflows/fork-ci.yml`, and `docs/operations/fork-nightly.md`
are byte-identical to their pre-rollback state (verified with `git diff`
against the old `main` tip).

A follow-up should make `source_ref` runs fail when the provided stack
is missing patches present on `main` (patch-id comparison in prepare).

---
Written by an agent (Claude Code, claude-fable-5).
yngatech-nightly Bot pushed a commit that referenced this pull request Aug 18, 2026
## Problem

The `source_ref` dispatch that fixed the conflicted patch stack promoted
a resolution cut before today's workflow PRs merged, rolling `main`'s
workflow state back: #87 (promote every verified run), #90 (require
workflow jobs directly), #91 (`source_ref` input), and #92
(yngatech-nightly app token) were dropped. The moved-main lease only
guards movement during a run, not whether the provided stack already
contained everything on `main`.

## Fix

Cherry-pick the four squash commits back onto the promoted stack, in
original merge order. The restored `.github/workflows/fork-nightly.yml`,
`.github/workflows/fork-ci.yml`, and `docs/operations/fork-nightly.md`
are byte-identical to their pre-rollback state (verified with `git diff`
against the old `main` tip).

A follow-up should make `source_ref` runs fail when the provided stack
is missing patches present on `main` (patch-id comparison in prepare).

---
Written by an agent (Claude Code, claude-fable-5).
yngatech-nightly Bot pushed a commit that referenced this pull request Aug 18, 2026
## Problem

The `source_ref` dispatch that fixed the conflicted patch stack promoted
a resolution cut before today's workflow PRs merged, rolling `main`'s
workflow state back: #87 (promote every verified run), #90 (require
workflow jobs directly), #91 (`source_ref` input), and #92
(yngatech-nightly app token) were dropped. The moved-main lease only
guards movement during a run, not whether the provided stack already
contained everything on `main`.

## Fix

Cherry-pick the four squash commits back onto the promoted stack, in
original merge order. The restored `.github/workflows/fork-nightly.yml`,
`.github/workflows/fork-ci.yml`, and `docs/operations/fork-nightly.md`
are byte-identical to their pre-rollback state (verified with `git diff`
against the old `main` tip).

A follow-up should make `source_ref` runs fail when the provided stack
is missing patches present on `main` (patch-id comparison in prepare).

---
Written by an agent (Claude Code, claude-fable-5).
yngatech-nightly Bot pushed a commit that referenced this pull request Aug 18, 2026
## Problem

The `source_ref` dispatch that fixed the conflicted patch stack promoted
a resolution cut before today's workflow PRs merged, rolling `main`'s
workflow state back: #87 (promote every verified run), #90 (require
workflow jobs directly), #91 (`source_ref` input), and #92
(yngatech-nightly app token) were dropped. The moved-main lease only
guards movement during a run, not whether the provided stack already
contained everything on `main`.

## Fix

Cherry-pick the four squash commits back onto the promoted stack, in
original merge order. The restored `.github/workflows/fork-nightly.yml`,
`.github/workflows/fork-ci.yml`, and `docs/operations/fork-nightly.md`
are byte-identical to their pre-rollback state (verified with `git diff`
against the old `main` tip).

A follow-up should make `source_ref` runs fail when the provided stack
is missing patches present on `main` (patch-id comparison in prepare).

---
Written by an agent (Claude Code, claude-fable-5).
incognitojam added a commit that referenced this pull request Aug 19, 2026
## Problem

The `source_ref` dispatch that fixed the conflicted patch stack promoted
a resolution cut before today's workflow PRs merged, rolling `main`'s
workflow state back: #87 (promote every verified run), #90 (require
workflow jobs directly), #91 (`source_ref` input), and #92
(yngatech-nightly app token) were dropped. The moved-main lease only
guards movement during a run, not whether the provided stack already
contained everything on `main`.

## Fix

Cherry-pick the four squash commits back onto the promoted stack, in
original merge order. The restored `.github/workflows/fork-nightly.yml`,
`.github/workflows/fork-ci.yml`, and `docs/operations/fork-nightly.md`
are byte-identical to their pre-rollback state (verified with `git diff`
against the old `main` tip).

A follow-up should make `source_ref` runs fail when the provided stack
is missing patches present on `main` (patch-id comparison in prepare).

---
Written by an agent (Claude Code, claude-fable-5).
incognitojam added a commit that referenced this pull request Aug 19, 2026
## Problem

The `source_ref` dispatch that fixed the conflicted patch stack promoted
a resolution cut before today's workflow PRs merged, rolling `main`'s
workflow state back: #87 (promote every verified run), #90 (require
workflow jobs directly), #91 (`source_ref` input), and #92
(yngatech-nightly app token) were dropped. The moved-main lease only
guards movement during a run, not whether the provided stack already
contained everything on `main`.

## Fix

Cherry-pick the four squash commits back onto the promoted stack, in
original merge order. The restored `.github/workflows/fork-nightly.yml`,
`.github/workflows/fork-ci.yml`, and `docs/operations/fork-nightly.md`
are byte-identical to their pre-rollback state (verified with `git diff`
against the old `main` tip).

A follow-up should make `source_ref` runs fail when the provided stack
is missing patches present on `main` (patch-id comparison in prepare).

---
Written by an agent (Claude Code, claude-fable-5).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant