Skip to content

fix(config): republishing an earlier version rebuilds again — the rollback ran nothing (#530) - #1382

Merged
athvin merged 1 commit into
mainfrom
feat/530-config-rollback
Nov 29, 2026
Merged

athvin merged 1 commit into
mainfrom
feat/530-config-rollback

Conversation

@athvin

@athvin athvin commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

Closes #530

Post-merge is part of this pull request. The ledger below records whether
the follow-up work actually happened. /land-pr closes it.

What

Fixes the rollback. Republishing an earlier config version, which is the documented way to roll back, ran no rebuild. The publish rebuild's idempotency key was publish:{version}:rebuild, so a republish matched that version's first publish and got its long-finished job back. The bad version's results stayed. The key now names the publish event: this version, the version it replaces, and when that one was published. Also adds the recovery table #530 asks for (each failure and its API call) to api-contract's launch-readiness reference.

Why

#530's definition of done: a customer can restore an earlier run's results, the docs list each failure's recovery call, and a pg test runs bad publish → rollback → earlier results. Decision: republish-and-rebuild is the supported rollback; there is no snapshot restore without recompute. The test found that this path did not work at all.

Proof

make check exit 0. New pg_config_rollback (real Postgres, real executor): publish v1 and deliver base_10, publish a bad v2 that visibly changes the duplicate groups, then republish v1. It must enqueue a fresh rebuild (asserted queued) and restore v1's groups exactly. It failed before the fix with v2's merged groups. It also asserts that incremental runs and a full rebuild agree at v1. pg_dataset_config still passes.

Risk & rollback

A retried publish request still dedupes (same prior version, same timestamp). A v1→v2→v1→v2 cycle now gets a distinct key each time. Rollback: git revert <merge-sha>.

Post-merge ledger

Closed by: agent · session Claude Code:24d16c2e-fec6-49d8-9797-060338df4848 on brians-MacBook-Pro · 2026-11-29T05:05:44Z

  • main is green with this change on it — the merge SHA, and the run
    that proves it. A later head SHA with this commit as an ancestor counts;
    a cancelled run with zero jobs does not: — d67b9d1, rust 46218981736 + frontend 46218981849 success
  • images built, or correctly never ran because nothing that goes into
    an image changed: — success, run 46218981740
  • deploy converged — proved by a line the running process emitted, not
    by the image digest and not by the workflow conclusion: — its own deploy 46219250226 failed: er-tenant-migrate's hook timed out behind a long p3live job I had left running on er-dev, not this diff; the deploy of 7c43aea (run 46225900472) succeeded and contains this commit
  • the push-only surface no pull request can pre-test (deploy, drift,
    kind's nightly leg) is green, or knowingly red for a reason that is not
    this change: — infra, devcontainer success on d67b9d1
  • the board card reached Done through the automation rather than by
    hand, and the issue closed: — API: restore a dataset's results to an earlier run, and document the recovery operations #530 CLOSED by fix(config): republishing an earlier version rebuilds again — the rollback ran nothing (#530) #1382 via automation
  • follow-ups are open for everything deferred here — numbers: — none
  • what was learned is written down where the next session will find it
    (a skill, a reference, memory) — or nothing new was learned: — republish is the rollback, and its rebuild key is now per publish event; launch-readiness.md has the recovery table

Specific to this change

Context — plan, discoveries, measurements, files

Plan

Discoveries

Measurements

Files

Probe trail: the rollback response's jobs_enqueued id predated v2's job, which exposed the reused key.

🤖 Generated with Claude Code

…lback ran nothing (#530)

The publish rebuild's idempotency key was publish:{version}:rebuild. A
rollback republishes an earlier version, so it matched that version's
first publish, got its long-finished job back, and enqueued nothing: the
response listed a job id, the bad version's results stayed, and the
docs page's rollback instruction silently did not work.

The key now names the publish event: this version, the version it
replaces, and when that one was published. Each publish is distinct, a
v1 → v2 → v1 → v2 cycle included, and a retried request (same prior)
still dedupes.

pg_config_rollback proves it through the API: v1 + three deliveries,
a bad v2 that visibly changes the duplicate groups, then republishing
v1 enqueues a fresh rebuild and restores v1's groups exactly. It failed
before the fix. Also asserts incremental runs and a full rebuild agree
at v1.

Decision (#530): republish-and-rebuild is the supported rollback; no
snapshot restore without recompute. api-contract's launch-readiness
lists each failure and its recovery call.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

This branch was previously deployed

1 inactive deployment
marketing-preview — 16b84ed6 Deployed Nov 29, 2026 by athvin via remove closed PR previews #135
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.

API: restore a dataset's results to an earlier run, and document the recovery operations

2 participants