Skip to content

chore: regenerate cutover rehearsal gate after #1607 - #1762

Merged
bcdonadio merged 2 commits into
mainfrom
chore/1726-s23
Oct 25, 2026
Merged

bcdonadio merged 2 commits into
mainfrom
chore/1726-s23

Conversation

@bcdonadio

Copy link
Copy Markdown
Contributor

Why

docs/migration-rehearsal-gate.json / .md still recorded the cutover rehearsal for commit 41e046b and the hash of an older scenarios.json. After #1607 and #1707 moved single-generation and set rows to the two-role order, that pass was stale release evidence (#1726).

Regenerating it exposed #1761. Since #1744 (#1684), POST /promote-events answers lock contention with a 503 busy body, but the rehearsal's promote step still only retried the old 500 response. Rows F5, F5-delivery, F6b and F6b-delivery therefore failed.

How

Two commits:

  1. Fixture fix (Cutover rehearsal promote step treats the #1684 busy 503 as fatal #1761, test-only): RehearsalCase.promote retries exactly once when the client error has statusCode 503 and the route's PROMOTE_EVENTS_BUSY_BODY.error message, which is imported from the route rather than copied. Every other failure, and a second busy answer, stays fatal. The dead 500/error_log branch is removed, and the recorded step labels are unchanged.
  2. Gate: a full-profile, unfiltered rehearsal ran at commit 1 on a clean tree (PostgreSQL 18.4, rootless Podman, one worker). Its assembler output is committed as docs/migration-rehearsal-gate.json; the run-temp home roots are redacted to <run-tmp>/ after their absence was verified on the real paths, and the original path-list digest is recorded. docs/migration-rehearsal-gate.md is regenerated from that JSON.

Testing

  • Rehearsal: 41 rows, exit 0, 1146 s. Verdict pass-with-documented-limits (F9, H2 and L1 document their limits), no pending row, cleanup receipt clean. The tested commit is the fixture-fix commit.
  • rehearsal.manifestSha256 matches sha256sum test/postgresql/cutover-rehearsal/scenarios.json at the tested commit. check-evidence.ts validates the committed JSON at #/$defs/gate.
  • Fixture fix: the four previously failing rows passed in a filtered run, each recording one retry. Typecheck and eslint are clean.
  • No production file changed, so there is no changeset or coverage fragment.

Reviewer guide

  1. The promote method in test/postgresql/cutover-rehearsal/fixture.ts.
  2. docs/migration-rehearsal-gate.md (tested inputs, rows, limits, cleanup receipt). The JSON is generated.

Closes #1726
Closes #1761

The cutover rehearsal fixture retried a drain promote only on the old
500 "failed to promote events" answer, after reading an "already in
progress" row from the sidecar error log. Since #1684 the route answers
lock contention with 503 and PROMOTE_EVENTS_BUSY_BODY, and writes no
error_log row, so F5, F5-delivery, F6b and F6b-delivery threw on the
first busy answer and the full rehearsal failed.

RehearsalCase.promote now retries exactly once when the client error
carries statusCode 503 and the exact PROMOTE_EVENTS_BUSY_BODY.error
text. Any other failure stays fatal. The obsolete error_log branch and
the unused lastPromoteRefusal helper are removed; the recorded step
label retried-once-after-lock-contention is unchanged.

Test-only; no changeset or codecov fragment. A filtered rehearsal of
the four rows passed, each with one immediate retry, so no pause is
added.

Refs #1761, #1726

Signed-off-by: Bernardo Donadio <bcdonadio@bcdonadio.com>
The checked-in gate named tested commit 41e046b and a scenarios.json
manifest hash that no longer matches main, so it could not certify the
current tree. This regenerates it from a fresh full-profile rehearsal
at tested commit b756ae4: harness run 4cb02700, 41 rows, exit 0 in
1146 s, verdict pass-with-documented-limits, cleanup clean.

The JSON is the assembler output with the host-specific prefix of the
43 rehearsal.homeRoots entries replaced by <run-tmp>/ after absence was
verified on the real paths. The Markdown report is regenerated from
that JSON and records the SHA-256 of the original paths. Only the two
gate files change.

Refs #1726

Signed-off-by: Bernardo Donadio <bcdonadio@bcdonadio.com>
@bcdonadio bcdonadio self-assigned this Oct 25, 2026
@bcdonadio
bcdonadio enabled auto-merge October 25, 2026 09:43
@bcdonadio bcdonadio changed the title fix: match rehearsal promote retry to busy 503 chore: regenerate cutover rehearsal gate after #1607 Oct 25, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-25T09:44:10.854675Z fb6d0a4 PR opened
🔒 Security Review ✅ Completed 2026-10-25T09:45:55.310989Z fb6d0a4 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@bcdonadio
bcdonadio merged commit e8b9056 into main Oct 25, 2026
21 checks passed
@bcdonadio
bcdonadio deleted the chore/1726-s23 branch October 25, 2026 09:47
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.

Cutover rehearsal promote step treats the #1684 busy 503 as fatal Regenerate the cutover rehearsal gate after #1607

1 participant