Skip to content

bip93: Require integer header thresholds - #11

Merged
BenWestgate merged 1 commit into
reviewability-v1from
codex/v1-header-threshold-type
Sep 28, 2026
Merged

BenWestgate merged 1 commit into
reviewability-v1from
codex/v1-header-threshold-type

Conversation

@BenWestgate

Copy link
Copy Markdown
Owner

What

Require Header.threshold to be a non-boolean integer before checking the BIP93
range.

Why

Python numeric equality allowed 2.0 through the range-membership check, leaving
a float in an otherwise validated immutable header and failing later during
Bech32 symbol encoding. This adapts
Rob1Ham/python-codex32#11
onto the current target.

Validation

  • focused public API and BIP93 tests — 90 passed
  • Ruff check and format checks
  • strict mypy

@BenWestgate BenWestgate added gate: adversarial review Resolve, merge, or explicitly defer before the next full adversarial review. area: bip93 BIP93 encoding, checksum, parsing, and format rules. bug Something isn't working labels Sep 24, 2026
@BenWestgate

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 7d889130fe

ℹ️ 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 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 (Claude), posted at the maintainer's request.

ACK 7d88913

  • Closes the 2.0 float hole; bool is still rejected first.

Check the runtime threshold type before range membership so numerically equal
floats cannot enter immutable BIP93 headers and fail later during symbol
encoding.

Security: strengthens the validated-artifact construction boundary without
changing valid integer thresholds.

Validation: focused public API and BIP93 tests; Ruff check and format; strict
mypy.
@BenWestgate
BenWestgate force-pushed the codex/v1-header-threshold-type branch from 7d88913 to 5051283 Compare September 28, 2026 00:07
@BenWestgate
BenWestgate merged commit 833c918 into reviewability-v1 Sep 28, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: bip93 BIP93 encoding, checksum, parsing, and format rules. bug Something isn't working gate: adversarial review Resolve, merge, or explicitly defer before the next full adversarial review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant