Repository navigation
codec9 checked encoder; DR512 naming; add_pm wasm rows in CI - #434
Conversation
- Codec9::encode_touched_checked and Codec9Runtime::encode_touched_checked return Quantized9::Lane (the same lane encode_touched gives) when the quantized magnitude fits 255, and Quantized9::Wide(exact) when it does not, instead of saturating. Outside i64: Codec9Error::OutOfRange. - dr512-epistemic-pm-invariant: DR512 names the representation (512 codewords); the arithmetic is Abakus pm. Never touched is the identity of add_pm and NaN after decode: add, then decode. - abakus::pm: the same rule in the module doc, pinned by a test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAqKMNZqKXSaeb9g2ypywF
criterion is benches-only and does not build for wasm32-wasip1, so it moves to a cfg(not(wasm32)) dev-dependency table. tests/add_pm.rs then builds for wasm32-wasip1 as it is; scripts/add-pm-backends.sh gains wasm (+simd128, the simd_wasm realization) and wasm-scalar arms, run under node's WASI (scripts/wasi-test-run.mjs), 11 tests each. Both run in the wasm job. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAqKMNZqKXSaeb9g2ypywF
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Pm derived PartialEq, which needs U8x64: PartialEq; the nightly-simd realization's U8x64 does not implement it, so master's nightly row has been red since #433. Pm now compares pos and mag.to_array(). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAqKMNZqKXSaeb9g2ypywF
|
Fixed here in Checked locally with nightly:
Generated by Claude Code |
Summary
Three small items from the DR512 review.
Checked encoder.
Codec9::encode_touched_checkedandCodec9Runtime::encode_touched_checkedreturn aQuantized9:Lane(lane)when the quantized magnitude fits 255. This is the same laneencode_touchedreturns, including the -0.49999 → +0 rule.Wide(exact)when it does not, instead of saturating to 255.A value whose quantized form is outside
i64is refused with the newCodec9Error::OutOfRange; no crate outsidecodec9.rsnamesCodec9Error. Input now has the same exact escape thatabakus::pmgives arithmetic.DR512 naming (DECISION, in
dr512-epistemic-pm-invariant.md).dt64::draddressing.pm".add_pmand NaN after decoding:decode(add_pm(⊥, +5)) = 5, whiledecode(⊥) + decode(+5) = NaN. Add first, then decode. A test inabakus::pmpins both results.wasm rows in CI.
criterionis used by benches only and does not build forwasm32-wasip1, so it moves to acfg(not(target_arch = "wasm32"))dev-dependency table.tests/add_pm.rsthen builds for wasm unchanged.scripts/add-pm-backends.shgains two arms, run in the existing wasm job under node's WASI (scripts/wasi-test-run.mjs):wasm(+simd128, thesimd_wasmrealization);wasm-scalar(no simd128, the scalar backend).Evidence
cargo test --lib -- hpc::codec9 hpc::abakus: 17 tests pass, 3 of them new.checked_encode_escapes_instead_of_saturatingred;scripts/add-pm-backends.sh wasmandwasm-scalareach run 11 tests and pass locally. The two binaries are distinct builds.cargo check --benches,cargo clippy --features std --lib --tests -D warnings,cargo fmt --check, andfacet-stride-guard --diff origin/master(no hits).Generated by Claude Code