|
2 | 2 |
|
3 | 3 | ## Unreleased |
4 | 4 |
|
| 5 | +## v0.101.1 — STM and agent hardening pass |
| 6 | + |
| 7 | +Concentrated correctness, consistency, and safety pass over the |
| 8 | +STM and agent surfaces that landed in v0.101.0. No new features; |
| 9 | +every change closes a real or latent bug or aligns mino with JVM |
| 10 | +canon. Highlights: |
| 11 | + |
| 12 | +- STM commit is now atomic via a two-pass split (stage all new |
| 13 | + values + run all validators, then apply); a late-iteration |
| 14 | + validator throw or commute-replay throw used to leave earlier |
| 15 | + refs already committed. |
| 16 | +- Commute log replay routes through `mino_pcall` so a throwing |
| 17 | + commute fn no longer leaks the global commit lock. |
| 18 | +- `tx_state_t.in_commit` rejects re-entered `alter` / `ref-set` / |
| 19 | + `commute` from inside commute-replay or validator callbacks. |
| 20 | +- `send` and `send-off` from inside `dosync` are queued and |
| 21 | + dispatched only on successful commit (cleared on retry / abort). |
| 22 | + `release-pending-sends` actually counts and clears that queue. |
| 23 | +- Cross-state defense: agents now track `owning_state` and every |
| 24 | + agent prim throws MST007 on mismatch. The ref check moved into |
| 25 | + the shared cores so the Clojure path (not just the C API) is |
| 26 | + covered. |
| 27 | +- Agent constructor accepts `:validator`, `:error-handler`, |
| 28 | + `:error-mode`, `:meta`; unknown options throw. |
| 29 | +- `error-handler` is invoked on action and validator failure |
| 30 | + (was stored but never called). `restart-agent` runs the |
| 31 | + validator on the new state. `set-error-mode!` / |
| 32 | + `set-error-handler!` / `add-watch` / `set-validator!` reject |
| 33 | + invalid arguments at install time. |
| 34 | +- `*agent*` is bound to the dispatching agent across action / |
| 35 | + validator / watch bodies. |
| 36 | +- `shutdown-agents` flips a state-level flag; subsequent sends |
| 37 | + throw MST008. `send-via` throws MST008 with a clear directive |
| 38 | + rather than being unbound or aliasing to `send`. |
| 39 | +- Watch dispatch goes through `mino_pcall` for both refs and |
| 40 | + agents; first thrown exception is captured, every other watch |
| 41 | + still runs, captured exception re-thrown so the caller surfaces |
| 42 | + it. Pending-sends drain runs before watch dispatch so a |
| 43 | + misbehaving watch can't drop queued agent sends. |
| 44 | +- `with-meta` / `vary-meta` on stateful types (atom / agent) |
| 45 | + throw with a clear directive; `(meta x)` and `alter-meta!` keep |
| 46 | + working (the latter now also write-barriers). |
| 47 | +- Agent print form carries identity: `#agent[ID VAL]` matches |
| 48 | + `#ref[ID VAL]`. |
| 49 | + |
5 | 50 | ### Bind `*agent*` During Action / Validator / Watch Dispatch |
6 | 51 |
|
7 | 52 | JVM canon binds the dynamic var `*agent*` to the dispatching agent |
|
0 commit comments