Skip to content

Design verona regions

Eric Stern edited this page Nov 17, 2026 · 44 revisions

Memory safety from Project Verona (Reggio regions + services on cowns)

Design issue: #30 — the ruling that binds.

STATUS: STAGES S0–G LANDED (G 989d7182a1); the model loop is CLOSED at core-m3w-fa25 (red team AR clean); specs/model-*.md follow fa25 (c7e1f48a38); compiler agreement is open, tracked on #235, #243, #244, #245, #246, #232, #233 and the issues filed from N5; remaining: closing items, then Release

Context

Maxon's safety work has failed twice on edge cases:

  1. The inferred write and provenance machinery (StorageProvenance.maxon at 11,234 lines, EffectSummary, the parameter-mutation masks, the E3078/E3159/E3188/E3138 checks at send) took 13 review rounds and opened new holes each round.
  2. The Pony-style declared capability design was sound in capmodel but needed 11–16k markers. It was cancelled on 2026-10-24.

The root cause in both was that capabilities sat on bindings, and let was forced to mean deep immutability. Every unannotated position then needed whole-program provenance.

The goal is a sound model built from Project Verona: the Reggio static region type system (OOPSLA'23, arxiv 2309.02983) and behaviour-oriented concurrency (BoC, OOPSLA'23), with Maxon's services kept as the surface. Single-threaded code needs no markers.

This revision folds in two rounds of independent reviews (soundness, implementation feasibility, consistency; then a second soundness red team and an accuracy review); "Review findings" at the end maps each finding to where it is answered.

