Skip to content

docs: Say what correct can and can't repair - #102

Open
BenWestgate wants to merge 1 commit into
reviewability-v1from
claude/new-issue-fixes-fvhbl3-89
Open

BenWestgate wants to merge 1 commit into
reviewability-v1from
claude/new-issue-fixes-fvhbl3-89

Conversation

@BenWestgate

@BenWestgate BenWestgate commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

Requested by Ben · project thread

Before: the user guide gave correct one paragraph, and its limits were only in the developer API guide.

After: a "What correct can repair" section in the user guide lists what one string survives, what it doesn't, when to add --bytes 32, and why filling exactly 13 unreadable characters needs YES.

How: each limit was measured by damaging BIP-93 test vectors (48, 74 and 127 characters) and running the CLI's correction search, 2 to 4 trials per case. Two items from the issue's starting list didn't hold and are left out: 2 missing plus 2 extra worked in only half the trials within ten seconds, and 3 missing plus 1 extra and two wrong groups never did. Rebased onto reviewability-v1 9b99862 and re-measured there on 2026-10-20: every listed limit still holds. Script and results: limits.py in the project's correct-limits folder.

Docs only. Closes #89

🤖 Generated with Claude Code

https://claude.ai/code/session_015CuLXqAvAovfoVcUmmogwa
https://claude.ai/code/session_01Q1TNm1YeYW8K9W2eBvxmCD

@BenWestgate BenWestgate self-assigned this Oct 1, 2026
@BenWestgate
BenWestgate marked this pull request as ready for review October 2, 2026 02:25
@chatgpt-codex-connector

This comment has been minimized.

@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.

ACK 4a0b18b. The capability documentation matches the implemented correction behavior.

@BenWestgate BenWestgate added correction Correction engine and correction UX. documentation Improvements or additions to documentation gate: adversarial review Resolve, merge, or explicitly defer before the next full adversarial review. labels Oct 4, 2026

Copy link
Copy Markdown
Owner Author

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

The docs have a current-head Codex ACK and are useful, but they document follow-up field testing rather than closing a validated finding from the supplied adversarial reviews. The v1 user-facing audit fixes already include the reviewed mixed-case correction behavior and the length-specific recovery guidance. Keep #102 open for post-v1 so the frozen review candidate stops accumulating late documentation scope.

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

@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 4a0b18b: no findings. This is user-facing correction-capability documentation only and does not change recovery behavior.

@BenWestgate
BenWestgate force-pushed the claude/new-issue-fixes-fvhbl3-89 branch from 4a0b18b to fbb010b Compare October 22, 2026 03:13
@BenWestgate
BenWestgate marked this pull request as ready for review October 22, 2026 03:34
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 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-23T21:31:39.496090Z 9424889 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: fbb010bcbb

ℹ️ 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 docs/user/guide.md Outdated
Comment thread docs/user/guide.md Outdated

@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-assisted current-head documentation review.

ACK c3d74ae (static). The earlier misleading correction limits now exclude whole-group omissions and preserve the 15-character long-checksum case. The confirmation warning distinguishes 13 and 15 erasures. Python-package CI passes. Post-v1 deferral remains appropriate.

Comment thread docs/user/guide.md Outdated
It can fix:

- up to 8 unreadable characters, up to 4 wrong ones, or a mix in which each
wrong character counts as two unreadable ones;

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.

this is unclear

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.

Reworded in 0bf2587. It now says that one wrong character uses up the room of two unreadable ones, and gives examples: 6 unreadable plus 1 wrong, and 4 unreadable plus 2 wrong. Both were measured to work.


Generated by Claude Code

Comment thread docs/user/guide.md Outdated

- up to 8 unreadable characters, up to 4 wrong ones, or a mix in which each
wrong character counts as two unreadable ones;
- 13 unreadable characters in a row, or 15 in a 127-character string;

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.

long codex32 string?

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.

Yes. In 0bf2587 all three places now say "long codex32 string", and the first one adds "(127 characters)".


Generated by Claude Code

Comment thread docs/user/guide.md
Comment thread docs/user/guide.md Outdated
wrong character counts as two unreadable ones;
- 13 unreadable characters in a row, or 15 in a 127-character string;
- up to 4 missing characters, up to 4 extra ones, or one of each;
- one or two swaps of neighboring characters, or one swap of distant ones;

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.

I'd much rather this say "one swap of characters anywhere in the string" (in addition to to _ other mistakes / unreadable).

But I'm surprised it couldn't do 3-4 adjacent swaps.

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.

