Skip to content

fix: anchor rollback assertion to cascade rollback preflight#12

Merged
joshua-temple merged 2 commits into
mainfrom
fix/rollback-dispatch-resolver-assertion
Jun 26, 2026
Merged

fix: anchor rollback assertion to cascade rollback preflight#12
joshua-temple merged 2 commits into
mainfrom
fix/rollback-dispatch-resolver-assertion

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

The suite asserted a no-target rollback reverts to the seed's recorded sha. That premise is unsound: the deploy-on-merge path does not advance the deploy-history ring (only promote/rollback finalize push a ring snapshot), so the no-target rollback resolves its target from whatever the ring already holds (a stale cross-run entry or a repin-injected deploy), not the suite's seed. It passed standalone by luck and failed in the live fleet after the repin push.

Fix: before firing the no-target repository_dispatch rollback, call cascade rollback preflight --env prod --json (the exact resolver the generated rollback workflow's preflight uses) to learn the target the rollback will pick, assert it is a real revert (no_op=false, != current), then assert the committed result matches that resolved target plus ref=rollback/prod. Deterministic and immune to ring pollution; still exercises the no-target client_payload path the suite uniquely proves.

Validated: reproduced the in-fleet failure, then this fix passed green against a polluted/diverged ring (suite run completed/success including the reconcile gate). actionlint and guardrails clean.

Joshua Temple added 2 commits June 26, 2026 18:58
The rollback scenario suite only cleared releases and tags at the start,
leaving the manifest deploy-history ring intact. In the live fleet the
repin push fires its own orchestrate that records a prod deploy in the
ring before the suite runs, so the no-target rollback resolved the prior
version off that injected entry and reverted prod to the wrong SHA. Wipe
the manifest state with cascade reset --state --push before seeding so
the seed is genuinely prod's first deploy and the ring's prior is
deterministic both standalone and in-fleet.

Signed-off-by: Joshua Temple <waitingtables@gmail.com>
The suite asserted prod reverted to the SHA it seeded. That only held by
luck: the deploy-on-merge path never pushes to the deploy-history ring,
so a no-target rollback reverts to whatever the ring (or manifest git
history) already holds, not the suite's seed. The no-target rollback
resolves its target with the same resolver the generated workflow's own
preflight uses. Anchor the assertion to that resolved target (sha,
version, source), keeping the suite deterministic standalone and in-fleet
while still exercising the no-target client_payload path.

Signed-off-by: Joshua Temple <waitingtables@gmail.com>
@joshua-temple joshua-temple merged commit 231ed3b into main Jun 26, 2026
3 checks passed
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