Repository navigation
feat(u32): add embedded constant AND - #145
Conversation
|
Review: changes required before merge. The checked byte boundary misses three original input limbs. With four witness items encoding numeric 1, replacing any bottom-based position 0, 1, or 2 by the nonminimal encoding [0x01, 0x00] still succeeds under the local Tapscript Consensus profile after consuming the four outputs and appending OP_TRUE. Position 3 is rejected. Validate each original byte before arithmetic normalizes it; move or stage the validated limb before repeating the check. Add malformed-encoding regressions at every position under a profile that permits nonminimal numeric encodings globally. Evidence: Reviewed commit: |
1f86d25 to
916732b
Compare
|
Updated in commit
Checks passed: focused AND tests, all 34 non-ignored |
|
Review of The validator now rotates through all four original limbs, addressing the earlier top-limb-only check. Preserve malformed/nonminimal inputs at every position and the AND result/order regressions. Rebase and rerun the focused AND and named metric checks plus KB validation. Current integration conflicts: Validation scope: source/diff and existing CI review; no new full-repository or field-arithmetic test run was requested. |
Resolve conflicts in knowledge/catalog.json, knowledge/comparisons/arithmetic.md, knowledge/primitives/index.md, and tests/primitive_metrics.rs by keeping every main entry and adding the u32-and-constant record, rows, and metric test. All 101 main catalog records and 256 configurations are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Run the hostile-input regressions on a complete leaf that consumes all four outputs before OP_TRUE under the local tapscript Consensus profile. Every position now checks -1/256 (Verify), negative zero and nonminimal one (EqualVerify), and a five-byte number (ScriptIntNumericOverflow), with canonical 128/255 controls that must succeed. A test-only top-limb-only mutant must fail the all-position alias predicate while accepting aliases at positions 0-2. Result/order checks now supply runtime witnesses through the shared strict harness for six boundary/pattern cases and 100 seeded cases. Correct stale 612-byte/444-opcode prose to the measured 620 bytes and 448 static non-push opcodes, and align the knowledge page evidence wording with the catalog record. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Addressed in
Validation on the committed head, clean tree:
No full-repository or field-arithmetic run. Compiler This head was subsequently integrated into |
Summary
u32_and_constant(value)for checked byte-oriented u32 masking with a public embedded operandEvidence boundary
Verification
cargo fmt --all -- --checkpython3 tools/kb.py validatepython3 -m json.tool knowledge/catalog.jsongit diff --check