Done in 0bf2587. The line now reads: "one swap of two characters anywhere in the string along with up to 2 wrong ones, or up to 3 swaps of neighboring characters". Measured one search at a time:

  • 3 neighboring swaps: fixed in 1.3 to 1.7s.
  • 4 neighboring swaps: timed out in all 3 trials.
  • 1 distant swap plus 2 wrong: fixed at the 10-second deadline.
  • 1 neighboring swap plus 3 wrong: fixed (the line you cACKed).

Generated by Claude Code

Comment thread docs/user/guide.md
Comment thread docs/user/guide.md
Comment on lines +293 to +294
- one or two whole four-character groups missing, extra or swapped, or one
group with every character wrong.

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.

wasn't it:
one or two whole four-character groups, missing, extra, wrong or swapped?

the one group wrong seems wrong since we can correct 8 arbitrary erasures which is how these are solved.

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.

Missing, extra and swapped groups all work for two groups. Wrong groups only work for one, because the search never treats a whole group as unreadable. A wrong character counts as an error at an unknown position, and the checksum can locate about 4 of those. One fully wrong group is 4 errors, which is fixed. Two fully wrong groups are 8, which timed out in every trial. The 8-erasure capacity only applies if the user marks those characters as ?. So 0bf2587 adds: "If you know which groups are wrong, type their characters as ?: two groups are then 8 unreadable characters, which it can fix."

The search could also try each pair of groups as erasures. With 10 groups that is 45 cases of an 8-erasure fill, which is cheap, but it changes correction, so it would be a separate follow-up.


Generated by Claude Code

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.

"the search never treats a whole group as unreadable" it is supposed to and it used to correct any two groups where every character or more than most were errors provided there were no other errors in the string.

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.

The search could also try each pair of groups as erasures. With 10 groups that is 45 cases of an 8-erasure fill, which is cheap, but it changes correction, so it would be a separate follow-up.

The search absolutely used to do this and it still should since it's cheap and useful to try any 2 groups as 4 erasures each. I want that reverted or back in before v1, while this user document can be deferred.

Comment thread docs/user/guide.md Outdated

It can't fix 9 or more scattered unreadable characters, 5 or more missing
characters outside whole missing groups, more than 13 unreadable characters in a
row (15 in a 127-character string), or two groups that are both wrong. Some

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.

it could on my CPU, what kind of puny CPU did you use?

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.

Run one search at a time on the same Xeon, two fully wrong groups (8 wrong characters) timed out in 3 of 3 trials, and so did two wrong groups plus 1 more wrong character. My reasoning in the other thread says 8 wrong characters at unknown positions is past what the checksum can locate on any CPU. Do you remember the case you ran? If some characters in those groups were still right, it would fall under "up to 4 wrong".


Generated by Claude Code

Comment thread docs/user/guide.md Outdated
Comment thread docs/user/guide.md Outdated

@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-assisted review of 0bf2587.

One wording fix remains: a timeout in the measured trials is not an unsupported repair. The default search also includes the 74-character target; --bytes 32 narrows that search. Please qualify the claim below. Otherwise the revised examples address the feedback. Documentation-only review; no runtime change.

Comment thread docs/user/guide.md Outdated
If whole groups are missing, give the seed's size with `--bytes`, such as
`--bytes 32` for a 74-character string. `correct` then tries only that length,
which is much faster: it fixes two missing groups in a 74-character string at
once with `--bytes 32` and not at all without it.

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.

“not at all without it” overstates the experiment. _correction_plan() includes 74 among the default MS targets; the shared ten-second deadline can prevent completing that search. Suggest: “Specifying the size narrows the search and can let repairs finish before the deadline.”

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.

Agreed. I replaced the claim with your sentence in 32f1a98.


Generated by Claude Code

A tester called correction a black box: the user guide gave it one
paragraph and the limits were only in the developer API guide. List
what one string can survive and what it can't, how --bytes narrows the
search, and the 13-fill case that the YES prompt guards.

Each limit was checked by damaging BIP-93 test vectors and running the
correction search one trial at a time, 3 to 4 trials per case.

Closes #89

Claude-Session: https://claude.ai/code/session_015CuLXqAvAovfoVcUmmogwa
Claude-Session: https://claude.ai/code/session_01Q1TNm1YeYW8K9W2eBvxmCD
@BenWestgate
BenWestgate force-pushed the claude/new-issue-fixes-fvhbl3-89 branch from 32f1a98 to 9424889 Compare October 22, 2026 20:33
@BenWestgate

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 9424889f2a

ℹ️ 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".

Copy link
Copy Markdown
Owner Author

cACK. The two-group repair regression is addressed separately in #165: the existing eight-erasure BCH probes are scheduled early, with a three-second regression test. #102 remains documentation-only and can wait until that behavior lands.

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

correction Correction engine and correction UX. documentation Improvements or additions to documentation post-v1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant