Skip to content

cli: Share the library correction driver - #181

Draft
BenWestgate wants to merge 1 commit into
codex/split146-profilesfrom
codex/split146-driver
Draft

BenWestgate wants to merge 1 commit into
codex/split146-profilesfrom
codex/split146-driver

Conversation

@BenWestgate

Copy link
Copy Markdown
Owner

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.

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.

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T04:41:50.441218Z 9e4feb6 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/codex32/_cli_input.py
Comment on lines +415 to +416
excluded = tuple(artifact.header.index for artifact in accepted)
context = CorrectionContext(hrp, target, _prefix_for_suffix(immutable, value), excluded)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@BenWestgate
BenWestgate added this pull request to stack #205 October 24, 2026 13:43

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant