Skip to content

correct: Say why the entry was invalid when suggesting a repair - #101

Draft
BenWestgate wants to merge 3 commits into
codex/remove-unreachable-v1-branchesfrom
claude/new-issue-fixes-fvhbl3-85
Draft

BenWestgate wants to merge 3 commits into
codex/remove-unreachable-v1-branchesfrom
claude/new-issue-fixes-fvhbl3-85

Conversation

@BenWestgate

@BenWestgate BenWestgate commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

Requested by Ben · project thread

Problem

correct, and the embedded “Possible correction” prompt in recovery commands, showed a repaired string without first explaining why the entered text was invalid.

Change

Print one Invalid: <reason> line using the parse error already available to the caller. Mixed-case input uses the profile-neutral wording that codex32 strings are all uppercase or all lowercase and both cases decode to the same data. The reason is printed only after the low-discrimination YES gate, so noninteractive gate failure still emits only its operational error.

The tested cases cover mixed case, invalid threshold/index symbols, invalid data characters, and an extra character. create --existing keeps using the library’s own rejection reason.

Review stack

Base: #105 (codex/remove-unreachable-v1-branches) at 361feb7.

The unrelated <5250 cap commit was removed and its old tip is preserved on archive/101-pre-restack-20261004. #105 was merged into this feature branch through stack-maintenance PR #122, so current head 65a886a is an actual descendant of #105. Comparing #105 to the head shows only the four reviewed behavior/test files.

The combined tree is 5,188 installed production logical lines under <5200. Exact-head Python-package run 755 succeeded on this combined head. #104 overlaps the _confirm_correction call shape and must preserve both arguments if #104 is later accepted.

Validation

The behavior commit dc4bf7b has a Codex ACK. Prior validation passed 931 tests plus Ruff, strict mypy and focused optimized tests; exact-head Python-package run 755 is green. The review finding that the original mixed-case wording incorrectly said “same wallet” for non-wallet profiles is fixed.

Closes #85.

AI-assisted stack maintenance and review. Responsible-human review/authorship policy still applies before integration.

@BenWestgate BenWestgate self-assigned this Oct 1, 2026
@BenWestgate
BenWestgate marked this pull request as ready for review October 1, 2026 13:54

@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: b4d15aeeb6

ℹ️ 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 Outdated
@BenWestgate
BenWestgate force-pushed the 30-recorded-fingerprint-gate branch 2 times, most recently from a7efaae to 054e8d9 Compare October 1, 2026 22:02
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@BenWestgate
BenWestgate force-pushed the 30-recorded-fingerprint-gate branch from 054e8d9 to 115f2c2 Compare October 2, 2026 08:57
claude added 2 commits October 2, 2026 12:19
`correct` and the "Possible correction" prompt in secret, share, wallet
and create --existing showed only the repair. Print one line to stderr
first, "Invalid: <reason>", using the reason `check` already gives.

Callers pass the parse error they already caught, so nothing is parsed
twice. A mixed-case string now says codex32 strings are all uppercase
or all lowercase and that either case recovers the same wallet.

Closes #85

Claude-Session: https://claude.ai/code/session_015CuLXqAvAovfoVcUmmogwa
The mixed-case message said either case "recovers the same wallet", but
`_parse` shows it for every profile, including shares and application
prefixes with no wallet. Say that both cases decode to the same data.

Claude-Session: https://claude.ai/code/session_015CuLXqAvAovfoVcUmmogwa
@BenWestgate
BenWestgate force-pushed the claude/new-issue-fixes-fvhbl3-85 branch from e852899 to dc4bf7b Compare October 2, 2026 17:19
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

1 similar comment
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@BenWestgate BenWestgate left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

AI-generated review (Codex), posted at the maintainer's request.

Not ACKing 96ac5aa yet: this raises the installed-code budget from 5,200 to 5,250 without explicit authorization. The invalid-reason UX change otherwise looks sound.

@BenWestgate BenWestgate added area: cli Command-line interface behavior. area: correction Correction engine and correction UX. gate: adversarial review Resolve, merge, or explicitly defer before the next full adversarial review. labels Oct 4, 2026
@BenWestgate
BenWestgate force-pushed the claude/new-issue-fixes-fvhbl3-85 branch from 96ac5aa to dc4bf7b Compare October 4, 2026 19:00
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@BenWestgate
BenWestgate changed the base branch from 30-recorded-fingerprint-gate to codex/remove-unreachable-v1-branches October 4, 2026 19:01

@BenWestgate BenWestgate left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

AI-generated current-head follow-up review (Codex), posted at the maintainer's request.

ACK dc4bf7bbc223 now that the unrelated <5250 cap commit has been removed.

The invalid-input reason is taken from the parse error the caller already caught, so the change does not add a second parsing/validation path. The message remains behind the existing low-discrimination disclosure gate, and the follow-up wording is profile-neutral (“same data”) rather than incorrectly assuming a wallet. The tested malformed-header/data/length and mixed-case cases cover the intended user-facing boundary.

No correctness blocker found in the focused behavior diff. The PR is stacked on #105 and preserves <5200; run final CI on the actual integrated #105 + #101 tip before freeze. Responsible-human authorship/review policy still applies.

Temporary stack refresh: bring the reviewed #105 cleanup into #101's feature branch so the PR head and CI represent the intended combined tree. Human integration will rewrite/squash agent-authored history under repository policy.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@BenWestgate BenWestgate left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Codex current-head review at 65a886a: no findings. Since the prior ACK, the only new commit brings in #105’s already exact-head-reviewed cleanup; the invalid-reason behavior and disclosure-gate placement are unchanged.

@BenWestgate BenWestgate left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

AI-generated current-head stack review (Codex), posted at the maintainer's request.

Code ACK 65a886a735b8 for the actual #105 + #101 head. #105 is now an ancestor of this branch; comparing #105 (361feb7) to the head yields only the four reviewed invalid-reason behavior/test files. The unrelated <5250 cap change is absent.

The reason text still comes from the already-caught parse error, remains behind the existing low-discrimination disclosure gate, and uses profile-neutral mixed-case wording. The known #104 call-shape overlap remains documented if that post-v1 enhancement is later integrated.

Fresh current-head Python-package run #755 is still queued at the time of this review. Treat this as an exact-head code ACK with CI pending. Responsible-human authorship/review still applies before integration.

Copy link
Copy Markdown
Owner Author

V1 disposition (Codex, 2026-10-04): defer this post-audit UX enhancement from the v1 candidate.

The invalid-reason behavior has a current-head Codex code ACK and fits under the library budget on #105. It is not required to close the original mixed-case audit finding, which is already fixed by #42. A temporary attempt to combine #100 and #101 exposed a real late-stack overlap conflict, so carrying this into v1 would enlarge the frozen-candidate review scope without closing an audit finding.

Keep #101 open for post-v1, where it can be rebased with #100/#104 as appropriate. Human authorship/review remains required when integrated.

@BenWestgate
BenWestgate marked this pull request as draft October 4, 2026 19:18
@BenWestgate BenWestgate removed the gate: adversarial review Resolve, merge, or explicitly defer before the next full adversarial review. label Oct 4, 2026

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

area: cli Command-line interface behavior. area: correction Correction engine and correction UX.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants