Skip to content

State in C-132 that a mut-param write made before an err is visible to the caller - #117

Merged
O6lvl4 merged 1 commit into
mainfrom
c132-err-writeback-visible
Sep 30, 2026
Merged

O6lvl4 merged 1 commit into
mainfrom
c132-err-writeback-visible

Conversation

@O6lvl4

@O6lvl4 O6lvl4 commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

What

Carries the ruling on almide/almide#2917 (#1871 option (B), "write visible") into the judge.

  • C-132: the #1576 part said the err arm carries no buffer and that a ! site propagates before any write-back, so the caller keeps its pre-call value. That is withdrawn. Its "Boundary … stays walled" sentence is dropped. It is replaced by an AMENDED paragraph:

    • A write the callee makes to its mut param before it errs is visible to the caller, as with native &mut.
    • Every raising exit carries the buffer it holds at that point: an explicit err(..), a guard, every x! / x?.
    • The call site writes back on both arms.
    • An unpropagated call (??, match, bound Result, let _ =) writes back, then yields ok/err.
    • A ! call writes back, then propagates.

    The exclusion of a declared-Result effect fn whose err type is not String is kept.

  • C-226: it no longer describes the value-returning mut-param effect fn as "the documented C-132 exclusion". It points at C-132's ok and err arms.

  • New fixture spec/wasm_cross/mut_param_err_write_visible.almd:

    • exits after a write: explicit err, guard, propagated !;
    • consumers: ??, match, bound Result, let _ =, and a ! forwarded one level up;
    • buffers: List, String, record.
  • The header comment of mut_param_effect_can_err.almd no longer states the old order.

The reference evaluator already copies mut finals out on every exit (call_fn_muts), so the ref needs no change. On the new fixture, als-ref run and native almide 0.64.0 print identical stdout, exit 0. The wasm legs wall on it today; almide/almide#2917 implements it.

ALS-M13's prose is general ("written back at every call position") and does not contradict this, so it is left unamended. Amending it would need a fresh review stamp in proofs/als-validation.toml.

Author / verifier record

role who (human handle, or agent + session) independent of the author?
authored Claude Code agent (Opus 5.5), for O6lvl4 —
verified same agent: ref evaluator + native almide 0.64.0 run, local gates no

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

…o the caller, and pin it with a mut_param_err_write_visible fixture

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