Phase 1 / Etch / Concurrency algebra (race, sync, branch, spawn)#40
Merged
Conversation
5 tasks
guysenpai
added a commit
that referenced
this pull request
Jul 3, 2026
Fix the fossilized Zig build cache that has been canceling the required build-and-test (windows-2025, ReleaseSafe) check since M1.0.11 and blocks the M1.0.12 merge (PR #40). CI: the monolithic actions/cache@v5 step never re-saved on an exact-key hit, and its key (os-mode-zigver-zonhash) had no per-commit component — under a stable build.zig.zon the cache froze at its first save while the M1.0.x milestones drifted the sources, until the near-cold windows-2025 ReleaseSafe recompile blew the 40-min job budget; the timeout also skipped the post-job save, locking the loop. Replaced with an explicit restore/save split: per-sha primary key (never exact-hits on a fresh commit, so every run refreshes from the most recent prior state; GitHub LRU retires old entries), three-level prefix fallback (exact sha -> newest under this zon -> newest under this os/mode/zig), a mid-job save right after zig build (a run killed during zig build test still leaves a fresh build cache — timeout immunity), and a final if: always() save (red test legs still save). Timing report now records cache_matched_key (which fallback level seeded the run). ReleaseSafe budget 40 -> 55 min (near-cold headroom on the slowest runner; Debug stays 20). Whitelist note: actions/cache/restore@v5 and save@v5 are sub-actions of the already-whitelisted actions/cache@v5. Bench and docs cache sites untouched. CI: full required-check set green on the PR head. Notable: all three fallback levels observed in real runs, plus the rescue path — a red attempt's final save was exact-hit by its rerun (1 m 47 s). One recorded deviation: commit type chore(ci) instead of the prompt's ci(...), which the section 4.3 whitelist and the commit hook reject. Warm-lineage variance observed (a matched key does not guarantee a short build; the budget is the protection, not the key ladder). Measures: windows-2025 ReleaseSafe near-cold 35 m 27 s (build 419 s / test 1652 s, first non-NA test_seconds since M1.0.11) vs exact-hit build 2 s / test 20 s; ubuntu ReleaseSafe warm zon-prefix 1 m 13 s. Closes the CI cache refresh chore. Brief: briefs/chore-ci-cache-refresh.md
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