Skip to content

Bump Kani to 0.68.0, add pre-roll Kani test, and tighten Kani proof bound - #3729

Open
joshlf wants to merge 2 commits into
mainfrom
codex/fix-failing-pr-submissions
Open

joshlf wants to merge 2 commits into
mainfrom
codex/fix-failing-pr-submissions

Conversation

@joshlf

@joshlf joshlf commented Sep 28, 2026

Copy link
Copy Markdown
Member

Motivation

  • Update the pinned kani verifier to a newer release and prevent the roll bot from opening PRs that cannot pass CI due to verifier/CLI incompatibilities.
  • Centralize the arguments used to invoke kani so the roller and CI use the same invocation.
  • Adjust a Kani proof in byte_slice.rs to reflect the verifier's pointer modeling limits so proofs remain valid.

Description

  • Bump the kani-version in .github/workflows/ci.yml from 0.60.0 to 0.68.0 and simplify the kani job args to a minimal, stable feature set including --output-format=terse and -Zfunction-contracts.
  • Add a KANI_ARGS environment variable to .github/workflows/roll-pinned-toolchain-versions.yml and add a Test Kani version step that runs model-checking/kani-github-action with the rolled version before submitting the PR.
  • Replace the use of crate::DstLayout::MAX_SIZE in zerocopy/src/byte_slice.rs with a hard upper bound of 0xFFFF_FFFF_FFFF and add a comment explaining this is due to Kani's pointer-object layout modeling.

Testing

  • The roller workflow now exercises the same kani invocation via the new Test Kani version step using model-checking/kani-github-action with KANI_ARGS to catch incompatible verifier/CLI changes before creating a PR; no logs are attached here.
  • CI will run the kani job with the updated kani-version and the standardized args after this change; no automated test output is included in this patch.

Codex Task

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 28, 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-28T15:01:38.527202Z 30cf9e1 Manual request
🔒 Security Review ✅ Completed 2026-09-28T15:03:28.298756Z 30cf9e1 Manual request

Security findings

Advisory findings (1)

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

@joshlf
joshlf enabled auto-merge September 28, 2026 14:38
@codecov-commenter

codecov-commenter commented Sep 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.64%. Comparing base (41f5b37) to head (30cf9e1).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3729   +/-   ##
=======================================
  Coverage   92.64%   92.64%           
=======================================
  Files          20       20           
  Lines        6429     6429           
=======================================
  Hits         5956     5956           
  Misses        473      473           

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

@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: 454412fbb8

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

- name: Test Kani version
uses: model-checking/kani-github-action@f838096619a707b0f6b2118cf435eaccfa33e51f # v1.1
with:
args: ${{ env.KANI_ARGS }}

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 Test the checked-out branch's Kani arguments

For the v0.7.x matrix entry, checkout replaces the worktree with that release branch, but env.KANI_ARGS remains the hard-coded value from the default branch's workflow definition. The action therefore does not exercise the invocation in the checked-out .github/workflows/ci.yml that the roller edits; if the release branch retains different or deprecated flags, this test can pass and then create a PR whose actual CI fails—the exact failure this step is intended to prevent. Derive the arguments from the checked-out branch or define them per matrix branch instead of duplicating main's current arguments here.

Useful? React with 👍 / 👎.

@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 Security Review · Automatically triggered

Here are some automated security review suggestions for this pull request.

Reviewed commit: 454412fbb8

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

# incompatible CLI or verifier changes fail the roller instead of
# repeatedly creating a PR which cannot pass CI.
- name: Test Kani version
uses: model-checking/kani-github-action@f838096619a707b0f6b2118cf435eaccfa33e51f # v1.1

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 Security Review · Automatically triggered

P2 Badge Security: Isolate the latest Kani binary from bot credentials

If the newest Kani release consumed by this action is compromised, the scheduled job automatically selects and executes it, then runs create-pull-request on the same runner with GOOGLE_PR_CREATION_BOT_TOKEN and a pull-requests: write job token. Malicious verifier code can persist or tamper with shared runner state so it executes during the later credentialed step, enabling token theft or attacker-modified bot PRs. The SemVer check and pinned wrapper authenticate neither nor isolate the selected verifier. Run Kani in a separate no-secret job, then use a fresh credentialed runner to apply only the validated version string.

Useful? React with 👍 / 👎.

@joshlf
joshlf disabled auto-merge September 28, 2026 14:48
@joshlf

joshlf commented Sep 28, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 30cf9e1f75

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

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

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

Reviewed commit: 30cf9e1f75

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 enabled auto-merge September 28, 2026 15:06
// Kani models pointers with 16 object bits, leaving 48 bits for the
// object offset. This is the largest allocation size that does not
// wrap the model's object-offset field.
kani::assume(len <= 0xFFFF_FFFF_FFFF);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@joshlf Does astra have any opinions about whether we should cfg(kani) MAX_SIZE to be 0xFFFF_FFFF_FFFF?

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants