Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions docs/guides/basichttp-front.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,31 @@ token and the query log, records the router's half of this and the
persisted state.

A host serves the base URL over TLS and rotates a location that may have
leaked with `StatifierRouter.BasicHTTP.rotate_location/2`, after which
the old one answers 404.
leaked, after which the old one answers 404. A host that holds the
execution's live session rotates with
`StatifierRouter.BasicHTTP.rotate_location/3` and `session:` naming that
session, which also re-stamps the session so its chart reads the new
location. This hold desk has no session to name: the hold is a durable
execution, which has none (see "The outbound send runs in the
executor"), so a host rotating its location calls
`rotate_location/2`, which answers as `rotate_location/3` with no
options, and the `_ioprocessors` entry the execution stored when it
started keeps the old location until the host refreshes it.

## The pins

| Package | Version | What this guide uses it for |
|---|---|---|
| `statifier_router` | 0.12.0 | the `:basichttp` key, the location, `StatifierRouter.BasicHTTP.Front`, the location table, `deliver_event/4` for a failed send |
| `statifier_router` | 0.13.0 | the `:basichttp` key, the location, `StatifierRouter.BasicHTTP.Front`, the location table, `deliver_event/4` for a failed send |
| `statifier` | 2.13.0 | the Basic HTTP Event I/O Processor and its decoder |
| `statifier_persistence` | 0.24.1 | the chart registry, the execution, the input log |
| `statifier_persistence` | 0.24.2 | the chart registry, the execution, the input log |

0.12.0 is the floor because it is the published release `mix.exs`
0.13.0 is the floor because it is the published release `mix.exs`
requires. 0.9.2 was the first `statifier_router` release whose
migrations and address reaper both run on this app's SQLite database,
and nothing this guide uses needs more.
and nothing this guide uses needs more. `rotate_location/3`, which the
rotation paragraph above names for a host holding a live session, is
0.13.0's; this app does not call it.

## The chart

Expand Down
4 changes: 2 additions & 2 deletions docs/guides/first-workflow-form-post.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ The recipe is written and checked against these releases, which are what

| Package | Version | What the recipe uses it for |
|---|---|---|
| `statifier_router` | 0.12.0 | the webhook front, the binding, the delivery, the address, dedupe and ledger tables, the typed-send routes, `:around_delivery`, `:on_create` and `:on_step` |
| `statifier_router` | 0.13.0 | the webhook front, the binding, the delivery, the address, dedupe and ledger tables, the typed-send routes, `:around_delivery`, `:on_create` and `:on_step` |
| `statifier_oban` | 0.17.2 | the steps' jobs and the deadline timers, on this app's Oban |
| `statifier_persistence` | 0.24.1 | the chart registry, the execution, the input log, `Retention.prune/3` |
| `statifier_persistence` | 0.24.2 | the chart registry, the execution, the input log, `Retention.prune/3` |
| `statifier_blocks` | 0.43.0 | the document and the compile |
| `statifier` | 2.13.0 | compiling the chart and running it |

Expand Down
21 changes: 15 additions & 6 deletions docs/guides/first-workflow-routed.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ The recipe is written and checked against these releases, which are what

| Package | Version | What the recipe uses it for |
|---|---|---|
| `statifier_router` | 0.12.0 | the binding, the delivery, the address and dedupe tables, the route, the reapers, the migration's `:leading_columns`, `:on_create` and `:on_step` |
| `statifier_persistence` | 0.24.1 | the chart registry, the execution, the input log, `ended_at` |
| `statifier_router` | 0.13.0 | the binding, the delivery, the address and dedupe tables, the route, the reapers, the migration's `:leading_columns`, `:on_create` and `:on_step` |
| `statifier_persistence` | 0.24.2 | the chart registry, the execution, the input log, `ended_at` |
| `statifier_blocks` | 0.43.0 | the document and the compile |
| `statifier` | 2.13.0 | compiling the chart and running it |

`statifier_router` 0.12.0 requires `statifier ~> 2.10` and
`statifier_persistence ~> 0.18`, as 0.9.2, 0.10.0 and 0.11.3 did.
`statifier_router` 0.13.0 requires `statifier ~> 2.10` and
`statifier_persistence ~> 0.18`, as 0.9.2, 0.10.0, 0.11.3 and 0.12.0 did.
`mix.exs` asks for `statifier ~> 2.12` and `statifier_persistence ~> 0.24`
all the same, the lines this table names: 0.20.0 is the release that
adds `Executions.migrate_batch/3`, which
`docs/guides/migrating-waiting-executions.md` walks, and `mix.lock`
resolves 0.24.1. The jobs run on this app's own Oban. The first line the
resolves 0.24.2. The jobs run on this app's own Oban. The first line the
command prints names the versions it actually loaded.

## The workflow
Expand Down Expand Up @@ -346,7 +346,16 @@ Each of these is in `statifier_router`'s README and not needed here:

## Moving the first-workflow host to these pins

The latest move, to statifier 2.13.0 and statifier_blocks 0.43.0, needed
The latest move, from statifier_router 0.12.0 to 0.13.0 with
statifier_persistence 0.24.2, needed nothing in this recipe: 0.13.0 adds
no option, event or migration version. It adds
`StatifierRouter.BasicHTTP.rotate_location/3`, and this recipe
configures no BasicHTTP location; it keeps a route's mark after a
nested `StatifierRouter.Delivery.deliver_event/4`, and
`StatifierExamples.RoutedWorkflow.DoorstepRoute` makes no nested
delivery. statifier_persistence 0.24.2 changes documentation only.

The move before it, to statifier 2.13.0 and statifier_blocks 0.43.0, needed
nothing in this recipe: statifier 2.13.0 adds
`Statifier.Session.replace_send_type/3`, which the recipe does not call,
and refuses two documents with a `<state>` that has no `id`, which this
Expand Down
11 changes: 9 additions & 2 deletions docs/guides/first-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ The recipe is written and checked against these releases, which are what
|---|---|---|
| `statifier` | 2.13.0 | compiling the chart and running it |
| `statifier_blocks` | 0.43.0 | the document, `Plan.expressible/3`, the compile |
| `statifier_persistence` | 0.24.1 | the chart registry, the execution, the input log, `ended_at` |
| `statifier_persistence` | 0.24.2 | the chart registry, the execution, the input log, `ended_at` |
| `statifier_oban` | 0.17.2 | the invoke job and its `:invoke_timeout`, the timer job |
| `statifier_router` | 0.12.0 | two of the publish-time checks |
| `statifier_router` | 0.13.0 | two of the publish-time checks |

`statifier_datamodel` 0.5.2 arrives through `statifier_blocks`. The first
line the command prints names the versions it actually loaded.
Expand Down Expand Up @@ -306,3 +306,10 @@ which the recipe does not call, and refuses two documents with a
statifier_blocks 0.43.0 changes what the Map draws and says, and a list
of datamodel paths gets the advisory a single path gets; the recipe
mounts no Map, and its document declares no list of paths.

The move to statifier_router 0.13.0 and statifier_persistence 0.24.2
needed nothing here either: the router adds
`StatifierRouter.BasicHTTP.rotate_location/3` and keeps a route's mark
after a nested delivery, and this recipe uses the router for two
publish-time checks only; statifier_persistence 0.24.2 changes
documentation only.
2 changes: 1 addition & 1 deletion docs/guides/migrating-waiting-executions.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ opened. The next run starts from an empty chart.

The migration surface is `statifier_persistence`'s. `mix.exs` asks for
`~> 0.24`, the line the first-workflow guides' pin tables name, and
`mix.lock` resolves 0.24.1; `Executions.migrate_batch/3` is 0.20.0's.
`mix.lock` resolves 0.24.2; `Executions.migrate_batch/3` is 0.20.0's.
The first line the command prints names the version it loaded.

The migration surface is the verb and its report. A dry run is the
Expand Down
22 changes: 21 additions & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,11 @@ defmodule StatifierExamples.MixProject do
# pin tables name, as se-rhk5's floor did. 0.24.1 is a documentation
# release: no migration, no library code, and the `statifier` floor
# stays `~> 2.9`.
#
# 2026-10-11: `mix.lock` moves to 0.24.2 beside the router's move to
# 0.13.0, and the requirement stays. 0.24.2 is a documentation
# release as well: no migration, no library code, and the same
# `statifier ~> 2.9`.
{:statifier_persistence, "~> 0.24"},

# Durable timers. `statifier_oban` never owns an Oban instance
Expand Down Expand Up @@ -697,7 +702,22 @@ defmodule StatifierExamples.MixProject do
# migration version, and changes `StatifierRouter.Webhook` alone, which
# answers every request that carries `:raw_body` as 0.11 did; the hold
# desk's BasicHTTP front and the routed recipe do not call it.
{:statifier_router, "~> 0.12.0"},
#
# 2026-10-11: the requirement moves to `~> 0.13.0`, the published
# release after 0.12.0, to keep the reference embedder on what is
# published; nothing here needs more than 0.12.0. `mix.lock` moves the
# router to 0.13.0 and `statifier_persistence` to 0.24.2, and no other
# line. 0.13.0 states the same `statifier ~> 2.10` and
# `statifier_persistence ~> 0.18` as 0.12.0 and adds no option, event
# or migration version. This app does not call its new
# `StatifierRouter.BasicHTTP.rotate_location/3`. Its fix keeps a
# route's mark after a nested
# `StatifierRouter.Delivery.deliver_event/4`, and no route here makes
# one: the hold desk calls `deliver_event/4` from
# `StatifierExamples.HoldDesk.DeskPost`, an Oban job, with
# `run_in_scope: true`, a boolean, which 0.13.0's newly named
# `ArgumentError` for any other value does not reach.
{:statifier_router, "~> 0.13.0"},

# The observing/authoring component library, declared DIRECTLY rather
# than taken transitively. `statifier_ui` is an OPTIONAL dependency of
Expand Down
4 changes: 2 additions & 2 deletions mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
"statifier_blocks": {:hex, :statifier_blocks, "0.43.0", "b6c086e058e066e9ae29d1897dea2777039caf17dd5734cd2b14db371e074cc6", [:mix], [{:phoenix_live_view, "~> 1.0", [hex: :phoenix_live_view, repo: "hexpm", optional: true]}, {:predicator, "~> 9.4.1", [hex: :predicator, repo: "hexpm", optional: false]}, {:statifier, "~> 2.2", [hex: :statifier, repo: "hexpm", optional: false]}, {:statifier_datamodel, "~> 0.4", [hex: :statifier_datamodel, repo: "hexpm", optional: false]}, {:statifier_ui, "~> 0.9", [hex: :statifier_ui, repo: "hexpm", optional: true]}], "hexpm", "bddad75684c8b7255505d4bfc76ee10d1cb3e2a422365bca1c1c5bd3997b9aaa"},
"statifier_datamodel": {:hex, :statifier_datamodel, "0.5.2", "dcee12e421db5b79563ea7ce89cf127f2b35a8f00852d953f489342ebca9cc54", [:mix], [], "hexpm", "6d9df00890c5e3f1541ba77edbfcec0a2b75d43df438b6f57c926923f55bf57a"},
"statifier_oban": {:hex, :statifier_oban, "0.17.2", "3bfa0070c60130cf0ee16c0543009d2a8d8b4298b3394b0bddef71e5d362434e", [:mix], [{:oban, "~> 2.19", [hex: :oban, repo: "hexpm", optional: false]}, {:statifier, "~> 2.5", [hex: :statifier, repo: "hexpm", optional: false]}, {:statifier_persistence, "~> 0.13", [hex: :statifier_persistence, repo: "hexpm", optional: true]}, {:telemetry, "~> 1.3", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "cc8268a62ffddba9df14989f85dd4abc8df1ebdbcd55082dd53b9bac144b7905"},
"statifier_persistence": {:hex, :statifier_persistence, "0.24.1", "ff92155ed6d524ccb011b1faa251005294f5894905302a98f34c7e417dbbb415", [:mix], [{:ecto_sql, "~> 3.10", [hex: :ecto_sql, repo: "hexpm", optional: true]}, {:statifier, "~> 2.9", [hex: :statifier, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.3", [hex: :telemetry, repo: "hexpm", optional: false]}, {:uxid, "~> 2.0", [hex: :uxid, repo: "hexpm", optional: false]}], "hexpm", "840e8bae69960106d7d7c5c8f638cdd35f6fa58c889ae4184a6a21ecc631a674"},
"statifier_router": {:hex, :statifier_router, "0.12.0", "d514260dfe9adda209fd820dccdf8a4c37f7f184049afea06491a866f379b7ef", [:mix], [{:broadway, "~> 1.3", [hex: :broadway, repo: "hexpm", optional: false]}, {:ecto_sql, "~> 3.14", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:predicator, "~> 9.4", [hex: :predicator, repo: "hexpm", optional: false]}, {:statifier, "~> 2.10", [hex: :statifier, repo: "hexpm", optional: false]}, {:statifier_persistence, "~> 0.18", [hex: :statifier_persistence, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:uxid, "~> 2.0", [hex: :uxid, repo: "hexpm", optional: false]}], "hexpm", "6801299625f133ff1ceb4c0135cb4ebb92a0b4cae2ab27dabc0baff9b8515391"},
"statifier_persistence": {:hex, :statifier_persistence, "0.24.2", "5673cccc2e944c57df9be6f93bbe95429222992d22e63145ecc5ef41c85b0244", [:mix], [{:ecto_sql, "~> 3.10", [hex: :ecto_sql, repo: "hexpm", optional: true]}, {:statifier, "~> 2.9", [hex: :statifier, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.3", [hex: :telemetry, repo: "hexpm", optional: false]}, {:uxid, "~> 2.0", [hex: :uxid, repo: "hexpm", optional: false]}], "hexpm", "3f85a91af0a29b7cc2ec0bcdb92b4febb3d14b3c01019d607fdef1a5cf9490bb"},
"statifier_router": {:hex, :statifier_router, "0.13.0", "f790ebc821163c09db9b1ee0cb1ea4d7caa91fe7477e0141614efa4df6bf2b4b", [:mix], [{:broadway, "~> 1.3", [hex: :broadway, repo: "hexpm", optional: false]}, {:ecto_sql, "~> 3.14", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:predicator, "~> 9.4", [hex: :predicator, repo: "hexpm", optional: false]}, {:statifier, "~> 2.10", [hex: :statifier, repo: "hexpm", optional: false]}, {:statifier_persistence, "~> 0.18", [hex: :statifier_persistence, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:uxid, "~> 2.0", [hex: :uxid, repo: "hexpm", optional: false]}], "hexpm", "adb216d48d669a55ed82a575b59de1e65ce8e74ac44c24967d9e8f8d30ae6082"},
"statifier_ui": {:hex, :statifier_ui, "0.10.2", "74350d79ce2ce0235108bdf2851539c843cbd43de55ed582ed9bcaa6543de75c", [:mix], [{:kino, "~> 0.14", [hex: :kino, repo: "hexpm", optional: true]}, {:phoenix_live_view, "~> 1.0", [hex: :phoenix_live_view, repo: "hexpm", optional: true]}, {:predicator, "~> 9.4", [hex: :predicator, repo: "hexpm", optional: false]}, {:statifier, "~> 2.5", [hex: :statifier, repo: "hexpm", optional: false]}, {:statifier_datamodel, "~> 0.4", [hex: :statifier_datamodel, repo: "hexpm", optional: false]}], "hexpm", "f58a1e03b04dbaa172b319c0868408ea9e6383d30f979b9b3e676f4a831315ac"},
"tailwind": {:hex, :tailwind, "0.5.1", "35435b13158c90d37da11e1cfc808755fca1d7b6c5ab87b1b19c5de87e2f0a10", [:mix], [], "hexpm", "c4e26302a59fec72abc5610ecb6ad2116d9aa31f31aab2d4b8eb6e95d25a689c"},
"telemetry": {:hex, :telemetry, "1.4.2", "a0cb522801dffb1c49fe6e30561badffc7b6d0e180db1300df759faa22062855", [:rebar3], [], "hexpm", "928f6495066506077862c0d1646609eed891a4326bee3126ba54b60af61febb1"},
Expand Down
2 changes: 1 addition & 1 deletion test/statifier_examples/form_post/form_post_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ defmodule StatifierExamples.FormPostTest do
assert {:ok, lines} = FormPost.run(idempotency_key: "form-test")

assert [
"first workflow from a form post on statifier_router 0.12." <> _pins,
"first workflow from a form post on statifier_router 0.13." <> _pins,
"registered chart " <> _hash,
"stored application " <> stored,
"repeat the same client key again: application " <> _repeat,
Expand Down
11 changes: 9 additions & 2 deletions test/statifier_examples/mix_deps_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -1056,10 +1056,17 @@ defmodule StatifierExamples.MixDepsTest do
# Sabotage: pointed the LOCK assertion back at `"0.11.` and left
# `mix.lock` alone; it went red reporting the resolved 0.12.0 entry.
# Reverted from a copy.
#
# 2026-10-11: the requirement moves to `~> 0.13.0`, the published
# release after 0.12.0; nothing here needs more than 0.12.0, and
# 0.13.0's new `rotate_location/3` is called by nothing here.
# Sabotage: pointed the LOCK assertion back at `"0.12.` and left
# `mix.lock` alone; it went red reporting the resolved 0.13.0 entry.
# Reverted from a copy.
test "the statifier_router dep is the Hex requirement" do
deps = Mix.Project.config()[:deps]

assert {:statifier_router, "~> 0.12.0"} in deps
assert {:statifier_router, "~> 0.13.0"} in deps

lock_line =
"mix.lock"
Expand All @@ -1068,7 +1075,7 @@ defmodule StatifierExamples.MixDepsTest do
|> Enum.find(&String.starts_with?(&1, ~s( "statifier_router": )))

assert lock_line, "statifier_router has no mix.lock entry"
assert lock_line =~ ~s({:hex, :statifier_router, "0.12.)
assert lock_line =~ ~s({:hex, :statifier_router, "0.13.)
refute lock_line =~ ":git,"
end

Expand Down
2 changes: 1 addition & 1 deletion test/statifier_examples/routed_workflow_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ defmodule StatifierExamples.RoutedWorkflowTest do
assert {:ok, lines} = RoutedWorkflow.run(parcel_id: "parcel-test")

assert [
"first workflow routed on statifier_router 0.12." <> _pins,
"first workflow routed on statifier_router 0.13." <> _pins,
"migrated 4 router tables, depot_id at position 2 on each",
"published bdoc_parcel_route accepts parcel.scanned; " <>
"every publish-time check passed, 0 warning(s)",
Expand Down
Loading