Repository navigation
D30 step 2 (part 1): a declared @[effect] pin is interface material; on a runtime ABI definition it is the declared contract - #2488
Merged
Conversation
added 2 commits
October 20, 2026 08:21
…ime ABI definition it is the declared contract The runtime bundle (D30 R3) compiles the runtime alone, so a contract no type spells — what with_thread_spawn retains through fn_ptr and ctx — must be on the definition for the interface to carry it (plan §10, correction 3). Three pieces, none needing a seed: - Sema: an `@[effect]` pin on a runtime ABI definition in a runtime module is its declared contract, applied as the extern's is in the object world (#2481's rule, back); on any other bodied function the pin stays the §16.3d checked contract. - The interface: the emitter prints a declaration's pins as the parser reads them (`@[effect(ctx: escape_value)]`) on fns and externs instead of refusing them, the fingerprint row carries the pinned bits in place of the type's declared effect, and the interface twin applies a pin as an extern's (apply_interface_declared_effects). - The harness: wi_demo gains a pinned extern and a pinned fn; the .wi regenerates byte for byte, the twin's fingerprint agrees, a dropped pin is a fifth mutation that changes it, and a consumer handing the pinned extern a closure holding a view of its frame (spawn_os's shape) is refused from the interface alone. Moving the pins from the std externs onto the runtime definitions needs a seed carrying this rule (the seed compiles rt/ for stage1): the next PR, with seed.lock.
…; the interface prints it and the fingerprint carries it (D30 step 2)
This was referenced Oct 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
D30 R3 step 2, the part that needs no seed (plan §10, correction 3: a bundle compiles the runtime alone, so a contract must be on the definition for the interface to carry it).
@[effect]pin on a runtime ABI definition in a runtime module is its declared contract, applied as the extern's is in the object world (D30: spec/internals/compile_errors under the lane; facade domains, comptime and declared runtime pins #2481's rule, back); elsewhere a pin stays the §16.3d checked contract.@[effect(ctx: escape_value)]) on fns and externs instead of refusing them; the fingerprint row carries the pinned bits; the twin applies a pin as an extern's.wi_demogains a pinned extern and a pinned fn — the.wiregenerates byte for byte, the twin's fingerprint agrees, a dropped pin is a fifth mutation that changes it, and a consumer handing the pinned extern a closure holding a view of its frame (spawn_os's shape) is refused from the interface alone.wo_bundles.md.Part 2 (next PR, with
seed.lock): cut a seed carrying the rule, move the pins fromlib/stdexterns onto thert/definitions, delete #2482's extern-inheritance, and extendrt_decl_auditto compare pins.Evidence (seed-driven, ~/.local/with-staging/d30-step2, same tree as 08ff63eab):
:gategreen,:bundle-interface-testsgreen, lane sweeps on the releaseWITH_RT_IN_UNIT=11702/1702, 1790/1790, 283/283,with run tools/battery.wGREEN (243 s). The docs commit is outside the green key (D49).