Skip to content

Polymorphic sync v3#11

Open
cuzzo wants to merge 14 commits intomasterfrom
polymorphic-sync-v3
Open

Polymorphic sync v3#11
cuzzo wants to merge 14 commits intomasterfrom
polymorphic-sync-v3

Conversation

@cuzzo
Copy link
Copy Markdown
Owner

@cuzzo cuzzo commented May 5, 2026

No description provided.

cuzzo and others added 14 commits May 5, 2026 03:10
scan_for_raises only flagged ON ... RAISE / EXIT actions, but the
unselected-bubble path of every fallible WITH always emits
rt.setError(...); return error.CheatError; for types like LockCycle /
Deadlock. Functions in non-main scopes that hosted any WITH+ON clause
therefore reached for an out-of-scope rt.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
WITH GUARD now supports multiple capabilities per WITH; each per-cap
predicate references only its own alias (sibling-alias references are
rejected with a "multi-object consistency for aliased objects is not
supported" diagnostic, since synchronized sources cannot provide a
cross-object atomic snapshot). Multiple per-cap GUARDs AND-combine in
the lowering. MUTABLE aliases are accepted unless the body actually
mutates them; mutation is recognized via the existing mark_var_mutated
infrastructure, now also stamped on the SymbolEntry (aliases have no
decl node) and on chained-target field/index assigns and mutating
method receivers.

Multi-fallible WITH (2+ EXCLUSIVE / write_locked_read) can now combine
with an ON / RETRY clause. emit_sorted_lock_acquires_fallible uses the
OrErr acquire variants, tracks held guards in per-cap booleans,
releases held guards in reverse order on any acquisition failure, and
either retries the sorted acquire from scratch or runs the user's ON
action. Defers at WITH-scope are guarded by the same held-bitmap so
they're safe no-ops on the failure path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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