Skip to content

id-atlas A9118-array-codec: ArrayAddress type + canonical codec (#10182) - #10337

Merged
dezren39 merged 1 commit into
mainfrom
queue/17150-10182-array-codec
Nov 14, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/17150-10182-array-codec

Conversation

@dezren39

@dezren39 dezren39 commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

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 = ordered Vec<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 standard Ord (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). Pure std, 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.rs is 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 --check on both new files: clean.

Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

… 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.
@dezren39
dezren39 requested a review from a team as a code owner November 14, 2026 18:31
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-14T18:31:48.942365Z
We couldn’t complete this review. Comment @codex review to try again.
fc2eb74 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 14, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ee79814c-4864-4d18-bcae-24409ad528ad
Commits

Reviewing files that changed from the base of the PR and between e4311e4 and fc2eb74.

Files selected for processing: 2

  • pkgs/id/crates/id-core/src/array_address.rs
  • pkgs/id/crates/id-core/tests/array_address.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@dezren39
dezren39 merged commit ab48b4a into main Nov 14, 2026
1 check passed
@dezren39
dezren39 deleted the queue/17150-10182-array-codec branch November 14, 2026 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement nullable ordered byte-slot address type and codec

1 participant