Skip to content

Holds a Journey press to authored checks - #281

Merged
johnnyt merged 1 commit into
mainfrom
se-b3n0-journey-authored-checks
Nov 28, 2026
Merged

johnnyt merged 1 commit into
mainfrom
se-b3n0-journey-authored-checks

Conversation

@johnnyt

@johnnyt johnnyt commented Nov 28, 2026

Copy link
Copy Markdown
Member

What changes

Riddler's resolve drops a question's checks from the elements it answers, so a check authored in the screen editor or in the patron registration fixture never held a patron at a screen, and the validation root carried no context for a check to read.

  • StatifierExamples.Signup.Journey.submit/4 puts each shown question's checks back from the screens document (authored_checks/2) and validates against a root of the typed responses, what the chart holds for the other screens with this screen's own keys and every secret question's left out (elsewhere/2), and a context the host builds (context/1): today, from the new :today option, a Date, or today's UTC date. Nothing the press sends reaches context.
  • StatifierExamples.Signup.Validation gains validate/3 and check/3, which take that context; validate/2 and check/2 pass an empty one. A failing check is worded in its author's message.
  • A refused view carries riddler's findings as refusals, and StatifierExamplesWeb.JourneyHost.submit/2 draws them. It used to re-run Validation.check/2 over the view's nodes, which carry no checks, so a check refusal would have reached the page with no finding.

Tests

  • ScreenEditor.TryTest, "holds the date of birth to its check, against the host's today": the patron registration fixture, run as a Journey, refuses a date of birth after the host's today and accepts the same date once today is past it.
  • ScreenEditor.TryTest, "takes its today from the host's clock, never from the press": a press carrying its own context and today keys is still refused on the host's clock.
  • Signup.ValidationTest, "a question's checks": a check is decided against the context it is handed, and decides nothing without one.
  • Each new test carries its sabotage note; every mutation went red on an assertion and was reverted from a copy.

Provenance

  • lib/statifier_examples_web/journey_host.ex is edited (one call and its moduledoc sentence) because the refused view's findings could no longer be recomputed there; its existing refusal test carries a new sabotage line.
  • Riddler is read at 0.9.0, the version mix.lock resolves.

Gate: full mix quality green on the committed tree.

Riddler's resolve drops a question's checks, so a check authored in
the screen editor or the patron registration fixture never held a
patron at a screen. Journey submit now puts each shown question's
checks back from the screens document and validates against a root
of the typed responses, what the chart holds for the other screens
(no secret question's) and a context the host builds: today, from
the submit's today option or the UTC date.

Validation takes that context in validate/3 and check/3 and words a
failing check in its author's message. The refused view carries
riddler's findings as refusals, which the Journey page's host now
draws, since re-checking the check-less nodes there found nothing.

Refs: se-b3n0
@johnnyt
johnnyt merged commit 7aa3aef into main Nov 28, 2026
4 checks passed
@johnnyt
johnnyt deleted the se-b3n0-journey-authored-checks branch November 28, 2026 12: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