install index: an empty CipherKey also means locked #112

Merged
claude-bot merged 1 commit from fix/empty-cipherkey into main 2026-10-29 10:28:14 +00:00
Collaborator

Closes #83.

What

The module index now treats a CipherKey line as locked whether or not it has a value. Before, an empty CipherKey= was taken as unlocked, so the catalog offered the module and installed it, but Module::from_conf refuses 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 on 3b7080d: "Build Done in 109.89 seconds".
  • Fails without the change: a_cipher_key_means_locked now covers an empty key, a real key and no key. With the base index.rs and the new test, it fails (panicked at sword/src/install/index/tests.rs:56). With the change, it passes.
  • The consumers were checked by the review: Catalog::installable/note (core/src/catalog.rs) and tools/ci/preset-check (it now flags a preset module with an empty key).
  • No phone install: the change only affects which index entries are offered, and none of the CrossWire lists the presets use has an empty-key module (#83).
  • CI on 3b7080d: changes, preset-check, rust, audit, app, e2e and click all passed.

Review

Reviewer: fresh-context code-review at high (review 304 on 3b7080d): 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

  • Index flag: high. It is one expression, made the same as Module::from_conf, and tested both ways.

🤖 Generated with Claude Code

Closes #83. ## What The module index now treats a `CipherKey` line as locked whether or not it has a value. Before, an empty `CipherKey=` was taken as unlocked, so the catalog offered the module and installed it, but `Module::from_conf` refuses 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 on 3b7080d: "Build Done in 109.89 seconds". - **Fails without the change:** `a_cipher_key_means_locked` now covers an empty key, a real key and no key. With the base `index.rs` and the new test, it fails (`panicked at sword/src/install/index/tests.rs:56`). With the change, it passes. - The consumers were checked by the review: `Catalog::installable`/`note` (core/src/catalog.rs) and tools/ci/preset-check (it now flags a preset module with an empty key). - No phone install: the change only affects which index entries are offered, and none of the CrossWire lists the presets use has an empty-key module (#83). - CI on 3b7080d: changes, preset-check, rust, audit, app, e2e and click all passed. ## Review **Reviewer:** fresh-context `code-review` at high (review 304 on 3b7080d): 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 - Index flag: high. It is one expression, made the same as `Module::from_conf`, and tested both ways. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
install index: any CipherKey line means locked, an empty one too (#83)
All checks were successful
CI / changes (pull_request) Successful in 11s
Presets / preset-check (pull_request) Successful in 2m17s
CI / rust (pull_request) Successful in 5m21s
CI / audit (pull_request) Successful in 11s
CI / app (pull_request) Successful in 3m0s
CI / e2e (pull_request) Successful in 7m43s
CI / click (pull_request) Successful in 1m53s
3b7080daf2
Module::from_conf refuses every enciphered module, so an entry with an
empty CipherKey was offered, installed and then never opened.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude-review left a comment

claude-review, level high, commit 3b7080daf2, range origin/main...HEAD.

No high, medium or low findings. IndexEntry::locked now matches Module::from_conf (sword/src/module.rs:97), which refuses any CipherKey line. The consumers (core/src/catalog.rs installable/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

claude-review, level high, commit 3b7080daf2f97ded2a8ca4c1aba2394fd3080da7, range origin/main...HEAD. No high, medium or low findings. `IndexEntry::locked` now matches `Module::from_conf` (sword/src/module.rs:97), which refuses any CipherKey line. The consumers (core/src/catalog.rs `installable`/`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
claude-bot changed title from WIP: install index: an empty CipherKey also means locked to install index: an empty CipherKey also means locked 2026-10-29 10:27:32 +00:00
claude-review left a comment

Gate approval on 3b7080d (trunk, standard tier).

  • Review 304 (high) found nothing; no high or medium findings are open. No commits after 3b7080d on origin/fix/empty-cipherkey.
  • CI is green on head (changes, preset-check, rust, audit, app, e2e, click). Audit: Review-Confidence 100.
  • Proof has no unrun elevated, maximum or AI-behavior gate. It shows the new test failing on base and passing with the change, and cargo make passing.
Gate approval on 3b7080d (trunk, standard tier). - Review 304 (high) found nothing; no high or medium findings are open. No commits after 3b7080d on origin/fix/empty-cipherkey. - CI is green on head (changes, preset-check, rust, audit, app, e2e, click). Audit: Review-Confidence 100. - Proof has no unrun elevated, maximum or AI-behavior gate. It shows the new test failing on base and passing with the change, and cargo make passing.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
schaefera/utStudyBIble!112
No description provided.