Skip to content

Compose byte decoders at explicit element metadata - #3892

Open
joshlf wants to merge 1 commit into
Gsul3w4vydc4wowguwwscielqttbpeytgfrom
Grpvcydhrmu5xhlrgdma3sjuwlvxdozc6
Open

joshlf wants to merge 1 commit into
Gsul3w4vydc4wowguwwscielqttbpeytgfrom
Grpvcydhrmu5xhlrgdma3sjuwlvxdozc6

Conversation

@joshlf

@joshlf joshlf commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Byte length cannot recover an element count when elements are zero-sized.
Keep the count in slice decoding, and retain each child's metadata when
composing indexed decoders into a sequence.

Prove initialization, realizability for admitted values, and completeness
through physical and mathematical decoding. Check empty uninhabited
slices, distinct zero-byte counts, rejected metadata, and nested indexed
sequences. These are pure representation laws; they do not supply a Rust
layout or pointer-access premise.

Authored by an AI agent acting on joshlf's behalf.


⬇️ Download this PR

Branch

git fetch origin refs/heads/Grpvcydhrmu5xhlrgdma3sjuwlvxdozc6 && git checkout -b pr-Grpvcydhrmu5xhlrgdma3sjuwlvxdozc6 FETCH_HEAD

Checkout

git fetch origin refs/heads/Grpvcydhrmu5xhlrgdma3sjuwlvxdozc6 && git checkout FETCH_HEAD

Cherry Pick

git fetch origin refs/heads/Grpvcydhrmu5xhlrgdma3sjuwlvxdozc6 && git cherry-pick FETCH_HEAD

Pull

git pull origin refs/heads/Grpvcydhrmu5xhlrgdma3sjuwlvxdozc6

Stacked PRs enabled by GHerrit.

Byte length cannot recover an element count when elements are zero-sized.
Keep the count in slice decoding, and retain each child's metadata when
composing indexed decoders into a sequence.

Prove initialization, realizability for admitted values, and completeness
through physical and mathematical decoding. Check empty uninhabited
slices, distinct zero-byte counts, rejected metadata, and nested indexed
sequences. These are pure representation laws; they do not supply a Rust
layout or pointer-access premise.

gherrit-pr-id: Grpvcydhrmu5xhlrgdma3sjuwlvxdozc6
Agent-authored-by: AI agent acting on joshlf's behalf
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T22:21:44.372817Z 41a2b65 PR opened
🔒 Security Review ✅ Completed 2026-10-15T22:23:04.292866Z 41a2b65 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.

This was referenced Oct 15, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request extends the Lean formalization of Rust storage decoders by introducing the sequence decoder, which composes repeated uses of a storage decoder, and proving its properties regarding initialization, realizability, and completeness. It also adds several theorems for sliceDecoder and arrayDecoder, alongside comprehensive test cases in ReferentTests.lean and RustStorageTests.lean covering edge cases such as zero-byte widths and empty types. There are no review comments, and we have no feedback to provide.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 48.67%. Comparing base (6afb011) to head (41a2b65).

Additional details and impacted files
@@                        Coverage Diff                         @@
##           Gsul3w4vydc4wowguwwscielqttbpeytg    #3892   +/-   ##
==================================================================
  Coverage                              48.67%   48.67%           
==================================================================
  Files                                     35       35           
  Lines                                   4754     4754           
==================================================================
  Hits                                    2314     2314           
  Misses                                  2440     2440           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
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.

2 participants