Skip to content

D30 step 2 (part 2): runtime definitions declare their own contracts; seed nightly-20261020-local-1-e1d2b25e6d04 - #2492

Merged
ehartford merged 2 commits into
mainfrom
d30-step2-pins
Oct 20, 2026
Merged

ehartford merged 2 commits into
mainfrom
d30-step2-pins

Conversation

@ehartford

Copy link
Copy Markdown
Contributor

Completes D30 step 2 (plan §10): the @[effect] pins move from lib/std's and src/'s externs onto the rt/ definitions (with_thread_spawn, with_vec_push_str, with_vec_append_bytes), #2482's extern-inheritance is deleted (one fact, one place — the definition, which the runtime bundle's interface now carries: @[effect(fn_ptr: escape_value, ctx: escape_value)] on with_thread_spawn), and tools/rt_decl_audit.w compares pins beside types (5 divergent on main before the move, 0 here).

Found on the way: a runtime definition's pin applied after its body check was too late — spawn_os is checked before the runtime's body and read worker as consume alone. The pin is applied at declaration, as an extern's, and kept through inference; under the lane spawn_os.worker reads escape_value exactly as in the object world.

seed.lock → nightly-20261020-local-1-e1d2b25e6d04, the first seeds whose Sema accepts a pin on a runtime definition (#2488): darwin cut on the laptop (fixpoint over 16 units, :release-checks green — studio128 is gone, Eric 2026-10-20), linux-x86_64 on eric-5090, windows-x86_64 on win10 (fixpoints). linux-aarch64 held on the 10-15 release (#2490/#2491 in progress) and windows-aarch64 until the dispatched cross seed (run 39452556233, D137) is pinned. Workflow pins moved with tools/bump_seed_pins.w.

Evidence (driven by the new seed, ~/.local/with-staging/d30-step2b at d6dba2a): :seed-driver ok, :gate green, rt-decl-audit 0 divergent, :bundle-interface-tests green, lane sweeps on the release WITH_RT_IN_UNIT=1 1702/1702, 1790/1790, 283/283, with run tools/battery.w GREEN (322 s). Docs commit on top (plan §10, handoff) is outside the green key.

Eric Hartford added 2 commits October 20, 2026 09:10
…cts; seed nightly-20261020-local-1-e1d2b25e6d04

The @[effect] pins move from lib/std's and src/'s externs onto the rt/
definitions — with_thread_spawn (fn_ptr, ctx: escape_value),
with_vec_push_str (val: escape_value), with_vec_append_bytes (v: write) —
and #2482's extern-inheritance (Zcu.note_runtime_contract_extern,
Sema.runtime_contract_externs) goes: one fact in one place, the
definition, which is what the runtime bundle's interface carries.

A runtime ABI definition's pin is applied at declaration, as an extern's
pin is, and kept through the body's inference: applied only after the
body check it was too late — std.thread's spawn_os is checked before the
runtime's body, and read `worker` as consume alone, so the lane twin of
err_thread_spawn_closure_captures_ref stayed green by accident of the
inherited extern and red without it. Under the lane spawn_os.worker now
reads escape_value exactly as in the object world.

tools/rt_decl_audit.w compares @[effect] pins beside parameter types: on
the tree before this commit it reports the five pinned externs against
their unpinned definitions (the gate on deleting the externs, plan §10
correction 3); here 0 divergent over 1216 definitions.

seed.lock: nightly-20261020-local-1-e1d2b25e6d04, the first seeds whose
Sema accepts the pins on rt/ (the seed compiles rt/ for stage1): darwin
cut on the laptop (fixpoint over 16 units, :release-checks green),
linux-x86_64 on eric-5090, windows-x86_64 on win10 (fixpoints).
linux-aarch64 is held on the 10-15 release (#2490: its seed cannot
bootstrap main) and windows-aarch64 until the dispatched cross seed is
pinned (D137). Workflow pins moved with tools/bump_seed_pins.w.
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