You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0558c2a
Browse filesBrowse the repository at this point in the historyBrowse files
fix(checkpoints): reject unverified journal tails and double-encoded card paths
- loadChanges discarded a parse failure on the final line as a torn
tail without evidence, so a corrupted final record made rollback
report an incomplete history as valid (restore-latest no-oped over
the lost write). Torn-tail repair is verified truncation owned by the
append path; a read now rejects, and rollbackFile, rollbackStep, and
restoreLatestFile surface an explicit failure without restoring.
- Change-card openFile paths were decoded once at the containment
boundary while openFile decodes again afterwards: a double-encoded
request (./%252e%252e/%252e%252e/.env) passed containment as a
literal and escaped only after that later decode. Card paths now
decode to a fixed point at the boundary (same rule as markdown);
literal names with a bare percent keep the historical fallback and
non-stabilizing encodings reject.
Regression tests: torn final line and entirely torn journal reject at
load; corrupt final records fail restore-latest, rollbackFile, and
rollbackStep without a restore call; a double-encoded change-card
traversal is rejected before openFile runs. Negative controls:
restoring the silent discard turns exactly the new-behavior tests red;
reverting the card path to a single decode turns exactly the
double-encode test red.
0 commit comments