Skip to content

Phase 6 item 6.16: navigations with a body (clazel-fetch half; ipc and kernel not done) - #177

Draft
atiernan wants to merge 20 commits into
phase6/6.14-submissionfrom
phase6/6.16-post
Draft

atiernan wants to merge 20 commits into
phase6/6.14-submissionfrom
phase6/6.16-post

Conversation

@atiernan

@atiernan atiernan commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Item 6.16, built in part: clazel-fetch and clazel-ipc are done; clazel-kernel does not handle Submit, so the item stays open and no tier changes.

clazel-fetch

  • Requests carry a method, body with content type, initiator and origin redirect-taint. Content-Type/Content-Length (Fetch 4.6 steps 6-9), Origin on non-GET/HEAD, body octets after the head, HTTP-redirect fetch step 12 (301/302 POST to GET without body; 303 all but GET/HEAD; 307/308 keep method and body, sent again), cookie context takes the method's safety and the initiator (no Lax/Strict cookies on a cross-site POST). Only GET and POST; body at most 16 MiB.
  • Spec/contracts df3f5afe unchanged except a05f847c (body_len_ok, same meaning; lemma_rewrite_plain_get). 255 verified, 0 errors; 81 mutations all certified, 0 survive; tests/conformance_post.rs 1378/1378 against a model of step 12 with rust-url. independent.rs still requires a plain GET (not widened). Four mutations whose certificates time out at 600 s were dropped.

clazel-ipc

  • Submit (tag 12, renderer to kernel: url, method, content type, body); tag 9 Navigate stays GET-only. Spec committed first (53f80793), then codec. 221 verified, 0 errors; example lemma; tests round-trip three messages and the largest that fits; 102 mutations, 102 killed with certificates, 0 survive (4 new, 2 old repaired).
  • Deviation from the plan's proposed 16 MiB: one Submit is one frame (MAX_FRAME is 1 MiB), so with a URL, method and content type of at most 8192 octets the body may be at most 1,040,320 octets (lemma_submit_fits_frame). Larger needs chunking or a larger MAX_FRAME; not done.

clazel-kernel (written 2026-11-19, NOT verified: no Verus run, sent to CI)

  • 5fa21a9a contracts first: Event::SubmitTab (declassified part of another domain's Submit, never produced by the host), declassified for Submit, statements of theorem_body_from_requester, theorem_body_sent_once, theorem_redirect_method, theorem_post_cookies.
  • 69ca8a4c executable Submit (submit_request_exec, begin_navigation_exec takes the request), SubmitTab arms and lemma_d_submit through the noninterference lemmas.
  • a4ccb60c src/body_theorems.rs (proofs: bodies_step invariant over traces, one-step facts for sends, fetch theorems at the kernel), 10 new tests/fetch.rs tests (34 pass natively; a test found that the exec frame gate let an uncommitted renderer's Submit through, fixed), 6.16 row updated.
  • Expect Verus errors in the kernel (proofs written blind). Not done: independent transcription for bodies, the four dropped fetch mutations, kernel mutations for Submit, Kani. Native: clippy clean, cargo xtask check passes. Proof jobs need approval.

Verify output

  • cargo xtask check: STATIC CHECKS PASSED; rustfmt and workspace clippy clean (clippy last run before the ipc work).
  • cargo xtask verify --part crate clazel-fetch: CRATE PART PASSED; --part crate clazel-ipc: CRATE PART PASSED.
  • Kernel: cargo verus verify 866 verified, 0 errors at be0caa3f (re-run on the committed tree; the kernel's mutations, tests and part run were not run).
  • cargo xtask verify --changed not completed (libvulkan missing in WSL for the workspace tests). CI's full verification has not run.

🤖 Generated with Claude Code

@atiernan
atiernan added this pull request to stack #175 November 16, 2026 13:22
@atiernan atiernan changed the title phase6/6.16 post Phase 6 item 6.16: navigations with a body (clazel-fetch half; ipc and kernel not done) Nov 16, 2026
atiernan and others added 15 commits November 16, 2026 23:14
…y (item 6.16)

Request-level spec: Req (method, body, initiator, redirect-taint), the
Content-Type/Content-Length fields (Fetch 4.6 steps 6 to 9), Origin on a
non-GET (Fetch "append a request Origin header"), the bytes sent with
the body after the head, HTTP-redirect fetch step 12's method and body
rewriting, the safe-method bit. Contract predicates for the exec functions
and redirect_method_rule. Additive: nothing existing changes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… rewritten (item 6.16)

A change to the contracts committed in df3f5af, justified as follows.
request/spec.rs: adds body_len_ok(n), the predicate "n <= max_request_body()",
and req_ok now calls it; its meaning is unchanged (the bound and req_ok's
value are identical for every Req). The name lets examples and a mutation
state the 16 MiB bound without building a 16 MiB sequence.
request/lemmas.rs: adds lemma_rewrite_plain_get (a plain GET is not changed by
rewrite_for_redirect), used when the transducer's independent transcription
is restricted to the pre-6.16 class. No other spec or contract text changes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ual to the spec (item 6.16)

ReqBuf/PayloadBuf, request_bytes_req(_cookie), rewrite_for_redirect (HTTP-redirect
fetch step 12), method_is_safe, req_ok_exec, each proven equal to its spec
function; 27 request examples evaluated by Verus (examples_body.rs).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ator, redirect rewriting (item 6.16)

State gains req; start_req starts any request (start is the plain GET); the
bytes sent are the head and body; a redirect rewrites the request by step 12
and sets the origin redirect-taint; the cookie context reads the method's
safety and the initiator. theorem_redirect_method, theorem_post_cookies and
theorem_sends_have_valid_req, the earlier theorems re-proven over the new
state, 19 transducer examples. independent.rs is restricted to plain GET
requests (not widened to bodies; see the phase-6 row).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…red to the new spec (item 6.16)

85 in all: 81 killed with a Verus-checked certificate, 4 killed incidentally
(their certificates evaluate a whole transducer step and time out at 600 s), 0
survive (cargo xtask mutate clazel-fetch). cookie-field-*, taint-ignored and
method-unsafe had stale find strings after the transducer moved to
request_bytes_req_cookie and a request-dependent context; they now name the
new text.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… (item 6.16)

1378 of 1378 random GET/POST redirect chains agree with a reference model of
Fetch step 12 and RFC 9110 15.4 (rust-url resolves Location); PUT and a GET
with a body are refused.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… 6.16)

Records what is built and proven in clazel-fetch and, plainly, that clazel-ipc's
Submit, the kernel and its theorems, tests/fetch.rs and the widened
independent.rs are not done.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
….16)

Tier 2 requires every mutation to be a certified kill, and cargo xtask check
failed on the four killed-incidentally entries. The mutations were killed by
the example proofs, but evaluating a whole transducer step in the mutant
exceeds the 600 s certificate limit. 81 remain, all certified.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…tem 6.16)

