install index: an empty CipherKey also means locked #112
No reviewers
Labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
schaefera/utStudyBIble!112
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/empty-cipherkey"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #83.
What
The module index now treats a
CipherKeyline as locked whether or not it has a value. Before, an emptyCipherKey=was taken as unlocked, so the catalog offered the module and installed it, butModule::from_confrefuses every enciphered module, so it never opened. Such entries now show "Needs an unlock key, which the app cannot take yet." and have no Install.Blast radius
Tier: trunk
Trunk paths touched:
sword/src/install/index.rs(and its tests)Testing tier: standard (fix)
Gate / rollback: no flag. It only narrows what is offered: nothing installed is touched, and an empty-key module was never usable. Undo: revert this merge.
Proof
cargo make(fmt, clippy, tests with coverage, release check, cargo-deny, cargo-audit) passed locally on3b7080d: "Build Done in 109.89 seconds".a_cipher_key_means_lockednow covers an empty key, a real key and no key. With the baseindex.rsand the new test, it fails (panicked at sword/src/install/index/tests.rs:56). With the change, it passes.Catalog::installable/note(core/src/catalog.rs) and tools/ci/preset-check (it now flags a preset module with an empty key).3b7080d: changes, preset-check, rust, audit, app, e2e and click all passed.Review
Reviewer: fresh-context
code-reviewat high (review 304 on3b7080d): no findings.Review-Confidence: 100/100 (audit: high review on the final commit, consumers traced, test fails without the change; no missed defect).
Confidence by part
Module::from_conf, and tested both ways.🤖 Generated with Claude Code
claude-review, level high, commit
3b7080daf2, range origin/main...HEAD.No high, medium or low findings.
IndexEntry::lockednow matchesModule::from_conf(sword/src/module.rs:97), which refuses any CipherKey line. The consumers (core/src/catalog.rsinstallable/note, tools/ci/preset-check) behave as intended with the wider flag. The test covers the empty, non-empty and absent cases.Outside the diff (not a defect): spikes/s2-sword/README.md:112 says "An empty key means a locked module", which is still accurate.
Files reviewed: sword/src/install/index.rs, sword/src/install/index/tests.rs, sword/src/module.rs, sword/src/conf.rs, sword/tests/synthetic.rs, core/src/catalog.rs, core/src/catalog/tests.rs, tools/ci/preset-check/src/lib.rs, tools/ci/preset-check/src/tests.rs, spikes/s2-sword/README.md, CLAUDE.md
WIP: install index: an empty CipherKey also means lockedto install index: an empty CipherKey also means lockedGate approval on
3b7080d(trunk, standard tier).3b7080don origin/fix/empty-cipherkey.