Skip to content

Adds three branch library setup documents - #265

Merged
johnnyt merged 1 commit into
mainfrom
se-xv0i-setup-documents
Nov 22, 2026
Merged

johnnyt merged 1 commit into
mainfrom
se-xv0i-setup-documents

Conversation

@johnnyt

@johnnyt johnnyt commented Nov 22, 2026

Copy link
Copy Markdown
Member

What this does

Three setups a branch library runs when it joins, each a document of its own that runs alone as a durable Journey, with Back between its steps.

  • The documents: a catalogue sync, a reading-list import and a card-reader setup (priv/fixtures/catalogue_sync.json, reading_list_import.json, card_reader_setup.json), each a core.sequence of three myapp.step blocks, the plain returnable host step type, with its own screens document beside it (*_screens.json). Because every step is a returnable step, the Journey page offers Back on the second and third step of each.
  • The one list: StatifierExamples.Library.Setups lists the three once, by key (the file stem a page carries in ?path=) and by document id (bdoc_catalogue_sync, bdoc_reading_list_import, bdoc_card_reader_setup). fetch_document/1 answers a setup by its document id and :error for any other, which is what a resolver of child documents needs to look up. outcomes/1 reads each document's declared root outcomes from its compile for use as a child.
  • The settings page: /settings (StatifierExamplesWeb.SettingsLive) lists the three with their names, descriptions and root outcomes. Start starts the setup as a durable Journey with Journey.start/2 over its own options and navigates to the existing Journey page with the setup's key and the new execution's id. It draws no screen of its own. A key the list does not hold is refused on the page.
  • The Journey page runs the three by key beside the patron registration steps: its ?path= lookup now asks Library.Setups for any key other than the registration steps'.

Back in these documents goes through the plain returnable step type, not a composite: ruled by the operator, 2026-11-22. The signup Path is unchanged and keeps its authored back edge. No statifier_blocks change and no dependency move.

Provenance

  • Each document's root is a core.sequence, so each declares one root outcome, done. A root that finishes with more than one outcome, such as skipped, needs a root block that declares them, which here would be a new host composite this change does not add. So how a setup went is in its responses, where each press recorded it, and not in its outcome.
  • Every key in a screens document is unique across the whole document, screen keys included, so a screen is never named after the question it asks (reader_place asks reader_location).
  • The step type's outcomes and responses are not checked against the screen a step names, so the new fixture test does it for every Path built from myapp.step, the patron registration steps included. The test does not change the type.
  • No setup asks a boolean question: the Journey page does not convert a boolean answer yet, and a test holds the setups to that.
  • The new screens documents are named among the files under priv/fixtures/ that are not block documents (block_schema_test.exs).

Tests

test/statifier_examples/library/setups_test.exs (the list, the root outcomes, each step's config against its screen, each setup walked as a durable Journey and gone back on) and test/statifier_examples_web/live/settings_live_test.exs (the page: the list, Start landing on the first screen with no Back, Back between steps on each setup's page, the refusal). Every new test carries a sabotage note from a run: each mutation applied, the named test failed on an assertion, and the file was restored byte-equal from a copy before the next.

Full mix quality green on SQLite.

A catalogue sync, a reading-list import and a card-reader setup, each
a Path of three returnable steps with its own screens document, listed
once in Library.Setups by key and by document id. Each root declares
the outcome done. A new settings page starts any one of them as a
durable Journey and hands it to the Journey page, which now runs the
three by key and offers Back between their steps.

A fixture test holds every step's outcomes and responses to its
screen's buttons and questions, and no setup asks a boolean question.

Refs: se-xv0i
@johnnyt
johnnyt merged commit 44e6f4a into main Nov 22, 2026
4 checks passed
@johnnyt
johnnyt deleted the se-xv0i-setup-documents branch November 22, 2026 15:48
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