Rulings (user, 2026-10-24)

  1. let means "cannot be reassigned" only. Deep immutability becomes immutable (frozen). Only immutable can be image data. This reverses project_a_let_is_immutable_at_every_depth and project_a_let_is_image_data.

  2. Static Reggio types, with no run-time safety checks. Every rule is a compile-time error. Reggio's one dynamic check (entering a region that is already open) is made static by two rules: opening, swapping, sending or freezing a region needs a writable reference to what holds it (everything outside an open block is read-only, so an open region cannot be reached again), and no other coroutine runs while a region is open: inside a modify block (or one-call open) every wait on another party (ruling 5's list, message-reply awaits included), every coroutine await, every acquire, and every call whose inferred may-wait or may-yield bit is set are refused; and while the block is open the runtime does not switch to a sibling coroutine of the same green thread (I/O such as print or a file read simply blocks the strand for the block). Releases never yield (destructors close OS handles synchronously). The runtime open bit is not needed.

  3. The actor model stays. spawn, services and export messages remain the surface. Each service is implemented as a Verona cown whose state is a closed region; each message is a behaviour on that one cown.

  4. Parameter capabilities are inferred, with no marker. Each unmarked parameter (and an omitted receiver) is a capability variable κ, and the body is checked once against it under Reggio's rule that assignment needs equal capabilities. The body's uses decide one of three outcomes:

    • any capability (mutable, read-only or immutable argument): the body only reads it during the call;
    • mutable only: the body writes through it, opens/swaps/freezes/merges an isolated value reached from it, passes it or a field of it by reference (a mutable value-type, isolated or unique parameter) or to a mutable-only parameter, stores it, captures it, or hands it to a callee whose parameter is mutable-only;
    • immutable only: the body passes it to an immutable parameter, a message argument of immutable type, calls an immutable self method or requirement on it, or stores it into frozen data.

    A capture's capability is written, never inferred (user, 2026-10-29): a closure that needs a captured parameter frozen (to call an immutable self method on it, say) captures a parameter declared immutable.

    A body that needs both mutable and immutable is refused. A result reached from a parameter takes that argument's capability only if every return path fits it; a path returning a fresh value, a module let or another parameter's data fixes κ instead (or is refused). These are per-parameter and per-function facts, computed as one joint least fixpoint over the call graph's strongly connected components. Interface requirements and function-type parameters are not inferred across the program: they are read-only unless declared mutable self / mutable T (ruling 19). Reggio has no read-only supertype ("If a mut and paused could alias, the immutability of the latter would be weakened to read-only"), so an any-capability parameter is a capability parameter: one capability per call, checked once, compiled once (counts are routed at run time by box kind). There is no any keyword.

    Maxon's current read-only binding keyword is removed (its uses become let).

  5. No waiting while holding. Code that holds services (a message body, an acquire block) may not wait on another party: no await of a message reply or of a promise of unknown origin, no acquire, no send with a nonzero sendTimeout: (ForeverMs or finite), no shutdown that waits, no latch, registry or default-key wait, and no async of — or await of — a coroutine that may do any of these. Request/response from inside a service becomes "send, and handle the reply in another message". This is BoC's own rule, and it makes deadlock impossible by construction.

  6. The may-wait and may-yield facts are inferred, with no marker (no function colouring). One bit each per function over the call graph, computed from the conservative side (a function in a recursive group is assumed to wait until shown otherwise). May wait: the function waits on another party (ruling 5's list) or calls one that may. May yield: the function awaits a coroutine, or calls one that may yield or may wait. I/O is neither: it parks the green thread, never switching it to a sibling coroutine inside a block.

  7. Coroutines share the caller's region, under structured rules. async may take mutable arguments. Such a promise is tied: it lives only in a local (no field or container holds it), cannot be returned, captured or sent, and is drained by an unconditional consuming await before the function returns; passing it to a parameter the callee keeps counts as storing it and is refused. Every path out of the function, a throw, an early return and a propagating try included, must first await or .cancel() each tied promise still live there, or it is a compile error; there is no implicit join (user, 2026-11-03). .cancel() on a tied promise stops the coroutine starting any new far-end wait and then waits for it to finish, discarding its result, so no tied coroutine outlives its caller. Every promise held in a local, tied or not, is must-use (user, 2026-11-03: forgetting one is a logic error). On every path it is awaited, cancelled, stored, returned or passed on. Dropping it at scope exit, overwriting it, or discarding it with _ = is a compile error. The one exception is a service message's reply discarded with _ = (_ = try h.say("a")), which is an explicit fire-and-forget: the message is still delivered (user, 2026-11-03); _ = async f() stays refused. A promise inside a container or field is still cancelled with its container at run time. An async given data opened by a modify block is refused. Inside a modify block and inside an acquire block, async, a coroutine await and any call whose may-yield bit is set are refused: code that holds a region open or holds services neither waits nor yields. HoldResolution keeps holds across every call that may yield. An acquire parks only the coroutine that makes it, not its whole green thread.

  8. The receiver's capability may be declared as a first parameter where inference cannot express it: function submitTo(immutable self, …) exists only on frozen values. Omitted, the receiver is inferred (ruling 4). A name is never overloaded (ruling 31), so a method exists once, whatever its self capability.

  9. paused is never written. The compiler infers it inside a modify or acquire block; read-only parameters accept it; diagnostics say "read-only while '' is open".

  10. The block that opens an isolated value for changes is modify x 'label' … end 'label' (Reggio's enter). Inside, x (a local, parameter or field path) keeps its name and is writable; everything else is read-only except block locals, new objects and outer value-typed vars. There is no second name. Only the region's contents are writable: the slot holding x cannot be reassigned or passed by reference inside its own block. Any call that passes an isolated value in an unmarked position — as receiver or as argument — opens it for that call expression: every other argument must be a value, immutable or a moved isolated, two isolated values in one such call are refused, and the result leaving the call must be a value, immutable or a fresh isolated (so self.index.first().text = "x" is refused; write it inside modify). Likewise any statement that reads or writes through an un-opened isolated value (lines.count(), job.number = 4, let n = job.number) opens it for that one statement under the same rules: one isolated root per statement, nothing but values, immutable and fresh isolated data leaves it, and outer data is read-only in it. For an if or while the open covers the condition alone; a for or match over the value opens it for the whole statement, because its head lends the value's parts to the body.

  11. An element of a container of isolated values is reached only inside a block. modify jobs.get(0) 'l' … end 'l', a one-call open, or a for over the container lends the element for that span, and the container is read-only for the span; a bare let j = jobs.get(0) is an isolated read without a block. remove, pop and swap take an element out. A match on a union with an isolated payload lends the payload within the arm as an un-opened isolated value: it is opened like an isolated local, never moved or assigned, and taken out only by swap. (Ruling 43: for unique, non-isolated elements the container stays read-only for the span as a rule about the container alone; no window opens.)

  12. Atomic updates across services: the acquire block (Verona's when, renamed): acquire a, b 'move' … end 'move' otherwise 'stopped' … end 'stopped' takes both services at once and runs the block on the caller's green thread. It is an ordinary block: return leaves the enclosing function and releases the services.

  13. Inside an acquire, one service is writable at a time (Reggio's window of mutability; supersedes "all at once"). All named services are held for the whole block, so the block is atomic; a method call on one service's state opens that one for the call, and a modify block opens one for several statements. A statement that would store one service's data into another's is a local type error. No check crosses a function call. Two names in one acquire may be the same service at run time (it is taken once), so states of the same type are treated as possibly the same object: holds are kept across a write to either. Acquired state names (and a message's self) cannot be moved, swapped, frozen, merged or sent.

  14. Re-acquiring a service is refused at compile time. Any acquire may wait, and code holding services may not call anything that may wait, so a nested acquire is refused whatever service it names.

  15. Parameters are let unless marked mutable (user, 2026-10-31). An unmarked parameter cannot be reassigned: position = position + 1 is a compile error naming the fix (mark it mutable, or bind a local var). A value-type (numbers, bool, enums, String), isolated or unique parameter marked mutable before its type is passed by reference: function skipSpaces(bytes ByteArray, position mutable BytePosition) advances the caller's variable. mutable is write access to what the caller passed: for a value type, an isolated or a unique value, the caller's variable itself (none of them has aliases, so assigning the parameter writes the caller's storage and nothing diverges); for a plain record, the object's contents. Nothing is inferred: only the marker makes a parameter by reference (Verona has no by-reference parameters, and inout was declined). The caller passes a var or a writable field or element (not a let, a literal or an expression); arguments that overlap a by-reference one are E3186. A function type or interface requirement spells it the same way (typealias Step = function(mutable Count)), and a closure or conformer converts only if its markers match exactly. A plain (aliasable) record parameter is never rebound (r = Row.create() would point the caller's variable at another object while other holders keep the old one): mutable on it is the write-through capability (ruling 19). On a value or unique type, mutable is legal only on a parameter or a function-type parameter (the exception to ruling 29's refusal of capability words on value types). A generic body never reassigns a mutable T parameter: T may be a plain record, and the body is checked against T's bound only (user, 2026-10-31).

  16. Spelling: Reggio's imm is immutable and iso is isolated. A capability is a prefix word on the type, read like an adjective: var index as isolated WordIndex, lines isolated LineArray, returns isolated LineArray, Array with immutable Job, Map with (String, isolated Job), value as immutable Point, on a local that is a region of its own let chunk = LineArray.create() as isolated LineArray (ruling 17), and on the receiver function submitTo(immutable self, …). No colon is involved, so the parser's "name followed by :" scanners (argument labels, struct-literal fields, map keys) are unaffected. The new words are contextual, like module: recognized only where the grammar expects them (a capability word before a type; modify/acquire at the start of a statement; freeze/merge/swap before an operand; is unique after a type name), so today's names MachinePin.acquire() (stdlib/Scheduler.maxon:124), swap(i, j) (stdlib/helpers/sort/smallSort.maxon:22), IrModule.merge (maxon-bin/Compiler/IR/IrModule.maxon:780) and locals named mutable or unique keep working. S0 surveys every collision and lists any that cannot stay.

  17. Instances are mutable by default, as in Verona. T.create(…) used as an ordinary value is mutable in the current region; a value becomes immutable only through freeze (or by being a module let). Types carry no capability.

  18. New regions are inferred, with no marker at the creation site (Pony's automatic recovery). An expression whose result capability is mutable and whose inputs are all clean cannot point back into the current region, so its result is usable as isolated: let pinned = freeze Point.create(2.0, y: 3.0), Self{index: WordIndex.create()}. Clean inputs are values, immutable data and moved isolated data — not a by-reference argument, not a value of an unbounded type parameter, not a promise whose payload is not sendable, and not the result of a runtime or external function that may return cached data (each such function is audited and declared). A generated clone() is clean only when it deep-copies everything: a type with a closure field is not cloneable, and an isolated field is cloned by opening it into a fresh region. Recovery happens at that one expression, where an isolated position asks for it (a field, argument, send, return, freeze). A local bound to such an expression is ordinary mutable data unless it is declared as isolated T (ruling 15); a declared one is linear (ruling 27). Nothing tracks a local's isolation through the function.

  19. type X is unique for values that must never be copied or aliased. Records alias freely inside a region under this design, so a type for which a second reference or a copy would be a disaster declares it. A unique value is never cloned or aliased: let b = a moves it (E3102 after), storing it moves it, an argument lends it for the call (a callee that stores the parameter takes it instead, inferred like the read-only bit, and the caller's variable is moved), reading it from a container names its slot, as today (docs/LANGUAGE_REFERENCE.md:5025-5030): consuming the read moves it out of the slot. It crosses threads by move. A type with a unique field is unique too (inferred) and gets no generated clone(). Declare it only where cloning or aliasing would be disastrous: stdlib's Promise (awaiting consumes it, so it is never lent) and every OS-handle type (closing is a write the handle's other holders would not see, so a handle is neither frozen nor shared; user, 2026-10-30) are unique, and so, by the field rule, is every type that holds one. A type that owns an OS handle held as a plain integer declares is unique (StreamingSubprocess, whose handle becomes private, and SharedSegment); a handle the system closes (DebugHandle, SampledThread.handle) is not an owner and stays plain (user, 2026-10-30). Service handles are not OS handles: they stay shareable. An OS handle, like a promise, belongs to no region (user, 2026-10-30): a record or region may hold it, it crosses a modify or acquire window, a send may move an outside one out of a window, and closing one there writes no region. A unique value read from a slot and lent to a call is a one-call open of that slot, exactly as an isolated argument is (ruling 10): every other argument is a value, immutable or moved, and the slot is resolved after the other arguments run, so g(r, y: r.file) is refused whatever g does with r (user, 2026-10-30). Every one-call open, unique or isolated, follows one order: the receiver and the other arguments run first, in source order; then the opened path (holder, index and condition) is evaluated and opened, last (sample 12); any other operand that moves a local the opened path reads is E3102 (user, 2026-10-30). A kept argument moves its local where that argument runs, so any operand run after it that reads or swaps the local is E3102, for calls, constructors, union literals, sends and spawns alike (user, 2026-10-30). Two element steps may name the same element unless both indexes are different literals, and are the same element when both are one let; a for binding is its array's path plus some element (user, 2026-10-30). Inside its own window a unique target is never bound, kept or stored (it has one name); a non-unique target may be aliased by block locals that never leave the window (user, 2026-10-30). A type that reaches a thread-bound OS handle (MachinePin, and Debuggee or Sampler where bound to a thread) is never sendable, transitively as unique is, so no region holding one crosses threads (today's E3138; user, 2026-10-30). Service handles stay shareable.

  20. Interface requirements and function types are read-only, and never wait or yield, by default. A requirement whose conformers write the receiver declares mutable self; a function type whose callee writes a parameter declares mutable T (typealias RowEdit = function(mutable Row)); a function type whose closures write what they captured is a mutable function(…) (typealias Tallier = mutable function(Row)), and a value of it cannot be called through frozen or read-only data. A closure or conformer converts only if its inferred class for each unmarked parameter (and self, and its captures) is exactly "any capability", it may neither wait nor yield (S0 hole G2: a yielding closure called inside a modify block deadlocks under ruling 2's guard), and a result reached from a read-only parameter does not stand in for a plain mutable result (it is refused for a function type; through an interface, the result takes the interface value's capability). Comparators, hashers and describers need nothing. Every fact stays local to a declaration, so separately compiled libraries stay sound. A by-reference parameter is spelled mutable there too (ruling 14), and a closure or conformer converts only if its markers match exactly.

  21. Pending operands are protected (S0 hole G1). Because records alias freely, a value already evaluated for one operand must survive the operands after it:

    • held at run time: a field read used as a constructor, union-literal, send, spawn or async argument is held across every later operand that may run user code, and a match subject is held across arms that write back (HoldResolution gains these holds; today it holds only arguments of user-function calls);
    • refused at compile time: a local read by one operand and passed to a mutable by-reference parameter (ruling 14) anywhere else in the same statement (new P2(x, put(x))). E3186 covers every operand of the statement, not only the arguments of one call, because a hold cannot protect a value its by-reference cell overwrites. The same holds for a by-reference field path (new P2(h.f, put(h.f))), and a by-reference field path's holder is kept alive across the call so another root cannot free it.
  22. isolated as a type argument is opt-in (red teams 5 and 6). A generic accepts isolated T only if it declares where T is isolated; its body is then checked with every stored T read as a lend (reached only inside a block, taken out only by swap/pop/remove). stdlib's Array, List and Map declare it; user generics opt in. clone() of a T yields a fresh mutable value, never an immutable T; a generic is cloneable only for type arguments that are.

  23. Rules settled by the red teams (rounds 5 and 6):

    • await applies to a local, or to a swap/pop/remove result; awaiting a promise still in a field or slot is refused. The result of await takes the result capability the async call computed (a coroutine returning its argument returns it with that argument's capability).
    • An async call never takes an isolated value in an unmarked position. A tied promise's .cancel() is a wait (ruling 7): a tied async sets the caller's may-yield bit.
    • In modify jobs.get(i), the index is a literal or a let and is evaluated once; inside, the opened element is reached only by that path.
    • isolated values cannot be tuple elements. A type with a unique field cannot be frozen; every alias-making read of a unique value (field read, cond, tuple read, a method returning self) consumes it. A match expression and a try … otherwise <value> merge are conds here; an arm that is a slot read or a lent unique is refused at the merge (E3214; ruling 47).
    • A mutable isolated T (or mutable unique-type) parameter is by reference: its argument must be an isolated (or unique) local, re-isolated after the call.
    • cond over two isolated locals consumes both; cond over two promises takes the stronger origin (may-wait if either is).
    • Inside acquire a, b with possibly-same states, a held read-only operand of one state while another is opened in the same statement is accepted (holds keep it alive).
    • Runtime obligation: a promise cell is resolved atomically when a sendable promise crosses threads. A sendable bound takes a value, a service handle, or an immutable type that is not unique and whose graph the share walk accepts; a function type, an interface type and a promise never meet it (ruling of 2026-11-16 on #30). A value here is a scalar, String, Character, cstring, or an aggregate that is not unique and owes no drop (a payload-free or word-sized union, a record, instance or tuple packed in a word); any aggregate that owns a counted box is written immutable until #104. An interface-typed slot in the argument's graph is judged where the value is shared (E3171, ruling 46), not at the bound. At a spawn, a bounded position is reported once, as E3215. A type-parameter argument, or an argument that mentions one, meets a bound only when the enclosing type's own bounds prove it; neither bound proves the other; E3215 in the declaration (#30, ruling of 2026-11-17). An instance a spawn infers over the enclosing type's parameters is refused earlier, as E2015, until #242, which owes the E3215 at that site. An alias over an associated type in an interface extension is each conformer's alias, judged from that conformer's binding; an interface with no conformer declares none.
  24. Rules settled by the reggio2 fix round:

    • A mutable isolated T (or mutable unique-type) parameter may be opened, swapped or replaced in the callee, but never moved out or aliased (otherwise the caller's variable names a region another thread owns).
    • A module-let initializer calls nothing (ruling 30).
    • Sample 11's Pool declares both bounds (where T is sendable and where T is isolated), so Pool.handle with isolated Job stays legal under ruling 22.
    • The model's interpretations I19–I31 (capmodel/reggio/REPORT2.txt) are adopted unless the user overrides one.
  25. Rules settled by red teams 7 and 8:

    • where T is isolated admits both isolated and unique type arguments (both are owned, move-only values): a stored T read is a lend, taken out only by swap/pop/remove. A generic without the bound cannot be instantiated with a unique type. stdlib Array, List and Map declare it, so arrays of promises work. A function type and a plain aggregate with no unique part never meet it; the values it takes are the sendable bound's value list. In a generic declaration, an aggregate over T meets it only when it is unique whatever T is (#30, ruling of 2026-11-17).
    • A module let of a unique type is refused (module lets are frozen, so it would be aliased).
    • An acquired service's state, or anything reached from it, cannot be an async argument.
    • A unique type whose method keeps its receiver cannot satisfy a mutable self interface requirement.
    • Passing the same unique local twice in one call is E3102.
    • The model's interpretations I32–I47 (capmodel/reggio/REPORT3.txt) are adopted unless the user overrides one. (Ruling 42: the one-call shape bx.eat(v) with v an un-opened isolated local into a parameter the callee owns is a moved isolated beside the opened receiver and merges into it; an outer var is assigned inside a window only when it holds a value type, isolated, unique and linear variables included.) (Ruling 42: "stores" means the value escapes the call; a rename to a local that dies in the callee is not a keep.) (Ruling 44: a unique argument, lent or kept, is a clean input only when its type is closed.) (Ruling 45: modify takes a local, parameter or field path; on a temporary it is refused with the no-holder refusal, E3199.)
  26. Rules settled by red teams 9 and 10:

    • A unique value converts to an interface type only if the interface is declared is unique; values of such an interface are moved and lent like any unique value.
    • A record result reached through a frozen interface or function value is read-only (paused), never immutable: the conformer may have returned a fresh mutable object.
    • The array a for drains is read-only in the loop body.
    • An explicit iterator over an isolated path needs a block; iter over a container of unique values is refused (for lends instead).
    • get(a, i) evaluates the index before reading the array (values first, sample 12).
    • Capabilities inside type constructors (promise payloads, array elements, generic arguments, function parameters and results) are compared at every conversion.
    • Inside a modify or acquire block, a record result through an interface or function value is read-only (the conformer may return its own data); to store it there, the requirement or function type declares returns isolated T.
    • The model's interpretations I48–I57 (capmodel/reggio/REPORT4.txt) are adopted unless the user overrides one.
  27. The core (user, 2026-10-27). Every rule is one typing rule per expression form, decided from types already in hand; there is no dataflow analysis of where a value came from (capmodel core, capmodel/reggio/REPORTCORE.txt):

    • Capabilities are part of every reference's static type, and every flow compares them: store, assignment, argument, by-reference argument, return, send and cond join, including the capabilities inside type constructors (array elements, promise payloads and origins, generic arguments, function parameters and results, tuple items, an iterator's array). A variable's capability is fixed at its binding.
    • isolated and unique are linear. Every use of an isolated local or parameter moves it except opening it (modify, a one-call open, a one-statement open); let b = a moves an isolated a.
    • An isolated value comes from three places only: an expression whose inputs are all clean (ruling 17), recovered at that one expression where an isolated position asks for it; a swap, pop or remove out of an isolated slot; a parameter, result, field or local declared isolated (ruling 15). An isolated temporary handed to an unmarked parameter is merged there. Rulings 36 and 41 add a bounded fourth: an owned linear parameter or consuming receiver of a closed type.
    • The window rule (ruling 10) holds for modify, the one-call open, the one-statement open, a for or match arm that binds an isolated element or payload, and an acquire block (ruling 43: a lend of a unique, non-isolated payload or element is not a window).
    • acquire adds nothing beyond ruling 12. Each acquired state is an isolated region held in place; one is open at a time; a call that only reads a state opens nothing and its result is read-only; a region moves between states only by a swap out and a store or isolated argument into another state while that one is open.
    • Results are typed (ruling 4): fixed, or "the capability of parameter p".
  28. Every promise cell resolves atomically (a release/acquire on resolution), regardless of whether it crosses threads.

  29. Rules the core keeps from the earlier rounds:

    • A message or factory parameter is never by reference.
    • A frozen and a mutable value joined by a cond are read-only afterwards.
    • otherwise runs instead of the acquire body, from the entry state.
    • A try handler sees every move made anywhere in its body.
    • A rebound name's old variable is dead from the rebinding; a rebinding never reuses a slot a coroutine holds by reference.
    • Block locals inside a window may point into the open region; they never leave it.
    • The variable rooting an open path, a lend or a matched union keeps its value inside the window or arm: it is not reassigned, rebound, swapped or passed by reference there (ruling 45: in a window, a lending for body, or an arm that binds a payload).
    • A result through an interface or function value never adapts and is never fresh.
    • A generic conformer is checked per instantiation, where it converts.
    • Dropping a tied promise before its consuming await is refused: reassigning it, a swap or pop whose result is not kept in a local that is drained like any tied promise, a by-reference callee that reassigns it, a cond that selects one of two. A conditional await (in one cond arm or one branch) does not drain it. A promise argument always moves (ruling 18: a promise is never lent), so a tied one passed to any parameter is kept by the callee and refused.
    • Names never collide: duplicate fields, parameters, methods, messages, union cases, module lets and type names, a type parameter named like a declared type, and a parameter named self are refused.
    • A module let's value is known at compile time (ruling 30).
    • A parameter's capability joined with frozen data by a cond is refused; joined with mutable data it makes the parameter mutable-only. A var bound to a parameter's data and later assigned frozen data makes the parameter immutable-only: the variable's capability is fixed at its binding (user, 2026-10-29). A T parameter is pinned the same way. A cond of a parameter's data and frozen data is judged against the parameter's final class, so statement order does not matter: immutable-only gives frozen data, mutable-only gives read-only data, undecided is refused; the cond itself pins nothing, though assigning its value to a var bound to the parameter pins it as any assignment does. A frozen-only T parameter may be passed to a T position that only reads it, as a record parameter may.
    • Every use of an unmarked parameter is judged against its final class (user, 2026-10-29): the body is checked treating the parameter as frozen, each use adds a requirement (mutable for a write, store or capture; frozen for an immutable parameter, an immutable self call or a send; none for a read), and the class is decided at the end. A frozen use inside a modify window therefore pins the parameter immutable-only in any statement order: a window restricts only mutable outside data. A use refused only because the promise of an async on the parameter's data is tied pins the parameter immutable-only the same way; that async's tiedness and may-yield bit follow the parameter's final class (user, 2026-10-29).
    • Code after a call that never returns normally is still checked, as in Go.
    • A bare return in a function, method or message that declares a result is refused, as in Go (user, 2026-10-29).
    • A message that throws fails its reply: the await of it throws, as a coroutine's does (user, 2026-10-29).
    • A bare yield inside a window is refused.
    • A unique value may be sent to a parameter of its own unique type or to an isolated one. Unique values stay unique inside unions, closure captures, for and match bindings and mutable T parameters; a callee that awaits or stores a unique parameter consumes the caller's argument.
    • The one-open-per-statement rule counts services, not names, and a read-only call opens nothing; two states opened in one statement are refused, cond arms included.
    • A store into an acquired state's plain field needs that state open; storing an isolated value into an open state's isolated slot is a move (b.item = o).
    • freeze applies to a local or a swap result, never to a field in place.
    • A for over a plain array that the loop pushes to or pops from is accepted; the iterator holds its buffer and re-checks the count.
    • Inside acquire a, b with possibly-same states, a read-only local taken from one state while another is opened is accepted, as for held operands (ruling 23).
    • spawn joins the factory's may-wait and may-yield bits into the spawner's.
    • A by-reference argument is a flow in both directions: every component of the variable's type is compared both ways, and a promise's origin and payload freshness, which no declared type carries, are taken as unknown after the call. A tuple or an iterator meets only its own kind.
    • A variable passed by reference to async is lent to the coroutine until its promise is drained, like a move that ends at the drain.
    • A by-reference cell write is a store: a pending operand read from a field or element is held until its statement ends, across every later operand that may write a by-reference field or element cell, directly or in a callee or coroutine (ruling 21's holds; HoldResolution keeps these holds).
    • A result declared returns mutable T returns mutable data of the caller's region, in every function, closure and conformer: frozen data, read-only data and a parameter's data are refused there. Through an interface or function value it stays writable whatever the value's capability. An unmarked result adapts (ruling 4).
    • A unique type is never sendable: whether a unique value can be sent depends on the value, not its type. A generic bound where T is sendable takes isolated Tok, never a plain unique Tok.
    • Every match subject is held at run time for the whole match (the hold follows the value, ruling 50), temporaries included (a cond, a call or an invoke result; ruling 21's holds). The locals a cond subject reads are guarded inside the arms like the variable rooting a matched union.
    • The roots of a cond match subject, or of a path over one (cond(c, h, g).u), are holders in every arm, binding or not, when the matched union has a unique or isolated payload: read-only, and not reassigned, swapped, moved, passed by reference or passed to a callee that writes them; over a plain-payload union the roots only stay put (not reassigned, swapped, moved or passed by reference) and their fields stay writable. Bind the subject to a local, or match under each branch of the condition (ruling 48).
    • Inside acquire, modify t.i on an isolated field of a state t not yet open opens t for the block as the one open state; only t.i's region is writable. The one-statement and one-call opens (t.i.n = 4, t.i.bump()) do the same, as one-statement modify blocks (ruling 10).
    • A swap, store or push whose new value moves the destination's own root is refused.
    • A function-type position over a type parameter lends its argument unless written isolated T (function(isolated T) returns T), which moves it: a closure may then keep or return it at every instantiation, and every caller hands over an isolated value (a unique value only when it is also isolated: fresh, or declared as isolated).
    • A closure written inside a generic body is checked once, there (user, 2026-10-28): one that keeps or returns its unmarked parameter of an unbounded T is refused at every instantiation, int included; write function(isolated T) to keep or return it. A sendable- or isolated-bounded T is never a plain record, so its closures are not refused for it.
    • A named callee's T parameter lends a unique or isolated argument when the callee neither keeps nor returns it, at direct calls and through conformers alike (user, 2026-10-28; ruling 18). A lent isolated argument is a one-call open under the window rule, whether or not the call is its last use.
    • A conformer whose result's join holds a parameter other than self, or a record parameter beside a T parameter, is refused where it converts, whatever the parameters are named (user, 2026-10-28).
    • A cond of two coroutines' promises has both coroutines as its origin and waits if either may. A variable's origin is fixed at its binding: a promise of a different set of coroutines is not assigned to it (user, 2026-10-28).
    • Where a requirement says returns mutable, a conformer's result that adapts to its receiver or a parameter, or is declared immutable self, is refused at the instantiation; whatever the result's type mentions, its capability word is compared (user, 2026-10-28).
    • A capability word (mutable, immutable, isolated) written directly on a value, handle or promise type is refused, except mutable on a parameter or function-type parameter of a value or unique type (ruling 14). Substituted through a type parameter, any capability word over a value, handle or promise type means that type as itself, in every position: a value copies, a service handle shares, a promise or OS handle moves (user, 2026-10-30). A unique type (a promise, an OS handle, or a type holding one) is never immutable, so a type parameter written under immutable is not instantiated at one. A generic body is checked against T's bound only, so in it an immutable T or isolated T is sendable only when T is bounded sendable; a result read through a receiver adapts to the receiver's capability whatever word it carries (user, 2026-10-30). A message or factory parameter or reply over a type parameter needs where T is sendable (sample 11), refused at the declaration, and so does a field of a service with no factory (its fields are the factory's parameters); int, String and service handles satisfy the bound, and no other bound is added (user, 2026-10-30).
    • let _ = e discards the value; discarding a tied promise is a drop.
    • An acquire block neither yields nor waits (user, 2026-10-28): async, a coroutine await and a may-yield call are refused inside it, as inside modify. Start coroutines before the block, await them there, and pass their results in.
    • A message body may start and await coroutines (user, 2026-10-28): it holds its own service across the yield, its coroutines follow the ordinary tied-promise rules, and none of them may wait (ruling 5).
    • A unique value is never cloned, through any path (ruling 18); a type is unique when any type it reaches, through any cycle of types, holds a unique field.
    • A closure never reassigns a variable it captured, mutable function included: a capture is the closure's own copy. It writes through a captured record instead.
    • Only a written immutable self makes a method's receiver frozen for a requirement (user, 2026-10-29): inference does not reach into a conversion.
    • The inferred facts never depend on declaration order (user, 2026-10-29): each pass visits the call graph's strongly connected components callees first, with no pass limit; each pass recomputes every signature's result from scratch; module-let types are part of the same fixpoint. A result not yet inferred stays unknown through every rule built from it (no refusal, no fact). Facts are learnt only from results settled under the facts already held, then the results are recomputed (user, 2026-10-29).
  30. A module let's value is known at compile time (user, 2026-10-28). Its initializer is a literal, a string, an enum case, a constant arithmetic expression, a reference to another module let or a field of one, a tuple, a cond whose condition is constant (only the arm it selects is a dependency), a closure that captures nothing, or a record or array literal built from these (Self{…}-style, allowed at module scope as the one exception to E3076). It calls no function (clone included; freeze is redundant and refused), so nothing runs before main: every module let is immutable image data, one copy shared by every function and thread, never isolated and never rebuilt per use; .clone() gives a mutable copy (user, 2026-10-28). A cycle between module lets is refused; their declaration order does not matter. A name read inside a closure's body is not a dependency: the body runs after every module let exists. A handle, a promise, a closure capturing anything, or a SharedValue cannot be a module let.

  31. No overloading, as in Go (user, 2026-10-28). A function name is declared once per scope, and a method name once per type; methods of one name on different types are separate methods. No declaration differs from another by parameter types, arity, labels or self capability: a second one is refused. A call binds the one declaration its name and receiver type name, so every analysis (capability classes, may-wait) reads that declaration. A conformer implements a requirement with its one method of that name. The short form of a long call gets its own name (sort / sortBy). A field and a method of one type do not share a name (user, 2026-10-29), and neither do a static and an instance method (user, 2026-10-31). Top-level names are scoped by directory, as Go's package block: every type, enum, union, interface, typealias, module let and function, private or exported, generic or not, is declared once per directory in one namespace (type Point and function Point in one directory collide); different directories are separate scopes; locals and parameters keep block scope and may shadow a top-level name (user, 2026-10-31). A program's own function may shadow a standard-library function of the same name: they are different scopes, as in Go. An extension, the program's or a library's, may add new members to a type but never redeclare one the type, the library or another extension already gives it (user, 2026-10-31).

  32. A consumed linear or Reply-holding union hands over its isolated payload as an owned value (user, 2026-11-13). When match consumes such a union, the union is dead and keeps no alias to the payload, so no match window opens for the payload: it may go anywhere a linear, isolated or Reply value may, under the ordinary rules for wherever the match sits. Model rule set core-m3w-fa11.

  33. Nested matches over one payload, and four refusals made exact (user, 2026-11-13, review AF). A match nested in an arm of a lending match on the same union lends the payload twice, read-only, and is sound: the oracle's allowance counts the enclosing match windows, and no checker rule is added. The nested lend applies to lending matches only, never under a consuming match (rulings 32, 40). Four refusals of programs the oracle runs clean are relaxed:

    • W1: a message body may match its own linear-union or Reply-union message parameter.
    • W2: an owned arm may reassign the variable it matched once the payload is consumed. A loop may refill it the same way when every path to the back edge refills it.
    • W3: a linear union held in an isolated variable may be matched.
    • W4: a variable holding a linear union's non-linear case owes nothing; overwriting it is no drop. Vacancy joins by intersection across branches, loops and try handlers. Model rule set core-m3w-fa12.
  34. The implicit merge, the matched unique, and recovery on first read (user, 2026-11-14, review AG).

    • When an isolated union is consumed by match, every payload is a fresh owned value, plain ones included. Storing one, or anything it reaches, into an open window's region merges its region in, as merge would.
    • A unique matched variable is not moved or copied inside its own lent arm (ruling 29).
    • The model's oracle also runs every failed send's hand-back handler (the forced-failure oracle), and every gate runs under both oracles.
    • I1: a match inside a try whose handler can never run is no drop.
    • I2: a var union reassigned in a try body and in its handler is accepted; the handler starts with the locals vacant at every throw point.
    • I3: a fresh, never-aliased plain local is recovered into an isolated position (a parameter, slot, declaration, freeze or merge) on its first read, and that read moves it. A local read before, re-read in a loop, or given a second name is not recovered.
    • I4: the lone plain payload of an owned isolated union is recovered the same way. I3 counts a local's reads, which amends the "nothing tracks a local's isolation" sentence of ruling 17 and the "no dataflow analysis" clause of ruling 27 for that one fact. Model rule set core-m3w-fa13.
  35. Send, spawn and coroutine start are throw points for the model's liveness (review AH, 2026-11-15). Review AH found no checker hole in fa13 and one oracle defect: a statement holding a send, a spawn or an async start was not a throw point, so a failed send's handler was never judged under the forced-failure oracle. The oracle counts them.

  36. The model follows the compiler where the compiler is sound (user, 2026-11-15). These refusals of the model are made exact, each behind its own switch:

    • A spawn whose factory cannot throw is no throw point. One whose factory may throw still is.
    • A message parameter is an owned value. A unique message parameter stored into service state, and a consumed linear receiver sent, are sound (ruling 42: an isolated message or factory parameter reaches a plain slot only through merge). An owned linear value is isolated where it goes on only when its type is closed (ruling 41).
    • A var linear moved into a send whose hand-back is consumed and refilled in a loop is accepted.
    • Vacancy is exact: a variable that never holds a linear value on a path owes nothing there. Model rule set core-m3w-fa14 (capmodel 6c881bc, REPORTFA14), which also carries ruling 35's throw points, ruling 38's lend, and RECOV-SWAP: swapping a local that a recovery moved is E3102 (an fa13 hole of I3/I4 found by its gadget g113; the compiler already refuses it). 0 holes under both oracles. Amendment to rulings 17 and 27: within one function body the checker keeps two flow facts, and nothing else about where a value came from. (a) For a plain local, whether its value is a clean one (a declaration's or an assignment's) that at most one read has taken a reference out of since; a join takes the more-read side, and the first read of such a value into an isolated position (an isolated declaration, parameter, slot or send) recovers the local, which is then moved. (b) For a union variable, vacancy: it holds a non-linear case of a linear union on every path, and then owes nothing. Neither fact crosses a call or a function boundary, refines a type or survives an alias, a swap, a capture or a keeping use; every other question about where a value came from stays unanalysed.
  37. A vacant linear-union variable owes nothing, so passing it twice is no move (user, 2026-11-15). It holds a payload-free case and owns nothing, which is consistent with ruling 33's W4.

  38. A read-only lend of the matched variable inside its own arm is legal (2026-11-15). Rulings 29 and 34 name everything the arm forbids for the variable rooting a matched union with a unique payload: it is not reassigned, rebound, swapped, passed by reference, moved or copied there. Lending it to a call that only reads it does none of these and makes no second owner, so it is accepted: match slot { case have(t) { peek(slot) } }. Whether a call is such a lend is decided by the rules that govern every lend: one that keeps its argument, and a send or a spawn, move it and stay refused. The model's F2 refuses the moves and the copies, not the read. (Ruling 42 extends this to a lend to a callee that writes through it and keeps nothing, when the statement names no binding of the arm.)

  39. A match over a plain union lends its payloads; only a linear union hands them over (2026-11-16). A payload bound from an isolated slot of a union held in a plain let, a var, a parameter, a field or an element is lent to its arm, opened there under the window rule (ruling 27), and never goes where an owned isolated value is wanted: let u = Mx.m1(rb) then match u { m1(o) then takeB(o) }, with takeB(b isolated Bx), is refused (E3198, the model's C-LEND), for a let as for a var or a parameter. A plain union is ordinary region data and aliases freely (let v = u, a call that keeps it, a call that returns it), so its name being dead after the match does not make the union dead. Ruling 32's argument holds only because a linear or Reply-holding union is never aliased. Whether a frame is the sole owner of a union's box is an ownership-layer fact: it decides whether the bind moves or retains a reference, and says nothing about the payload's region. Ruled out: any owned hand-over inferred from how a plain union was built or used. A match's mode is decided by the subject's type and capability alone, and ruling 27's list of where an isolated value comes from gains no entry. Unchanged: rulings 32-34, and whether a binding match consumes a let union's name at the ownership layer. A non-linear union held in an isolated variable is ruling 40. Breaking change, Fix: open the payload in the arm, or keep the union in an isolated variable and match it there (ruling 40); Maxon has no var payload slot. (Ruling 45 replaces the "Unchanged" line on the ownership-layer consume: a lending match never consumes its subject.)

  40. A bare match on an un-opened isolated variable moves the union and hands its payloads over as owned (user, 2026-11-16). A bare match whose subject is an un-opened isolated local, isolated parameter or message parameter holding any union consumes the variable (a later read is E3102); every payload is a fresh owned value, and ruling 34's merge and I4 apply. Inside the variable's own modify block it is open region data, so the match lends (ruling 39). A union in an isolated field or element is a slot, never consumed, and stays under ruling 20. Ruling 32's argument holds because an isolated variable is linear (ruling 27), so the consumed union has no alias; the mode is still decided by the subject's capability alone. Amends rulings 10 and 20 for this holder and extends ruling 32. Owed before the compiler changes: a switch in a rule set after fa14; 0 counterexamples under both oracles on every corpus, red-team suite and the self-tests, plus a 20k all-gadget campaign; a new gadget over non-linear unions in isolated locals, parameters and message parameters, matched bare, in their own modify, in another window, in a loop and a try, as a cond subject, nested, with ruling 38's lend (refused for a consumed subject), and with the payload stored, sent, frozen, merged and passed twice; a mutation gate (consume off, the oracle reports the hole); a verdict diff against fa14; a fresh red-team round. The compiler already takes the owned path for this holder; what changes is that inside the variable's own modify the match lends. Model rule set core-m3w-fa15 (capmodel 3dfb24c, REPORTFA15, switch ISO-VAR-CONSUME): 0 holes under both oracles on its hand corpus and gadget, and the mutation gate finds the hole with the consume off. Run scoped to ruling 40 at the user's direction; the full corpora ran on fa14. Consequence: a match nested in an arm of a match on the same isolated variable now reads a moved variable (E3102), so ruling 33's nested lend no longer covers this holder (114 corpus programs). This is intended (user, 2026-11-16): the author uses the outer arm's binding, or matches inside the variable's own modify, where both matches lend; a nested match after the arm reassigns the variable (W2) is clean. An isolated payload keeps the scrutinee variable's standing against every open window (ruling 41). (Ruling 45: the subject is an un-opened isolated variable or temporary, and it is moved at the head whether or not an arm binds.)

  41. A linear value is isolated only when its type is closed, and an owned payload keeps the standing of the variable it was matched out of (user, 2026-11-16, red team AI).

    • Part 1 (H1). An owned parameter of a linear type, or a consuming self receiver, goes where an isolated value goes (an isolated parameter, declaration, slot or result, a send, merge) only when its type is closed: every field and payload in its closure is a value, declared immutable or isolated, a service handle, a region-less handle ruling 17 counts as clean, or a unique or linear type that is itself closed. A plain record, array or union, a function value, an interface value or a type parameter is a plain part. An owned linear value of a type that is not closed is ordinary data of its region: matched, finalized, or moved to another plain linear position; an isolated position refuses it with the recovery refusal, naming the plain part. One predicate per type decides it, and every door that treats a linear value as its whole region asks it (linear parameter, consuming receiver, linear message parameter; ruling 44 adds the clean-call door). A failed send's hand-back is an isolated binding whatever its closure (ruling 45). Why: linearity makes the box unique, not the region closed; a builder may go on naming a plain part (let b = Bx(1); let m = Mp.m1(b); relay(m); b.n = 5). Ruled out: a fresh or isolated payload required at construction; refusing such a type's declaration; windows on every access. A message parameter stays owned because every send checks its argument as a closed region. An owned local of a closed type is the same (ruling 49).
    • Part 2 (H3). The payload a consuming match (rulings 32, 40) binds from an isolated slot is owned and keeps the standing of the variable it was matched out of. Declared outside the innermost open window, it is an outer isolated value there and is not opened (no modify, one-call or one-statement open; C-HOLDER, E3199), but still goes where an isolated value goes. The standing is transitive through a payload's payloads; the bare match inside the window stays accepted; plain payloads stay under ruling 34. In general no binding declared inside a window makes an older region a window local: a move into a new local, an isolated call result the value was moved into, a hand-back, a match payload. Why: ruling 40's "fresh owned value" means no alias, not born in the window. Ruled out: refusing the bare match in a window; merging the payload into the window at the bind.
    • Both parts only refuse. Model round 18 (core-m3w-fa16) carries both with H2's may-throw oracle fix, the fix round's light gates in full under both oracles, a gadget per part, a mutation gate, a verdict diff against fa15, and a fresh red-team round. A refusing compiler change may land once fa16's gates are at 0 holes. Breaking for source compiled today: H1's Fix: declare the plain part isolated, or consume the value where it is; H3's Fix: merge the payload, hand it to an isolated parameter, or match outside the window.
    • Model rule set core-m3w-fa16 (capmodel 2fccd44, REPORTFA16; switches LIN-CLOSED and PAYLOAD-STANDING): 0 holes under both oracles on hand_ai7, its hand corpora and gadgets g118/g119; each switch off reports H1/H3; nothing moves from refused to accepted. Gates narrowed to ruling 41 at the user's direction. PAYLOAD-STANDING also closes rename-door holes that predate ruling 40 (let p as isolated = o or an isolated-returning call inside a window, then modify p), and refuses opening an I4-recovered plain payload inside another window.
  42. Six model/compiler disagreements settled, each by the one fact that decides it (user, 2026-11-16).

    1. A callee keeps a unique parameter only when the value escapes the call: a store into a field, element or container, a record or union literal (even a local one), a capture, a return, a send or spawn, an await or other consume, or a keeping parameter, judged through every name the callee gives it. A rename (let u = t, var u = t, chains) whose names all die in the callee moves nothing in the caller. Model follows the compiler; it accepts more, so a model switch, gadget, both oracles and a mutation gate.
    2. In its own arm, the matched variable of a union with a unique payload may be lent to a callee that writes through it, when the callee keeps nothing and the statement names no binding of the arm. Every move, copy, keep, send, spawn, reassignment, swap and by-reference pass stays refused; an isolated-payload arm stays a window. Extends ruling 38; accepts more (model switch, gadget, mutation gate).
    3. A parameter declared isolated reaches a plain slot only through merge, whoever declares it (function, method, message, factory); E3196 stands. A message or factory parameter of a unique or linear type with no capability word is owned plain data, and storing it is a move. Narrows fa14's MSG-OWNED to ruling 36's wording. With ruling 41, an owned unique or linear parameter goes on to an isolated position only when its type is closed.
    4. Inside a window an outer var is assigned only when it holds a value type (E3204 for records, unions, and isolated, unique or linear variables). Ruling 10 as written; the model follows.
    5. A mutable parameter of a linear type is by reference by the marker alone, and the callee never moves the value out (E3224). Rulings 14 and 24; the model follows.
    6. SPAWN-NOTHROW with a linear factory argument, REFILL-FRESH through a loop header (one fact, one join), and VACANT-COPY into a callee that sends are compiler work as ruled (36, 37), each passing the one crossing check: a value crosses a thread only as the whole of its region (a fresh expression, a declared-isolated variable, or an owned unique or linear value of a closed type). LIN-PARAM-OWNED lands in ruling 41's closed form once fa16 is at 0 holes. Confirmed: bx.eat(v) (isolated receiver, v an un-opened isolated local, a parameter the callee owns) is allowed by ruling 10. Still refused: a non-linear isolated value into an unmarked parameter, a plain linear local beside the opened receiver, and the call inside a window. Model rule set core-m3w-fa17 (capmodel 44a87d5, REPORTFA17; switches RENAME-DIES, ARM-WRITE-LEND, ISO-PARAM-MERGE, OUTER-VAL-ONLY, LIN-MUT-BYREF): 0 holes under both oracles on its hand corpus and gadgets g120/g121; gates narrowed to ruling 42. Assigning between parameter-class locals now moves the value, closing an fa16 hole (var u = t2; u = t; h.k = u). A swap out of, or a by-reference pass of, a renamed local counts as a keep. Item 2's arm-binding exclusion carries the compiler's E3102 but closes no hole the model can see (with it off, the oracle runs the five programs clean). Addendum (user, 2026-11-16): (i) item 4 refuses every outer var that does not hold a value type (ruling 14's list: numbers, bool, enums, String), immutable, handle and promise variables included; relaxing it is Backlog #127. (ii) Inside a window an outer non-value var is not assigned, not swapped, and not passed by reference to a parameter that may replace it: one rule for every rebinding. (iii) In item 1 a swap out of a renamed local and a by-reference pass of one are keeps, and "bound" reads "bound or assigned" (var u = t2; u = t; h.k = u keeps t). Item 2's arm-binding exclusion (E3102) stays on ruling 18's ground (g(r, y: r.file)): a callee cannot know two parameters reach one unique value. Model rule set core-m3w-fa18 (capmodel f36d82d, REPORTFA18): red team AJ (0c6729a) found that a by-reference isolated parameter could be opened inside another object's window; under ruling 41's general rule it is the caller's variable and an outer root in every window of its callee (BYREF-STANDING, C-HOLDER; the compiler had the same hole, E3199 now). The addendum's swap rule is OUTER-SWAP (C-OUTER). Both only refuse; 0 holes under both oracles.
  43. A lend of a unique payload or element is not a region window; it pauses only its holder (user, 2026-11-16). A match arm that lends a unique payload, and a for body that lends unique elements, open no window when the payload or element is not isolated: outer data stays writable (have(t) then o.n = 5, and a call that writes it). The holder is protected by the rules that name it: the matched variable is not reassigned, rebound, swapped, moved, copied, kept or passed by reference in its arm (rulings 29, 34, 38) and is lent to a writer only as ruling 42 item 2 allows; the container a for lends from is read-only for the whole body, directly and through any callee that needs it writable (rulings 20, 26). The binding is a lent unique value, never kept, stored, moved or sent; its plain parts are ordinary data of the current region. An isolated payload or element still opens a window, and a unique lend nested in a real window keeps that window's rules. Why: a window guards a region boundary, and a non-isolated unique value lives in the current region; the path from the root to the lent value has one name. Ruled out: a full window for such arms; any relaxation of the holder's rules (ruling 42 item 2 stays limited to match arms). Consequence: a plain part of a lent unique value may be stored in outer data, which is safe across threads only because of the crossing check (rulings 29, 41, 42; #119). Model: switches for the arm and the for body, narrow round. The compiler already accepts these; the language reference states the rule with or after the #119 fix.

  44. A unique argument is a clean input only when its type is closed; reading a plain part out of a lent unique value is not a keep (user, 2026-11-16).

    1. LEND-CLOSED: a unique argument, lent or kept, is a clean input of a call (ruling 17) only when its type is closed (ruling 41 part 1's predicate). A call given a unique argument whose type has a plain part is not a clean call, and its result does not go where an isolated value is wanted (E3200, the model's C-RECOVER). Evidence: fn stash(t Tq) returns Ko { let o = Ko(Bx(0)); o.keep = t.b; return o }, then let k as isolated = stash(q); send k; q.b.n = 3 was a region-edge in fa18. Amends ruling 17's clean inputs and extends ruling 41's doors; it only refuses.
    2. Ruling 42 item 1 judges the unique value itself: a plain part read out of a lent unique parameter (t.b) is ordinary region data, and storing or returning it is not a keep (a unique part cannot be read out, E3214). So stash lends q: let o = stash(q); q.b.n = 3 is accepted, and let k as isolated = stash(q) is refused by point 1.
    3. In a lend from a field path (match h.u, for t in h.xs) the whole root h is the holder: read-only for the lend, and not passed to a callee that writes it. Ruling 42 item 2's writing lend is of the matched union itself, never of the record that holds it. A path over a cond has every arm's roots as holders, in a for and in every arm of a match (ruling 48). Addendum (user, 2026-11-16): point 3's holder is read-only only where something is lent: in a match arm that binds a payload (decided per arm; an arm that binds nothing, or names a payload case without binding it, lends nothing) and in a lending for body. Corrected (user, 2026-11-16): an arm that binds no payload opens no window whatever the payload's capability; an arm that binds an isolated payload is a window (ruling 27's bullet reads "a for or match arm that binds an isolated element or payload"). Point 1's closed unique argument is a clean input only outside a window: not when read from a slot, not an acquired state or reached from one, and not inside an open window (modify, acquire, a one-call or one-statement open, an isolated-payload arm), since a callee may move its isolated or unique parts into a result that would then leave the window.
  45. The fa22 regeneration's six families, and six places the compiler comes to the rulings (user, 2026-11-16). Four decisions each get one point in the compiler: (A) does a match consume or lend, (B) is a variable a guarded root, (C) do two operands of a statement reach one unique value, (D) what standing and capability a new binding takes from the value moved into it.

    1. In a lending match the matched variable is guarded only in an arm that binds a payload, whatever the payloads; an arm that binds nothing may reassign, swap, pass by reference, move or copy it (amends ruling 29's root guard; model round fa23) (ruling 49: no arm lets the root cross a thread; under ruling 50's call rule). A cond subject's locals stay put in every arm (fa23 refuses what fa22's ARM-BINDS-HOLDER had relaxed) (ruling 48: every arm; the whole root read-only when the union has a unique or isolated payload).
    2. Ruling 40 covers every un-opened isolated subject holding a union, named or not: a variable, an isolated call result, a swap/pop/remove result, an as isolated expression, a cond of such values (which moves every isolated variable it names); the temporary takes the oldest standing of what moved into it. match job.state and a fresh plain temporary still lend (fa23).
    3. Such a bare match moves its subject at the head whether or not an arm binds; a read in any arm or after is E3102 (the compiler comes to ruling 40).
    4. A lending match never consumes its subject at any layer: only a linear or Reply-holding union or an un-opened isolated subject is consumed; a plain union and an isolated variable inside its own modify stay readable. Where the match is the last use the bind still moves (no emitted-code change).
    5. A message or factory parameter with no capability word goes on to an isolated position only when its type is closed (fa23 switch). A failed send's hand-back is an isolated binding whatever its closure (maintainer, 2026-11-16), on condition that no plain part read out of it outlives the statement and it is not handed on afterwards; ruling 41 part 1 loses the hand-back door. A bare match on a message parameter with no capability word consumes it, closed or not (ruling 40).
    6. Ruling 42 item 2's exclusion applies when an arm binding's name occurs anywhere in the statement: a bare name, a field or element path root, a receiver, a nested call's argument, a captured name (ruling 18).
    7. The compiler comes to the rulings, none relaxed: the root consumed inside its own modify (rulings 10, 29), modify on a temporary (E3199), a container reassigned inside a for that lends from it (rulings 20, 26, 43), a unique slot path beside its root in one call (ruling 18), outer linear data consumed inside a window (rulings 10, 42), standing laundered through a union or record literal (ruling 41 part 2). Four compiler defects are confirmed, each bounded by what fa22 accepts: a loop refill of a consumed isolated union variable when every path to the back edge refills it (W2); I4 for parameters and unique payloads; r.fin() after g(r) with r mutable Rl; a field write counted as a fresh-local read. Model rule set core-m3w-fa23 (capmodel fbcbf1b, REPORTFA23; switches ARM-NOBIND, ISO-TEMP-CONSUME, MSG-CLOSED, HANDBACK-ISO with its condition): 0 holes under both oracles on its hand corpus (169) and three 2,000-program gadgets; each acceptance's guard switched off is caught by the oracle. Red team AN (capmodel 8fcc2b6) found H-AN1 and B-AN1 (a cond inside a field path had no roots); core-m3w-fa24 (capmodel a47457d; COND-PATH-ROOTS and the every-arm guard) closes both with 0 holes; red team AO (capmodel 3d1ac7d) found no hole: core-m3w-fa24 was then the final rule set. An oracle defect (a handler's binding was never ended in the last-use flow) was repaired as O-HANDLERBINDS. Model rule set core-m3w-fa19 (capmodel 02684ae, REPORTFA19) carries ruling 43 and LEND-CLOSED; red team AL (a3c85c3) found a cond of unique locals getting past LEND-CLOSED (the compiler refuses it), repaired in fa20. core-m3w-fa20 (capmodel afe717b, REPORTFA20; LEND-CLOSED-COND looks through a cond's arms, LEND-CLOSED-KEPT applies point 1 to kept arguments) has 0 holes under both oracles. Red team AM (f6d14f8) found NO hole and no checker bug in fa20: the review loop is closed under the S0 stop rule. Its one conformance gap (two clean-result doors, an async start and a consuming receiver, skipped LEND-CLOSED with no damage, since either needs the variable's moving first read) is core-m3w-fa21 (capmodel e4dc2d6, LEND-CLOSED-DOORS), which only refuses. The model's final rule set is core-m3w-fa21. (Ruling 44: in a lend from a field path the whole root is the holder; LEND-CLOSED is the crossing check this ruling relies on.)
  46. A cond subject's roots, found by one structural walk, are holders in every arm (user, 2026-11-16).

    1. A subject's roots come from one structural walk: a field or element path takes its base's roots; a cond takes every arm's roots, at any depth (cond(a, cond(b, h, g), k).u.v, an element path over a cond); a match expression and a try … otherwise <value> merge count as a cond (ruling 47); a call takes the roots of every argument that can reach its result, the receiver included, and a result declared fresh takes none (ruling 50).
    2. In a match or lending for whose subject is a cond or a path over one, every root is a holder in every arm, binding or not, when the matched union has a unique or isolated payload: read-only, and not reassigned, swapped, moved, passed by reference or passed to a callee that writes it (ruling 44 point 3 without its addendum); over a plain-payload union the roots only stay put and their fields stay writable. Every arm is judged as a binding arm of the bare form. h.n = 5 in a non-binding arm of match cond(c, h, g).u is refused, and accepted under match h.u, by design.
    3. This is the root guard only: an arm is a window only when it binds an isolated payload (ruling 27).
    4. No narrowing to a guard of rebinding only: where a unique or isolated payload can be lent, a root is either a read-only holder or unguarded, and callee writes are per parameter. Model rule set core-m3w-fa24 (capmodel a47457d).
  47. A held match subject does not cross; an owned local of a closed type is the whole of its region; the arms of a value merge are alternatives (user, 2026-11-17).

    1. Inside any arm of a lending match, binding or not and whatever the payloads, every held value (ruling 50) is not the whole of its region: not a send argument, a spawn factory argument, a reply or any other isolated position, and not a clean input of a call (ruling 44 point 1). A binding the root is moved into inside the arm takes the hold with it until the match ends, at the point that gives a binding its standing (ruling 41 part 2). In a non-binding arm try s.take(u) and spawn Sk.create(u) are E3214, and s.take(idUT(u)) is E3200 at the crossing. 45.1's in-thread uses are unchanged. Why: ruling 21 holds the subject across its arms at run time, so a value the sender's match still holds would be reached from two threads. Send before or after the match. Not decided: letting the root cross from a non-binding arm.
    2. An owned local of a unique or linear type whose type is closed (ruling 41 part 1's predicate) goes where an isolated value goes, with no freshness asked: the frame's own local (not a lent parameter, a for or arm binding, or a slot read), not held (point 1, or a lending for over it), under the existing window rules (45.7; ruling 44's addendum point 2). The use moves it. Why: a closed type has no plain part, so nothing outside the value names any part of it. Ruled out: freshness or as isolated for a unique local to cross; a second predicate at any one door. Model switch OWNED-LOCAL in core-m3w-fa25; no door that refuses today accepts before fa25 is clean.
    3. The arms of a ternary, a match expression and a try … otherwise <value> are alternatives: a linear or unique variable named in several arms is moved once, and the merge moves every such variable any arm names (rulings 23, 45.2). (u if c else u) moves u. Model switch MERGE-ARMS-ALT in core-m3w-fa25. A linear variable moves in its arm under the if rule: every path through the merge moves the same linear variables, whatever the arm's form, so (r.me() if c else r) is accepted and try make() otherwise a is E3223 on a. The join's roster and the transparent lend (R-c) are for unique values that are not linear; a lent linear merge is a temporary that owns the value. The model's R-LIN-COND lift is widened under #257 (#30, readings R-e to R-g).
    4. Confirmed: ruling 29's stay-put guard binds the root in every arm that binds a payload, plain union included; standing through a union or record literal is 45.7 as written; ruling 42 item 5 covers every consume by the owner after a by-reference pass. Amends ruling 41 part 1; extends rulings 21, 42 item 6, 44 point 1, 45.1 and 47. core-m3w-fa25 (capmodel b97f552) is the final rule set: OWNED-LOCAL, MERGE-ARMS-ALT, HELD-TAKEN-OUT and HELD-CALLEE at 0 holes; red team AP found H-AP1 (ruling 50), AQ a checker bug in the window-shadow identity (fixed, 6b8b5fe), and AR found no hole.
  48. The hold of a lending match follows the value, in the frame and through a call (user, 2026-11-17).

    1. Inside any arm, a value is held when it may be, or may contain, what the match read at its head: a root of the subject (ruling 48's walk, where a call takes the roots of every argument that can reach its result, the receiver included, and a result declared fresh takes none: match a.get(0) roots a); a binding or holder a held value is moved or stored into (49.1); anything taken out of, or reachable from, a held value (swap on a slot under it, pop, remove, removeFirst, take, and any call a held argument can reach). One predicate.
    2. A held value is not the whole of its region: 49.1's refusals apply to every held value, and 49.2's "not held" reads this predicate. In a non-binding arm, swap h.u with v and a.pop() stay legal (45.1) and yield held values; handing one to a send, a spawn, a reply or an isolated position is refused.
    3. A call takes a held value only when nothing of it can leave the call except through its result: a per-parameter fact of the callee, point 1's predicate run over its body with that parameter held. The value leaves when the callee hands it, or anything taken out of it, to a crossing door or isolated position; stores it outside the parameter's own graph; throws it; lends it to a coroutine; or passes it to a parameter that lets it leave. Returning it is not leaving. A callee with no summary (a function value, an interface method, an opaque body) lets it leave unless the parameter is immutable. The same for a mutable by-reference parameter, a receiver and a plain parameter.
    4. Binding arms and cond subjects are unchanged (rulings 29, 43, 48); they apply to the roots point 1 adds. Why: a callee is checked alone and cannot see its caller's match. Fix: take the value out, or call the function, before or after the match. Ruled out: refusing every by-reference pass of a root; a per-local "touched while held" fact; withdrawing 49.2 inside every arm; library methods as primitives. Not decided: ending the run-time hold at the entry of an arm that binds nothing. Amends 45.1; extends rulings 21, 44 point 1, 48 and 49.1. Model switches HELD-TAKEN-OUT and HELD-CALLEE in core-m3w-fa25. The compiler: #235. H1 readings (#30, H-1 to H-7): a value that existed before the expression being resolved began is a root, except along the holder chain: a value read out of a field is part of its holder whenever it was read, for the root walk and for a store into a holder alike (H-10). Every isolated position asks the hold through one check: an isolated declaration, parameter and return, a swap replacement, a store into an isolated slot, an assignment to an isolated variable, and merge; freeze is exempt (H-11). A name that outlives its statement and may be part of another binding's graph either leaves that binding unable to cross, is refused at its binding (E3214), or lives inside a window that nothing held enters (match x on a cell-resident x roots the cell; match self.f roots self); a value's hold is decided when it is minted; "a result declared fresh takes none" means the callee declares returns isolated, and only for the root walk: forward, every non-value result takes the hold of a held argument that can reach it; a closure takes the hold of what it captures; an isolated parameter or return is judged at the isolated-position door, the spawn and reply doors only an unmarked one; a holder takes the hold only from a store the frame makes, and a store through a call is point 3's (H-8).

    The interpretations and open questions of the earlier rounds' reports (I19–I90, H9–H27) no longer bind; what the core still needs of them is a rule above.

    S0 stop rule (user): red-team rounds continue, one fresh red team per round, until a round finds no hole of any kind (checker bugs included); then the user re-approves spellings and counts and stage A starts. Fix rounds run light gates (every corpus and red-team suite, self-tests, one 20k campaign with all gadgets); the full battery (5×20k, 100k, interleaving sweep, mutation gate, oracle-mutation table) runs once, on the round that comes back clean, before S0 closes.

The standing criteria still apply, in order: soundness (non-negotiable), then the fewest annotations, and every check local. The exceptions are call-graph facts the user chose over markers: the may-wait and may-yield bits (ruling 6), parameter and result capabilities (ruling 4). Each is a small fact per function or parameter, conservative where a callee is unknown, never inferred across interface or function-type boundaries (ruling 19), with no tracking of what points to what. Parameter-capability inference is the closest relative of the write inference that failed before, so S0 models it and the red teams attack it first. Breaking changes are made freely. The executable model must report 0 counterexamples, confirmed by independent red teams, before any compiler work begins.

What Maxon code looks like

New words: isolated, immutable, mutable (on a value-type, isolated or unique parameter or function-type parameter, and on interface requirements and function types), modify, freeze, swap, merge, acquire, is unique, is sendable, and a self parameter with a capability. Everything else is today's Maxon (docs/WRITING_MAXON_CODE.md). "E-new" marks a diagnostic the design adds; its number is assigned at implementation. Samples marked fragment use types from an earlier sample or from the named file. Comments in the samples are for this plan only.

Three rules change how ordinary code reads:

  • E3077 asks for let on any local that is never reassigned, including one whose array is pushed to. Today such a local must be var. A parameter is let unless marked mutable, and passing a var to a mutable parameter counts as reassigning it (ruling 14).
  • Records alias freely inside a region. let b = a no longer moves a, and a closure shares what it captures; both are counted references in one region. E3102 (use after move) stays for isolated values, unique values and sends.
  • Struct literals stay legal only inside their own type (E3076), so every sample builds through a factory.

1. Ordinary code needs no markers; let only stops reassignment

typealias Tally = int(0 to u64.max)
typealias Column = function(Counts) returns Tally
typealias ColumnArray = Array with Column

type Counts
	export var lines = 0 as Tally
	export var words = 0 as Tally

	static function create(lines Tally, words Tally) returns Self
		return Self{lines: lines, words: words}
	end 'create'
end 'Counts'

type Report
	let columns as ColumnArray

	static function create() returns Self
		return Self{columns: ColumnArray.create()}
	end 'create'

	function addColumn(column Column)
		self.columns.push(column)
	end 'addColumn'

	function render(counts Counts) returns String
		let row = StringBuilder.create()

		for column in self.columns 'eachColumn'
			row.append("{column(counts):8}")
		end 'eachColumn'

		return row.build()
	end 'render'
end 'Report'

function main() returns ExitCode
	let report = Report.create()
	report.addColumn(function(counts Counts) gives counts.lines)
	report.addColumn(function(counts Counts) gives counts.words)
	print("{report.render(Counts.create(3, words: 12))}\n")
	return 0
end 'main'
  • self.columns.push(column) writes through a let field. Today that is E3159; after, it is legal: the field is never reassigned, and the array it holds may change.
  • let report and let row are written through (addColumn, append). Today both must be var.
  • Adding report = Report.create() to main is refused, as today. Today's wording ("cannot assign to immutable variable: 'report'") is reworded, because "immutable" now means frozen: "'report' is a let and cannot be reassigned".

A program that never shares data between threads, never freezes anything and never builds a separate region writes no capability words at all.

2. Immutable data: freeze and immutable

typealias Coord = float(f64.min to f64.max)
typealias FieldNumber = int(0 to 1024)

type Point
	export var x as Coord
	export var y as Coord

	static function create(x Coord, y Coord) returns Self
		return Self{x: x, y: y}
	end 'create'
end 'Point'

function plot(p Point) returns String
	return "({p.x}, {p.y})"
end 'plot'

type Settings
	export var field as FieldNumber
	export var numeric as bool

	static function create(field FieldNumber, numeric bool) returns Self
		return Self{field: field, numeric: numeric}
	end 'create'
end 'Settings'

let origin = Point{x: 0.0, y: 0.0}
let standard = Settings{field: 0, numeric: false}

function adjusted(numeric bool) returns Settings
	let mine = standard.clone()
	mine.numeric = numeric
	return mine
end 'adjusted'

function broken(numeric bool)
	standard.numeric = numeric
end 'broken'

function main() returns ExitCode
	let cursor = Point.create(0.0, y: 0.0)
	cursor.x = 1.0
	let pinned = freeze Point.create(2.0, y: 3.0)
	print("{plot(origin)} {plot(pinned)} {cursor.x} {adjusted(true).numeric}\n")
	return 0
end 'main'
  • A type carries no capability, as in Verona. cursor is a mutable Point; pinned and origin are frozen ones. Creating a value makes it mutable in the current region. freeze Point.create(2.0, y: 3.0) needs no isolated: the call's inputs are plain numbers, so its result cannot point into the current region and is a region of its own, which freeze turns immutable (ruling 17). freeze cursor is refused: cursor was written as an ordinary mutable value, so it is part of this region ("'cursor' is used as mutable at line 3; freeze a copy: freeze cursor.clone()"). plot only reads p, so it takes cursor, pinned and origin alike (ruling 4). A use that keeps or shares the value beyond the call says p immutable Point: a message parameter, a field of frozen data.
  • Module lets are known at compile time (ruling 30). An initializer is built from literals, constants and record literals, never a call, so standard is immutable Settings image data and nothing runs before main. A record literal is allowed at module scope although E3076 refuses one elsewhere outside its type.
  • clone() reads its receiver (inferred read-only) and returns a fresh, mutable copy in the current region.
  • broken is E-new: "cannot write 'numeric' through 'standard', which is immutable".

3. Read-only parameters are inferred; immutable self when a method needs frozen data

An unmarked parameter or receiver that the function only reads accepts a mutable, read-only (inside a block) or immutable argument. One the function writes accepts only a mutable argument; one it sends or freezes accepts only an immutable one. Nothing in the source says which; hover shows it (ruling 4).

A method may still declare self as its first parameter with a capability, for the cases inference cannot express: function submitTo(immutable self, …) exists only on frozen values. self is never written at the call (table.count()), and the first argument after it stays positional.

Receiver Callable on Inside the body
(omitted), never written a mutable, read-only or immutable receiver self is read-only; a result reached from self takes the receiver's capability
(omitted), written a mutable receiver self is writable
(omitted), sent or stored as frozen data an immutable receiver self may be shared
immutable self a frozen receiver only self may be sent, stored anywhere, or shared
typealias RowArray = Array with Row

type Row
	export var text as String

	static function create(text String) returns Self
		return Self{text: text}
	end 'create'
end 'Row'

type Table
	var rows as RowArray

	static function create() returns Self
		return Self{rows: RowArray.create()}
	end 'create'

	function count() returns Count
		return self.rows.count()
	end 'count'

	function first() returns Row
		return try self.rows.get(0) otherwise panic("first: called only after add")
	end 'first'

	function add(row Row)
		self.rows.push(row)
	end 'add'

	function submitTo(immutable self, auditor Auditor.handle)
		try auditor.check(self) otherwise ignore
	end 'submitTo'
end 'Table'

type Auditor
	static function create() returns Self
		return Self{}
	end 'create'

	export function check(table immutable Table)
		print("audited {table.count()} rows\n")
	end 'check'
end 'Auditor'

function describe(table Table) returns String
	return "{table.count()} rows"
end 'describe'

function stamp(table Table)
	table.add(Row.create("stamped"))
end 'stamp'

function main() returns ExitCode
	let live = Table.create()
	live.add(Row.create("a"))
	let frozen = freeze Table.create()
	print("{describe(live)} {describe(frozen)}\n")
	stamp(live)
	let mine = live.first()
	mine.text = "b"
	print("{live.first().text}\n")
	frozen.submitTo(spawn Auditor.create())
	return 0
end 'main'
  • Inferred, per parameter. count, first and describe only read their table, so they accept live and frozen alike. add writes self, and stamp passes table to add, so both take only a mutable table. The function is still checked once and compiled once.
  • How it is inferred: each unmarked parameter is a capability variable, and the body is checked against it with Reggio's "assignment needs equal capabilities". Writing through it, opening an isolated value inside it, passing it (or a field of it) to a mutable-only parameter, storing it or capturing it makes it mutable-only. Passing it to an immutable parameter or sending it makes it immutable-only. Only reading it leaves it open to any capability (ruling 4).
  • Results adapt, inferred. A result reached from a parameter (here self, through self.rows.get(0), whose result comes from its receiver) takes that argument's capability, because every return path comes from self. live.first() is a writable Row, the same row live holds, so the program's second line is b; frozen.first() is immutable Row. A function with one path returning Row.create("x") and another returning t.first() does not adapt: its result is mutable, so t is fixed to mutable-only. If a result comes from two parameters, their arguments must have the same capability at the call; pick(mutRow, b: frozenRow) is E-new ("'pick' returns 'a' or 'b'; they must both be mutable or both immutable here").
  • immutable self methods exist only on frozen values. submitTo sends self with no move and no copy. A method name is declared once per type (ruling 31), so there is no second submitTo for mutable tables. Interface requirements are read-only unless declared mutable self (ruling 19), and an interface value carries its capability.
  • Errors:
    • frozen.add(Row.create("x")) is E-new: "'add' writes its receiver (line 2: self.rows.push(row)); 'frozen' is immutable".
    • function relay(t Table, auditor Auditor.handle) that calls auditor.check(t) makes t immutable-only, so relay(live, auditor: a) is E-new: "'relay' sends 't' to a service ('check' takes immutable Table); 'live' is mutable. Freeze it first".
    • stamp(frozen) is E-new: "'stamp' writes 'table' (it calls 'add', which writes its receiver); 'frozen' is immutable".
    • live.submitTo(…) is E-new: "'submitTo' is declared immutable self; 'live' is mutable. Freeze it first".
  • No markers for readers. stdlib's Array, Map, Set and String readers need none, including the ones that return an element.
  • immutable on a parameter means the function keeps or shares it (sends it, stores it in frozen data). It accepts only frozen values: a mutable one could change while another thread reads it. A parameter the function only uses during the call is left unmarked and accepts anything it does not write.

4. Build, then freeze

typealias LineNumber = int(1 to u32.max)
typealias DeclarationMap = Map with (String, Declaration)
typealias DeclarationArray = Array with Declaration

type Declaration
	export var name as String
	export var line as LineNumber

	static function create(name String, line LineNumber) returns Self
		return Self{name: name, line: line}
	end 'create'
end 'Declaration'

type IndexBuilder
	var byName as DeclarationMap

	static function create() returns Self
		return Self{byName: DeclarationMap.create()}
	end 'create'

	function add(declaration Declaration)
		self.byName.upsert(declaration.name, value: declaration)
	end 'add'

	function lineOf(name String) returns LineNumber
		let found = try self.byName.get(name) otherwise panic("lineOf: every name was added")
		return found.line
	end 'lineOf'
end 'IndexBuilder'

typealias SettledIndex = immutable IndexBuilder

function buildIndex(declarations DeclarationArray) returns SettledIndex
	let builder = IndexBuilder.create() as isolated IndexBuilder

	modify builder 'fill'
		for declaration in declarations 'eachDeclaration'
			builder.add(declaration.clone())
		end 'eachDeclaration'
	end 'fill'

	return freeze builder
end 'buildIndex'
  • The index fills a region of its own. as isolated IndexBuilder declares that builder is a region of its own (ruling 15); the initializer's inputs are clean, so it is accepted (ruling 17). Without the declaration builder is ordinary mutable data, and modify builder and freeze builder are refused. Inside the modify block, declarations is read-only, so each element is copied into builder's region with clone().
  • freeze builder turns the whole region immutable, and the result is shared freely as SettledIndex. For a local, freeze, swap and a send consume the binding (reading builder afterwards is E3102); the writable-holder rule applies to fields and elements.
  • One type, both phases. lineOf never writes self, so it works while the index is built and after it is frozen; add (mutable self) is refused on the frozen one. A typealias names the frozen form.
  • Alternative: a record that is filled and then published, like the compiler's SettledDeclarations (SignatureIndex.maxon:17169), keeps the builder in an isolated field and the result in an immutable one: self.published = freeze swap self.settled with IndexBuilder.create(). An isolated field never holds frozen data, so there is no in-place freeze of a field.

5. Separate regions: isolated, modify, swap

typealias Tally = int(0 to u64.max)
typealias WordCounts = Map with (String, Tally)
typealias WordArray = Array with String

type WordIndex
	var counts as WordCounts

	static function create() returns Self
		return Self{counts: WordCounts.create()}
	end 'create'

	function add(word String)
		let seen = try self.counts.get(word) otherwise 0
		self.counts.upsert(word, value: seen + 1)
	end 'add'

	function absorb(other WordIndex)
		for (word, seen) in other.counts 'eachWord'
			let mine = try self.counts.get(word) otherwise 0
			self.counts.upsert(word, value: mine + seen)
		end 'eachWord'
	end 'absorb'
end 'WordIndex'

type Indexer
	var index as isolated WordIndex
	var filesSeen = 0 as Tally

	static function create() returns Self
		return Self{index: WordIndex.create()}
	end 'create'

	function addWords(words WordArray)
		modify self.index 'fill'
			for word in words 'eachWord'
				self.index.add(word)
			end 'eachWord'
		end 'fill'

		self.filesSeen = self.filesSeen + 1
	end 'addWords'

	function addWord(word String)
		self.index.add(word)
	end 'addWord'

	function takeIndex() returns isolated WordIndex
		return swap self.index with WordIndex.create()
	end 'takeIndex'
end 'Indexer'
  • var index as isolated WordIndex is a separate region the Indexer owns and can hand off whole.

    var index as WordIndex var index as isolated WordIndex
    where the index lives in the Indexer's region, like any field in a sealed region of its own
    changing it self.index.add(word) the same for one call; modify self.index for several statements
    storing outside objects into it allowed values and copies only
    handing it to another service or freezing it alone a deep copy (self.index.clone()), O(size) swap it out, O(1), no copy

    Mark a field isolated only when that part is handed off or frozen on its own (a batch a service ships, the pages a Document sends to a Printer in sample 8, an index built and then published). Most fields need nothing.

  • New regions are inferred. WordIndex.create() stored into the isolated field needs no marker: a call whose inputs are all values, immutable or moved isolated data cannot point back into the current region, so its result is a region of its own (ruling 17).

  • modify x 'label' … end 'label' opens an isolated local, parameter or field. Inside, x keeps its name and is writable (the checker tracks the change, as it tracks moves), so self.index is writable while everything else outside (the rest of self, words) is read-only. for over the read-only words uses the array's read-only iterator; each String is a value, so it crosses in.

  • One call opens it implicitly. self.index.add(word) in addWord is a one-statement modify block around that call.

  • swap takes the whole region out in O(1).

  • Nothing mutable leaves a block. A value leaving a modify block (or an implicit one-call open) by any exit — the end, return, throw, break — must be a value, immutable or a fresh isolated.

  • What a modify block may change:

    Writable inside the block Read-only inside the block
    the modified value and everything it reaches objects from outside the block (words, the rest of self)
    objects created inside the block (they join the region once stored into it)
    locals declared inside the block
    outer vars holding values (numbers, bool, String) outer vars holding records (cannot be reassigned)

    Outside data goes in as a value or a copy (clone()), so the region never points out and can still be frozen or sent in O(1) afterwards.

  • No other coroutine runs inside, and nothing inside waits on another party. A modify block (or one-call open) may not await a coroutine or a message reply, acquire, or call anything that may wait or may yield; while it is open the green thread does not switch to a sibling coroutine. I/O such as print just blocks the strand.

  • Errors (all compile-time):

    • self.index.absorb(spare) with spare a mutable WordIndex from outside is E-new: "'spare' is mutable outside 'index'; a call into an isolated region takes values, immutable or isolated".
    • Inside 'fill', self.takeIndex() is E-new: "'takeIndex' needs a writable receiver; 'self' is read-only while 'fill' is open". The same rule refuses reopening, sending or freezing self.index there.

6. Services stay as they are; what crosses a message changes

Services are written as today (spawn, export messages, try … otherwise, sendTimeout:, shutdown). What crosses changes: a message argument or reply is isolated (moved, O(1), no run-time walk), immutable, a value, or a handle.

msort's sortedChunks, today (examples/msort.maxon:524-532). Each line is cloned so the chunk has one owner, and the runtime walks the chunk at the send to check it (exit 96 if not):

var chunk = LineArray.create()
chunk.reserve(share)

for position in first upto stop 'eachLine'
	let line = try lines.get(position) otherwise panic("sortedChunks: every position lies inside the input")
	chunk.push(line.clone())
end 'eachLine'

replies.push(try sorter.sortLines(chunk) otherwise panic("sortedChunks: a fresh sorter refuses its only chunk"))

After (fragment of msort). The chunk is built in its own region and moved. There is no clone (String is a value) and no walk:

let chunk = LineArray.create() as isolated LineArray

modify chunk 'fill'
	chunk.reserve(share)

	for position in first upto stop 'eachLine'
		chunk.push(try lines.get(position) otherwise panic("sortedChunks: every position lies inside the input"))
	end 'eachLine'
end 'fill'

replies.push(try sorter.sortLines(chunk) otherwise panic("sortedChunks: a fresh sorter refuses its only chunk"))

Reading chunk after the send is E3102: it moved. The spawn at msort.maxon:513 becomes spawn Sorter.create(freeze settings.clone()): settings.clone() is already a fresh region (ruling 17), and the freeze is there because Sorter.settings is typed immutable SortSettings, so every sorter can share it.

The service side (examples/msort.maxon:419-443):

type Sorter
	var settings as immutable SortSettings

	static function create(settings immutable SortSettings) returns Self
		return Self{settings: settings}
	end 'create'

	export function sortLines(lines isolated LineArray) returns isolated LineArray
		modify lines 'read'
			let rows = rowsFrom(lines, maker: self.settings.keyMaker())
			rows.sort(self.settings.comparator())
			let sorted = LineArray.create() as isolated LineArray

			modify sorted 'write'
				sorted.reserve(rows.count())

				for row in rows 'eachRow'
					sorted.push(row.text)
				end 'eachRow'
			end 'write'

			return sorted
		end 'read'
	end 'sortLines'
end 'Sorter'
  • settings is frozen, and keyMaker() and comparator() only read it (inferred), returning fresh values. The closures they build capture nothing (function(left Row, right Row) gives left.key.compare(right.key)).

  • What needs a marker. A message parameter or reply of a record type says isolated or immutable. Values (numbers, String, enums) and handles need nothing.

  • A record sent without isolated (fragment, against a message export function rankRows(rows isolated RowArray) returns isolated RowArray):

    let rows = RowArray.create()
    rows.push(current)
    let ranked = try sorter.rankRows(rows) otherwise panic("rankRows: refused")
    print("{ranked.count()}\n")
    

    rows is ordinary mutable data of this region, so the send is E-new: "'rankRows' takes isolated RowArray; 'rows' is mutable. Declare it as isolated RowArray, or send rows.clone()". Declaring it is not enough here: rows.push(current) then opens rows for that call, and current is a mutable Row of this region, so the push is E-new: "a call into isolated 'rows' takes values, immutable or isolated; 'current' is mutable. Push current.clone()".

7. Atomic updates across services: the acquire block

typealias Money = int(i64.min to i64.max)
typealias EntryArray = Array with Money

type Account
	var balance as Money
	var history as EntryArray

	static function create(opening Money) returns Self
		return Self{balance: opening, history: EntryArray.create()}
	end 'create'

	function canPay(amount Money) returns bool
		return self.balance >= amount
	end 'canPay'

	function change(by Money)
		self.balance = self.balance + by
		self.history.push(by)
	end 'change'

	function entries() returns EntryArray
		return self.history
	end 'entries'

	function replaceHistory(entries EntryArray)
		self.history = entries
	end 'replaceHistory'

	export function balanceNow() returns Money
		return self.balance
	end 'balanceNow'
end 'Account'

function transfer(source Account.handle, target Account.handle, amount Money) returns bool
	acquire source, target 'move'
		if not source.canPay(amount) 'short'
			return false
		end 'short'

		source.change(-amount)
		target.change(amount)
	end 'move' otherwise 'stopped'
		return false
	end 'stopped'

	return true
end 'transfer'

function main() returns ExitCode
	let a = spawn Account.create(100)
	let b = spawn Account.create(0)
	let moved = transfer(a, target: b, amount: 30)
	let left = try await a.balanceNow() otherwise 0
	print("{moved} {left}\n")
	return 0
end 'main'
  • acquire source, target 'move' … end 'move' takes both services at once and runs the block. Inside, source and target name the services' state (Account), not the handles. No message to either runs until the block ends, so the program prints true 70: no message can see the money in flight.

  • One writable at a time. Both states start read-only inside the block. source.change(-amount) opens source for that call, then target.change(amount) opens target. Several statements on one service use modify source 'debit' … end 'debit'. The block is still atomic, because it holds both services throughout.

  • It is an ordinary block. It runs on the caller's green thread; the calling coroutine parks until both services are free, and the thread's other coroutines keep running meanwhile. return, break, continue and throw leave it as they leave any block, and every service is released on the way out; return false returns from transfer. A value leaving it must be a value, immutable or a fresh isolated, so nothing mutable from a service outlives the hold.

  • transfer is an ordinary function. let moved = transfer(a, target: b, amount: 30) waits for its result; async transfer(…) runs it as a coroutine.

  • otherwise handles a stopped service. With (e) it binds which handle stopped. An acquire does not take mailbox capacity, so it has no mailboxFull case.

  • What the block may use from outside: values and frozen data, read or passed in; a var of a value type, assigned; an isolated, moved in. Outside mutable data is read-only inside.

  • Ordered with messages; deadlock-free. A message sent to a before the block starts runs before it. An acquire takes every service it names at once, and code that holds services never waits (sample 9).

  • Names. Inside, each name means its service's state. A handle reached through an expression is bound with let first (let source = self.left).

  • The same service named twice is taken once. Since two names may then be one object, states of the same type are treated as possibly the same: holds are kept across a write to either.

  • The states cannot leave. freeze source, merge source, swapping it, or passing it to an isolated parameter is refused: the service keeps its state.

  • Layout. otherwise follows end on the same line, as else does.

  • No mixing between services (fragment of a function over two Account handles):

    acquire first, second 'mix'
    	first.replaceHistory(second.entries())
    end 'mix' otherwise 'stopped'
    	return false
    end 'stopped'
    

    E-new: "'second.entries()' is read-only while 'first' is open; pass a copy: first.replaceHistory(second.entries().clone())". While first is open, second is read-only, and read-only (Accepted spelling, model fa5 Z3: historyCopy() returns isolated EntryArray, replaceHistory(entries isolated EntryArray) stores merge entries, and the copy is bound first: let copy = second.historyCopy() then first.replaceHistory(copy); the inline forms are E3201.) data cannot be stored into writable state. The copy goes inline because a clone() is a fresh region only at its own expression: bound first to a local, it is ordinary mutable data of the block, which a call opening first refuses. The check is local to this statement.

8. Coroutines share the caller's data, structured

typealias Tally = int(0 to u64.max)
typealias PathArray = Array with immutable FilePath
typealias LinesPromise = Promise with StringArray
typealias LinesPromiseArray = Array with LinesPromise

type RunSummary
	export var filesRead = 0 as Tally

	static function create() returns Self
		return Self{}
	end 'create'
end 'RunSummary'

function readLines(path FilePath) returns StringArray
	let text = try File.readText(path) otherwise return StringArray.create()
	return text.split("\n")
end 'readLines'

function countLines(path FilePath, summary RunSummary) returns Count
	let lines = readLines(path)
	summary.filesRead = summary.filesRead + 1
	return lines.count()
end 'countLines'

function readAll(paths PathArray, summary RunSummary) returns StringArray
	let reads = LinesPromiseArray.create()

	for path in paths 'startReads'
		reads.push(async readLines(path))
	end 'startReads'

	let lines = StringArray.create()

	for pending in reads 'finishReads'
		lines.append(await pending)
		summary.filesRead = summary.filesRead + 1
	end 'finishReads'

	return lines
end 'readAll'

function countBoth(first FilePath, second FilePath, summary RunSummary) returns Count
	let one = async countLines(first, summary: summary)
	let two = async countLines(second, summary: summary)
	return await one + await two
end 'countBoth'
  • Untied promises go anywhere a value goes. readAll's paths are immutable, so async readLines(path) takes only frozen data and its promise is not tied: it sits in the array reads, and the reads overlap. Each awaited result is a fresh region, written into lines as plain data.

  • Sharing is legal, in locals. countBoth shares the mutable summary with both coroutines. Each promise holds summary, so it is tied: it lives only in a local (never in a field or a container), cannot be returned, captured or sent, and is drained by an unconditional consuming await before the function returns. Every other exit (a throw, an early return, a propagating try) first awaits or .cancel()s each tied promise explicitly, or it does not compile; cancelling a tied promise waits for its coroutine to stop. An async call, a coroutine await or a may-yield call inside a modify or acquire block is refused.

  • A container of tied promises is an error. reads.push(async countLines(path, summary: summary)) is E-new: "this promise holds 'summary', which is mutable in the caller's region; a container cannot hold it. Await it in a local, or pass frozen or isolated data".

  • Returning one is an error (fragment):

    typealias TextPromise = Promise with String
    
    function describeLater(table Table) returns TextPromise
    	return async describe(table)
    end 'describeLater'
    

    E-new: "this promise holds 'table', which is mutable in the caller's region; await it in this function, or pass an isolated or frozen table so the promise may leave".

  • Awaiting a coroutine inside an open region is refused at compile time. (print inside printPages's modify block is fine: while a block is open the green thread does not switch to a sibling coroutine, so I/O just blocks the strand.)

    typealias PageArray = Array with Page
    
    type Page
    	export var text as String
    
    	static function create(text String) returns Self
    		return Self{text: text}
    	end 'create'
    end 'Page'
    
    type Printer
    	static function create() returns Self
    		return Self{}
    	end 'create'
    
    	export function printPages(pages isolated PageArray)
    		modify pages 'show'
    			for page in pages 'eachPage'
    				print("{page.text}\n")
    			end 'eachPage'
    		end 'show'
    	end 'printPages'
    end 'Printer'
    
    type Document
    	var pages as isolated PageArray
    
    	static function create() returns Self
    		return Self{pages: PageArray.create()}
    	end 'create'
    
    	function takePages() returns isolated PageArray
    		return swap self.pages with PageArray.create()
    	end 'takePages'
    
    	function editWhilePrinting(printer Printer.handle)
    		let printing = async sendPages(self, printer: printer)
    
    		modify self.pages 'edit'
    			self.pages.push(Page.create("late edit"))
    			await printing
    		end 'edit'
    	end 'editWhilePrinting'
    end 'Document'
    
    function sendPages(doc Document, printer Printer.handle)
    	let pages = doc.takePages()
    	try printer.printPages(pages) otherwise ignore
    end 'sendPages'
    

    A coroutine starts running at its caller's next wait. If the await were allowed, sendPages would run there and swap self.pages out from under the open block. The await is E-new: "cannot wait inside 'edit'; another coroutine could run while 'pages' is open. Await before or after the block". Moving await printing after end 'edit' compiles: the edit finishes, then sendPages takes the pages.

  • Unrestricted promises. A promise whose arguments are all isolated, immutable, values or handles is not tied. It may be stored or returned as today, and sent if its payload type is sendable — unless its function may wait (sample 9), in which case it may be kept in locals, returned and awaited, but not stored or passed. A message's reply promise may be stored (msort's replies); awaiting it, or any promise whose origin the function cannot see, counts as a wait for ruling 5.

9. No waiting while holding (inferred, no marker)

Fragment, using Account, EntryArray, Money and transfer from sample 7:

type Ledger
	var entries as EntryArray
	var reviewer as Reviewer.handle

	static function create(reviewer Reviewer.handle) returns Self
		return Self{entries: EntryArray.create(), reviewer: reviewer}
	end 'create'

	export function record(amount Money, a Account.handle, b Account.handle)
		self.entries.push(amount)
		_ = transfer(a, target: b, amount: amount)
	end 'record'

	export function audit()
		let verdict = try await self.reviewer.verdict() otherwise false
		print("{verdict}\n")
	end 'audit'

	export function requestAudit(me Ledger.handle)
		try self.reviewer.verdictTo(me) otherwise ignore
	end 'requestAudit'

	export function verdictArrived(verdict bool)
		print("{verdict}\n")
	end 'verdictArrived'
end 'Ledger'

type Reviewer
	static function create() returns Self
		return Self{}
	end 'create'

	export function verdict() returns bool
		return true
	end 'verdict'

	export function verdictTo(ledger Ledger.handle)
		try ledger.verdictArrived(true) otherwise ignore
	end 'verdictTo'
end 'Reviewer'

function main() returns ExitCode
	let reviewer = spawn Reviewer.create()
	let ledger = spawn Ledger.create(reviewer)
	let fine = try await reviewer.verdict() otherwise false
	try ledger.requestAudit(ledger) otherwise ignore
	print("{fine}\n")
	return 0
end 'main'
  • No marker. The compiler works out which functions may wait on another party: one containing an acquire block, an await of a message reply, a send with a nonzero timeout or a latch wait; one calling a function that may wait; one awaiting a promise from such a function. transfer may wait.
  • Refused: waiting while holding. A message body holds its own service; an acquire block holds what it names.
    • Ledger.record is E-new: "the message 'record' may wait ('transfer' acquires source and target at line 2) while holding its own service".
    • Ledger.audit is E-new: "the message 'audit' awaits a reply from 'reviewer' while holding its own service; send the request with this service's handle and handle the reply in another message".
  • The request/response shape inside services is requestAudit → verdictTo → verdictArrived: each step is a message, and none waits. The ledger passes its own handle (me, here from main) so the answer comes back as a message. A message may also send to its own service to continue later (try me.requestAudit(me) otherwise ignore), which this design allows (today E3136 makes a self-send unspellable).
  • Not holding, waiting is fine. main holds nothing, so it awaits a reply as today.
  • What the inference assumes. Function types and interface requirements never wait: a closure or a conformer that may wait is refused where it is converted to one, so a call through a function or interface value never needs whole-program knowledge. A promise from a function that may wait can be kept in locals, returned and awaited, but not stored in a field or container or passed as an argument, so its await is always visible; starting one with async in holding code is itself a wait. I/O and sleep are not waits on another party; a send with a nonzero sendTimeout: is one (user, 2026-11-02): holding code sends with the default timeout 0 and handles mailboxFull.

10. Parameters are let unless marked mutable

typealias BytePosition = int(0 to u64.max) implements ElementIndex

function skipSpaces(bytes ByteArray, position mutable BytePosition)
	while position < bytes.count() 'skip'
		let b = try bytes.get(position) otherwise panic("skipSpaces: position is below count()")

		if b != 0x20 'found'
			return
		end 'found'

		position = position + 1
	end 'skip'
end 'skipSpaces'

function firstWord(bytes ByteArray) returns BytePosition
	var at = 0 as BytePosition
	skipSpaces(bytes, position: at)
	return at
end 'firstWord'
  • mutable before a value type is write access to the caller's variable (ruling 14, user, 2026-10-31). skipSpaces assigns position, and firstWord's at is updated. Only the marker makes a parameter by reference; nothing is inferred.
  • An unmarked parameter is let. Writing position = position + 1 in a function that declares position BytePosition is E-new: "'position' is a parameter and cannot be reassigned; mark it mutable, or bind a local var".
  • At the call the argument must be a var (or a writable field or element), not a let, a literal or an expression; passing a var counts as reassigning it for E3077. Arguments that overlap a by-reference one are E3186. The same marker on an isolated or unique parameter (function refill(batch mutable isolated LineArray)) takes an isolated or unique local, which the callee may open, swap or replace.
  • Inside a block a by-reference argument must be writable there: an outer var passed to a mutable parameter inside a modify or acquire block must hold a value type, as for any assignment to it there.
  • Across async, a by-reference argument is a mutable argument, so the promise is tied (sample 8), and the variable is lent to the coroutine until the promise is awaited: the caller cannot read, write or pass it in between.
  • A function type or interface requirement spells it the same way (typealias Step = function(mutable Count)); a closure or conformer converts only if its markers match exactly.

11. Generics

typealias JobNumber = int(0 to u64.max)

type Job
	export var number as JobNumber

	static function create(number JobNumber) returns Self
		return Self{number: number}
	end 'create'
end 'Job'

type Pool uses T where T is sendable and T is isolated
	typealias Waiting = Array with T

	var waiting as Waiting

	static function create() returns Self
		return Self{waiting: Waiting.create()}
	end 'create'

	export function submit(item T)
		self.waiting.push(item)
	end 'submit'
end 'Pool'

type Stack uses T
	typealias Items = Array with T

	var items as Items

	static function create() returns Self
		return Self{items: Items.create()}
	end 'create'

	function push(item T)
		self.items.push(item)
	end 'push'
end 'Stack'

typealias JobPoolHandle = Pool.handle with isolated Job
typealias JobStack = Stack with Job
typealias FrozenJobStack = Stack with immutable Job

function queueJobs(pool JobPoolHandle, count JobNumber)
	for number in 1 to count 'eachJob'
		try pool.submit(Job.create(number)) otherwise ignore
	end 'eachJob'
end 'queueJobs'

function stacks() returns (JobStack, FrozenJobStack)
	let mine = JobStack.create()
	mine.push(Job.create(1))
	let shared = FrozenJobStack.create()
	shared.push(freeze Job.create(2))
	return (mine, shared)
end 'stacks'
  • where T is sendable: a service over T must be able to send every T. Pool with Job is E-new: "'Job' is not sendable; use isolated Job or immutable Job".
  • An unbounded T takes any capability, fixed where T is fixed: JobStack holds mutable jobs in the current region, FrozenJobStack holds frozen ones that may be shared.
  • Generic bodies are checked once against T with only its bound's capabilities (an unbounded T is treated as possibly immutable: readable, not writable, not sendable), so errors stay at the declaration. This includes a bound at a nested position: Pool with T meets Pool's bound only when T's own bounds prove it. Storing a T needs the destination to hold T at the same capability, which self.items does, so push accepts whatever capability T is fixed to. A value of an unbounded T is never a clean input for ruling 17.

12. Evaluation order: values first, then the target

typealias Tally = int(0 to u64.max)

type Stage
	export var total = 0 as Tally

	static function create() returns Self
		return Self{}
	end 'create'
end 'Stage'

type Pipeline
	var current as Stage

	static function create() returns Self
		return Self{current: Stage.create()}
	end 'create'

	function advance() returns Tally
		self.current = Stage.create()
		return 1
	end 'advance'

	function step()
		self.current.total = self.advance()
	end 'step'
end 'Pipeline'
  • Assignments: the right-hand side runs first, then the target path is resolved. Today the old current gets the total; after, the new one does (as in Pony and Swift).
  • Calls: the arguments run first, then the receiver path is resolved and any region on it opened, so self.index.add(next()) cannot open a region next() swapped away.
  • A silent breaking change. It gets a RELEASE_NOTES entry, and scripts/fixpoint.sh guards the compiler's own source.

13. The compiler's own worker pool

Fragment (LoweredUnit, SourceFile and lowerInto stand for compiler types):

typealias LoweredPromise = Promise with isolated LoweredUnit
typealias LoweredPromiseArray = Array with LoweredPromise
typealias SourceFileArray = Array with immutable SourceFile

type Lowerer
	static function create() returns Self
		return Self{}
	end 'create'

	export function lower(file immutable SourceFile, index SettledIndex) returns isolated LoweredUnit
		let unit = LoweredUnit.create(file.path) as isolated LoweredUnit

		modify unit 'lower'
			lowerInto(unit, file: file, index: index)
		end 'lower'

		return unit
	end 'lower'
end 'Lowerer'

function lowerAll(files SourceFileArray, index SettledIndex, lowerer Lowerer.handle) returns LoweredPromiseArray
	let replies = LoweredPromiseArray.create()

	for file in files 'eachFile'
		replies.push(try lowerer.lower(file, index: index) otherwise panic("lowerAll: a running lowerer refuses"))
	end 'eachFile'

	return replies
end 'lowerAll'
  • What crosses. immutable SourceFile and SettledIndex (an immutable alias, sample 4) cross with no copy and are readable inside the modify block.
  • Sharing the index is free. Today the same send runs a share walk over the whole index.

Where the markers go

S0's survey of the tree (compiler, stdlib, examples, runtime; HEAD 30cd53666a): COUNTED is an exact count, ESTIMATED an enumeration of sites with judgement per site.

Marker Where Count (compiler + stdlib)
immutable before a type shared message and factory positions, fields that hold frozen data, type arguments 25–90 (estimated)
isolated before a type handed-off message and factory positions (38, counted), promise aliases, builders, fields, locals 45–65 (estimated)
modify, freeze, swap, merge worker pools, publishes, hand-offs, region filling 25–45 (estimated)
mutable self / mutable T / mutable function requirements and function types whose callee writes (ruling 19) 25–35 (estimated)
mutable before a value-type, isolated or unique parameter parameters the function writes through to the caller's variable (ruling 14) 3 in the tree (counted)
acquire blocks that update several services atomically 0 (counted)
is unique stdlib's Promise; the OS-handle builtins (__ManagedFile, __ManagedDirectory, __ManagedSocket, __ManagedPages, __ManagedHandle, __ManagedPin) by rule; the raw-integer owners StreamingSubprocess and SharedSegment 3 written (counted); 58 types unique by inference (29 stdlib, 29 compiler, all in Debug/, Profile/, Mcp/, Testing/; counted)

Against 11–16k for the cancelled Pony design. Not markers, but churn: E3077 flips 9,830 of 12,101 var locals to let (estimated ±1%); 1,060 uses of the read-only binding keyword (view) become let; 24 overload groups (17 stdlib, 7 compiler) and 92 field/method name pairs are renamed (ruling 31); 55 module and 5 static lets built by a call go (ruling 30); 167 spec files declare a module var (873 declarations). No existing name collides with a contextual word, provided the parser decides mutable bool (a named parameter or payload) by token count, and reads freeze, merge or swap as the operator only when no ., = or adjacent ( follows it.

Design

Capabilities and defaults

The capability is a prefix word on the type (ruling 15): p immutable Table, returns isolated Job, Array with isolated Job, var settings as immutable SortSettings. The receiver's capability is an optional first parameter (ruling 8).

Reggio Maxon Meaning
mut unmarked a reference into the open region
iso isolated the unique reference to a closed region's entry
imm immutable frozen, outside every region, shareable, atomic count
paused never written; inferred inside modify/acquire blocks readable, not writable, not sendable
tmp never written inferred for objects local to a block
— unmarked parameter (inferred: any / mutable-only / immutable-only) a capability variable checked once against its body; an any-capability parameter is fixed to one capability per call; a result whose every path comes from it takes its capability

Assignment requires equal capabilities, as in Reggio. An any-capability parameter does not relax this: one call fixes one capability.

  • Interface requirements and function types are read-only and never wait unless declared otherwise (mutable self, mutable T; ruling 19); conformers and closures are checked against them where they convert.
  • Values outside the capability system: numbers, bool and enums. String is a copy-on-write value type with a sticky-shared buffer count: plain while it is 1, flipped to atomic SHARED at the first alias, by a freeze walk, or at a send. A String parameter is a let value unless marked mutable (ruling 14): a mutating method on an unmarked one is refused (mark it mutable, or bind a local var copy).
  • Mutable in the open region: every parameter, receiver, field, payload, return, type argument and capture, unless marked. A local takes its initializer's capability. Records alias freely inside a region (no move on let b = a).
  • Closures are objects in the capability system. Captures are the closure's fields: a closure is mutable in the region of what it captures, and immutable only if every capture is. A mutable capture returned as a plain record result adapts through the closure value, as a conformer's self does: mutable through a mutable value, read-only through a read-only or frozen one; a frozen capture stays frozen. Whether a closure writes its captures is recorded on its type: a plain function type promises it does not; a mutable function(…) may, and cannot be called through immutable or read-only data (ruling 19). A function value is never a "value" for the isolated factory, acquire or message rules.
  • Defaults spelled out: a send's sendTimeout: defaults to 0, so a send to a full mailbox fails at once (docs/LANGUAGE_REFERENCE.md:5252-5254) and a self-send cannot block; an interface-typed field is cloneable only if every conformer is, as today (docs/LANGUAGE_REFERENCE.md:5996-6001); Map, Set and List iterators hold their storage across an await as array iterators do.
  • Settled details: an isolated local passed to an unmarked parameter is lent for the call (a one-call open); an async call never takes one there (ruling 23); an any-capability parameter converted to an interface value adapts like a result; when one of several acquired services has stopped, none is granted and otherwise runs.
  • Module scope: a module let's value is known at compile time (ruling 30): literals, constants and record or array literals of them, no calls, so every module let is immutable image data and no initializer runs before main. The 55 module and 5 static lets built by a factory call (mostly shared empty sentinels stored into fields) are deleted, and each use allocates a fresh value instead, as Go does (user, 2026-10-30). A module var is refused: none in the compiler, stdlib or examples, but 165 spec files declare one and are rewritten, and docs/WRITING_MAXON_CODE.md:1155-1156 changes.
  • Types carry no capability (as in Verona): a value is created mutable in the current region, or as a new region when built from clean inputs (ruling 17), and becomes immutable only through freeze or by being a module let.
  • is unique (ruling 18): never copied or aliased; moves on let, store and send; lent to a call.
  • Message parameters and replies of record type are isolated or immutable.
  • Generic bodies are checked once against T with only its bound's capabilities.
  • Removed: the current read-only binding keyword, and the keep, readonly and returns readonly qualifiers with their codes (E2076, E3189). Today's sole qualifier is replaced by isolated.

Regions

  • New regions are recovered at the expression (ruling 17) from clean inputs, where an isolated position asks for one; a local is isolated only when declared as isolated T, and is then linear (ruling 27).
  • modify x 'l' … end 'l' opens an isolated local, parameter or field of writable data; inside, x is the writable region under its own name (no second name, no rename), and only its contents are writable (the slot holding x is not reassigned inside). Everything outside is read-only inside, except block locals, new objects and outer value-typed vars. No coroutine await or acquire inside; while the block is open the runtime does not switch to a sibling coroutine of the same green thread.
  • One-call and one-statement opens: a method call on an isolated value (including inside an acquire, and on a region nested in an open one), and any statement that reads or writes through one, is a one-statement modify block around that statement (ruling 10).
  • Containers of isolated values: reading an element lends it (it cannot be sent or swapped through that read); remove, pop or swap take it out; for over such a container yields lent elements.
  • swap, a send of an isolated and freeze need a writable reference to what holds it.
  • Exits: a value leaving a modify block by any exit must be a value, immutable or a fresh isolated.
  • freeze x (isolated → immutable) reuses the share walk, marks every box SHARED and flips string buffers (ruling 46: in a program that lowers a service start; a value crosses strands only through a service, so in a program with no service start freeze, SharedValue.publish and a registration mark the concrete records they walk, a conformer held at an interface type keeps a plain count, and E3171 is judged for promises only). merge x (isolated → mut) moves the region into the open one. swap path with v returns the old isolated.
  • Viewpoint adaptation follows Reggio's Table 2 (a mutable field read through immutable is immutable; through read-only, read-only).
  • Reference counts: region boxes COUNTED (plain); immutable boxes SHARED (atomic); constant immutable IMMORTAL. The routing exists (maxon-bin/Compiler/Runtime/MmRuntime.maxon:193-221, :2292-2330). The plain-count invariant becomes: a COUNTED box is in one region, a region is open in at most one window, and an isolated crosses threads only through a release/acquire edge (a send, a cown hand-off, a promise result). The send share walks and the __sole_<T> exit-96 walk are deleted. A green thread and its async coroutines are one strand and only a service start makes another (ruling 46), so with no service start a plain count is exact; the compiler asserts at the service-start door that the program was counted as spawning.
  • E4014 (no type cycles) stays.

Coroutines and the capmodel holes H1–H3

Coroutines of one green thread may share the caller's region (ruling 7). They never run at the same instant; the hazards are interleaving at a wait.

  • Tied promises: an async with any mutable argument returns a tied promise. It lives only in a local (no field or container holds it) and cannot be returned, captured or sent. It is drained by an unconditional consuming await; every other exit awaits or cancels it explicitly (a compile error otherwise), and a tied .cancel() waits for the coroutine to stop. async, a coroutine await and a may-yield call are refused inside a modify or acquire block. Local checks.
  • No other coroutine runs while a region is open. Inside a modify block (or one-call open) a coroutine await and an acquire are refused, and while the block is open the runtime does not switch to a sibling coroutine of the same green thread: I/O blocks the strand instead. Releases never yield (destructors close OS handles synchronously), so a drop inside a block cannot switch either.
  • Iterators stay memory-safe across awaits outside blocks: an array iterator holds its buffer and re-checks the count, so a coroutine that clears the array at an await mid-loop cannot cause a stale read.
  • Open regions cannot be reached again. Opening, swap, sending and freeze need a writable reference to what holds the region. Inside an open block everything outside is read-only, so the open region (and its holder) cannot be reopened, swapped out, sent or frozen; only regions nested inside the open one can be opened, and regions form a tree.
  • Holds across yields: HoldResolution never elides a hold whose span contains an await, a park, or a call that may yield.
  • A coroutine starts at its caller's next wait.
  • H1: values first, then targets and receivers (sample 12); an isolated hop requires a block.
  • Pending operands (ruling 21): constructor, union-literal, send, spawn and async arguments read from fields are held across later operands that may run user code; match subjects across write-back arms.
  • H2: O2-WB: count the new value, store it, then release the old one.
  • H3: a local reference into an isolated region exists only inside a block, where no other coroutine runs, so the send H3 needs cannot run then; holds across calls that may yield cover the lingering count.

Services on cowns, and the acquire block

  • A service is a cown. spawn Type.factory() builds the state as an isolated region and wraps it in a cown; the handle is the cown reference and is sendable. An export message is a behaviour on that one cown. Messages from one sender keep their order.

  • Arguments and replies must be sendable (isolated moved, immutable, a value or a handle). One local capability check replaces E3138/E3137/E3135/E3191.

  • A message may send to its own service (E3136, which today makes a self-send unspellable, is lifted for it): with no waiting while holding, a send to oneself cannot deadlock, and it is how a service continues a request/response.

  • An acquire block (acquire a, b 'l' … end 'l' otherwise 'h' … end 'h') is a BoC behaviour whose body runs inline on the caller's green thread:

    • it enqueues on every named cown at once (two-phase, address order; duplicates collapsed) and parks the coroutine (not its whole green thread) until all are granted; the hand-off is the release/acquire edge for the states' plain counts;
    • states of the same type may be the same service, so holds are kept across a write to either; state names cannot be moved, swapped, frozen, merged or sent;
    • inside, every named state is read-only until opened; a method call on one opens it for the call, a modify block for several statements; one is writable at a time (ruling 12);
    • outside mutable data is read-only inside; value-typed vars may be assigned; isolated values may be moved in;
    • every exit releases every cown; a leaving value must be a value, immutable or a fresh isolated;
    • it is ordered with each service's messages by BoC's spawn order;
    • it takes no mailbox capacity; a stopped service runs otherwise;
    • any acquire inside code that holds services is refused (ruling 13);
    • a dropped promise of a coroutine waiting for a grant leaves the queue; one inside the body runs it to the end.
  • No waiting while holding (rulings 5, 6). The compiler computes a "may wait" bit per function, as the least fixpoint over the call graph's strongly connected components:

    • a function may wait if it contains an acquire block, an await of a message reply or of a promise whose origin it cannot see, a send with a nonzero sendTimeout:, a shutdown that waits, a latch, registry or default-key wait, an async of a may-wait function, or an await of a may-wait promise, or calls a function that may wait;
    • a may-wait promise comes from async of a function that may wait, or from a call returning one; it may live in locals, be returned and be awaited, but not be stored in a field or container or passed as an argument;
    • function types and interface requirements never wait: a closure or conformer that may wait is refused where it is converted to one (ruling 19), so no fact depends on the whole program;
    • an acquire block's body and a message body may not wait; the refusal prints the chain;
    • I/O and sleep are not waits on another party; a send with any nonzero sendTimeout: is (user, 2026-11-02): two holding services stalled on each other's full mailboxes would otherwise deadlock until the timeout and then fail by timing.

    E3139 (await cycles between services) and ServiceCallCycleCheck.maxon are deleted in stage F, when this rule arrives: no holder awaits.

  • Mailboxes stay for messages. spawn(capacity:), sendTimeout:, mailboxFull/serviceStopped and shutdown keep their meaning; the capacity counts messages queued on the cown.

  • Runtime: CownRuntime (3–5k lines, replacing MailboxRuntime 1,437 + ServiceLoop 679 + ServiceRegistryRuntime 511 lines):

    • each cown has an MCS-style last slot; a behaviour is enqueued in two phases in address order, with an atomic predecessor count;
    • a message behaviour runs on a pooled green thread on the GMP scheduler; an acquire block's behaviour resumes its parked caller;
    • cowns are released when the body ends.

    A service's state moves between green threads, which rewrites the "one owning green thread" invariant (MmRuntime.maxon:2316-2330), the refcount-torture control, and what tests/debug, tests/dap and debug_gt show as a service's thread. Only the context switch is per target; park and queue logic is shared; wasm32-wasi answers spawn and acquire with E3104 through TargetFacilities, while freeze and the sticky String count work there.

  • What stays: services, spawn, export messages and default service keys. SharedValue with T remains the atomic cell for immutable or value T (over a type parameter, only one bounded sendable: E3171 at a nested typealias X = SharedValue with T without where T is sendable, E3215 per instantiation; the cell then behaves as the cell over the concrete argument; an inner alias shadows a same-named file-scope alias at every door (type position, static call, from), local to its type); stdlib/OwnerLatch.maxon keeps working, and its wait counts as a wait.

Editor support: the capability on hover

Hovering a variable, parameter, field or self in VS Code shows its capability at that point:

words — a parameter of 'addWords'
WordArray — read-only while 'fill' is open (mutable outside it)
let frozen — a local that is never reassigned
immutable Table — frozen: read-only, shareable with other threads
table — a parameter of 'describe'
Table, any capability (only read) — called here with: mutable (main:5, live), immutable (main:5, frozen)
  • Where it comes from. Today's hover (maxon-bin/Compiler/Lsp/LspHover.maxon) infers types from tokens. The checker records, for every binding read, its span and capability (with the open block's label). The LSP project check (LspProjectChecker, LspProjectCheck.maxon:26; docs/CLI_REFERENCE.md:2339-2345) keeps the table per document version, sent as isolated. Hover reads it and falls back to the token heuristics when the latest check is stale or failed.
  • Also shown: whether an isolated value has moved ("moved at line 12"); that a tied promise must be drained; a self parameter's capability; and, on a function name, whether it may wait, with the chain ("may wait: calls 'transfer', which acquires at line 2").

Implementation notes

  • Where capabilities live: a per-value capability column on IrFunction beside the existing tag and name columns, and on parameters in SignatureIndex; not a MaxonType arm (IR/Maxon/MaxonDialect.maxon:118, export union MaxonType, is interned and matched everywhere). Flow facts (read-only inside a block, moved isolated) sit beside move tracking (MoveSlots.maxon). Checking happens where it does today (Parser, SemanticCheck, Queries).
  • Scaling: every new check is per expression or per function, plus the call-graph facts (may-wait, may-yield, parameter and result capabilities) computed together as one joint least fixpoint over strongly connected components. The parameter-capability fact extends the parameter-write pass that already exists (SemanticCheck.buildParamMutationSummary, :1759, which computes writtenParamMask and writesThroughParamMask; by-reference parameters come from the declared mutable markers, not from inference) with the three-state capability and a per-function "result comes from parameters …" mask. Facts never cross interface or function-type boundaries (ruling 19), so the library cache stays valid. Each stage records a run_scale_test reading.
  • Runtime and external functions that may return cached records are audited and declared non-fresh for ruling 17; any whose behaviour on its arguments is not known counts as writing every non-value argument.
  • HoldResolution is re-validated in S0 now that let is not deep and let b = a aliases; it keeps holds across calls that may yield and across writes to a possibly-same acquired state.
  • Deletion coupling:
    • keep the by-reference machinery, driven by the mutable marker (ruling 14): ParameterCell.maxon, ArgumentOverlapCheck.maxon (E3186), Parser.byRefArgumentValue (Parser.maxon:96985), Parser.declarationByRefConvention (:96961; it reads the marker), SemanticCheck.buildParamMutationSummary (:1759), the writtenParamMask/reassignedParamMask columns, and LiteralArgPromotion;
    • stage A deletes the inference of by-reference parameters: the token sweep's reassign and forward facts, closeByRefForwarding, the name-keyed targets, and the inferred function-value and witness masks with their adapters wherever a marker makes them unnecessary (a function type or requirement spells the marker, so a conversion compares markers);
    • the kept by-reference pass is seeded from StorageProvenance: buildParamMutationSummary(… provenanceWrites: provenance.receiverWrites …) (SemanticCheck.maxon:78, consumed at :1782-1785) takes its "written through an alias" seeds from there. Before E2 deletes StorageProvenance, the capability checker supplies those seeds itself (writes through a parameter's aliases are capability facts it already computes), and a spec pins each seed kind;
    • move SummaryCallDispatch.instanceIdOfValue (used by Parser, LowerMaxonToStd) and ReadOnlyRootKind (declared in DeepLet.maxon:6; used by IrFunction, MaxonDialect, Project, Parser) before deleting their files;
    • E3077's main door is already in Parser (Parser.maxon:33948); only StorageProvenance's one emission moves; E3186 reads the declared markers;
    • bump the library cache format (LibraryCacheFormat, LibraryCacheStore.maxon:2);
    • HoldResolution already treats await as loud (:147, :162); modify open and acquire join that class.
  • Spec re-pins: E3078 appears in 33 spec files (327 occurrences) and E3159 in 42 (288).

Deleted and added

Files deleted: StorageProvenance.maxon, DeepLet.maxon, CallbackFlow.maxon, ServiceGlobalAccessCheck.maxon, ServiceCallCycleCheck.maxon, SummaryCallDispatch.maxon, MailboxRuntime.maxon, ServiceLoop.maxon, ServiceRegistryRuntime.maxon (after their survivors move). ServiceCompanions.maxon and ServiceProgramSurvey.maxon are rewritten onto the cown runtime.

Code deleted inside other files: the write facts in EffectSummary (E3064 stays); the SignatureIndex provenance and send-door columns and their cache codecs (the by-reference columns stay); the read-only binding keyword; the keep/readonly qualifiers.

Error codes deleted: E2076 and E3189 in B1; E3143 in C; E3078, E3159, E3188, E3187, E3135, E3137, E3138, E3140, E3163 and E3191 in E2; E3139 in F when its replacement arrives (S0 confirms each one's meaning before deletion). The local sendability check covers E3140's reply case.

Error codes kept: E3102 (now for isolated, unique values and sends), E3100, E3141 (generalized from promises to every unique type: copied, cloned or aliased; PromiseType.maxon's copy rules become the general unique rules), E3142, E4014, E3057, E3059, E3134, E3136 (minus the self-send case), E3164, E3190, E3192; E3077 (a local check that a var is reassigned); E3186 (by-reference overlap over the declared mutable markers).

New compile-time checks:

  • a capability mismatch; an argument whose capability a parameter's inferred use refuses (naming the use)
  • a body that needs a parameter both mutable and immutable; a result whose return paths disagree with its adapted capability
  • a conformer or closure that writes or may wait against a read-only, non-waiting requirement or function type
  • an isolated read without a block or swap
  • opening, swapping, sending or freezing an isolated without a writable reference to what holds it
  • reassigning an unmarked parameter (the error names the fix: mark it mutable, or bind a local var; ruling 14)
  • a mutable value-type, isolated or unique parameter given a let, a literal or an expression (an isolated or unique one also needs an isolated or unique local), or a closure or conformer whose mutable markers differ from its function type's or requirement's
  • reassigning or passing by reference the slot of a value being modified, inside its own block
  • moving, swapping, freezing, merging or sending an acquired state or a message's self
  • inside a modify block or one-call open: any wait on another party, a coroutine await, an acquire, or a call that may wait or may yield
  • a call passing two isolated values in unmarked positions, or an isolated value beside a mutable argument
  • an element of a container of isolated values (or an isolated union payload) reached outside a block
  • a mutable function value called through frozen or read-only data
  • a tied promise passed to a parameter the callee keeps
  • an async given data opened by a modify block
  • a module let initializer that acquires
  • a second declaration of a function name in one scope, or of a method name in one type (ruling 31)
  • a write through read-only or immutable data
  • a mutable value leaving a modify or acquire block
  • an isolated factory given mutable data
  • a closure captured into a capability its captures do not allow
  • a tied value (or an alias of one) stored, returned, captured or sent
  • an acquire block writing a non-value outer var, or storing outer mutable data into a state
  • a store from one acquired service's data into another's
  • a message body or acquire block that may wait (with the chain)
  • a may-wait promise stored in a field or container or passed as an argument
  • an acquire inside code that holds services (any acquire may wait)
  • a module var
  • a message parameter or reply of record type without isolated or immutable
  • a capability bound violated; a conformer's self capability differing from its requirement's

New runtime checks: none. Every safety rule is a compile-time error (ruling 2).

Amendments under model check (user, 2026-11-02)

Proposed during stage B; none binds until reggio.py models it with 0 counterexamples in the campaigns and a fresh red team. Each amends ruling 4 (and sample 3's "does not adapt" sentence).

  • M1 — a result's capability comes only from its source parameters. At a call, the result capability is computed from the arguments at the parameters some return path comes from, never from the other arguments. A per-function bit records whether some return path is not a parameter's data (fresh, local, another source). All source arguments mutable → mutable; all immutable and no other path → immutable; all immutable with another path → read-only; any read-only → read-only; mixed → refused (as today). A mixed return no longer pins its parameter mutable-only.
  • M2 — a join with local data does not pin. A cond or try … otherwise joining a parameter's data with fresh or local mutable data yields a value judged by M1's rule against the parameter's final class (undecided → read-only); writes through it pin the parameter mutable-only. A join with frozen data stays refused (ruling 29). Call results are settled after parsing (user, 2026-11-02): a call result whose callee's source mask is not yet known is undecided, tied to the callee and its arguments; the sends, stores and writes that need a capability of it are recorded and judged once every mask is known, as parameter classes are.
  • M3 — a non-escaping holder does not pin. A record built from a parameter's data that is never returned, stored, captured, sent or passed to a keeping parameter takes the parameter's capability for the parameter's data it holds: a write reaching the parameter's data (reader.bytes.set(…)) pins the parameter mutable-only; a write to the holder's own fields (reader.position = …) pins nothing, since the holder is a fresh record (user, 2026-11-02). A returned holder follows M1; a literal init (Self{managed: managed}) is such a returned holder.
  • M4 — storing a unique or isolated parameter is a move, not a write: it pins no capability class and needs no mutable marker (ruling 18's "a callee that stores the parameter takes it").

Model result (capmodel REPORTM.txt, 2026-11-03), and the user's decisions:

  • M1 and M2: 0 counterexamples as written. ADOPTED, with M1's added row: when the source is the caller's own undecided parameter, the result is read-only if that parameter's final class is immutable or undecided, and mutable if it is mutable-only.

  • M4 as written: UNSOUND, because it drops the check that a kept unique argument is movable. ADOPTED as M4-ARG: the parameter is unpinned, but at a keeping position the ARGUMENT must be mutable data of the caller (a move); a capability variable forwarded by a keeping caller needs nothing.

  • M3 as written: UNSOUND in two ways. A callee that writes through the holder writes frozen data, and a window's read-only data gets into a fresh record. Clean repairs are M3-ESCAPE (passing the holder to any parameter its callee needs mutable-only counts as escaping) and M3-NORO (a parameter a record is built from takes no read-only argument). ADOPTED (user, 2026-11-03) as the finer M3 plus M3-NORO (capmodel REPORTM2.txt; 0 holes on every final gate). The finer rule: passing the holder to a callee escapes, and pins the source parameter, only when the callee's writes reach the held parameter's data, or when it stores, captures or returns the holder. Four refinements make it sound:

    1. Reach is a per-class fact. It is recorded for any write that is not a bare write to the parameter's own field: through an alias read back out of the holder, through a derived value, or through a var that may hold the parameter.
    2. A swap or pop out of a holder's field counts as reaching; what comes out is mixed data of the held classes.
    3. The fact is transitive through a bare pass-on, and a callee that returns the parameter escapes.
    4. A mutable self method is judged by its own facts. Interface requirements, generic T positions, function-value calls and mutable-marked parameters are conservative and always escape.

    The model also fixed M2's join: a mixed variable joined with immutable data is read-only data.

  • M1, M2, M4-ARG and M3 bind on landing only after a fresh red team of the whole set finds nothing.

  • Gate met for M1, M2 and M4-ARG (2026-11-04). The core-nom3 battery had 0 holes (REPORTM4.txt), and red team N round 2 was clean outside acquire (REPORTRTN2.txt). They land with stage B. M3 lands next, after its own clean red-team round. The acquire hole is recorded under stage F. M3 lands in E1 (user, 2026-11-08): without it a frozen List cannot be iterated or cloned once List.first/last adapt to their receiver (closing a module-let List hole), and no iterator over a frozen user collection compiles. Gate: red team Q against M3 (REPORTRTQ.txt) finds nothing; then the checker implements M3 and the List arms carry their receiver's sources. Q found 3 holes (M3Q repairs), R found 2 more (M3R; REPORTRTR.txt), red team S runs on core-m3r. Closures that build from captures (user, 2026-11-08), Verona's way: a closure is an object whose captures are fields and whose body is checked once against its self capability; a closure whose body builds a mutable record from (or otherwise reaches into a record with) its captures needs a mutable self — it is a mutable function, converts only to a mutable function(…) type, and ruling 19 refuses calling it through read-only (paused, frozen) data. This replaces the model's blanket M3R-CAPTURES refusal; model switch M3V + a red team confirm it. A closure that WRITES its captures is inferred the same way (user, 2026-11-09; switch M3W). Gate met (2026-11-09): red team S found the iterator-capture hole (M3S-ITERCAP repair); V (M3V) and T (core-m3w = M3Q + M3R − CAPTURES + M3V + M3S + M3W + M5) found NO HOLE (REPORTRTV.txt, REPORTRTT.txt). The compiler implements core-m3w.

  • M5 — ruling 21's by-reference overlap counts only operands evaluated BEFORE the write (user, 2026-11-05, under model check). E3186 refuses a local read by an operand evaluated before the by-reference call that writes it. That includes a ternary condition that wraps the call, at any group depth, because the condition runs first. An operand evaluated after the call reads the new value, needs no hold, and is accepted (print("{a.equals(b, tolerance: slack)} {slack}")). Field-path operands follow the same rule, compared by value. M5 binds on landing only after the model (pending-operand gadgets, values-first order) and a fresh red-team round find nothing. Gate met (2026-11-05): core-nom3m5 is clean on the battery (REPORTM5.txt), and red team P was clean (REPORTRTP.txt). M5 lands with stage B. The red team left two checks for the compiler: E3186 must cover a closure or function value's mutable (by-reference) parameters at an invoke, which the model cannot witness, and a field-path cell read through a for binding (for e in a P2(e.b, put(e.b))). Scope (user, 2026-11-06): E3186 is per ROOT BINDING, as the model's R21-BYREF is. It counts reads of the cell's own root variable and that variable's field paths, but not other names of the same record (a view, a moved var). Those names are pending operands, and ruling 21's runtime holds already keep them alive. Tracking which record an alias names would be the provenance dataflow ruling 27 forbids. Write-based lend (user, 2026-11-06): E3186 follows the model's R21-BYREF. A by-reference argument lends its cell only if the callee writes the parameter, directly or by forwarding it to a by-reference parameter that is written (a per-parameter fact over the call graph, computed as a least fixpoint). look(s, b: s) is accepted when look's a mutable String is never written. Calls through an interface requirement or function value count every mutable position as written (ruling 19: no fact crosses those boundaries). Ruling 14's marker still decides that the parameter is by reference.

Stages

Each stage lands through /land as one commit with its own documentation (AGENTS.md: docs in the same commit), its own RELEASE_NOTES entry where Maxon source breaks, a run_scale_test reading, and the seed gate respected. Emitted-runtime stages need two self-compiles, an x64 and an arm64 arm, and a wasm E3104 path where the feature cannot run there.

  • S0 — executable model, capmodel rev7 "reggio".
    • Rules: a new reggio.py in the capmodel repository (capmodel, local only); it reuses interp.py and its oracle.
    • The oracle adds: region ids, a window per behaviour and coroutines interleaving in the caller's window; the static open-region rules (writable holder; no coroutine switch while a block is open); tied values, consuming drains and joins on exit; holds across yields; the BoC two-phase scheduler with mailbox capacity and coroutine-level parking; the three count kinds and the sticky String count; freeze; values-first evaluation and O2-WB; the three-state parameter capability and result capabilities; clean inputs for ruling 17; the may-wait and may-yield bits; one-writable-at-a-time inside acquire with possibly-same states; closures as objects; is unique; read-only, non-waiting function types and interface requirements.
    • Detectors: a non-entry edge between regions, a write through read-only or frozen data, change under an iterator across an await, data race, use-after-free, plain count stepped by two threads, deadlock (including services and messages).
    • Features covered: every sample in this plan, inferred read-only parameters and adapting results, immutable self methods, build-then-freeze, isolated fields, unions with isolated payloads, Array with isolated T, generics with capability bounds, interfaces carrying capabilities, closures, coroutines and tied promises, multi-service acquire, self-sends, module let, SharedValue, mutable by-reference parameters, releases inside blocks (which never yield), containers of isolated values.
    • Corpus: the 314 earlier attacks, H1–H3, every finding of the four plan reviews, the sound controls, and compiler idioms (pool dispatch, index build-then-freeze, SettledDeclarations, SpecWorkerPool's drain).
    • Gates: five 20k campaigns plus one 100k; the mutation gate on every rule; two or more independent red teams until 0 counterexamples; H1–H3 probed against the HEAD compiler (real ones fixed now).
    • Survey: collisions of the new contextual words with existing names; markers, build-then-freeze candidates, and every compiler and stdlib message body that awaits a reply or acquires today (each needs the request/response rewrite in stage F).
    • Then: the user re-approves the spellings and counts before stage A.
  • A — evaluation order and declared by-reference parameters. Values-first evaluation; O2-WB; parameters are let unless marked mutable (ruling 14): reassigning an unmarked one is a compile error, and the inference of by-reference parameters is deleted (the 3 tree sites that reassign a parameter mark it mutable; the RELEASE_NOTES.md entry's Fix: is "mark the parameter mutable"). Overloading removed (ruling 31): about 36 same-name groups in stdlib and the compiler are renamed. Independent of the new meaning of let; fixpoint.sh guards the order change. The parse/resolve split (each file parsed once, the parser only collects, resolution after parsing) is designed in parse-resolve-split.md (user, 2026-10-31) and DEFERRED (user, 2026-11-01): B1 follows A directly. Stage A landed as b61c3e3c95.
  • B1 — capability syntax and checker. The contextual words; isolated/immutable before types; self parameters; mutable self / mutable T / mutable function; modify/freeze/swap/merge; is unique with stdlib's Promise declared unique (stdlib/Builtins.maxon:112; its rules match today's promise rules, so it lands before E2 makes ordinary records alias). The checker runs with let still deep-immutable (the old analyses enforce it), so it only tightens. Today's sole/keep/readonly qualifiers retire here with their codes (E2076, E3189); the read-only binding keyword goes in E1–E2. Seed: stdlib and compiler source use the new words before any release knows them, so B1 ships a seed shim (scripts/seed-shim/, the same many-declarations case as the existing 0001-withdraw-the-stdlib-module-tier… patch). The argument-vs- inferred-capability check runs after parsing (in Queries.maxon), because a parameter's class is known only once the whole call graph is parsed.
  • B2 — runtime. The freeze walk, sticky String counts, the strand guard (a flag read by the scheduler's __gt_strand_next, maxon-bin/Compiler/Runtime/GtRuntime.maxon:466, so a parked strand with a block open does not switch to a sibling coroutine), and synchronous destructors (probably already true: ConsoleRuntime has no park; S0 confirms which park kinds a block can reach). Emitted runtime: two self-compiles and the wasm path.
  • B3 — the inferred bits. May-wait, may-yield, the three-state parameter class and result capabilities, added to buildParamMutationSummary (SemanticCheck.maxon:1759) as more per-function masks over the same call-graph edges; HoldResolution keeps holds across calls that may yield. Then freeze a new seed (scripts/freeze-seed.sh).
  • B1–B3 also carry (user, 2026-11-02, after the stage-B soundness audit):
    • the audit's accepted-unsafe gaps, each fixed to its ruling as written:
      • a nested modify keeps every enclosing window's root open (ruling 2, 10);
      • results through interface and function values adapt, or are read-only, never fresh (rulings 19, 26, 29);
      • ruling 17's audit list of runtime and external functions;
      • a direct send with a nonzero timeout inside a window is refused;
      • immutable T parameters are argument-checked;
      • indirect calls feed may-yield;
      • spawn factories are capability-checked;
      • a captured parameter pins mutable-only (ruling 4);
    • the B-era rulings that no stage named:
      • tied promises (rulings 7, 23, 29);
      • pending-operand holds (ruling 21);
      • the sticky String count;
      • ruling 17's by-reference and promise clauses;
      • ruling 26's result, for and iter rules;
      • the callee side of ruling 24. The may-wait seed gaps (unknown-origin awaits, shutdown, latch, registry and default-key waits) stay with stage F.
  • C — services on cowns. CownRuntime replaces the mailbox runtime (only the context switch is per target: Targets/X64/X64GtRuntime.maxon:200, Targets/Arm64/Arm64GtRuntime.maxon:130; park and queue logic is shared). Module var is refused here, with the 165 spec files that declare one rewritten and E3143 deleted. No acquire yet. Stage C decisions (user, 2026-11-06), after the scout (scratchpad stageC-scout.md):
    • A promise in a service's state is refused. A field of a service type (reached from its state) may not hold a promise; a message body awaits or cancels its coroutines before it returns. The ~10 specs that keep a coroutine's promise across messages become refusals (RELEASE_NOTES Fix:). This keeps every promise on the strand that owns its coroutine, since each message may run on a different pooled green thread.
    • static var is refused too, with the same diagnostic as a module var (both are globals every thread shares); the 112 static var declarations in specs are rewritten with the 912 module-var lines.
    • A pooled runner drains the cown: when a cown has work, one pooled green thread takes it, runs its queued messages in order (a bounded batch), then releases it.
    • The front-end ABI is renamed to cown names (__svc_spawn, __mbox_* → names that say cown), touching Parser, SignatureIndex and TargetFacilities.
    • The two-phase, address-ordered multi-cown enqueue is built in C (user, 2026-11-06), with its atomic predecessor count, exercised by a runtime torture until acquire uses it in F.
    • A module or static var is a syntax error (AGENTS.md: a removed spelling gets the parser's generic error); the release note's Fix: names the rewrite. E3143 and E3165 are deleted. The promise-in-state refusal takes the next free code after stage B's E3196–E3215. Design: scratchpad stageC-design.md.
  • After G, before the release (user, 2026-11-06): the model corpus becomes spec cases. S0's attack corpus (the 314 attacks, H1–H3, every red-team finding) is ported into spec cases pinned to capmodel core-nom3m5's verdict, so CI checks the compiler against the model on every run. It runs with the review and fix pass that follows the last stage (ledger: verona-ledger.md).
  • D also turns region tracking on everywhere (stage B finding, 2026-11-04). In stage B the capability checker runs only where Parser.regionTracking() is true: stdlib source, any program that declares a region word, a file whose tokens spell region surface (async counts), or a draining loop. Every other program relies on the old deep-let analyses. Round 30 found that tracking the compiler's own program raises about 10 E3208 refusals in compiler code, which ruling 19 says must be fixed: McpServer ToolWithin (×6), ShadowRespellingsOf, ClassificationPrinter and LeftoverKeyOf (×2). D fixes them and removes the gate.
  • D — region checks, let read as mutable. The capability checker runs beside the old checks without treating let as read-only; message parameters must be isolated/immutable; markers in the compiler (SettledDeclarations as freeze swap of an isolated field into an immutable one; SpecWorkerPool's stored drain promises restructured; FrontEndPool's adopt cloning from an immutable baseline; msort and examples). Stage D decisions (user, 2026-11-06), after the scout (scratchpad stageD-design.md):
    • The isolated/immutable rule for record-typed values crossing into a service covers message parameters, replies AND factory parameters (E3217, reported at the spawn).
    • The SettledDeclarations freeze swap refactor and the SpecWorkerPool drain-promise restructuring are dropped from D (nothing forces them) and revisited at E2.
    • Seed: build a seed locally (scripts/freeze-seed.sh on the B/C tree) that should equal what CI's freeze produces, and use it for D's seed chain; D's compiler source may then use the region words without new shims.
    • No multi-root windows (Reggio opens one region at a time; the user will not go beyond Verona). The compiler's FrontEndWorker/StdPassWorker replies use per-unit workspaces: the scratch and costs a reply needs live in the unit's own isolated region, as BackendWorker does; measured with run_scale_test. The parse writes the index, and a per-file index copy cost +13–26% allocations / +3–11% CPU, so (user, 2026-11-06) D builds a parse-local overlay: workers keep one shared read-only index and the parse writes only into an overlay in the unit's region. After the whole plan, judge the overlay on its measured cost and complexity: the parse/resolve split (parse-resolve-split.md) would replace it, and is done only if the overlay turns out not to be good enough.
    • stdlib's HttpServer keeps its per-connection ConnectionWorker service; its E3217 (and ~35 http-server cases) stay red until stage F's coroutine-per-connection rewrite.
  • E1 — accept the new let. let becomes reassignment-only; the read-only binding keyword is accepted as let; old E3077 counting stays. Freeze a seed. Stage E1 decisions (user, 2026-11-07), after the scout (scratchpad stageE1-design.md):
    • view is a pure synonym of let from E1 (the parser maps it to let; its machinery goes dead; E2 rewrites the spelling and deletes the dead code).
    • let b = a keeps moving a record local through E1 and E2; alias-instead-of-move is its own change after E2, before G.
    • E2013 reads "'x' is a let and cannot be reassigned", with a field form ("'f' is a let field and cannot be reassigned"); loop variables, match payloads and tuple elements use "is a let"; parameters keep their messages.
    • "Every field let" makes an immutable aggregate only structurally: every field let AND every field type a value or an immutable aggregate (the emitted share walk reads it, so E1 takes two self-compiles).
    • Coordinator defaults (plan-following): a let blame becomes rebindOnly, never unblamed (write facts stay recorded; a let still cannot reach a mutable by-reference parameter, re-coded E3159→E2013); module lets stay deep until E2 (ruling 30); E3077 newly firing gets a tree sweep and an Unreleased entry; cache format bump; seed frozen by ci.yml freeze_seed dispatch after landing.
    • Module-let sentinels go in E1 (user, 2026-11-07): once a let field reads back writable, a module let stored into a field could be written through. E1 therefore brings E2's sweep forward: every module and static let built by a call is deleted and each use allocates a fresh value; storing module-let data into a mutable place stays refused, so E1 is sound at its commit.
    • Module-let data is immutable, and its holders say so (user, 2026-11-07): the ~940 byte-string name constants (let X = b"…") are image data stored into fields and arrays typed plain ByteArray (Token.value, NameRoster's readonly ByteArray elements). E1 types module-let data immutable in the region checker (ruling 30) and spells the holders immutable ByteArray / Array with immutable ByteArray; names built at run time are frozen where they enter such a holder. run_scale_test measures the atomic-count cost. Not only module scope (user, 2026-11-07): every let whose initializer is a compile-time constant (ruling 30's forms: a literal, b"…", a constant record/array/tuple literal, another constant let) is immutable by default — a local, static or field let alike — since its value is image data. Ruling 1 stands (user, 2026-11-07), after weighing "every let immutable" and a const keyword against Verona/Pony: let means not reassigned; only constant lets are immutable by inference; holders spell immutable (one typealias for the compiler's name type keeps the sweep small). After the names scout (user, 2026-11-07; scratchpad stageE1-immutable-names-design.md): every inline byte literal b"…" is immutable image data like a constant let (no allocation per use; var x = b"…" then written is refused, RELEASE_NOTES Fix:); Map keys and Set elements are immutable slots (stdlib Map/Set declare them so; inserting a key takes immutable data or freezes). No name typealias (E2015 refuses one over a generic instance, and it would not shrink the diff): holders spell immutable ByteArray, NameRoster becomes Array with immutable ByteArray. The lexer holds its source immutable and freezes each name slice; run_scale_test measures the atomic-count cost on lex/parse.
    • Value-like records (user, 2026-11-07): a record type whose every field is let and a value type (or itself value-like) — FilePath, LogLevel, LimbSlots — counts as a value for capabilities (ruling 29 extended): immutable/isolated over it mean the type itself, it needs no freeze to enter an immutable slot, and a send shares it like a String (crossing threads it still goes through the share walk / an atomic count, so a plain count is never stepped by two threads). This holds in a tuple element too: (immutable P, W) is the type (P, W) (#98 rule 6). Precisely (#98 rule 7): a value type is a type naming no record, a byte record, or an immutable aggregate, which is a record whose every field is a let, or a union, where every field or payload is a value type, another immutable aggregate, or a slot declared immutable; a Promise too. A service handle and a SharedValue are not values. Model-check note owed to the after-plan review.
    • Mixed-source results are read-only (user, 2026-11-07): an unmarked result whose return paths mix frozen data (including the function's own frozen data, e.g. a SharedValue-held base) with mutable data is read-only (paused) for the caller, extending M1's "all immutable with another path → read-only" to internal frozen sources (instead of E3209). Model-check note owed to the after-plan review.
  • Stage E2 decisions (user, 2026-11-10; scout scratchpad stageE2-design.md): all 14 scout recommendations — strict E3077 (moved-out vars included); SummaryCallDispatch gutted to CallResolution.maxon; E3159's by-reference refusals → E2013; KEEP E3140 (until F) and E3187; E3135's promise/function-value/opaque-T arms stay refused as E3217-family; call-built module lets → per-call functions + a call-free module-let rule (one new code); retire readonly; let b = a stays a move; delete the sole walk + exit 96 only (share walk stays for freeze); keyword-blind checker; SettledDeclarations / SpecWorkerPool refactors stay dropped; new rules fold into existing codes; alias-write seeds from ParamSources. Sticky counts land in E2 (user, 2026-11-11): deleting the sole walk exposed that B2's sticky String count was never built; E2 implements it (String buffers and OS-handle boxes flip to atomic SHARED at first alias, freeze or send). Exit 96 stays for the share walk freeze uses. E3220 = a call in a module/static let initializer. A unique value passed to async is lent until drained (user, 2026-11-11), local or parameter alike, by the same mechanism as a by-reference argument (ruling 29): the caller cannot read, close or pass it until the promise is awaited or cancelled. A server is stopped by .cancel() on its serving promise, not by a concurrent close().
  • E2 — flip and delete. LANDED 2026-11-11 as f9536894c4 + seed pin 77a5ff8b84. var→let and the read-only binding keyword→let across the tree; the new E3077; module lets known at compile time (ruling 30), the factory-built sentinels deleted and allocated fresh at each use; every analysis, code and walk in "Deleted" goes except E3139 and ServiceCallCycleCheck.maxon, which stay until F; specs re-pinned; cache format bumped.
  • F — OPEN HOLE TO DECIDE AND MODEL FIRST (red team N, 2026-11-04; capmodel REPORTRTN.txt, redteamN/hole1min.txt): acquire s { let m = s.r s.r.b = 1 return m.b } is accepted. m is a read-only view of the state's data, and the one-statement open then writes it, which breaks the paused-view rule. The pre-amendment model has the same hole, and M1 widens it to pick(s.r, 0). There are two candidate repairs: (a) a read of a closed state's field is a one-statement open, and its let result must be able to leave it; (b) opening a state is refused while a read-only local taken from it is live. The user decides before F begins, and the chosen rule passes the model and a fresh red team first. Chosen (user, 2026-11-11): (a). Reading a closed acquired state's field is a one-statement open; its result follows the window rule (only a value, immutable or a fresh isolated outlives the statement), so let m = s.r of a record field is refused (read the field needed, or .clone()). Model it on core-m3w, then a fresh red team. Extended (user, 2026-11-11), after soundness review W: a call that reads a closed acquired state (s.peekR() returning self.r) is the same one-statement open, so its result must be a value, immutable or fresh to outlive the statement; ruling 27's "a call that only reads a state opens nothing" is amended accordingly. Stage F decisions (user, 2026-11-11; scout scratchpad stageF-design.md): D1–D16 adopted as recommended (Log/TraceCapture send with timeout 0 to a large-capacity handler, error does not await, panic/exit flush; sample 7's fix is a method returning a copy; factory bodies are holders; the may-wait-promise storage rule is dropped; one new code E3221 for a message or factory body that may wait; a cancelled parked acquirer is released without running the body; the strand guard covers the block; interface handles refused in acquire; stopped = closed at enqueue or freed at grant; a literal sendTimeout: 0 is not a wait; (e) is the stopped name's 0-based position; LSP checks single-flight per root; torture at scale). Ruling 19a (user): a requirement or function type whose conformers may wait declares a trailing waits effect clause, placed like throws (function handle(exchange HttpExchange) throws HttpServerError waits, typealias Job = function(Row) waits; order: returns, throws, waits; like throws, it states what a call MAY do — the language reference says so once for every effect clause); a call through it is a wait and a yield from the declaration alone, refused in message, factory, acquire, modify and one-call opens; any conformer converts to a waits position, a waits value never converts to an unmarked one; service interfaces and export messages may not use it. A behaviour on no cowns (user, Go's goroutine model): a task with its own green thread, sendable arguments, holding nothing, so it may wait; its promise is storable and awaiting it is a wait; serve spawns one per connection (multi-core, handlers may wait). 19a and the no-cown task are model-checked before they land. Task semantics (model round 4, capmodel REPORTFA3W; user 2026-11-12): starting a task is a send-like non-wait (a holder may start one, not await it); arguments sendable; the promise is storable; dropping it cancels the task cooperatively at its next wait; no detached tasks. T1 (user): a task promise may not cross into a message argument or a service's state, so no task-to-task await cycle can form (costs the acceptor idiom). Model round 5 adds T1 and closes red team X's X1 (a statement that opens one acquired state and reads another is two states in one statement, ruling 29). Task type (user, 2026-11-12): a task's promise has its own stdlib generic type Task with T (task f(x) starts it — a contextual word like async, user 2026-11-12 — and yields it); a Promise converts to a Task at an outermost flow, never the reverse; no message argument, factory parameter, service state, generic argument or interface-implementing record may contain a Task at any depth (T1-CROSS, capmodel core-m3w-fa3w2, REPORTFA3W2). Reply promises stay ordinary Promises. The LSP project check becomes a task (its own strand, may wait), replacing the coroutine that starved the session loop. SUPERSEDED (user, 2026-11-12): no task concept and no waits marker — "this is why we have services". Ruling 19a, the no-cown task, T1 and the Task type are withdrawn. Request/response from a handler uses continuations (Verona/Pony): a handler sends its request with its own handle and the reply arrives as another message; ruling 5 holds unchanged, HttpHandler.handle stays non-waiting. X1 (one acquired state per statement) and repair (a) stand. Signal: withdrawn (user, 2026-11-12). No Signal primitive. Checker as a service (user, 2026-11-12, supersedes the on-demand coroutine): the LSP checker and resolver are services. The compile driver uses continuations at its two pool joins (FrontEndPool, StdPassPool): the pools take a reply-to handle and send batchDone instead of being awaited, and the driver is a service with phase states. The CLI compile runs the same driver service, with main awaiting its final reply, so there is one driver. Superseding is a SharedValue generation read; single-flight comes from the mailbox order; the cooperative yields and the poll go. Relay reload via LSP file watching (user, 2026-11-12): LspRelay's 500 ms slot poll goes. The server registers workspace/didChangeWatchedFiles for the slot path, and a change event re-attaches the binary (run build renames atomically, so the two-poll settle goes too). A client without dynamic watcher registration gets no hot reload, and the relay says so once in its log. Lands with the checker-as-service round. HttpResponder (user, 2026-11-12): a handler that must consult a service answers through a continuation. exchange.respondLater() returns a unique, sendable HttpResponder holding the ConnectionWorker's handle; any service that holds it calls responder.respond(response), a send with timeout 0 (not a wait), and the worker writes the response. HttpResponder is MUST-USE like a promise (ruling 7): on every path, throws and early returns included, it is answered or passed on, and a failed send hands it back in otherwise. A holder that crashes or is shut down drops it, and that case answers 500 through a service-release hook (the worker's last handle dropped runs its release, which answers 500): a new concept, designed, model-checked and spelling-approved before it lands. Finalizers and linear types (user, 2026-11-12; supersedes the release hook and the 500-on-crash answer): a destruct self statement ends a value's life; any function containing it is a FINALIZER and takes consuming self (the call moves the receiver). A type with at least one finalizer is LINEAR and implicitly unique (so is any type holding one, by the field rule): on every path, throws and early returns included, each value is consumed by exactly one finalizer call or moved on, or it is a compile error. Any type may declare finalizers. A linear value lives only in locals, parameters and message arguments, never in a field, container, closure capture or service state, so no run-time drop exists and no finalizer is chosen by the runtime. A failed send hands a linear argument back in otherwise. HttpResponder's respond/respondWith are its finalizers; a service consulting others carries the responder in each continuation message. Model-checked before it lands. Deferred reply (user, 2026-11-12): any message may answer later: reply.later() inside a message body yields a unique, sendable Reply with T (T the message's reply type), and the caller's ordinary await resolves when some service calls reply.answer(value) (a send with timeout 0, not a wait). A Reply may be stored in service state while continuations run; dropping it fails the caller's await with serviceStopped, as a stopped service's reply does today. This lets non-service callers (main, the LSP session, spec and MCP workers) await a service chain's result: the CLI compile and the project resolver run on the one driver service. Model-checked (liveness of a stored, never-answered Reply; deadlock with ruling 5) before it lands. Service handle cycles (user, 2026-11-12): E4014 extends to handles: a service type's state may not reach a handle to its own type, directly, through other service types, or through an interface's conformers (a cown refcount cycle never frees and the leak gate exits 101). It over-approximates as E4014 does; the cure is passing the handle per message (continuations) or distinct types. Model fa6 (capmodel 7a654c9, REPORTFA6; user 2026-11-12): 0 holes. Added by the model and adopted: R-DEFER-HOLD (a Reply never leaves holding code: no message reply, promise payload, async argument, acquire exit or function result to a non-holder; without it a Reply returned to main deadlocks), no linear value live across any wait, a linear record field refused (only union payloads inherit linearity), a linear argument always moves, a try handler sees every move; async with a linear argument stays refused (user). A stored-forever Reply is a liveness hang, not a hole. Review AB runs on fa6. Round 6h decisions (user, 2026-11-13): library tokens and parses are a FROZEN shared cache (one immutable copy per process, each owner keeps a mutable memo for project files only); a hardware fault drains queued Log records synchronously (no park, no service) before dying; a stdlib Slot with T replaces the array-of-one idiom. Cooperative cancellation (user, 2026-11-13; Go's model): no coroutine is ever torn down mid-frame. Cancelling (.cancel() or dropping the promise) marks it: sleep returns early, I/O and waits fail with a cancelled error, and the coroutine runs to completion through its own code paths, whose throw paths already consume every linear value (L3). Landing (user, 2026-11-13): stage F lands once its landing gates pass; model review AE's holes H1–H4 (handle cycle through a generic at a type parameter; match windows over linear or Reply unions with an isolated payload; a match or for over a read-only scrutinee) are fixed in the model (fa10) and the compiler as the immediate next landing, and the review loop continues. H2 by owned move (user, 2026-11-13): a linear or Reply-holding union consumed by match yields its isolated payload as a fresh owned value (the union is dead, no alias), so no match window opens for an owned payload; the model (fa11) is aligned to the compiler. Review AF (user, 2026-11-13): F1 (a match nested in an arm of a match on the same union, two read-only lends of one payload) is sound: the oracle's allowance counts enclosing match windows, no checker rule. The wrong refusals W1-W4 are relaxed: a message may match its own linear or Reply union parameter (W1); an owned arm may reassign its matched variable once the payload is consumed (W2); a linear union in an isolated variable may be matched (W3); overwriting a linear union variable that holds a non-linear case is not a drop (W4). Model fa12, then a fresh review; the compiler follows. Review AG (user, 2026-11-14): F1 (a plain payload of an owned isolated union stored into an open window) is an implicit merge: a consumed isolated union's payloads are all fresh owned values, and storing one into an open region merges its dissolved region. F2 (a unique matched variable moved or copied in its own lent arm) is refused, per ruling 29. AG's forced-failure oracle (hand-back handlers exercised) joins the standing gates. I1-I4 are relaxed: a match in a try whose handler cannot run is not a drop (I1); a var union reassigned in a try body and its handler (I2); a fresh unaliased plain local recovered into an isolated declaration (I3); a plain owned payload stored where an isolated payload may go (I4). Model fa13, then a fresh review.
  • F — the acquire block. LANDED 2026-11-13 as 0a5202d2b6 + seed pin a5fae8e0b5. acquire, one-writable-at-a-time, the may-wait bit, no waiting while holding, self-sends, E3139 and ServiceCallCycleCheck.maxon deleted. S0's survey found no message body that awaits directly; two wait through a whole in-process compile (LspProjectChecker.check, LspProjectCheck.maxon:38; LspProjectResolver.resolve, LspArrivals.maxon:40). They become coroutines of the LSP session loop, holding no service, and "still wanted" (requireStillWanted, Project.maxon:13000) becomes a SharedValue read instead of a message round trip, as Go would use an atomic or a context (user, 2026-10-30). HttpServer serves each connection with a coroutine, not a service message, so a handler may await services; the shared handler is immutable and mutable state lives in a service it calls (Go's net/http; user, 2026-10-30). Log.error sends with ForeverMs and awaits (stdlib/Log.maxon:314-320), so a message body that logs an error would wait (none does today); how Log.error changes is decided in F.
  • G — hover. The per-read capability table and the hover text.
  • Release.

After approval, the plan file is renamed verona-regions.md. Memory is updated: the cancelled-Pony memory gets these rulings and the two reversed let memories are marked superseded.

Verification

  • S0: campaigns and red-team reports with 0 counterexamples and every mutation killed.
  • Every sample in this plan becomes spec cases, with its output or E-new pinned, in the stage that introduces its feature. A sample that shows both a working program and a refused function becomes two cases: the program, and each refused function as its own case.
  • Per stage: spec cases RED-then-GREEN through mcp__maxon__run_spec_test, filtered; one self-compile (two when the stage changes emitted runtime); scripts/fixpoint.sh; the seed chain (seed → C1 → C2); the wasm lane; run_scale_test; CI on every target after push.
  • End to end:
    • H1/H2/H3 repros and evidence/promiserecover2.maxon refused at compile time or correct at run time;
    • each review finding's program (see below) refused or correct;
    • acquire ordering against messages, and the may-wait refusal with its chain;
    • the leak gate (exit 101/75) clean;
    • LSP tests pin the hover text for a binding outside a block, inside one, frozen, an inferred read-only parameter, and moved.
  • Docs: each stage updates its own sources (docs/LANGUAGE_REFERENCE.md, docs/MEMORY_MANAGEMENT.md, docs/WRITING_MAXON_CODE.md, the registry text, docs/CLI_REFERENCE.md for hover) and regenerates the site. In docs/WRITING_MAXON_CODE.md these change: line 383 (E3077's definition), 428 (let x = 42 // immutable), 440 ("Use var for any variable you call mutating methods on"), 1155-1156 (module var), 1183-1200 (the Memory Model section) and 1255 (Style: "var only where … mutated").
  • Documentation is tested by a reader. After the docs for a stage land, a fresh agent that has read only the published pages (not this plan, not the compiler) writes a set of programs using the stage's features — including ones it expects to be refused — and predicts each outcome. Every wrong prediction is a docs defect, fixed in the same stage.

Documentation and the website

The model is new to most readers (Verona's regions are research), so the site needs an explanation, not only a reference. Generated pages are never edited directly: each comes from a docs/ source or the error registry, and node website/scripts/sync-docs.mjs regenerates them (website/MAINTAINING.md, "Content sync"); a new language page means a new ## section in docs/LANGUAGE_REFERENCE.md, an entry in the script's SOURCES map, and the page file with its front matter.

Page Source What it holds Stage
new language/regions ("Regions and capabilities") new ## Regions and Capabilities in docs/LANGUAGE_REFERENCE.md The explainer: what a region is (one entry, nothing points in, with a diagram of the current region, a separate region and frozen data), why it makes sends and freezing O(1) and counts plain; the current region; isolated and immutable; modify and what it may change; freeze; inferred parameter capabilities and adapting results; inferred new regions; when to mark a field isolated; is unique; mutable self / mutable T on interfaces and function types; what hover shows. Every example is a spec case. B1, extended in D–E2
language/memory-model ## Memory Model Rewritten: let means "not reassigned"; records alias inside a region; the three count kinds; module lets known at compile time (image data); what replaced deep let. E1–E2
language/variables its ## section let / var under the new meaning; E3077's new rule. E1–E2
language/async (services, coroutines) the concurrency sections Services on cowns; what crosses a message; the acquire block with the transfer example; one writable at a time; no waiting while holding and the request/response pattern; coroutines sharing data, tied promises, no coroutine waits inside modify. C, F
language/functions its section let parameters unless marked mutable (a mutable value-type, isolated or unique parameter is by reference), read-only parameters, immutable self. A, B1
cli/error-codes ErrorCodeRegistry.maxon doc comments Every new code: what it means, a refused example and its fix. Deleted codes removed. every stage
cli/editor docs/CLI_REFERENCE.md, Editor Support The capability hover. G
best-practices/writing-maxon-code (also the MCP instructions) docs/WRITING_MAXON_CODE.md The rules an AI author needs: when to write isolated/immutable, modify, acquire; the common refusals and their fixes; the Memory Model section rewritten. every stage
getting-started/tour tour.mdx (hand-written) A short step: build a batch, send it to a service, move money between two services with acquire. F
release-notes RELEASE_NOTES.md Each stage's breaking changes with their Fix: lines. every stage
new blog post at the release website/src/content/docs/blog/ (hand-written) Why Maxon moved to regions: the two failed approaches, what Verona contributed, what code looks like now, the migration. Release
docs/internals/ shared page new docs/internals/regions.md For compiler contributors: where capabilities live, the inferred bits, how modify and acquire are checked. B1, F

Review findings

Finding Answer
Soundness C1: a message awaiting a reply deadlocks against a multi-service acquire Rulings 5, 6: no waiting while holding; E3139 deleted
C2: a tied promise outlives the block that opened its data Tied values drain before that block ends
C3: who "already holds" a service Ruling 13: any nested acquire refused at compile time
C4: closures outside the capability system Closures are objects; captures are fields
H1: is immutable (dropped) built from mutable fields is immutable dropped (types carry no capability, as in Verona)
H2: H1 through receivers and the one-call open Arguments first, then receiver path and open
H3: one-way region tags Ruling 12: one writable at a time; no tags
H4: escape from a block by return/throw Leaving values must be values, immutable or fresh isolated
H5: the same service twice Duplicates collapsed
M1: adapting-result arguments, overloads, interfaces One capability per call; interface requirements read-only unless declared mutable self (ruling 19); interface values carry their capability
M2: H3 needs a "may yield" fact Second inferred bit for HoldResolution
M3: nested open regions at freeze/send Static: freeze/send need a writable holder; no sibling coroutine runs while a block is open
M4: mailbox room and cancellation acquire takes no capacity; dropped waiters leave the queue
M5: change under an iterator across an await No coroutine await inside a modify block; iterators hold their storage elsewhere
Feasibility: S1 runtime-only stage Folded into B and C
Feasibility: S4b not seed-clean Split into E1 / E2 around a seed freeze
Feasibility: deletion coupling "Implementation notes"
Feasibility: per-call check copies superlinear Gone (ruling 12); read-only parameters compiled once
Feasibility: docs in a separate S5 Each stage's docs in its own commit
Consistency: stale wording, sample errors Rewritten throughout
Round 2 C1: a read-only parameter sent or stored as frozen Ruling 4: three-state capability variable (any / mutable-only / immutable-only)
Round 2 C2: a result claiming the wrong capability; by-reference reassignment Ruling 4: every return path must fit; ruling 14: a by-reference parameter is declared mutable, never inferred
Round 2 C3: "fresh" results that are not fresh (immutable results, unbounded T, clone with closures or isolated fields, await, runtime caches) Ruling 17: result must be mutable; clean inputs defined; audited runtime functions
Round 2 C4: holding code starting a coroutine that waits Rulings 5, 6: async of a may-wait function is a wait
Round 2 H1: missing writes (opening, by-reference fields, string fields, externs) Covered by the capability variable; externs conservative
Round 2 H2: whole-program facts vs separate compilation Ruling 19: requirements and function types read-only and non-waiting unless declared
Round 2 H3: aliases of isolated locals Rulings 17, 27: an isolated local is declared and linear
Round 2 H4: releases yielding inside a block Destructors synchronous; no sibling-coroutine switch while a block is open
Round 2 H5: duplicate services at run time States of the same type treated as possibly the same; holds kept
Round 2 H6: tied containers, throw paths Consuming drains, aliases tied, join on any other exit
Round 2 H7: isolated in containers; stealing acquired states Lent element reads; acquired states and a message's self cannot be moved
Round 2 M1–M7 Equal-capability stores; no overloading (ruling 31); joint fixpoint; coroutine-level parking; iterators hold their buffer; only contents writable in modify; may-wait list completed
Accuracy review: blocking sample errors, E3139 staging, citations Samples 4, 6, 8, 10, 13 fixed; E3139 kept until F; citations corrected
Fable 1: reply await inside modify while a sibling is granted a service Ruling 2: every wait on another party, and every may-wait call, refused inside a block
Fable 2: a callee that awaits a coroutine, called inside a block Ruling 6 defines may-yield; such calls refused inside a block
Fable 3: adapting results escaping through function types and interfaces Ruling 19: refused for function types; through an interface the result takes the value's capability
Fable 4: closures writing their captures through frozen data Ruling 19: mutable function(…); plain function types promise no capture writes
Fable 5: a lent isolated element surviving pop/send Ruling 20: elements reached only inside a block; container read-only for the span
Fable 6: a tied promise taken by a callee Ruling 7: passing it to a keeping parameter counts as storing it
Fable 7: an isolated argument beside mutable arguments Ruling 10: any call with an isolated argument opens it; other arguments must be values, immutable or moved
Fable 8: conversion checked "writes" only Ruling 19: conversion needs the "any capability" class exactly
Fable 9–10: default send timeout; cloning an interface-typed field Design "Defaults spelled out"
Fable feasibility: stage B too large, seed shim, StorageProvenance seeding the parameter-write pass, module var staging, word collisions B split into B1–B3 with a seed shim; seed coupling in Implementation notes; module var and E3143 in C; contextual words and an S0 collision survey
S0 G1: pending operands freed by later operands (constructor/match subjects; by-reference reassignment) Ruling 21: runtime holds; E3186 over every operand of the statement
S0 G2: yielding closures or conformers called inside a block Ruling 19: function types and requirements never yield

S0 results (capmodel reggio, capmodel/reggio/REPORT.md): with rulings 19 and 21 as now written, 0 counterexamples in five 20k campaigns, one 100k campaign and the interleaving sweep; 25 of 25 idioms accepted; 38 of 46 mutants killed, 8 argued equivalent. The model's 18 interpretations of ambiguous rules are listed in the report and are adopted unless the user overrides one. Not yet modelled: generics, SharedValue, latches, shutdown/otherwise, cancellation, per-target behaviour.

Clone this wiki locally