Repository navigation
id-atlas A9118-array-codec: ArrayAddress type + canonical codec (#10182) - #10337
Conversation
… canonical codec (#10182) Implements design S4.23-S4.28: ArrayAddress over Vec<Option<Vec<u8>>> with spec ordering, a versioned canonical binary codec (decode rejects non-canonical bytes), and URI slot tokens (~ / b. + percent-encoded octets). Golden-vector tests cover byte-for-byte encode, typed decode, both-direction round trips, null/empty non-collision, ordering and rejections. Crate-root export stays with slice 9110-02 per the ownership split; tests include the module by path.
Codex Review Summary: ❌ FailedThis 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. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 57 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Closes #10182 (slice A9118-array-codec).
Preflight
Native blocker #10160 closed 2026-11-14T18:20:30Z (verified fresh via the GitHub dependencies API in tasks 17031 and 17150); gate clear, implementation proceeded within the issue's approved scope only.
What this delivers
pkgs/id/crates/id-core/src/array_address.rs(new, owner A9118-array-codec):ArrayAddress= orderedVec<Option<Vec<u8>>>per design S4.23–S4.28 — null slot distinct from empty bytes, zero-length address valid, no fixed semantic maximum; ordering delegates to the slot vector's standardOrd(null before bytes, bytes unsigned-lexicographic with strict prefix first, shorter equal-prefix list first) so it cannot drift from the spec. Versioned canonical binary codec (v1: version byte, u64 BE count, per-slot tag + u64 BE length + payload) that is lossless both directions and rejects bad version/truncation/trailing bytes/unknown tags; URI slot tokens (~for null,b.+ percent-encoded octets for bytes,/-joined). Purestd, no new dependencies.pkgs/id/crates/id-core/tests/array_address.rs(new, owner A9118-array-codec): golden vectors byte-for-byte, typed decode, both-direction round trips, null/empty/absent non-collision, ordering chain, rejection cases, URI token goldens.Scope note: the crate-root export and manifest wiring belong to slice 9110-02 per the issue's ownership split, so
lib.rsis untouched; the test includes the module by path (the same file the export will name) so the oracle runs today.Test report
cargo test -p id-core --test array_address— 8 passed, 0 failed (golden vectors encode byte-for-byte and decode to the typed values; round trips both directions; ordering; rejections; URI tokens).rustfmt --checkon both new files: clean.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.