Skip to content

fix(tm): keep stale retirement aligned with exact-history preview and atomic confirmation (#60) - #61

Merged
AllenXiao95 merged 6 commits into
masterfrom
fix/issue-60-stale-retirement-atomic
Oct 16, 2026
Merged

AllenXiao95 merged 6 commits into
masterfrom
fix/issue-60-stale-retirement-atomic

Conversation

@AllenXiao95

Copy link
Copy Markdown
Owner

Fixes #60

Changes

  • Align stale-formal retirement eligibility with preflight, including usable exact source-history fallback, inside the same BEGIN IMMEDIATE transaction.
  • Require exact identity-set equality (rather than only equal counts) and optionally compare complete TM before-image revision tokens prior to archiving/deleting.
  • Restrict Dashboard retirement to expressly confirmed coordinates and bind confirmation to captured TM-row tokens; reject old/incomplete confirmation snapshots with a fresh-preflight instruction.
  • Make CLI review-retire --stale --apply retire only its previewed coordinates with identical row guards.
  • Add storage, Dashboard and CLI regression coverage: mixed true-stale/history-hit, equal-count wrong identity, changed row between preflight and commit, empty/missing confirmation and rollback of partial history/archive writes.

Safety

  • Preserves the existing explicit-confirmation boundary and backup behavior.
  • Fail closed on changed candidate sets or before-image mismatch.
  • No schema migrations, no authority bypass and no production-data changes.

Verification

GitHub Actions framework-tests matrix (Windows/Linux, Pydantic 1/2) will validate on this PR. No local runtime clone was available; CI status should be reviewed before merge.

Scope note

This addresses the confirmed mismatch between the preview and retirement predicates; the original production 15/14 data was not provided, so the exact 15th row is not independently identified.

@AllenXiao95
AllenXiao95 merged commit 4489754 into master Oct 16, 2026
10 checks passed
@AllenXiao95
AllenXiao95 deleted the fix/issue-60-stale-retirement-atomic branch October 16, 2026 07:39
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.

[P1][TM] Fix stale-formal preview/retirement mismatch and guard confirmed rows atomically

1 participant