Skip to content

Restate C-004, C-005 and C-200 as ADR-0024's sequential run-every-element observation - #121

Merged
O6lvl4 merged 3 commits into
mainfrom
fan-concurrent-as-if-sequential
Sep 30, 2026
Merged

O6lvl4 merged 3 commits into
mainfrom
fan-concurrent-as-if-sequential

Conversation

@O6lvl4

@O6lvl4 O6lvl4 commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

What

Step 0 of almide ADR-0024 (docs/adr/0024-fan-effect-callbacks-run-concurrently-as-if-sequential.md, almide/almide#3028): the contract text for fan running concurrently while being observed as a sequential, run-every-element evaluation.

  • C-004: fan.map and fan.settle behave as a sequential evaluation of every element in list order, whatever the substrate. The EXCEPTION clause (block/settle interleaving on native) is kept; ADR-0024 step 1 deletes it when per-element output buffering lands.
  • C-005: fan.map evaluates every element, including those after an Err, and the lowest-index Err surfaces (the rule fan { } already follows, C-199).
  • C-200: a trap in element k is observed as the sequential evaluation: elements 0..k-1 complete and flush in order, nothing after k appears. A concurrent substrate waits for the elements below the trap (ADR-0024 D6). The residual is stated: an element above the trap that had already started may have sent requests the sequential evaluation never sends.
  • ALS-R3 prose amended to match. Its validation row is re-stamped.
  • The reference evaluator's fan.map now runs every element and returns the lowest-index Err.
  • New fixtures: spec/wasm_cross/fan_map_err_runs_every_element.almd (C-005) and spec/wasm_cross/fan_trap_waits_for_elements_below.almd (C-200).

The contracts are ahead of the implementation. Judged locally against almide 0.64.0 (ref + cross legs):

  • fan_map_err_runs_every_element: ref disagrees with both legs. Today's fan.map stops at the first Err, so it prints 2 of the 5 lines.
  • fan_trap_waits_for_elements_below: ref agrees with wasm. Native races, and element 2's line appears in about 11 of 20 runs.

Both are expected findings against released binaries. almide does not advance proofs/als-pin.txt to this commit until the PRs that implement D1 (step 3) and D5/D6 (step 1).

Local gates, all green: check-contracts, contract-provenance, element-coverage, style, validation, links, gate-verification, selftest-conformance, runner-coverage, ref-independence, ref-kernel (49/49), ref-totality.

Author / verifier record

role who (human handle, or agent + session) independent of the author?
authored Claude (agent, O6lvl4's session) —
verified Claude (same agent): local gates + ref/cross legs against almide 0.64.0 no

Ratchets loosened in this PR (ceiling up / floor down): none.

O6lvl4 and others added 2 commits September 30, 2026 23:32
… the lowest-index Err

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ment observation and pin them with two fixtures

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@O6lvl4
O6lvl4 force-pushed the fan-concurrent-as-if-sequential branch from b5c7700 to fc71f5e Compare September 30, 2026 14:32
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@O6lvl4
O6lvl4 merged commit dbb26dd into main Sep 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant