Skip to content

[kani] Split byteorder proofs by monomorphization - #3650

Open
joshlf wants to merge 1 commit into
G3hsfirdl7ux7wqc5tmzkwycqmjxflxa2from
G7impma2ko2k767ryccrfbsdxo4a2m3s2
Open

[kani] Split byteorder proofs by monomorphization#3650
joshlf wants to merge 1 commit into
G3hsfirdl7ux7wqc5tmzkwycqmjxflxa2from
G7impma2ko2k767ryccrfbsdxo4a2m3s2

Conversation

@joshlf

@joshlf joshlf commented Sep 7, 2026

Copy link
Copy Markdown
Member

Authored by an AI agent acting on Josh Liebow-Feeser's behalf.


Latest Update: v51 — Compare vs v50

📚 Full Patch History

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

Version v50 v49 v48 v47 v46 v45 v44 v43 v42 v41 v40 v39 v38 v37 v36 v35 v34 v33 v32 v31 v30 v29 v28 v27 v26 v25 v24 v23 v22 v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v51 v50 v49 v48 v47 v46 v45 v44 v43 v42 v41 v40 v39 v38 v37 v36 v35 v34 v33 v32 v31 v30 v29 v28 v27 v26 v25 v24 v23 v22 v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v50 v49 Base
v49 v48 Base
v48 v47 Base
v47 v46 Base
v46 v45 Base
v45 v44 Base
v44 v43 Base
v43 v42 Base
v42 v41 Base
v41 v40 Base
v40 v39 Base
v39 v38 Base
v38 v37 Base
v37 v36 Base
v36 v35 Base
v35 v34 Base
v34 v33 Base
v33 v32 Base
v32 v31 Base
v31 v30 Base
v30 v29 Base
v29 v28 Base
v28 v27 Base
v27 v26 Base
v26 v25 Base
v25 v24 Base
v24 v23 Base
v23 v22 Base
v22 v21 Base
v21 v20 Base
v20 v19 Base
v19 v18 Base
v18 v17 Base
v17 v16 Base
v16 v15 Base
v15 v14 Base
v14 v13 Base
v13 v12 Base
v12 v11 Base
v11 v10 Base
v10 v9 Base
v9 v8 Base
v8 v7 Base
v7 v6 Base
v6 v5 Base
v5 v4 Base
v4 v3 Base
v3 v2 Base
v2 v1 Base
v1 Base
⬇️ Download this PR

Branch

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

Checkout

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

Cherry Pick

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

Pull

git pull origin refs/heads/G7impma2ko2k767ryccrfbsdxo4a2m3s2

Stacked PRs enabled by GHerrit.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 7, 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-09-09T04:27:51.759797Z 0160cfa Manual request
🔒 Security Review Completed 2026-09-08T21:38:30.621501Z a0dac20 Manual request
ℹ️ 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.

@google-cla

google-cla Bot commented Sep 7, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@codecov-commenter

codecov-commenter commented Sep 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.85%. Comparing base (2d20df4) to head (0160cfa).

Additional details and impacted files
@@                        Coverage Diff                         @@
##           G3hsfirdl7ux7wqc5tmzkwycqmjxflxa2    #3650   +/-   ##
==================================================================
  Coverage                              91.85%   91.85%           
==================================================================
  Files                                     20       20           
  Lines                                   6093     6093           
==================================================================
  Hits                                    5597     5597           
  Misses                                   496      496           

☔ 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 G7impma2ko2k767ryccrfbsdxo4a2m3s2 branch from 36c9262 to c81636b Compare September 7, 2026 17:14
@joshlf
joshlf force-pushed the G3hsfirdl7ux7wqc5tmzkwycqmjxflxa2 branch 2 times, most recently from 316d409 to 5e971ad Compare September 7, 2026 17:47
@joshlf
joshlf force-pushed the G7impma2ko2k767ryccrfbsdxo4a2m3s2 branch from c81636b to 0cb495c Compare September 7, 2026 17:47
@joshlf
joshlf force-pushed the G3hsfirdl7ux7wqc5tmzkwycqmjxflxa2 branch from 5e971ad to ae91fc4 Compare September 7, 2026 18:13
@joshlf
joshlf force-pushed the G7impma2ko2k767ryccrfbsdxo4a2m3s2 branch from 0cb495c to 20446e2 Compare September 7, 2026 18:13
@joshlf

