Skip to content

Prove cast metadata composition against reference sizes - #3777

Open
joshlf wants to merge 1 commit into
Gdbl6xaqz63ttxnug4rlquswinz6f64o6from
G3ae3zf3etbretqebdewalwfyjb4kmdpo
Open

joshlf wants to merge 1 commit into
Gdbl6xaqz63ttxnug4rlquswinz6f64o6from
G3ae3zf3etbretqebdewalwfyjb4kmdpo

Conversation

@joshlf

@joshlf joshlf commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Add an inline Rust assertion harness that selects the production cast plan,
requires checked metadata arithmetic to succeed, invokes the actual unchecked
conversion, and compares complete sizes using the independent remainder-based
reference. Cover sized-to-sized, sized-to-DST and affine DST-to-DST plans.

Prove metadata representability from the accepted plan and a complete source
size fitting usize, covering the stronger isize-bound caller domain. Retain
independent contract checks and explicit witness guards. Pointer provenance,
reference validity and KnownLayout implementations remain separate obligations.

Validation: fresh required proofs and axiom audit, all170 library tests, and
MSRV/stable/nightly and workspace Clippy checks. Both complete final models
reject an incorrect arithmetic model and a failing root assertion.

Agent-authored-by: AI agent acting on joshlf's behalf


Latest Update: v8 — Compare vs v7

📚 Full Patch History

Links show the diff between the row version and the column version.

Version v7 v6 v5 v4 v3 v2 v1 Base
v8 vs v7 vs v6 vs v5 vs v4 vs v3 vs v2 vs v1 vs Base
v7 vs v6 vs v5 vs v4 vs v3 vs v2 vs v1 vs Base
v6 vs v5 vs v4 vs v3 vs v2 vs v1 vs Base
v5 vs v4 vs v3 vs v2 vs v1 vs Base
v4 vs v3 vs v2 vs v1 vs Base
v3 vs v2 vs v1 vs Base
v2 vs v1 vs Base
v1 vs Base
⬇️ Download this PR

Branch

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

Checkout

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

Cherry Pick

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

Pull

git pull origin refs/heads/G3ae3zf3etbretqebdewalwfyjb4kmdpo

Stacked PRs enabled by GHerrit.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 5, 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-05T17:21:11.111844Z 981ac78 PR opened
🔒 Security Review ✅ Completed 2026-10-05T17:22:11.016975Z 981ac78 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.

@codecov-commenter

codecov-commenter commented Oct 5, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 58 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.50%. Comparing base (000a31f) to head (f6cb425).

Files with missing lines Patch % Lines
zerocopy/src/layout/cast_from.rs 0.00% 53 Missing ⚠️
zerocopy/src/layout/tail_transform_checks.rs 0.00% 5 Missing ⚠️
Additional details and impacted files
@@                          Coverage Diff                          @@
##           Gdbl6xaqz63ttxnug4rlquswinz6f64o6    #3777      +/-   ##
=====================================================================
- Coverage                              52.17%   51.50%   -0.67%     
=====================================================================
  Files                                     27       27              
  Lines                                   4393     4450      +57     
=====================================================================
  Hits                                    2292     2292              
- Misses                                  2101     2158      +57     

☔ 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.

@joshlf
joshlf force-pushed the G3ae3zf3etbretqebdewalwfyjb4kmdpo branch from 981ac78 to 8993d2f Compare October 5, 2026 21:12
@joshlf
joshlf force-pushed the Gdbl6xaqz63ttxnug4rlquswinz6f64o6 branch from b323a93 to afb7a9f Compare October 5, 2026 21:12
@joshlf
joshlf force-pushed the G3ae3zf3etbretqebdewalwfyjb4kmdpo branch from 8993d2f to 5c28353 Compare October 5, 2026 21:44
@joshlf
joshlf force-pushed the Gdbl6xaqz63ttxnug4rlquswinz6f64o6 branch 2 times, most recently from 071eddb to e690b10 Compare October 5, 2026 22:08
@joshlf
joshlf force-pushed the G3ae3zf3etbretqebdewalwfyjb4kmdpo branch from 5c28353 to 9d78357 Compare October 5, 2026 22:08
@joshlf
joshlf force-pushed the Gdbl6xaqz63ttxnug4rlquswinz6f64o6 branch from e690b10 to e9a0708 Compare October 6, 2026 00:32
Add an inline Rust assertion harness that selects the production cast plan,
requires checked metadata arithmetic to succeed, invokes the actual unchecked
conversion, and compares complete sizes using the independent remainder-based
reference. Cover sized-to-sized, sized-to-DST and affine DST-to-DST plans.

Prove metadata representability from the accepted plan and a complete source
size fitting usize, covering the stronger isize-bound caller domain. Retain
independent contract checks and explicit witness guards. Pointer provenance,
reference validity and KnownLayout implementations remain separate obligations.

Validation: fresh required proofs and axiom audit, all170 library tests, and
MSRV/stable/nightly and workspace Clippy checks. Both complete final models
reject an incorrect arithmetic model and a failing root assertion.

Agent-authored-by: AI agent acting on joshlf's behalf
gherrit-pr-id: G3ae3zf3etbretqebdewalwfyjb4kmdpo
@joshlf
joshlf force-pushed the G3ae3zf3etbretqebdewalwfyjb4kmdpo branch from 926083d to f6cb425 Compare October 13, 2026 16:33

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