Skip to content

fix: report artifact-only rollback checkpoint refusal - #1758

Merged
bcdonadio merged 1 commit into
mainfrom
fix/1746-s23
Oct 25, 2026
Merged

bcdonadio merged 1 commit into
mainfrom
fix/1746-s23

Conversation

@bcdonadio

Copy link
Copy Markdown
Contributor

Why

lcm migration rollback --set publishes the reverse activation artifact before it records the rollback checkpoint. When that checkpoint write failed, the CLI decided whether anything was written by comparing set write fingerprints. Those fingerprints don't cover the activation artifact store, so a refusal that had durably written only the artifact was reported with applied: false.

How

  • Service (cutover-set-rollback.ts): the refused result gains an optional artifactPublished: true. It is set only on the checkpoint-step refusal and only when this call's publishArtifact returned outcome: "written". A reused artifact, either already stored or reconciled by the store after the absence read, never sets it. effectBegun stays false, and a retry reuses the stored artifact byte-identically.
  • CLI (cli-cutover-set.ts): the checkpoint refusal mapping passes artifactPublished as the write signal. An artifact-only write now reports applied: true. An unreadable fingerprint still adds writeObservation: "unresolvable". An unchanged fingerprint without the flag stays applied: false, which keeps Set rollback checkpoint member records are indistinguishable from an empty store #1667's behavior.
  • Docs: the "Before the checkpoint" row of the rollback crash table in docs/migration-cutover-set.md. Patch changeset; codecov ownership fragment.

Testing

  • Service fault injection (cutover-set-rollback-faults.test.ts): written gives the flag, and the retry reuses the artifact without it; reused-after-absence gives no flag; a pre-existing orphan gives no flag. Every case asserts that no checkpoint or member record was written and that leases were released.
  • performSetRollback (cli-cutover-set-r1.test.ts): flag with a readable fingerprint gives applied with no marker; flag with an unreadable fingerprint gives applied with the marker. The existing Set rollback checkpoint member records are indistinguishable from an empty store #1667 cases are unchanged.
  • Focused runs at the final head: two independent reviewers ran 14 files/366 tests and 13 files/358 tests, with 100% statements, branches, functions and lines on both changed production files. Typecheck and eslint are clean.

Reviewer guide

  1. The checkpoint branch of the fresh rollback path in src/migration/cutover-set-rollback.ts, and the fifth argument of refused().
  2. The checkpoint branch of mapRollback in src/migration/cli-cutover-set.ts.

Closes #1746

A set rollback that published the reverse activation artifact and then
failed to record its checkpoint was refused with applied:false. The CLI
decides applied from a fingerprint of the journal, records and member
heads, which does not cover the artifact store, so the durable artifact
write was invisible.

The refused result now carries artifactPublished: true, set only on the
checkpoint refusal and only when this call's publishArtifact outcome is
"written". A reused artifact (an earlier call's orphan, or one that
appeared after the absence read) never sets it. mapRollback passes the
flag as the write signal, so a readable fingerprint reports applied
true, an unreadable one keeps the unresolvable marker, and an unchanged
fingerprint without the flag stays applied false (#1667).

No checkpoint, member or selection effect begins, so effectBegun stays
false and a retry reuses the stored artifact byte-identically.

Signed-off-by: Bernardo Donadio <bcdonadio@bcdonadio.com>
@bcdonadio bcdonadio self-assigned this Oct 25, 2026
@bcdonadio
bcdonadio enabled auto-merge October 25, 2026 07:43
@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-25T07:43:56.735990Z 942d535 PR opened
🔒 Security Review ✅ Completed 2026-10-25T07:45:50.891105Z 942d535 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 e4188e0 into main Oct 25, 2026
30 of 32 checks passed
@bcdonadio
bcdonadio deleted the fix/1746-s23 branch October 25, 2026 07:57
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.

Set rollback checkpoint refusal does not report a published reverse artifact

1 participant