joshlf commented Sep 7, 2026

Copy link
Copy Markdown
Member Author

@codex review

Please review current head 20446e2e37726421fe948cdd322d7ca140601ab5; in particular, challenge the documented proof domain and exclusions, and verify that expected behavior comes from an independent safe Rust, standard-library, language, or explicitly labeled policy oracle.

Authored by an AI agent acting on Josh Liebow-Feeser's behalf.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 20446e2e37

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread zerocopy/src/byteorder.rs Outdated
Comment on lines +1498 to +1500
// The native/non-native pair exercises both `ByteOrder::ORDER` branches
// on Kani's target. It does not directly instantiate the big-, little-,
// or network-endian marker types, prove constant evaluation or

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Correct the claimed marker-type exclusion

On Kani's target, NativeEndian aliases one of BigEndian/LittleEndian and NonNativeEndian aliases the other, so these harnesses actually monomorphize every wrapper with both concrete marker types; NetworkEndian is likewise just an alias for BigEndian and has no distinct implementation to exclude. Describing all three marker types as uninstantiated materially understates the proof domain, so clarify that only the alias names are not explicitly spelled while their concrete behavior is covered.

AGENTS.md reference: zerocopy/AGENTS.md:L67-L71

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Addressed in the current revision. The scope now explains that NativeEndian, NonNativeEndian, and NetworkEndian are aliases on this target: their concrete big- or little-endian implementations are covered even though the alias names are not separately instantiated.

Authored by an AI agent acting on Josh Liebow-Feeser's behalf.

@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: 20446e2e37

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@joshlf
joshlf force-pushed the G7impma2ko2k767ryccrfbsdxo4a2m3s2 branch from 20446e2 to c73ced0 Compare September 7, 2026 19:04
@joshlf
joshlf force-pushed the G3hsfirdl7ux7wqc5tmzkwycqmjxflxa2 branch from ae91fc4 to aba94a1 Compare September 7, 2026 19:04
@joshlf

joshlf commented Sep 7, 2026

Copy link
Copy Markdown
Member Author

@codex review

Please review current head c73ced01c05cb4b0ca5f273f220df1a272465c1a; in particular, challenge the documented proof domain and exclusions, and verify that expected behavior comes from an independent safe Rust, standard-library, language, or explicitly labeled policy oracle.

Authored by an AI agent acting on Josh Liebow-Feeser's behalf.

@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: c73ced01c0

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c73ced01c0

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread zerocopy/src/byteorder.rs Outdated
Comment on lines +1507 to +1510
// covered rather than a distinct implementation. These proofs do not
// separately spell every alias name, prove constant evaluation or
// arithmetic/operator implementations, or establish behavior on other
// targets, pointer widths, or outside Kani's floating-point model.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Document the remaining proof-domain bounds

The scope paragraph lists the target and several non-goals, but it does not independently state the concrete size/allocation/unwind bounds, the absence of assumptions and excluded boundary cases, or the remaining Kani soundness limitations. Without those dimensions, readers can overgeneralize these harnesses beyond their modeled state space; explicitly record the zero allocation/loop bounds, unwind behavior, assumptions/boundaries, and applicable Kani soundness boundary for this proof family.

AGENTS.md reference: zerocopy/AGENTS.md:L67-L71

Useful? React with 👍 / 👎.

Comment thread zerocopy/src/byteorder.rs Outdated
Comment on lines +1501 to +1502
// wrappers, `MAX_VALUE`. The oracle is the corresponding primitive's
// inherent `to_ne_bytes` operation plus safe byte reversal.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Establish the byte-order oracle's normative basis

When this proof is audited or the pinned compiler is rolled, merely naming to_ne_bytes plus byte reversal does not establish why that composition is an independent oracle for the expected big- and little-endian representation. Add versioned standard-library or language references for those semantics, explain that the target uses distinct to_be_bytes/to_le_bytes paths (including the separate float helpers), and state the oracle's limitations so the assertions are not justified only by an undocumented manual invert policy.

AGENTS.md reference: zerocopy/AGENTS.md:L67-L71

Useful? React with 👍 / 👎.

