Skip to content

seed interpreter: withdraw the spelling-admitted, label-blind PureCallMemo - #13614

Closed
briansrls wants to merge 2 commits into
mainfrom
seed-pure-call-binding
Closed

briansrls wants to merge 2 commits into
mainfrom
seed-pure-call-binding

Conversation

@briansrls

@briansrls briansrls commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Roadmap: seed-pure-call-binding (D15 census #9).

Defect, executed

v1_interpreter.rs PureCallMemo admitted calls by function spelling: content_hash, well_formed, locally_well_formed, fold_node, fold_node_content_hash, node_subtree_count.

  • Key: the function node plus each argument's allocation identity in source order. Argument labels were dropped.
  • Hit path: a hit returned before call_function bound or validated anything.

New claim module v2.test.claim.interpreter.pure_call_binding. Its subject is a supplied well_formed(a: List<Int>, b: List<Int>) -> List<Int> { a } with two retained lists.

Claim main this PR
swapped_labels_bind_their_own_parameters_holds: well_formed(a: x, b: y) then well_formed(b: x, a: y) must give [1] then [2] FAIL (second call served the first result) PASS
swapped_labels_bind_under_an_unrostered_spelling_holds: same body as first_formal PASS PASS
an_identical_repeat_answers_the_same_value_holds: positive control PASS PASS

Repair: withdraw the tier, don't re-key it

A spelling is not purity evidence, so adding labels to the key would still leave an unproved admission. The eval-frame memo one tier down already serves pure named calls:

  • it is eval_pure_named_call, on by default;
  • it is reached only by functions with no uses, so effectful functions never get there;
  • it verifies argument names and values (eval_call_memo_args_match) before a hit.

So PureCallMemo is deleted: the struct, the context field, its memory accounting, key/get/put, is_structural_pure_fn, and the serve in eval_call. gunbc.plans.fail_closed_lockdown records the withdrawal in its §3 table, its warm==cold paragraph, its suspected-root paragraph and its content-key task; that plan has no committed projection.

Warmed invalid-label refusal: I tried to write this control and it is not authorable as accepted source. The direct-call shape wall refuses at resolve (no parameter named 'c' (declared: [a, b])), so no accepted program reaches the runtime bypass that a hit could have skipped.

What still serves before binding: the eval-frame memo can return a result before call_function binds. It does so only after eval_call_memo_args_match has matched every stored argument's label and value against the call, so a call with different labels is a miss, not a hit.

Cost: these six producers now go through the eval-frame memo. Its key hashes argument content, memoized per allocation, instead of reading a pointer. I did not measure a wall-time difference.

Evidence (local, runtime change at 6367a86; the follow-up commit edits plan text only)

  • cargo fmt --all --check OK; cargo clippy --all-targets -- -D warnings OK.
  • The three claims above: claim_batch PASS. On main's seed (same claim file), the swapped-label claim FAILS.
  • Witnesses lane (claim_executor --required-ci --required-lane witnesses):
    • the floor planned all three claims as changed witnesses, and all planned-and-passed;
    • 16 wet refusals, the same baseline as main: mtcollins1_kvm_observer_protocol_wet_witness ×7 and allocation_client_execution_wet_witness ×8, which are local host refusals, plus v41_source_patch_converge_witness red5, cause unresolved.

Not in this PR

Seed retirement and any seed-wide materialization policy stay with their owners. The eval-frame memo's own admission (every uses-free function) is unchanged here.

🤖 Generated with Claude Code

…lMemo

PureCallMemo admitted calls by function spelling (content_hash, well_formed,
locally_well_formed, fold_node, fold_node_content_hash, node_subtree_count) and keyed
them on the function node plus each argument's allocation identity in source order,
dropping argument labels. Its hit returned before call_function bound or validated
anything, so f(a: x, b: y) then f(b: x, a: y) with the same retained x and y was
served the first result. Reproduced on main by
v2.test.claim.interpreter.pure_call_binding swapped_labels_bind_their_own_parameters_holds
(FAIL on main, PASS here); the same body under an unrostered spelling binds correctly
on both.

The tier is deleted, not re-keyed: a spelling is not purity evidence, and the
eval-frame memo one tier down (eval_pure_named_call, default on, reached only by
functions with no `uses`) already serves pure named calls and verifies argument
names and values (eval_call_memo_args_match) before a hit. The fail-closed lockdown
plan's row for pure_call_memo_key now records the withdrawal.

A warmed invalid-label call is not authorable as accepted source: the call-shape
wall refuses an unknown label at resolve ("no parameter named 'c'"), so no accepted
program reaches the runtime bypass that the deleted hit could have skipped.

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

chatgpt-codex-connector Bot commented Oct 9, 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-09T05:28:24.709026Z 6367a86 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.

@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: 6367a86229

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

alignments: [AlignNone, AlignNone, AlignNone],
rows: [
row(cells: [cell(text: "`v1_interpreter.rs` `pure_call_memo_key`"), cell(text: "key-by-address"), cell(text: "keys on `Rc::as_ptr`, not content → stale hit on realloc; structurally-equal args miss")]),
row(cells: [cell(text: "`v1_interpreter.rs` `pure_call_memo_key` (withdrawn)"), cell(text: "key-by-address, label-blind, admitted by spelling"), cell(text: "keyed on `Rc::as_ptr` in source order without argument labels, so swapped-label calls were served the first result (`v2.test.claim.interpreter.pure_call_binding`); the tier is deleted and pure named calls are served only by the eval-frame memo, which verifies names and values")]),

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 Retire the remaining PureCallMemo plan entries

This row now records the cache as withdrawn, but the same authority still says at lines 51 and 55 that pure_call_memo remains live with an address-keyed flake surface, while line 71 retains an unchecked task to kill that address key. After this commit deletes the cache, readers of the lockdown plan receive mutually exclusive current states and may schedule work against a nonexistent tier; update those remaining entries to describe the replacement eval-frame memo or mark the work complete.

Useful? React with 👍 / 👎.

…tements with its withdrawal

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

gunbai-bot Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Closed without folding in the v1 closeout bankruptcy (#13641). A seed-interpreter fix; the interpreter isn't part of the one retained seed emission. Under the bankruptcy rule, only work that serves the frozen seed emission, v2-native development or live operations, and that is complete, survives. The branch is kept for archaeology; no follow-up obligation is created. — sent from neat-wolf-604

@gunbai-bot gunbai-bot Bot closed this Oct 9, 2026
@gunbai-bot gunbai-bot Bot mentioned this pull request Oct 10, 2026
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