Repository navigation
fix: report artifact-only rollback checkpoint refusal - #1758
Merged
Merged
Conversation
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
enabled auto-merge
October 25, 2026 07:43
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
lcm migration rollback --setpublishes 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 withapplied: false.How
cutover-set-rollback.ts): the refused result gains an optionalartifactPublished: true. It is set only on the checkpoint-step refusal and only when this call'spublishArtifactreturnedoutcome: "written". A reused artifact, either already stored or reconciled by the store after the absence read, never sets it.effectBegunstays false, and a retry reuses the stored artifact byte-identically.cli-cutover-set.ts): the checkpoint refusal mapping passesartifactPublishedas the write signal. An artifact-only write now reportsapplied: true. An unreadable fingerprint still addswriteObservation: "unresolvable". An unchanged fingerprint without the flag staysapplied: false, which keeps Set rollback checkpoint member records are indistinguishable from an empty store #1667's behavior.docs/migration-cutover-set.md. Patch changeset; codecov ownership fragment.Testing
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.Reviewer guide
src/migration/cutover-set-rollback.ts, and the fifth argument ofrefused().mapRollbackinsrc/migration/cli-cutover-set.ts.Closes #1746