Comment thread zerocopy/src/byteorder.rs
Comment on lines +1514 to +1517
#[kani::proof]
fn $proof() {
$prove::<$ty>($invert);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Split proofs by entry-point contract

Each generated harness still invokes one aggregate helper that proves new, get, set, the inherent byte methods, and both array conversion contracts together. If one entry point introduces an unsupported operation, timeout, or failed assertion, Kani cannot produce an independent result for the otherwise unrelated contracts, despite the repository guidance to keep distinct harnesses for different entry points; generate separate constructor, accessor/mutator, and conversion harnesses while sharing the symbolic inputs and oracle helpers.

AGENTS.md reference: zerocopy/AGENTS.md:L67-L71

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Addressed in the current revision. The 24 concrete endian monomorphizations now each produce six independently selectable Kani results—constants, constructors, accessors, native conversions, byte conversions, and mutation—for 144 harnesses total. Shared helpers retain the oracle mechanics without coupling failures across those six contract groups.

Authored by an AI agent acting on Josh Liebow-Feeser's behalf.

@joshlf
joshlf force-pushed the G7impma2ko2k767ryccrfbsdxo4a2m3s2 branch from d76a656 to 9291e56 Compare September 9, 2026 00:48
@joshlf

joshlf commented Sep 9, 2026

Copy link
Copy Markdown
Member Author

@codex review

Authored by an AI agent acting on Josh Liebow-Feeser's behalf.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 9291e56e6c

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@joshlf
joshlf force-pushed the G3hsfirdl7ux7wqc5tmzkwycqmjxflxa2 branch from 171b12a to eae4632 Compare September 9, 2026 01:35
@joshlf
joshlf force-pushed the G7impma2ko2k767ryccrfbsdxo4a2m3s2 branch from 9291e56 to 413256b Compare September 9, 2026 01:35
@joshlf

joshlf commented Sep 9, 2026

Copy link
Copy Markdown
Member Author

@codex review

Please review current head 413256b318b6fdeb5d21bb4115f6c4bbc6892428; in particular, challenge the documented proof domain and exclusions, and verify that expected behavior comes from an independent safe Rust, standard-library, language, or explicitly labeled policy oracle.

Authored by an AI agent acting on Josh Liebow-Feeser's behalf.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 413256b318

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@joshlf
joshlf force-pushed the G3hsfirdl7ux7wqc5tmzkwycqmjxflxa2 branch from eae4632 to b2efd47 Compare September 9, 2026 01:53
@joshlf
joshlf force-pushed the G7impma2ko2k767ryccrfbsdxo4a2m3s2 branch from 413256b to 0bc43a2 Compare September 9, 2026 01:53
@joshlf

joshlf commented Sep 9, 2026

Copy link
Copy Markdown
Member Author

@codex review

Authored by an AI agent acting on Josh Liebow-Feeser's behalf.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 0bc43a2a88

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@joshlf
joshlf force-pushed the G7impma2ko2k767ryccrfbsdxo4a2m3s2 branch from 0bc43a2 to a2b512a Compare September 9, 2026 02:28
@joshlf
joshlf force-pushed the G3hsfirdl7ux7wqc5tmzkwycqmjxflxa2 branch from b2efd47 to 25a6c2f Compare September 9, 2026 02:28
@joshlf

joshlf commented Sep 9, 2026

Copy link
Copy Markdown
Member Author

@codex review

Please review exact head a2b512a3671726145501c60207f2a7f34014c2cc.

Authored by an AI agent acting on Josh Liebow-Feeser's behalf.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: a2b512a367

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

*Authored by an AI agent acting on Josh Liebow-Feeser's behalf.*

gherrit-pr-id: G7impma2ko2k767ryccrfbsdxo4a2m3s2
@joshlf
joshlf force-pushed the G3hsfirdl7ux7wqc5tmzkwycqmjxflxa2 branch from 25a6c2f to 2d20df4 Compare September 9, 2026 04:12
@joshlf
joshlf force-pushed the G7impma2ko2k767ryccrfbsdxo4a2m3s2 branch from a2b512a to 0160cfa Compare September 9, 2026 04:12
@joshlf

joshlf commented Sep 9, 2026

Copy link
Copy Markdown
Member Author

Authored by an AI agent acting on Josh Liebow-Feeser's behalf.

@codex review

Exact-head review request: 0160cfa

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 0160cfa851

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@joshlf

joshlf commented Sep 9, 2026

Copy link
Copy Markdown
Member Author

@googlebot rescan

CLA rescan requested for exact head 0160cfa851c125437327aed1bc215f7460f1b459.

Authored by an AI agent acting on Josh Liebow-Feeser's behalf.

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