feat: onboard existing plaintext notes - #197
Conversation
johnson-ricon
left a comment
There was a problem hiding this comment.
Adversarial review of exact head 90bbbdf722a0ca469601974e6e2c1ddb7f46f705 against exact base 7afe6e154d0e303e26ab40fd491ee27c1253e909.
Change requests
-
lib/setup.sh:14-47,64-82inventories tracked plaintext from the full index, but readiness checks only the count and whole-worktree cleanliness. In a non-cone sparse checkout with two tracked plaintext notes and only one materialized, setup reported both,notes stage --allstaged one, and the normal commit hooks allowed the other to remain asnotes/beta.mdplaintext behind the new encryption attribute.notes verify-blobs --strictthen failed on the resulting HEAD. Focused fix-it: #198. -
lib/stage.sh:13,32-43mutates the index before ciphertext verification and does not restore the replaced entry when verification refuses it. With a plaintext-producing clean filter,notes stage legacy.mdreturned failure but left the changed plaintext blob staged; the next ordinary commit auto-obfuscated it and successfully committed raw plaintext under an opaque ID. Focused fix-it: #199.
The unlock-before-setup-mutation ordering, exact Git Crypt header check, path-scoped renormalization, forward-only history preservation, locked managed-repo handling, existing-infrastructure path, and setup/stage library split otherwise look sound.
Validation: the original focused encrypt and stage suites passed (30/30 and 29/29); both disposable failure reproductions were confirmed; each focused fix passed its relevant regression and complete repository suite. Exact-head hosted macOS and Ubuntu checks were green at submission.
…ding-guard fix: refuse incomplete sparse onboarding
…ation-rollback fix: restore rejected staged note entries
Summary
Validation
mise run test encrypt(30/30)mise run test stage(29/29)mise run test(466 BATS tests and 9 Python tests)mise run doctorgit diff --check