Tag 12, renderer to kernel: url (text), method (text), content type (bytes),
body (bytes). Tag 9 Navigate stays the GET-only form. The body's bound is the
frame's, not the proposed 16 MiB: max_submit_body (MAX_FRAME - 8192 - 64) with
a URL, method and content type of at most max_submit_head (8192) together
fits one frame (lemma_submit_fits_frame); a larger one is not sent. The
deviation from the plan's proposed size is stated in the spec and will be in
the phase-6 row. Spec only: the exec codec follows in the next commit.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ions (item 6.16)

Msg::Submit, its parse, tokens and direction, proven equal to the spec (221
verified, 0 errors); lemma_example_submit; tests round-trip three Submit
messages and the largest one that fits a frame; four mutations.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…l-ipc's Submit (item 6.16)

The earlier 6.16 commits changed clazel-fetch (State.req, lemma_begin_budget,
is_wire_request and carried take the request) without re-proving its
dependents; the kernel did not compile under Verus. This restates the wire
request statements with nav.fetch.req, gives the mutation lemma's state a
plain GET, and covers Submit in the frame well-formedness (message_texts_ok,
lemma_four). lemma_d_kill got a spinoff prover and an rlimit of 60: its proof
exceeded the default after the new message variant. Kernel: 866 verified, 0
errors. Submit itself is not handled yet (handle_message ignores it).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… open (item 6.16)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… 102 of 102 killed (item 6.16)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…em 6.16)

begin_navigation takes the request; submit_request and submit in spec.rs;
Submit arms added beside Navigate's in the lemmas. Not finished: noninterference
(domain.rs, ni_theorem.rs, unwinding_d.rs) and exec not done; verification not
completed.
The differential has no Miri stride, and PR #177's Miri job hit its
6-hour limit. Every seed still runs in the normal test job; the
coverage floors divide by the stride (docs/VERIFICATION.md, Miri).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…em 6.16)

Every 25th seed still took 1054 s under Miri, about 13 s for each case
compared. Under Miri the test now runs the first case of each of five
kinds (a GET; a POST without a body; one with a body answered at once;
one whose body a redirect sends again; one whose body a redirect drops),
read from the script alone. The normal test job still runs all 6000
seeds (1378 compared, all agree).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
atiernan and others added 3 commits November 18, 2026 12:41
…declassification, the body theorems' statements (item 6.16)

Spec only, before the proofs (CLAUDE.md rule 3): Event::SubmitTab (the
declassified part of another domain's Submit, never produced by the host),
its step arm, declassified for Submit, user_tabs_open/kept_event for it, and
the statements of theorem_body_from_requester, theorem_body_sent_once,
theorem_redirect_method and theorem_post_cookies at the kernel.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… noninterference and frame lemmas (item 6.16)

begin_navigation_exec takes the request (the three old callers pass the
GET); handle_message_exec builds submit_request_exec and starts the same
navigation as the spec's submit. lemma_d_submit and the Submit branch of
lemma_navigate_declassify (with lemma_declassified_is_submit_tab) carry the
declassified SubmitTab through the unwinding lemmas; a SubmitTab arm beside
every NavigateTab arm. clazel-fetch: is_get and is_post are pub (visibility
only). Not verified: sent to CI.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ills an uncommitted Submit (item 6.16)

body_theorems.rs: bodies_step invariant chained along traces
(theorem_body_from_requester), theorem_body_sent_once,
theorem_redirect_method, theorem_post_cookies. ends_with replaces an exists
in the statement. tests/fetch.rs: 10 Submit tests (Miri branches sized
small). Not run through Verus: sent to CI. 6.16 row updated honestly.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…Miri and changed-crate CI)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch is waiting to be deployed

1 waiting deployment
full-verification — 560f2fb4 Waiting Nov 20, 2026 by atiernan via Approve the proofs #588
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.

1 participant