a wave is settlingengine at the endmembrane at the end

Fragment 1 · Wave 2

Wave 2 · A note arrives

One note is added at the door. The machine reacts on its own — the listener becomes ready, the doer acts — until nothing is left to do.

In this wave

  1. 12A new wave beginsSETTLING · enter-settle

    a wave is settlingengine: at the endmembrane: at the end

    The log
    1. #0a listener
    2. #1a doer
    3. end of the logenginemembrane
    The runtime
    Whatbeforeafter
    a wave is settlingnoyes

    A person commits a note at the door, so a new wave starts — the same way the first one did.

    Where it happens markSettling()Vol. 02 §4.6 · Vol. 02 §4.7

    Marks the start and the end of a wave. The runtime settles one wave at a time.

    Specification
    Vol. 02 §4.6 · Vol. 02 §4.7
    Code
    markSettling() in core/registers/mark-settling.ts, line 16: the runtime notes whether a wave is settling
    Journal
    SETTLING · enter-settle · by runtime
    Picture
    a wave is settling: no → yes
    core/registers/mark-settling.ts · build 043cc8b
    1. // SETTLING latch (Vol. 02 §4.6): one settling wave at a time — a second
    2. // concurrent settle is a caller error, not a queue. Ephemeral stratum: the
    3. // latch never survives into a snapshot; extraction asserts it clear.
    4. // Entering a wave also rewinds the discharge slot sequence: slot ids are
    5. // wave-local (the table is drained between waves and ids never reach the
    6. // log), which keeps the journal byte-identical across a snapshot/restore —
    7. // unlike INTENT.CTR, which the spec pins as never-reset (Vol. 02 §4.7).
    8. import type { RegisterFile } from "./register-file";
    9. import { recordTransition } from "./record-transition";
    10. export function markSettling(file: RegisterFile, settling: boolean): void {
    11. if (settling && file.ephemeral.settling) {
    12. throw new Error("A wave is already settling; the runtime handles one wave at a time.");
    13. }
    14. file.ephemeral.settling = settling;↑ the runtime notes whether a wave is settling
    15. if (settling) file.ephemeral.nextDischargeId = 0;
    16. recordTransition(file, "runtime", "SETTLING", settling ? "enter-settle" : "leave-settle");↑ the change is written into the journal
    17. }

    AGPL-3.0-onlyThe Lab's demonstration environment, as this fragment ran it (build 043cc8b). The code may change, and may differ from the code of a working machine.

    Nest VM core, incubated in the CoAgnes garden · build 043cc8b (2026-09-21) · this file last changed in f36e70d (2026-08-18)

  2. written by a person#2 · a note arrives
  3. written by the machine#3 · the listener is ready
  4. written by the machine#4 · the note is released
  5. 31The wave ends — quietSETTLING · leave-settle

    quietengine: at the endmembrane: at the end

    The log
    1. #0a listener
    2. #1a doer
    3. #2a note
    4. #3readiness
    5. #4the release
    6. end of the logenginemembrane
    The runtime
    Whatbeforeafter
    a wave is settlingyesno

    Nothing left to take, nothing waiting outside: the wave ends. The note came in as #2 and went out as #4, unchanged — and every step in between is above.

    Where it happens markSettling()Vol. 02 §4.6 · Vol. 02 §4.7

    Marks the start and the end of a wave. The runtime settles one wave at a time.

    Specification
    Vol. 02 §4.6 · Vol. 02 §4.7
    Code
    markSettling() in core/registers/mark-settling.ts, line 16: the runtime notes whether a wave is settling
    Journal
    SETTLING · leave-settle · by runtime
    Picture
    a wave is settling: yes → no
    core/registers/mark-settling.ts · build 043cc8b
    1. // SETTLING latch (Vol. 02 §4.6): one settling wave at a time — a second
    2. // concurrent settle is a caller error, not a queue. Ephemeral stratum: the
    3. // latch never survives into a snapshot; extraction asserts it clear.
    4. // Entering a wave also rewinds the discharge slot sequence: slot ids are
    5. // wave-local (the table is drained between waves and ids never reach the
    6. // log), which keeps the journal byte-identical across a snapshot/restore —
    7. // unlike INTENT.CTR, which the spec pins as never-reset (Vol. 02 §4.7).
    8. import type { RegisterFile } from "./register-file";
    9. import { recordTransition } from "./record-transition";
    10. export function markSettling(file: RegisterFile, settling: boolean): void {
    11. if (settling && file.ephemeral.settling) {
    12. throw new Error("A wave is already settling; the runtime handles one wave at a time.");
    13. }
    14. file.ephemeral.settling = settling;↑ the runtime notes whether a wave is settling
    15. if (settling) file.ephemeral.nextDischargeId = 0;
    16. recordTransition(file, "runtime", "SETTLING", settling ? "enter-settle" : "leave-settle");↑ the change is written into the journal
    17. }

    AGPL-3.0-onlyThe Lab's demonstration environment, as this fragment ran it (build 043cc8b). The code may change, and may differ from the code of a working machine.

    Nest VM core, incubated in the CoAgnes garden · build 043cc8b (2026-09-21) · this file last changed in f36e70d (2026-08-18)

At the end of the wave Two new records, written by the machine itself: the listener's readiness (#3) and the doer's release (#4). Then quiet.