Bump zwasm v1.7.2 → v1.8.0#2
Merged
Merged
Conversation
chaploud
added a commit
that referenced
this pull request
Apr 26, 2026
…kill Scaffolding refactor based on the Claude Code 2026-04 inventory (/Users/shota.508/Dropbox/LifeNote/knowledge/005_claude_code_slash_inventory.md): .claude/commands/ is officially deprecated in favour of .claude/skills/. Changes: - /continue moved from .claude/commands/continue.md to .claude/skills/continue/SKILL.md. Auto-triggers on "続けて" / "/continue" / "resume" via the skill description. - code-learning-doc skill split: SKILL.md (93 lines) holds the policy + workflow + canonical gate-rule definition; the per-doc template moved to a sibling TEMPLATE.md (77 lines). Skill body shrank from 318 lines to 93. - audit-scaffolding skill (new): periodic audit of CLAUDE.md, .dev/, .claude/, docs/, scripts/ for staleness, bloat, lies, and false positives. Produces a markdown report; non-destructive. Detailed check list lives in CHECKS.md alongside SKILL.md, grouped by category (A staleness, B bloat, C lies, D false positives, E coverage). - CLAUDE.md slimmed from ~150 lines to 94. Iteration loop and commit pairing details moved to their respective skills (continue and code-learning-doc); CLAUDE.md just points to them. Single source of truth per topic. - ROADMAP §11.6 split into Active / Planned tables (no Status column needed); §11.7 Periodic scaffolding audit added; §12.2 reduced to a 1-paragraph pointer to skill code-learning-doc; §12.4 replaced with a 1-paragraph pointer to skill continue. - test/run_all.sh now runs scripts/zone_check.sh --gate as suite #2. ROADMAP §11.6 gate #2 moves from Planned (informational) to Active. - handover.md and .dev/decisions/README.md updated to refer to skills instead of the removed .claude/commands/continue.md and the old pairing wording. File sizes after refactor (soft limits in parens): CLAUDE.md 94 (~100) .dev/ROADMAP.md 1069 (~1500) .claude/skills/code-learning-doc/SKILL 93 (~150) .claude/skills/continue/SKILL 57 (~150) .claude/skills/audit-scaffolding/SKILL 75 (~150)
chaploud
added a commit
that referenced
this pull request
May 24, 2026
§9.7 task 5.0 closer. Encodes the survey at
private/notes/phase5-skeleton-audit.md (676 lines, gitignored) as
a tracked decision so §9.7 rows 5.1-5.16 execute against a fixed
activation classification map without re-deriving from the
survey.
Two load-bearing decisions:
§1 Classification of the 8 Phase-4 skeletons:
4.13 io_interface matches FF (Phase 14, ADR-0015 a2)
4.17 type_descriptor restructure (5.11)
4.18 protocol restructure (Phase 7, D-040)
4.19 ObjectHeader matches FF (5.3)
4.20 host/_host_api matches FF (Phase 6 host wave)
4.22 binding_stack reverted (6a48e90 — terminal)
4.23 numeric/big_int restructure (5.2 + 5.9)
4.24 lazy_seq restructure (5.7)
4.25 dispatch/method_table matches FF (Phase 7, D-040)
§2 Critical-path activations for 5.16 exit smoke:
5.2 → 5.3 → 5.4-5.6 → 5.7 → 5.8 → 5.9-5.10 → 5.11 → 5.12
→ 5.15 (build_options flip, mechanical after 5.12)
→ 5.16 (exit smoke).
Parallel-safe: 5.13 (analyzer split), 5.14 (host placeholder
doc).
Devil's-advocate subagent forked with fresh context per CLAUDE.md
§ "ADR-level designs are handled inline" / principle.md
"Devil's-advocate subagent is mandatory at depth ≥ 2". Subagent
output reflected verbatim into Alternatives considered (Alt 1
smallest-diff / Alt 2 finished-form-clean split / Alt 3 wildcard
pattern-ADR). Subagent recommendation: Alt 1.
Main loop disposition: Alt 1 applied with §3 reduced to a
pointer (not deleted entirely — the link to the survey's "5.1
input bullets" stays so future readers find them without
re-discovering); §4 removed entirely per the subagent's
accurate F-003-overlap observation; subagent's omitted-
constraints #1 (per-row OrbStack gate) and #2 (5.15 in critical
path) reflected into §2. Omitted-constraint #3 moot now that §3
is a pointer.
ROADMAP §9.7 row 5.0 flipped to [x] in-place with the survey
SHA / row count + the Alt 1 disposition recorded so future
audits can reconstruct the deferral choice from the row text.
Smell-audited: 1: Devil's-advocate alternative Alt 1 applied
(structural ADR shrink — depth-2 amendment of the draft before
Accepted). The original draft carried the 8 constraint bullets
verbatim; the subagent surfaced the duplication-with-5.1
concern accurately and proposed three alternatives within the
F-NNN envelope. None violated F-001..F-008. F-003 (decision-
deferral) is the active constraint here: ADR-0026 should not
pre-commit decisions the survey only surfaces — 5.1's ADR-0027
/ ADR-0028 cluster owns the bullets at the moment they bind.
chaploud
added a commit
that referenced
this pull request
May 24, 2026
chaploud
added a commit
that referenced
this pull request
May 24, 2026
…e → 5.7 LazySeq force() 5.6 closed at 9553840 (single commit). Active task moves to 5.7 LazySeq activation — owns the Zig-0.16 mutex shape decision per ADR-0009 amendment 2 + the 5.1 input bullet #2 deferral. Likely disposition: (a) no lock for Phase 5 single-thread + explicit Phase 15 STM-activation debt row.
chaploud
added a commit
that referenced
this pull request
May 24, 2026
…nk + cache short-circuit; D-046 records Phase 15 mutex re-eval Smell-audited: 2: depth-2 surgery — rewrote LazySeq from default- struct + std.atomic.Mutex skeleton (4.24) to extern struct + Value-typed thunk + realized_flag discriminator. Per 5.1 input bullet #2 + Block A survey: cw v0 LazySeq had no lock at all (single-thread); Phase 5 inherits that disposition. Phase 15 STM activation re-evaluates per new debt D-046 (likely std.Io.Mutex via io_default). Field redesign: - thunk: Value (was: *const fn) — calls via rt.vtable.callFn so the closure's lexical env reaches through dispatch - realized: Value (was: atomic.Value(?*SeqOpaque)) — plain cache, single-thread; atomic returns at Phase 15 - realized_flag: u8 (new) — discriminates "pending" vs "cached" since both thunk and realized can equal nil_val legitimately - Dropped: ctx, lock (Phase 5 single-thread doesn't need them) force(rt, env, v): - non-LazySeq → passthrough - cached → return realized - pending → call vtable.callFn(thunk, []) → store result + flip flag → return result seq(rt, env, v) routes through force for .lazy_seq dispatch. Trace fn walks thunk + realized + meta. 4 new tests (layout / alloc default / cache short-circuit / non- LazySeq passthrough / vtable-not-installed error path). Full thunk-dispatch integration test deferred to 5.7.b alongside first/rest/next (need real Function values from tree_walk). Gate: Mac 13/13 + OrbStack Ubuntu x86_64 12/12 green (first-try).
chaploud
added a commit
that referenced
this pull request
May 24, 2026
…tent JVM upstream User-requested cold-start simulation surfaced a load-bearing wiring bug: branch (b) of the Resume contract was sourcing from `~/Documents/OSS/clojure/test/clojure/test_clojure/ regex.clj`, which the indirect-coverage deep dive (commit 292c52c, D-054 amend) proved does NOT exist. A new session picking (b) would try to read a non-existent file before finding the truth in D-054. Fix: - (b) re-pointed at cw v0's `test/upstream/clojure/test_clojure/ regex.clj` (the cw lineage SSOT, 54 LOC `CLJW-ADD`), with the no_copy_from_v1 reminder and a backref to the deep dive. - (a) cycle 2 DFA gained a cross-reference to D-056 — the dispatcher signature must accommodate lookahead in cycle 4 if honey/sql stays on the compat tier. - (c) row 6.9 clojure.string gained an inline warning: if a test touches `(?=...)`, it pulls forward into cycle 4 work; surface as a debt before sinking time. - Forbidden list (c) added: don't act on the original pre-amendment D-054 plan. Update count: this is handover update #2 for the session (the ≤ 2 / session cap allows it; both updates carry Active-task identifier-level material — cycle 1 end-to-end close at c957514, and the wiring correction here that prevents the next session from chasing a dead path). No HEAD-pointer churn. 100 lines (at cap). No forbidden phrases.
chaploud
added a commit
that referenced
this pull request
May 28, 2026
D-121 landed at 33ca37e via ADR-0050 unified InteropCallNode (depth-3 surgery; cycle-budget defer rejected per the new Cycle-budget defer smell). Resume contract now points to P1 #2 D-122 (D-102 Ref→TVal ring row assignment + impl). Smell-audited: 0: handover refresh — Active task identifier flipped per handover_framing.md update-cap exemption.
chaploud
added a commit
that referenced
this pull request
May 31, 2026
…); file D-180; wire resume Smell-audited: 2: ROADMAP §17 amendment — adds §9.2.S (perf campaign, ROI-ordered, ADR-0063 governance) as the ACTIVE resume target ahead of §9.2.R's Phase-15/JIT sequence (F-003: no renumber, pulled-forward overlay). ADR-0063 Revision history records the formalisation. No code smell. User-directed (2026-05-31): extend the one-off range pull-forward into a sustained ROI-ordered speed-tuning campaign, incorporated into the formal plan, wired so a clear session tackles it head-on first. Changes: - ROADMAP §9.2.S: the campaign (units table O-001✓/O-002✓ → D-180 → D-163 → D-140, measured numbers, PERF-marker + optimizations.md governance, F-002/F-011 discipline). - D-180 filed: bulk persistent! / vector.fromSlice (toPersistent's N-persistent-conj rebuild = the into/vec 121s bottleneck; pairs with the reverted O-003 transient into/vec; core-Vector change → exhaustive boundary tests). - handover resume contract → first-on-resume = §9.2.S / D-180. - optimizations.md: identified candidates #1 (D-180) + #2 (D-140 startup) with measured numbers; map/filter fusion (D-163) annotated 42s/1e5.
chaploud
added a commit
that referenced
this pull request
May 31, 2026
…dy AOT-restored (ADR-0056 Cycle 2b), not re-parsed; reduce-fusion moved to O-004 Smell-audited: 0: doc-only SSOT correctness fix (the candidate-#2 startup note predated ADR-0056 Cycle 2b's core-AOT restore + O-004's reduce-fusion landing).
chaploud
added a commit
that referenced
this pull request
Jun 4, 2026
…-io call sites (Phase B #1, ADR-0090 §1) Smell-audited: 1: first Phase B implementation increment per ADR-0090 §1. New runtime/concurrency/io_default.zig — a process-wide std.Io singleton (lazy single-threaded default; set() upgrades to rt.io in production) + lockMutex/unlockMutex/condWait/condSignal/condBroadcast/sleep wrappers over std.Io.Mutex/Condition. Solves the no-io-arg call sites (GC allocator vtable + module-level mutexes) that the global heap lock (increment #2) needs. cljw-clean re-derivation from cw v0's io_default.zig (no_copy_from_v1: reference, not copy; kept only the sync-primitive surface). Wired into the src/main.zig test aggregator (test-discovery trap). 3 unit tests green (get lazy-init, lockMutex/unlockMutex round-trip, cond signal/broadcast no-waiter); zig build green. Additive (new file + pure aggregator insertion) -> rides the gate-cadence batch; the full gate lands at increment #2 (the GC global heap mutex = shared-code/risky change). No concurrency consumer yet -> single-threaded behaviour unchanged.
chaploud
added a commit
that referenced
this pull request
Jun 4, 2026
…090 §2) Smell-audited: 1: Phase B implementation increment #2 per ADR-0090 §2. Added gc_mutex (std.Io.Mutex) to GcHeap; lock alloc/pin/unpin (gc_heap.zig) + the whole collect() cycle (mark_sweep.zig) via the io_default singleton (the allocator API takes no io arg). Makes allocation thread-safe under F-006 — the foundation the #3 ThreadGcContext root-publication handshake builds on for collection safety. Not reentrant (alloc never calls collect; collect never allocates). Uncontended + runtime-inert today (single-threaded; real threads land at #4 future/pmap), so no observable behaviour change. New concurrency test: 4 threads x 500 allocs through a threaded io serialize race-free (allocations.len == alloc_count == 2000). Full --serial-e2e gate green 247/0; the io_default-default-single-threaded gc tests still pass (uncontended lock). bench staged per source-bearing policy (also absorbs the session's dangling doc-commit gate samples). Stale 'lock deferred to Phase B' docstring updated to describe the landed lock.
chaploud
added a commit
that referenced
this pull request
Jun 4, 2026
…locks #3; re-analysis gated (D-244) Smell-audited: 2: Bad-Smell interrupt surfaced while designing increment #3. root_set.zig roots ns_vars/current_frame/macro_root_slot/permanent_roots but NOT the VM operand stack (vm.zig local Value array) nor tree_walk native-stack intermediates; safe today only because collect() runs at quiescent explicit points (no auto-collect). For Phase B real threads (#4), a mid-eval worker's operand/native-stack Values are un-rooted -> concurrent collect UAF; plus a pushFrame/popFrame read-during-write race during another thread's root walk. So ADR-0090 §2 Alt-2's 'no safepoint needed' is insufficient for mid-eval workers. Recorded as ADR-0090 Revision history + D-244 (the #3 gating design step): re-analyse with a DA-fork (safepoint Alt-1 vs publish-VM-operand-stack-root + forbid-tree_walk-during-collect) BEFORE the handshake code. The §1-2/§5-7 spine + increments #1/#2 are unaffected (the alloc lock is needed by either mechanism).
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.
Summary
WasmModule.Configunified loading API (PR Refactor module loading API using Config-based entrypoint zwasm#30 by @jtakakura).load*helpers are retained as thin wrappers, so CW call sites do not need changes.bash test/run_all.sh --quick→ 4/4 PASS (zig build test, cljw test 83 namespaces, e2e wasm, deps.edn e2e).Notable zwasm v1.8.0 behavioral changes (for awareness)
/// Persistent fuel budgetdoc comment). CW does not use the fuel API, so no impact here.--linkretry scoped toImportNotFound. CLI-only, no CW impact.See https://github.com/clojurewasm/zwasm/blob/main/CHANGELOG.md#180---2026-04-21 for the full release notes.
Test plan
zig build teston macOS aarch64 (with zwasm pinned locally to develop/pr30-integration: PASS)bash test/run_all.sh --quickon macOS aarch64: 4/4 PASS