api: Expose reference-vector helpers - #53
BenWestgate wants to merge 1 commit into
Conversation
Promote the module-level checksum and u5 conversion interfaces needed by reference-vector authors while keeping the package-level API narrow. Document and test the supported vector workflow and justify the remaining private cross-module couplings.\n\nValidation: 866 normal and 866 optimized tests; mypy; Ruff; production size budget.\n\nfixes #49
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
BenWestgate
left a comment
There was a problem hiding this comment.
AI-generated review (Claude), posted at the maintainer's request.
ACK 7311db8
- Pure renames plus
checksum_for_body_lengthfactored out of_from_partswith the same logic. I ran the api.md example; it parses as aSecret.__all__is 24. - These names become a supported v1 surface. That's the point of #49, but it's a commitment worth accepting on purpose.
- Sequencing: it conflicts with #42 and #57 (mechanical renames only).
- Nit: the new docstrings have a blank line after them, unlike the neighbouring functions.
|
Merge-order note from #42 review: #42 introduces |
|
Review follow-up: the blank-line docstring nit is valid but non-functional. I’m leaving the current one-commit API diff intact until #42 and #57 land because #53 already has mechanical rename conflicts with both; remove the extra blank lines in that single conflict-refresh commit rather than creating another pre-conflict churn commit. Human review order: #42 and #57 before #53. |
|
Second merge-order/API-boundary note from #13 review: after #13 lands, deduplicate the two ASCII-only case-fold implementations by adding one private |
|
Review-submission follow-up: ACK stands. The blank-line-after-docstring nit is style-only; handle it when this branch is refreshed after #13/#42 so the conflict resolution stays one mechanical API-boundary pass. That same refresh should (1) centralize private |
Closes #49.
Promote the module-level checksum specifications, u5 conversion helpers, and checksum-selection helpers required to construct and verify codex32 reference vectors without underscore-prefixed imports. The package-level
codex32.__all__remains the same 24-name backup/recovery API.docs/developer/api.mdnow documents the supported vector workflow and explicitly justifies the remaining private cross-module imports as correction-engine, GF/profile, wallet/Core, or CLI implementation couplings. Internal benchmarks may continue to use implementation-private names when they are explicitly testing internals.A production-import audit found 48 underscore-prefixed symbols across 64 same-package import edges. They are confined to the correction engine, profile/artifact construction, wallet/Core, and CLI implementation boundaries documented here. Renaming those symbols would only remove Python’s private-name signal or publish construction/search hooks; it would not improve the supported vector API. No additional pre-v1 rename is warranted.
Validation:
python -O) tests passgit diff --checkpassesDisclosure: AI tools were used while implementing and checking this user-requested branch-to-branch contribution.