Skip to content

Commit 00aae9b

Browse files
committed
docs: Record adversarial finding dispositions
Map all supplied original and consolidated findings to confirmed fixes, focused PRs, intentional contracts, deferred work, and claims that did not reproduce. Preserve the original review qualifications and identify the remaining existing-secret root gap covered by PR #126. Document the stricter threshold grammar, Core-independent fallback, review-line metric including docstrings, enforcement location, and optimized-validation contract. Compact one internal tuple assignment without changing its AST; this leaves the audited stack room for the four-line Core UX delta without raising the library cap. Verified current GitHub CI and reviews, compared source and regressions, checked document links and whitespace, and confirmed Ruff plus AST equivalence for the mechanical source cleanup. AI-assisted maintainer-requested audit closure; refs #20 and #38.
1 parent cde312b commit 00aae9b

4 files changed

Lines changed: 139 additions & 6 deletions

File tree

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
# Supplied adversarial reviews: finding disposition
2+
3+
This is a traceability snapshot, not a release approval. The supplied reviews
4+
examined `reviewability-v1` at `c118a83`; the branch now points to
5+
`5325eb7543e8545b321b0512b38c896b1e269ece`. Unmerged fixes are identified by PR,
6+
not by similarly named sibling branches. Issue
7+
[#20](https://github.com/BenWestgate/python-codex32/issues/20) tracks audit closure;
8+
[#38](https://github.com/BenWestgate/python-codex32/issues/38) owns integration and
9+
the final reviewer handoff.
10+
11+
## Inputs and qualifications
12+
13+
The four supplied files are identified by their SHA-256 hashes. D means DeepSeek,
14+
G means GLM, K means Kimi, and C means the consolidated report.
15+
16+
| File | SHA-256 |
17+
|---|---|
18+
| `codex32-review-DeepSeek_V4.1_Flash.md` | `94398728d93643e609987930c7fb38ea37b828fab9071d61aa1c255e5316450a` |
19+
| `codex32-review-GLM5.3_Flash.md` | `01569d9c3a6fbd1aae6f3a92d523ce9cafb50a66d16c56e91b1ff87030f5af11` |
20+
| `codex32-review-KimiK3_High.md` | `139ac9366b6f4c72f33b3d17e649e88d68e266c19345102084883aa850ab2977` |
21+
| `consolidated-review.md` | `458e647b7cd14f27f71809fdc1b240c8fd4b3cfbfb06e2005b0eb0a4d6767ea9` |
22+
23+
The originals qualify several claims more narrowly than the consolidation:
24+
25+
- Kimi calls the Core requirement consistent with the threat model and asks for
26+
a documentation hint. GLM recommends a warning-only fallback. The maintainer
27+
chose Core-backed fingerprint checks for `ms32`; generic `codex32` is the
28+
offline fallback. This is an intentional boundary with a UX/documentation gap.
29+
- Kimi reviewed live Core and GUI paths statically. Its restore recommendation
30+
exceeded the then-current operator-comparison contract. The accepted release
31+
requirement is now verification before mutation for accident safety, using
32+
an independent record or the explicit no-record confirmation. Malicious share
33+
replacement and encrypted descriptors remain separate human-planned work in
34+
[#55](https://github.com/BenWestgate/python-codex32/issues/55).
35+
- Kimi distinguishes accidental `repr()` disclosure from deliberate `str()`
36+
export. The accepted project contract redacts both; `.text` is explicit export.
37+
- The consolidation's shared-baseline table does not prove each original ran
38+
every listed command. In particular, only Kimi explicitly records the BCH
39+
constant verifier. Historical reviewer claims are not new validation evidence.
40+
- The consolidation calls the setup defect independently found by two reviews
41+
in its summary, although all three originals contain it.
42+
- GLM's secondary dependency-install ordering claim did not reproduce with pip's
43+
normal build isolation. The Astra-placeholder claim is stale. Neither justifies
44+
a new defect issue; the unwanted repository configuration was removed anyway.
45+
46+
## Numbered findings
47+
48+
“Merged” below means present on the branch identified above. “PR” means a focused
49+
patch exists but still needs human integration. Duplicate IDs share one row.
50+
51+
| Consolidated ID | Original sources | Assessment and current coverage |
52+
|---|---|---|
53+
| BL1 | D-B1, G-1, K-F4 | Confirmed developer-install defect; #3/#6 and merged #7 remove the test-only `bip32`/secp256k1 dependency. #115 corrects contributor setup. |
54+
| BL2 | D-B2 | Confirmed missing BSD notice; merged #15 includes `LICENSES` in wheel and sdist. |
55+
| H1 | K-F2 | Confirmed default-rendering leak; #22 and merged #25 redact `str()` and `repr()`, including nested correction candidates. |
56+
| H2 | K-F3 | Accepted accident-safety gate; #26/#30, CLI #57/#80/#81, GUI #118. #81 verifies existing seeds before replacement cards; #80 distinguishes an unavailable Bails check. #55 is a separate planning issue, not a missing v1 PR. |
57+
| H3 | K-F1 | Confirmed HRP-boundary defect; #32/#33 enforce 83 characters in parsing and correction contexts. Generalized-HRP draft vectors at `BenWestgate/bips` PR #2, commit `01374bf`, explicitly allow 83 and reject 84; 1023 is the expanded-codeword bound. |
58+
| M1 | G-2 | Confirmed standalone mixed-case regression; #37 and merged #42, including the required-preflight seed preservation follow-up. Interactive recovery already interpreted case. |
59+
| M2 | G-3, K-F9 | Intentional Core boundary; #99 fixes misleading Core diagnostics/preflight. This change documents the generic offline fallback. Do not introduce Python secp256k1 or silently discard fingerprints. |
60+
| M3 | K-F6 | Intended switch to a supplied complete S, with missing notice; #95 announces it after partial share entry. Rejecting S would change the chosen behavior. |
61+
| M4 | D-D4, G-4 | Confirmed review-process gap; #38 requires the final `docs/developer/reviewing.md`, pinned candidate, reading order, reproducible evidence, GUI scope, and human integration order. This snapshot supplies finding provenance but does not replace that frozen-tip handoff. |
62+
| M5 | D-D3 | Confirmed inherited contributor boilerplate; focused #115 replaces it and restores licensing/attribution terms. |
63+
| M6 | D-D1 | Confirmed historical measurements presented as current; focused #116 labels the `6802d86` snapshot and raw evidence. Re-running a benchmark cannot reproduce that host's old measurements. |
64+
| M7 | D process notes, K-F5 | Optimized tests and constant verification are in merged #47/#40. Dormant fuzz harnesses remain deferred until an engine, corpus, and budget are selected; no claimed fuzzing result is inferred from their presence. |
65+
| M8 | K-F7 | Partially fixed by merged #16 for supplied raw bytes. The existing-secret ceremony still bypassed root validation; #125 and focused PR #126 cover the remaining API path. Parsing remains format validation; CL secrets have no BIP32 requirement. |
66+
| M9 | K-F8 | Intentional stricter threshold grammar: `1` is rejected even for S. The API guide now records this reference-decoder divergence. |
67+
| L1 | D-C3 | Confirmed exit-status collision; #39 and merged #45 distinguish valid `0`, emitted suggestion `1`, usage/input syntax `2`, and no usable suggestion `3`. Suggestions remain nonzero. |
68+
| L2 | D-C1/C2, G-6 | Confirmed unreachable guards/always-false field; merged #46 removes the original findings. #105 removes the later redundant recovery/search paths. |
69+
| L3 | D-C5 | No demonstrated input-validation bypass: current asserts narrow internal types/state after explicit validation. The API guide states the boundary; optimized CI guards it. No blanket assert replacement is warranted. |
70+
| L4 | D-D6 | Intentional historical benchmark evidence, retained by merged #14; #116 labels its age and limits. No fresh timing guarantee follows from it. |
71+
| L5 | D process notes, K-F9 | Maintainer-authorized library cap is `<5200`; GUI is separately `<2250` in #118. The API guide defines recursive nonblank/non-comment counting, including docstrings, and names the enforcement test. |
72+
| L6 | D-D5 | Human integration/authorship work in #38. Preserve dependent PR history until the maintainer settles the stack and performs any required rewrite/squash. |
73+
74+
## Nits and secondary claims
75+
76+
| Finding | Sources | Disposition |
77+
|---|---|---|
78+
| Package export count says 25 instead of 24 | D-D2 | #64 removes obsolete `core_descriptors`; #53 documents the resulting 23-name package surface and supported module-level vector helpers. The public API regression rejects the removed export. |
79+
| Test fake accepts obsolete `private=` | D-C4 | One-line #117 makes `_FakeBitcoinCore.initialize` match the production call shape. |
80+
| Stale `MANIFEST.in` provenance exclusion | D notes, K-F9 | Already removed on the current branch (`d6a9f99`); keep `MANIFEST.in` because it still selects license, test, tool, and documentation files for the sdist. |
81+
| Ignored provenance/plans | D notes | Intentional local-only unfinished work in `.gitignore`/`AGENTS.md`; finished reports belong in `docs/audits`, including #23 and this snapshot. #38 links the local cleanup checklist for agents. |
82+
| Beta classifier with an rc version | G-6 | A maturity classifier and prerelease version are separate metadata; no demonstrated defect. Final stable metadata belongs to artifact qualification #5/#52. |
83+
| Extra blank line in `pyproject.toml` | G-6 | No longer present on the current branch. |
84+
| Repository Codex overrides | D notes | #41 and merged #48 remove the configuration. Whether the old named model exists is no longer relevant to the fix. |
85+
| Core RC documentation links | D notes | #93 points to the maintained offline-signing tutorial, as chosen by the maintainer. Stable/signed-RC monitoring is separate from audit closure. |
86+
| Budget-test discoverability | K-F9 | Direct test pointer added to the API guide; #38's final handoff must also name both library and GUI checks. No test-file move is needed. |
87+
| User-facing vector helpers require underscores | G-5 | #49/#53 expose the required codec/checksum helpers at their owning modules and document internal couplings. Further architecture work is explicitly separate. |
88+
| Stale/overlapping branch names | D notes | Use PR numbers and commit IDs as provenance. Pruning branches is housekeeping and does not establish or invalidate a fix. |
89+
| Dependency-install ordering | G-1 secondary note, C rejected claims | Not reproduced under ordinary pip build isolation; no new issue. |
90+
91+
## Verification and remaining release work
92+
93+
On 2026-10-04, GitHub reported successful checks and a Codex review tied to the
94+
current commit for #12/#13/#33, #52/#53/#57/#59/#64, #80/#81/#95/#99/#105,
95+
#115/#116/#117, and the focused GUI #66/#77/#78/#118/#119 changes. These include
96+
clearly disclosed Codex-generated reviews posted through the maintainer's
97+
account; they are not human approvals or proof of an independent Claude review.
98+
The PR #65 parent has a real open refresh-mode finding fixed by stacked #66;
99+
review and integrate them together. GitHub's “blocked” status can also reflect
100+
signature/authorship or branch rules even when checks pass.
101+
102+
Focused local checks at #103 commit `2924f5f` passed for default rendering,
103+
record mismatch before wallet calls, hidden fingerprint, recordless decline and
104+
acceptance, fresh creation, existing creation, and supplied-byte root rejection.
105+
The complete PR #103 security diff scan at behavioral parent `d9ce204`, against
106+
`115f2c2`, found no reportable finding; its later commit changes documentation
107+
only. These checks do not prove the later existing-secret API root path fixed.
108+
109+
#93 and #97 were updated after new reviews: the offline boot USB is distinct
110+
from the PSBT transfer medium; the FAQ distinguishes unshared fingerprint-derived
111+
identifiers and carries #96's identical 256-bit card so its link resolves. Their
112+
new commits need the applicable checks and review recorded before integration.
113+
114+
The remaining order is the live #38 stack: restore and Core UX, foundation/API,
115+
audit/release support, user documentation, then the GUI replay. The new #125 root
116+
fix in #126 must be included before freeze. #115/#116/#117 supply the mechanical
117+
cleanup; this patch supplies the remaining contract clarifications. The local
118+
ignored `docs/planning/v1-pre-review-cleanup.md` is a working checklist, not a
119+
shipped report.
120+
121+
Human review/integration and required signatures remain. The final candidate
122+
must then receive the pinned reviewer handoff, artifact qualification, Tails
123+
rendering/manual GUI-to-Core checks, and a fresh adversarial pass covering the
124+
library, CLI, GUI, and recovery documentation. Until those succeed, “all
125+
material validated findings resolved in the release candidate” is unproven.

‎docs/developer/api.md‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,17 @@ above.
156156
### Size budget
157157

158158
V1 keeps the installed package below 5,200 logical review lines, excluding
159-
blank and comment-only lines while counting subpackages recursively. Changing
159+
blank and comment-only lines while counting subpackages recursively, including
160+
docstrings. The enforcement is
161+
`tests/test_cli.py::test_production_size_budgets_are_enforced`. Changing
160162
the budget requires explicit review and authorization together with the matching
161163
documentation and enforcement update.
162164

165+
Public input checks use explicit exceptions. Remaining production `assert`
166+
statements narrow internal types or check state already established by validation;
167+
they are not input or wallet-identity gates. CI runs the suite under `python -O`
168+
as well as normally, so input rejection must continue to work with asserts removed.
169+
163170
## Profile and opaque-HRP capabilities
164171

165172
There is no runtime registration. An unknown HRP uses generic codex32 rules and
@@ -732,6 +739,7 @@ These choices are not presented as BIP93 requirements.
732739

733740
| Decision | Reason |
734741
|---|---|
742+
| reject threshold digit `1`, including for S | follows the container's `0` or `2`–`9` header grammar; deliberately stricter than the reference decoder's ignored-threshold rule for unshared secrets |
735743
| `ms` accepts only six seed sizes | follows the frozen PR #2258 profile with no legacy decoder |
736744
| random electronic output indices | reduces canonical index disclosure; explicit indices preserve requested order |
737745
| generation-only CRC padding | small recovery hint; not validity or share semantics |

‎docs/user/guide.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
`codex32` checks, corrects, recovers, and derives shares across application
44
prefixes. `ms32` provides Bitcoin master-seed workflows, including secure
55
creation. Use `ms32 create` for new Bitcoin backups.
6+
`ms32 secret` and `ms32 share` require local Bitcoin Core for fingerprint-aware
7+
output; `ms32 correct` requires it when repairing Bitcoin recovery material.
8+
`ms32 check` is Core-independent. For recovery, share derivation, or correction
9+
without Core, use the corresponding generic `codex32` command.
610
BIP39 worksheet profiles are
711
[not recommended for creation](https://secretcodex32.com/docs/index.html),
812
but existing backups can be recovered and corrected.

‎src/codex32/generation.py‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,7 @@ def _start(
229229
else:
230230
reheadered = _from_parts(profile, Header(threshold, identifier, "s"), secret.payload_symbols)
231231
assert isinstance(reheadered, (MasterSeed, CoreLightningSecret))
232-
self._secret, self._basis, self._direct_count = (
233-
reheadered,
234-
[reheadered],
235-
threshold - 1,
236-
)
232+
self._secret, self._basis, self._direct_count = reheadered, [reheadered], threshold - 1
237233
return self
238234

239235
@classmethod

0 commit comments

Comments
 (0)