Skip to content

bip93: Apply only the ms application rules - #180

Draft
BenWestgate wants to merge 7 commits into
codex/split146-cleanupfrom
codex/split146-profiles
Draft

BenWestgate wants to merge 7 commits into
codex/split146-cleanupfrom
codex/split146-profiles

Conversation

@BenWestgate

Copy link
Copy Markdown
Owner

Apply application rules only to ms. Treat cl and bip39 prefixes as generic codex32 text rather than maintaining local profile implementations.

Extracted from #146; based on #179. 225 focused parsing, length, sharing, generation and API tests pass. GUI compatibility remains an integration gate.

Confirmation fell back to /dev/tty or CONIN$ when stdin was redirected.
Now a confirmation needs interactive stdin, and redirected input that
needs one fails with the existing interactive-confirmation error.

Claude-Session: https://claude.ai/code/session_01XGMpowzJwwgyHMEd63ijDe
Nothing raised or caught either class. Their children now derive from
CodexError directly, so each failure names its specific reason.

Claude-Session: https://claude.ai/code/session_01XGMpowzJwwgyHMEd63ijDe
The wheel job installed the wheel into a fresh venv and ran a separate
smoke script. CI now replaces the editable install with the built
wheel, checks codex32 imports from site-packages, and runs the full
suite against it. The main-chain Core smoke tool repeated the regtest
fixture's checks and is removed.

Claude-Session: https://claude.ai/code/session_01XGMpowzJwwgyHMEd63ijDe
Remove setup, check, budget, and commit rules that CONTRIBUTING.md and
docs/developer/AI_POLICY.md already state, and say when to read those
files instead.

Claude-Session: https://claude.ai/code/session_01XGMpowzJwwgyHMEd63ijDe
Explain that a manually chosen share-set identifier should differ from the other backups the operator keeps. Use UNIQUE_ID in the CLI help. Extracted from #146 without changing the final wording.
Drop code that never runs or only aliases other code:

- create: Bitcoin Core is always connected and the terminal is always
  interactive, so the `core is None` and non-TTY branches are dead.
  The header is always ms, and `_generated_secret` only wrapped
  `generate_master_seed`.
- create --existing: the correction preview never received a
  fingerprint provider, so drop the parameter.
- correction: `_FixedCorrector` always set `erasure_products` to None,
  so the two-erasure product-table path never ran.
- tools: nothing ran the two dependency-free fuzz targets.
- errors: drop the pre-1.0 `MismatchedProfile` alias.
- bip93: drop the one-line `_validate_basis_prefix` wrapper.

No behaviour change.

Claude-Session: https://claude.ai/code/session_01XGMpowzJwwgyHMEd63ijDe
The library tried to carry a profile module per application. That
cannot scale: other applications should depend on this library and
apply their own rules, not ask it to ship every codex32 profile that
BIP93 does not define.

BIP93 defines only `ms`. Fold its six seed sizes, length check,
`MasterSeed` and CRC-padding helper into `bip93.py`, and remove the
`profiles/` package, the `Profile` enum, `artifact.profile`, and the
Core Lightning and BIP39 profiles with their secret types and errors.

`cl` and `bip39_*` strings still parse, correct, recover and derive as
generic codex32. They lose their extra checks: the CL threshold-0
rejection from #130, the BIP39 embedded checksum, and their fixed
lengths as correction hints.

Public API: removes `Profile`, `Bip39Secret`, `CoreLightningSecret`;
`CorrectionContext` takes a plain HRP string.

Security: parsing and correction boundaries change (fewer HRP-specific
checks). Needs security review.

Claude-Session: https://claude.ai/code/session_01XGMpowzJwwgyHMEd63ijDe

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:39:04.166631Z 8abddbe 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

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 8abddbe17d

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

@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