Phase 1 / Etch / Concurrency algebra (race, sync, branch, spawn)#40
Open
guysenpai wants to merge 12 commits into
Open
Phase 1 / Etch / Concurrency algebra (race, sync, branch, spawn)#40guysenpai wants to merge 12 commits into
guysenpai wants to merge 12 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes milestone M1.0.12 — Concurrency algebra (
race/sync/branch/spawn { }+ cancellation +TaskHandleawait). Brief:briefs/M1.0.12-concurrency-algebra.md(Status: CLOSED).Five review gates (E1–E5), each GO'd on the pushed diff; one Claude.ai STOP round-trip recorded (E0905, §9.2 revision 2) and two in-gate STOP fixes applied (E0905 exemption removal; return-await regression tests).
Closing notes (from the brief)
etch-resolver-types.md§9.2 revision 2 —awaitis the SOLE call-grain consumer of the{async}effect; the constructs relocate the suspension, their bodies are ordinary async contexts (E0905 applies recursively). See Recorded deviations.children_anyfires on "any child done OR none suspended" — the second clause realizes the all-branches-failed race passthrough (validated at the E1 GO). (2) Fix-as-you-go:return await <wake-target>silently dropped its return at resume since M1.0.11 — fixed at both resume sites, regression-tested across the three forms (E5 STOP). (3) One-tick construct latency for race/sync with >= 1 admitted branch (parent precedes children in pool order); zero-admitted constructs pass through same-tick — documented in the interleaving tests. (4) Failed tasks park.canceled(shared with explicit cancellation): not a winner, never block a join,awaiton them fails loud — one state, three semantics, documented onAsyncTask.state. (5) Language-audit exception: one French grammar citation lives in the brief's FROZEN SECTION (upstream-authored, not modifiable here); the two code-comment copies of it were paraphrased to English. (6) KB §9.12 swap content is Claude.ai-produced at the E5 gate (flagged in the gate signal); CLAUDE.md was updated on-branch per §3.4.zig fmt --check+zig build lintgreen.returnvalue share the M0.8 POD-across-suspend rule-arena caveat. (3) A branch block whose LAST item is a bareawaitparses that await as the block's trailing VALUE → E0904 (M1.0.11 placement, unchanged; the §9.5 pattern ends onreturnand is unaffected). (4)rules_matchedcounts once per tick per rule when ANY of its tasks drove — a coarse per-rule notion, informational only. (5) Theparentlink on race/sync children is lineage bookkeeping only (cancellation stays non-transitive by spec).Validation checklist (brief step 4)
wait_unscaled, noentity_event, no value-producing spawn bodies, no pool slot reuse, structuralspawn(...)untouched)zig build,zig build test(debug + ReleaseSafe),zig fmt --check,zig build lintgreenCLAUDE.mdupdated on-branch (current-state table, +1 Tags row, M1.0.12 open-decisions entry incl. the §9.2-rev-2 deviation, date)ast.zigspawn_struct doc,interp.zigAsyncSlot leftover, token/comment sweeps at E2/E3) — no orphans leftStatus: CLOSED,Closed: 2026-07-03docs(brief): close M1.0.12For Guy: the KB
etch-reference-part1.md§9.12 extension (multi-task realization: child tasks, drive-by-origin, WakeCond set, monotonic pool + husk parking, cancellation teardown, one-tick construct latency) is Claude.ai-produced at the E5 gate — to be swapped into the knowledge base alongside the merge + tag (v0.10.12-concurrency-algebra), per brief E5. Merge (squash) and tag are yours.🤖 Generated with Claude Code