Repository navigation
cli: Share the library correction driver - #181
BenWestgate wants to merge 1 commit into
Conversation
The CLI ran its own two-pass mixed-case search with its own deadline, capture ledger, and length plan. It now calls the library's _correct_complete, which gains the CLI's set-validity filter and the competitor scheduler, and keeps only the Hamming, CRC, and fingerprint tie breakers. Incomplete searches now mark every returned candidate. Claude-Session: https://claude.ai/code/session_01XGMpowzJwwgyHMEd63ijDe The public API retains fail-closed required work; only the CLI opts into the competitor scheduler. The expired-work regression is folded into this commit.
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9e4feb6705
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| excluded = tuple(artifact.header.index for artifact in accepted) | ||
| context = CorrectionContext(hrp, target, _prefix_for_suffix(immutable, value), excluded) |
There was a problem hiding this comment.
Exclude only ordinary share indices from the correction context
When a share derivation basis already contains a secret (index s), this tuple includes s, but _correct_complete now calls _validate_context, which rejects non-ordinary excluded indices. The exception is swallowed, so every subsequent damaged share receives no correction suggestion. For example, accepting VECTOR_3["secret_s"] and then entering VECTOR_3["share_a"] with its last character replaced by ? returns no candidates, whereas the previous search repairs it. Filter secrets out of excluded_indices and leave whole-basis compatibility checks to the existing allowed predicate.
Useful? React with 👍 / 👎.
Have the CLI use the library correction driver. Preserve the public API's fail-closed behavior and keep competitor scheduling specific to the CLI.
Extracted from #146; based on #180. The expired-required-work regression passes; its security fix is folded into this commit.