Skip to content

fix(smoke-test): gate final release on human PR approval - #1392

Merged
c-vigo merged 2 commits into
release/1.7.0from
bugfix/1391-smoke-human-approval
Aug 7, 2026
Merged

c-vigo merged 2 commits into
release/1.7.0from
bugfix/1391-smoke-human-approval

Conversation

@c-vigo

@c-vigo c-vigo commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes the smoke-test dispatch orchestration break found at 1.7.0-rc3 (#1391): the listener approved its own release PR with github.token, which vig-os/org-config#122 (2026-08-07) now forbids org-wide (can_approve_pull_request_reviews: false, not overridable per-repo).

Design per maintainer decision:

  • Cleanup-recreate semantics unchanged: every dispatch (each RC and the final) still closes the same-version release PR, deletes the release branch, and re-runs prepare-release from scratch.
  • Candidate dispatches leave the fresh release PR unapproved — approval gates the final release only (deferred-approval model, feat(ci): gate RC dispatch on CI only — move approval + ready-for-review to the final release #902), so the candidate chain runs green end-to-end with no human step.
  • Final dispatch pauses at a new Gate final release on human approval of release PR step: polls reviewDecision up to 30 min (20 s interval, inside the job's 35-min timeout) for a human to approve the freshly created PR, then proceeds to the final release workflow; on timeout it fails with re-run guidance (approve, then re-run failed jobs).
  • The gate reads the PR with the Release App token (same as the job's other steps), not the workflow token.

The secondary #1391 bug (failure-notify App-token mint 404) is not addressed here — it stays open in #1391.

Testing

TDD: new bats pin smoke-test dispatch gates the final release on human PR approval instead of self-approving committed RED first (asserts the gate step exists, gh pr review is gone, reviewDecision is polled), GREEN after the change. All 18 smoke-test dispatch bats pins pass; actionlint clean on the edited asset; full just precommit green.

Live proof plan: mirror to smoke-test dev, then dispatch rc4 — the candidate chain (deploy → cleanup-recreate → prepare → no-approval → candidate release → checks) must go green autonomously; the final-kind poll path is exercised at the real final dispatch.

Refs: #1391

c-vigo added 2 commits August 7, 2026 22:10
The dispatch listener approved its own release PR with the workflow
token, which vig-os/org-config#122 now forbids org-wide — the
1.7.0-rc3 smoke chain died at that step. Replace the approve step
with a kind-aware gate: candidate dispatches leave the PR unapproved
(deferred-approval model, #902), while the final dispatch polls up to
30 minutes for a human approval of the freshly created release PR and
fails with re-run guidance on timeout. Cleanup-recreate semantics are
unchanged: every dispatch still starts the release branch and PR from
scratch.

Refs: #1391
c-vigo added a commit to vig-os/devkit-smoke-test that referenced this pull request Aug 7, 2026
Mirror of the devkit asset fix from vig-os/devkit#1392
(vig-os/devkit#1391), landed ahead of the rc4 dispatch: the listener
executes from dev at trigger time, so the deploy PR alone cannot fix the
in-flight run.

- Auto-approve step (blocked org-wide by vig-os/org-config#122) replaced
with a kind-aware gate: candidates leave the release PR unapproved; the
final dispatch polls up to 30 min for a human approval and fails with
re-run guidance.
- Content is byte-identical to the rendered devkit asset on
`release/1.7.0`, so the next deploy PR carries no listener diff.

Closes #341
@c-vigo
c-vigo merged commit 062b243 into release/1.7.0 Aug 7, 2026
13 checks passed
@c-vigo
c-vigo deleted the bugfix/1391-smoke-human-approval branch August 7, 2026 20:23
c-vigo added a commit to vig-os/devkit-smoke-test that referenced this pull request Aug 7, 2026
Hotfix to **main**: `repository_dispatch` executes the listener from the
default branch, so the dev-side fix (#342) never ran — the rc4 chain
(run 31217441944) still died at the retired auto-approve step, blocked
org-wide by vig-os/org-config#122.

Byte-identical to the rendered devkit asset on `release/1.7.0`
(vig-os/devkit#1392) and to dev after #342 (modulo the
`vig-os/commit-action` v0.3.2 pin, which main had not yet received):
candidate dispatches leave the fresh release PR unapproved; the final
dispatch polls up to 30 min for a human approval. The upcoming smoke
release merge to main carries the same content, so no divergence.

Refs: #341
c-vigo added a commit that referenced this pull request Aug 11, 2026
## Description

Documents the smoke-test final-release human-approval gate shipped in
1.7.0 (#1391 / PR #1392). The mechanism is live-proven, but its
operational contract lived only in issue threads and workflow comments —
an operator following the current docs at the next final leg would hit a
silent 30-minute stall, because devkit's `release.yml` does not block on
downstream state and nothing signals that the smoke listener is waiting
for an approval.

Closes #1409

## Type of Change

- [x] `docs` -- Documentation only

## Changes Made

- **`docs/CROSS_REPO_RELEASE_GATE.md`**
- Receiver Responsibilities: new step for the approval gate — candidates
leave the smoke release PR unapproved (deferred-approval model, #902);
the final dispatch polls `reviewDecision` (20 s interval, 30 min) for a
human approval; cleanup-recreate semantics explain why the approval must
happen while the gate is waiting
- New **Contract dependencies** section: (1) smoke-test `main` must
require ≥1 approving review or `reviewDecision` never computes
(org-config-owned, org-config#127; workflow approvals blocked org-wide
by org-config#122); (2) the listener executes from the smoke repo's
default branch — asset is SSoT, urgent fixes are hotfixed to smoke main
and mirrored (precedents devkit-smoke-test#345/#353)
- Failure Signals: gate timeout added, distinguishing "nobody approved"
(approve + re-run failed jobs) from "required reviews dropped"
(org-config drift)
- **`docs/RELEASE_CYCLE.md`**
- Phase 4: notes the one human exception in the otherwise automated gate
- Phase 5 runbook: explicit operator step 2 — locate the waiting
listener run, approve the freshly created smoke release PR (`gh`
commands included), timeout recovery; subsequent steps renumbered
- `CHANGELOG.md` (+ synced `assets/workspace/.devcontainer/CHANGELOG.md`
copy, propagated by the `sync-manifest` hook)

## Changelog Entry

### Changed

- **Document the smoke-test final-release human-approval gate**
([#1409](#1409))
- `docs/CROSS_REPO_RELEASE_GATE.md` now describes the approval gate
shipped in 1.7.0 and its two contract dependencies: required reviews on
smoke-test `main` (org-config-owned) and default-branch listener
execution (asset SSoT, hotfix-main + mirror procedure)
- `docs/RELEASE_CYCLE.md` Phase 5 gains the explicit operator step:
approve the freshly created smoke-test release PR while the final
dispatch is paused at the gate, with timeout recovery

## Testing

- [x] Manual testing performed (describe below)

### Manual Testing Details

Docs-only change — TDD not applicable. Full `just precommit` suite green
locally (the `sync-manifest` hook propagated the changelog to the
workspace asset; committed). Content verified against the shipped gate
implementation
(`assets/smoke-test/.github/workflows/repository-dispatch.yml`, `Gate
final release on human approval of release PR`), the org-config live
config (`vig-os.jsonnet` devkit-smoke-test `Main protection`), and the
1.7.0 train record (#1391, org-config#122/#127, smoke run 31221248513).

## Checklist

- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [x] I have updated the documentation accordingly (edit
`docs/templates/`, then run `just docs`)
- [x] I have updated `CHANGELOG.md` in the `[Unreleased]` section (and
pasted the entry above)
- [x] My changes generate no new warnings or errors
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