From 4bb32bb93bfc494f22385b324432d59972da9877 Mon Sep 17 00:00:00 2001 From: JohnnyT Date: Tue, 13 Oct 2026 08:35:23 -0600 Subject: [PATCH 1/2] Carries the upgrading page to 0.25.0 The upgrading page now runs from 0.13 to 0.25.0. A "0.24 to 0.25" section with a "### 0.25.0" subsection says the statifier floor moves from ~> 2.9 to ~> 2.15, what a host on statifier 2.9 to 2.14 does, where the new function_providers: option goes (step/5, initialize: on create/4, Driver.new/3), the {:function_providers, reason} arm a host that passes a list may match, and the start_child_at/6 refusal in its own shape. The intro names the "~> 0.25.0" pin and the floor move, and the migration sentence runs through 0.25.0. Documentation only: no gated path changes, so there is no gate to run and the commit rests on review of the diff. Refs: sp-ho6v --- docs/upgrading.md | 64 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 58 insertions(+), 6 deletions(-) diff --git a/docs/upgrading.md b/docs/upgrading.md index 57b6da6..ab6035f 100644 --- a/docs/upgrading.md +++ b/docs/upgrading.md @@ -1,7 +1,7 @@ -# Upgrading a host from 0.13 to 0.24.2 +# Upgrading a host from 0.13 to 0.25.0 This page says what a host changes to move `statifier_persistence` from -0.13.0 to 0.24.2, one minor at a time. A host here is the code that +0.13.0 to 0.25.0, one minor at a time. A host here is the code that embeds the package: the module that calls `use StatifierPersistence.Ecto`, the migrations it runs, the options it passes to `StatifierPersistence.Executions` and `StatifierPersistence.Driver`, the @@ -14,10 +14,10 @@ Take the minors in order, and move the pin with each one, as the README recommends: `{:statifier_persistence, "~> 0.14.0"}`, then `"~> 0.15.0"`, then `"~> 0.16.0"`, then `"~> 0.17.0"`, then `"~> 0.18.0"`, then `"~> 0.19.0"`, then `"~> 0.20.0"`, then `"~> 0.21.0"`, then `"~> 0.22.0"`, -then `"~> 0.23.0"`, then `"~> 0.24.0"`. +then `"~> 0.23.0"`, then `"~> 0.24.0"`, then `"~> 0.25.0"`. The `statifier` floor stays `~> 2.6` through 0.17.0; 0.18.0 moves it to -`~> 2.9`, and every later release through 0.24.2 keeps it there. The -release after 0.24.2 moves it to `~> 2.15`. +`~> 2.9`, and every later release through 0.24.2 keeps it there; 0.25.0 +moves it to `~> 2.15`. ## Before you start: the database is at V07 @@ -35,7 +35,7 @@ with its own migration, and an install still short of V06 follows the V06 ordering rule in the `StatifierPersistence.Ecto.Migrations` documentation first. No release before 0.17.0 adds a migration; 0.17.0 does (V08, under "0.16 to 0.17"), and -no release from 0.18.0 through 0.24.0 adds one, and neither do the +no release from 0.18.0 through 0.25.0 adds one, and neither do the 0.23.1, 0.24.1 and 0.24.2 patches. ## 0.13 to 0.14 @@ -471,3 +471,55 @@ answer a host matches is added or removed. A documentation release: no library code differs from 0.24.1, and the `"~> 0.24.0"` pin already takes it. This page is now listed in the HexDocs sidebar, under Upgrading. **NONE**. + +## 0.24 to 0.25 + +### 0.25.0 + +Schema: **NONE**. The `statifier` floor moves from `~> 2.9` to `~> 2.15`, +the first release carrying host function providers, and no answer a host +matches is removed. One arm is added to a tuple a host may match: +`{:function_providers, reason}`, and it is answered only when a host passes +the new `function_providers:` option and the list does not resolve. + +- **If your `statifier` requirement allows 2.9 through 2.14**, move it to + `~> 2.15`: `{:statifier, "~> 2.15"}`, or a looser one that still excludes + every release before 2.15. A host that takes `statifier` only through + this package needs no change in its own `mix.exs`, and `mix deps.update + statifier` fetches 2.15. Nothing in + `statifier_persistence` answers differently for a chart that calls no + host function. What statifier itself changed between 2.9 and 2.15, + including a document it now refuses to compile, is in statifier's + CHANGELOG and upgrading page, which a host reads for the releases it + skips. +- **If your charts call functions of your own in a `cond` or an `expr`**, + give the list of your `Predicator.FunctionProvider` modules to + `function_providers:` instead of stamping it by hand with + `Statifier.MachineState.put_function_providers/2`. It goes in three + places: on `StatifierPersistence.Executions.step/5`; inside `initialize:` + on `StatifierPersistence.Executions.create/4`; and on + `StatifierPersistence.Driver.new/3` as a driver-level default that each + call may override. The package stamps the list on the loaded position + beside `routes:`, `invoke_types:` and `send_types:`, so a resumed + execution evaluates the call with no touch of + `Statifier.MachineState` from you. A durable subchart child the driver + creates does not inherit the list. A host that registers no function + provider changes nothing: **NONE**. +- **If you pass `function_providers:` and match on the errors of + `StatifierPersistence.Executions` or the driver**, add the + `{:function_providers, reason}` arm to the match. A list that does not + resolve is refused at the entry with `{:error, {:function_providers, + reason}}`, before any lock, load or write, on `step/5`, `create/4`, and + the driver's `create/3`, `send_event/4`, `done_invocation/5`, + `failed_invocation/5` and `answer_parent/3`. `reason` is one of + `{:not_a_list, value}`, `{:invalid_provider, entry, message}` and + `{:shadowed_names, names}` + (`t:StatifierPersistence.Executions.function_providers_reason/0`). A + host that passes no list never sees the arm. +- **If you call `StatifierPersistence.Driver.start_child_at/6` on a driver + that carries a `function_providers:` list**, add + `{:refused, {:function_providers, reason}}` to the refusals you match: a + list that does not resolve is refused there before any child is created + or anything is written, in the door's own `{:refused, reason}` shape. It + emits no `[:statifier_persistence, :child, :refused]` event. A driver + with a list that resolves, or with none, starts children as before. From 7ffb5ef902cad87618b3992bf5f927ca25f3f7c4 Mon Sep 17 00:00:00 2001 From: JohnnyT Date: Tue, 13 Oct 2026 08:37:12 -0600 Subject: [PATCH 2/2] Releases v0.25.0 Version 0.25.0, a minor release: the function_providers: option is new public surface (step/5, initialize: on create/4, Driver.new/3) and the statifier requirement moves from ~> 2.9 to ~> 2.15. Both changelog fragments are promoted into CHANGELOG.md, the README pin moves to ~> 0.25.0, and the changelog header link names v0.25.0. The release commit touches exactly mix.exs, README.md, CHANGELOG.md and the deleted fragments. The full mix quality gate ran green on this tree (1,447 tests, no warnings) with the gate lock and a machine slot held across the commit. The tag is the conductor's, after the merge. Refs: sp-ho6v --- CHANGELOG.md | 18 +++++++++++++++++- README.md | 2 +- changelog.d/sp-8ktk.md | 3 --- changelog.d/sp-aa9z.md | 8 -------- mix.exs | 2 +- 5 files changed, 19 insertions(+), 14 deletions(-) delete mode 100644 changelog.d/sp-8ktk.md delete mode 100644 changelog.d/sp-aa9z.md diff --git a/CHANGELOG.md b/CHANGELOG.md index a53da55..0b57169 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,10 +6,26 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Entries for unreleased work are not written here directly. Each issue drops a -fragment in [`changelog.d/`](https://github.com/riddler/statifier_persistence/blob/v0.24.2/changelog.d/README.md); the fragments are assembled +fragment in [`changelog.d/`](https://github.com/riddler/statifier_persistence/blob/v0.25.0/changelog.d/README.md); the fragments are assembled into a version section at release. See that README for the format and for when a change warrants an entry at all. +## [0.25.0] 2026-10-13 + +Feature release: a host registers its guard functions once, with `function_providers:` on `step/5`, inside `initialize:` on `create/4` and on `Driver.new/3`, and a resumed execution evaluates a `cond` or `expr` that calls one. A list that does not resolve is refused at the entry, and `start_child_at/6` refuses it in its own shape. + +Upgrading: no schema migration, and the `statifier` requirement moves from `~> 2.9` to `~> 2.15`. `{:function_providers, reason}` joins `t:StatifierPersistence.Executions.error/0`, answered only when a host passes the option and the list does not resolve. See `docs/upgrading.md`, "0.24 to 0.25". + +### Added + +- `function_providers:` on `StatifierPersistence.Executions.step/5`, inside `initialize:` on `create/4`, and on `StatifierPersistence.Driver.new/3` as a driver-level default each call may override: the host's guard functions are stamped onto the loaded position beside `routes:`, `invoke_types:` and `send_types:`, so a resumed execution evaluates a `cond` or `expr` that calls one without the host touching `Statifier.MachineState`. A durable subchart child the driver creates does not inherit the list. +- When `function_providers:` is passed, a list that does not resolve is refused at the entry with `{:error, {:function_providers, reason}}`, before any lock, load or write, on `step/5`, `create/4` and the driver's `create/3`, `send_event/4`, `done_invocation/5`, `failed_invocation/5` and `answer_parent/3`; `t:StatifierPersistence.Executions.error/0` gains the arm. +- When a driver's `function_providers:` list does not resolve, `StatifierPersistence.Driver.start_child_at/6` refuses with `{:refused, {:function_providers, reason}}`, its existing refusal shape, before any child is created or anything is written; a driver with a list that resolves, or with none, starts children as before. + +### Changed + +- The `statifier` requirement moves from `~> 2.9` to `~> 2.15`, the first release carrying host function providers; a host on statifier 2.9 to 2.14 moves statifier with it. + ## [0.24.2] 2026-10-11 Docs release: the upgrading page appears in the HexDocs sidebar under diff --git a/README.md b/README.md index 823fb99..3aee7c0 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ crash semantics. This package is that loop, packaged. ```elixir def deps do [ - {:statifier_persistence, "~> 0.24.0"}, + {:statifier_persistence, "~> 0.25.0"}, # Optional, for the Postgres adapter: {:ecto_sql, "~> 3.10"} ] diff --git a/changelog.d/sp-8ktk.md b/changelog.d/sp-8ktk.md deleted file mode 100644 index 7ad258d..0000000 --- a/changelog.d/sp-8ktk.md +++ /dev/null @@ -1,3 +0,0 @@ -### Added - -- When a driver's `function_providers:` list does not resolve, `StatifierPersistence.Driver.start_child_at/6` refuses with `{:refused, {:function_providers, reason}}`, its existing refusal shape, before any child is created or anything is written; a driver with a list that resolves, or with none, starts children as before. diff --git a/changelog.d/sp-aa9z.md b/changelog.d/sp-aa9z.md deleted file mode 100644 index 5348e87..0000000 --- a/changelog.d/sp-aa9z.md +++ /dev/null @@ -1,8 +0,0 @@ -### Added - -- `function_providers:` on `StatifierPersistence.Executions.step/5`, inside `initialize:` on `create/4`, and on `StatifierPersistence.Driver.new/3` as a driver-level default each call may override: the host's guard functions are stamped onto the loaded position beside `routes:`, `invoke_types:` and `send_types:`, so a resumed execution evaluates a `cond` or `expr` that calls one without the host touching `Statifier.MachineState`. A durable subchart child the driver creates does not inherit the list. -- When `function_providers:` is passed, a list that does not resolve is refused at the entry with `{:error, {:function_providers, reason}}`, before any lock, load or write, on `step/5`, `create/4` and the driver's `create/3`, `send_event/4`, `done_invocation/5`, `failed_invocation/5` and `answer_parent/3`; `t:StatifierPersistence.Executions.error/0` gains the arm. - -### Changed - -- The `statifier` requirement moves from `~> 2.9` to `~> 2.15`, the first release carrying host function providers; a host on statifier 2.9 to 2.14 moves statifier with it. diff --git a/mix.exs b/mix.exs index 8a9a0e1..2c7c26b 100644 --- a/mix.exs +++ b/mix.exs @@ -1,7 +1,7 @@ defmodule StatifierPersistence.MixProject do use Mix.Project - @version "0.24.2" + @version "0.25.0" @source_url "https://github.com/riddler/statifier_persistence" def project do