Skip to content

Model referent validity as byte-domain inclusion - #3887

Open
joshlf wants to merge 1 commit into
Gmhd5pbk4jan7lwabm442fdhchwui6nnrfrom
Gkc7ajwbs2rni7qu5gz3sdcm7457o6iuf
Open

joshlf wants to merge 1 commit into
Gmhd5pbk4jan7lwabm442fdhchwui6nnrfrom
Gkc7ajwbs2rni7qu5gz3sdcm7457o6iuf

Conversation

@joshlf

@joshlf joshlf commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Add a shared algebra for uninitialized, initialized, and safe referent
contents at an explicit byte width. Safe contents must pass both physical
and mathematical decoding. This permits empty valid domains without an
inhabitedness premise or a preferred representation.

Prove the basic weakening, completeness, wrapper-domain, and initialized
subrange rules. Transfers are conditional on equal endpoint widths, so
composition also requires equal source and intermediate widths. Add a
counterexample protecting that premise, plus invalid-boolean and empty-type
tests. These are content facts; memory access and resource obligations
remain separate.

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


Latest Update: v4 — Compare vs v3

📚 Full Patch History

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

Version v3 v2 v1 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/Gkc7ajwbs2rni7qu5gz3sdcm7457o6iuf && git checkout -b pr-Gkc7ajwbs2rni7qu5gz3sdcm7457o6iuf FETCH_HEAD

Checkout

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

Cherry Pick

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

Pull

git pull origin refs/heads/Gkc7ajwbs2rni7qu5gz3sdcm7457o6iuf

Stacked PRs enabled by GHerrit.

@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-15T19:05:39.242607Z f6bb2df PR opened
🔒 Security Review ✅ Completed 2026-10-15T19:09:21.118733Z f6bb2df PR opened

Security findings

Finding details are still loading. Check the individual review comments.

ℹ️ 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
@codecov-commenter

codecov-commenter commented Oct 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 48.89%. Comparing base (394b6d6) to head (04257d4).

Additional details and impacted files
@@                        Coverage Diff                         @@
##           Gmhd5pbk4jan7lwabm442fdhchwui6nnr    #3887   +/-   ##
==================================================================
  Coverage                              48.89%   48.89%           
==================================================================
  Files                                     34       34           
  Lines                                   4733     4733           
==================================================================
  Hits                                    2314     2314           
  Misses                                  2419     2419           

☔ 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: f6bb2dfad2

ℹ️ 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 anneal/lean/Rust.lean
import Rust.Pointer
import Rust.Bytes
import Rust.Storage
import Rust.Referent

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 Add Referent to the axiom-audit roster

When Rust is audited, RustTests.lean:66 selects declarations strictly by their defining module, but its libraryModules roster omits Rust.Referent. Consequently, every library declaration introduced by this import is skipped, so a later sorryAx or other forbidden assumption in Referent.lean could pass the required full-library audit; add the new module to that roster.

AGENTS.md reference: anneal/AGENTS.md:L11-L13

Useful? React with 👍 / 👎.

@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 introduces a new module Rust.Referent and its corresponding tests in Rust.ReferentTests. The new module defines referent states (uninit, initialized, and safe) along with the Transfer relation describing directional inclusion of domains when widths agree. It also includes several theorems proving properties about these states, transfers, and initialization preservation under slicing and splicing. I have no feedback to provide as there are no review comments.

@joshlf
joshlf force-pushed the Gmhd5pbk4jan7lwabm442fdhchwui6nnr branch from f2aa9ee to a11d390 Compare October 15, 2026 19:25
@joshlf
joshlf force-pushed the Gkc7ajwbs2rni7qu5gz3sdcm7457o6iuf branch from f6bb2df to 04e750c Compare October 15, 2026 19:25
Add a shared algebra for uninitialized, initialized, and safe referent
contents at an explicit byte width. Safe contents must pass both physical
and mathematical decoding. This permits empty valid domains without an
inhabitedness premise or a preferred representation.

Prove the basic weakening, completeness, wrapper-domain, and initialized
subrange rules. Transfers are conditional on equal endpoint widths, so
composition also requires equal source and intermediate widths. Add a
counterexample protecting that premise, plus invalid-boolean and empty-type
tests. These are content facts; memory access and resource obligations
remain separate.

gherrit-pr-id: Gkc7ajwbs2rni7qu5gz3sdcm7457o6iuf
Agent-authored-by: AI agent acting on joshlf's behalf

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