Skip to content

ci: promote soaked changes to beta and stable automatically - #87

Merged
nixuuu merged 2 commits into
devfrom
feat/auto-promotion
Nov 4, 2026
Merged

nixuuu merged 2 commits into
devfrom
feat/auto-promotion

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 4, 2026

Copy link
Copy Markdown
Member

Releases no longer need a human: a scheduled workflow promotes soaked changes.

Schedule: every 3 h (0 */3 * * *), first next → main, then dev → next, inside the release-branch-mutations concurrency group. Promotion stays fast-forward only: a continuous prefix of the source branch up to a cutoff commit C, never backwards, never forced; Release is dispatched on the target with expected_sha.

Cutoff

  1. Soak: dev → next takes the newest commit on dev for ≥ 24 h; next → main takes the newest published beta that has been complete for ≥ 72 h (an older beta stays a candidate while a newer one soaks).
  2. Follow-up fixes: a fix/perf/revert that landed after C and corrects something in (target, C] holds that change and everything after it, iterating to a fixpoint. Fixes already soaked are inside the prefix and ship with their feature.
    • Explicit links win: Fixes: #68, Refs: #68 / Refs: <sha>, follow-up to #68, the PR template line, standard reverts, GitHub closing keywords.
    • Otherwise line-level attribution (SZZ): git diff -w -U0 F^ F gives the pre-image lines the fix changes, git blame -w -M -C (honouring .git-blame-ignore-revs) gives the commits that introduced them; pure additions use unambiguous adjacent lines. Shared/generated paths are excluded; 7-day upper bound. Owners already released don't hold anything.
  3. Readiness: a successful Release run for exactly C (prefer a published nightly), no open release-blocker, docs-only / no-version ranges are a no-op.

Controls: repo variable AUTO_PROMOTION=off pauses it; label promotion-hold on a merged PR holds it and everything after; release-blocker blocks both paths; manual Promote uses the same selector with a default dry-run and explicit overrides (never skipping CI, beta, blockers, linked fixes or fast-forward). Job summaries show C0, C, version, included and held commits with reasons; a history issue records each promotion; a starvation issue opens when a change has been held for more than 7 days.

Manual smoke gates: live_smoke/update_smoke stay as dispatch inputs but no longer gate promotion. They are replaced by green Release CI (incl. updater tests and the 4-platform binary smoke) plus soak; stable also requires that verification on the beta. Not covered anymore by a human: live provider smoke and a full self-update/rollback on a real installation.

Convention: AGENTS.md, docs/contributing.md, docs/release.md and a new PR template ask for an explicit link in follow-up fixes; commitlint accepts the footers.

Dry-run on the real history (read-only): nothing to promote yet. #57 is attributed to #18 by changed lines; with today's state the first beta would be 0.2.0-beta.1 at #76 in the 2026-11-05 18:00 UTC cycle.

Checks: install, typecheck, lint, format:check, actionlint/shellcheck, check:tmp (973 pass, 153 skip, 0 fail); promotion tests run against local git fixtures and a mocked GitHub API.

@nixuuu
nixuuu merged commit be89282 into dev Nov 4, 2026
9 checks passed
@nixuuu
nixuuu deleted the feat/auto-promotion branch November 4, 2026 18:39
nixuuu added a commit that referenced this pull request Nov 4, 2026
The first dry-run of **Promote** on GitHub (run 41889328410) failed:
older versions of `.git-blame-ignore-revs` name the pre-squash
formatting commit `28347c5`, which exists only on the deleted
`chore/anti-slop` branch, so `git blame --ignore-rev` aborts with
"cannot find revision … to ignore" in a fresh CI checkout (locally the
object still existed, so the local dry-run passed).

Attribution now passes only listed revisions that exist as commits. New
test: a listed revision missing from the repository is skipped and blame
still attributes the fix.

The first attempt of that run also hit a transient GitHub API 502; the
selector already fails safe (no promotion) in that case.

Checks: promotion attribution tests (11 pass), lint, format, scripts
typecheck.

Refs: #87
nixuuu added a commit that referenced this pull request Nov 4, 2026
Automatic promotion (#87) holds a linked change and everything merged
after it until the linking fix has soaked for 24 h. The first scheduled
run showed how much one link can hold back (#103's `Fixes: #2` held the
whole range since v0.1.0), so the convention now says when to link and
when not to.

- AGENTS.md, docs/contributing.md and the PR template: link only the PR
whose behaviour the fix actually corrects; no links from
`test`/`ci`/`docs`/`refactor`/`chore` commits or for pre-existing
behaviour; use `Related: #N` (not parsed, holds nothing) for context.

No code change; the parser already ignores `Related:`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant