Repository navigation
feat(u4): add checked bit-to-nibble packer - #75
Conversation
d3ac1b1 to
db961b9
Compare
|
Review recommendation: fix before merging. Correct the contradictory stack contract before merging. The actual input order is September 11 local validation (unchanged PR head): Integration: rebase on current main, resolve any catalog/NR/OP ID collisions, and run the affected correctness tests and focused metric checks. Reviewed commit: |
db961b9 to
d46cf24
Compare
|
Updated in place in commit d46cf24.
Validation: 24 affected bits tests passed; |
|
Review of The explicit stack layout, checked/unchecked cases, short-stack tests, and active metric improve the proposed inverse adapter. Resolve the shared catalog/metric additions without dropping existing entries, then rerun the inverse-packer and round-trip tests plus its named metric check. Current integration conflicts: Validation scope: source/diff and existing CI review; no new full-repository or field-arithmetic test run was requested. |
Resolve the shared-file conflicts against origin/main (3d1001f): - knowledge/catalog.json: keep main's u4 stack_contract (including the per-nibble popcount sentence) and append the PR's inverse-packer sentence; the PR's bits-to-nibble-checked configuration and metric test link are kept. All 117 main records and 283 main configurations survive; the merged file has 117 records and 284 configurations with no duplicate ids. - tests/primitive_metrics.rs: keep both main's aes_key_profile_metrics_are_current and the PR's u4_bits_to_nibble_metrics_are_current (135 #[test] fns = 134 main + 1 PR; every main and PR metric key occurrence preserved). - src/arithmetic/u4/mod.rs: take main's sorted module list, a strict superset of the PR's (the PR only reordered declarations). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The round-trip test only exercised nibble 9 (0b1001), a bit-palindrome, so a packer with reversed (LSB-first) weights still passed it. Round-trip every nibble through the checked big-endian altstack splitter, for both checked and unchecked packing, while keeping the surrounding main/alt sentinels. With the weight-reversal mutant the test now fails at nibble 1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Addressed in
Validation on the clean committed HEAD:
Field tests were not run. Runs use compiler |
Summary
Verification
cargo test --locked arithmetic::u4::bits::tests::inverse_ -- --nocapturecargo test --locked --test primitive_metricspython3 tools/kb.py validatecargo fmt --checkgit diff --checkThe full repository test suite was intentionally not run.