Skip to content

fix(context-cli): let close ignore a stale revision delivery during a rollback - #109

Merged
qiansc merged 1 commit into
mainfrom
fix/task-rollback-legacy-delivery
Nov 13, 2026
Merged

qiansc merged 1 commit into
mainfrom
fix/task-rollback-legacy-delivery

Conversation

@qiansc

@qiansc qiansc commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #108. #108 deletes a partial revision delivery selection when a rollback is applied, but a rollback applied with an older version keeps its stale revision-delivery.json. After upgrading:

  1. context close still validates that selection against the replaced revision and fails with "Partial revision delivery is no longer active".
  2. Retrying the rollback returns already-applied, so the new deletion never runs.
  3. Finishing the rollback requires close, so the workspace cannot complete the rollback.

While a rollback is active, context close and the close status now ignore a revision delivery selection; the existing rollback cleanup removes it. The rollback record is read only when a selection exists, so the common close path does no extra work. No migration or configuration is added.

Tests

  • The partial-delivery rollback test now also runs with the selection restored after apply (the state an older version leaves). Without this change that case fails at close; with it, close, build and finish succeed and the selection is removed.
  • 91 related test files: 471 pass, 0 fail (including approvedRevisionSubmissionScale, unchanged at ~12 s); typecheck and lint clean.

🤖 Generated with Claude Code

… rollback

A rollback applied with an older version left its partial revision delivery
selection behind; close validated it against the replaced revision and the
rollback could not finish. Close and close status now ignore the selection while
a rollback is active, and the rollback cleanup removes it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@qiansc
qiansc merged commit e64a6c5 into main Nov 13, 2026
2 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