Skip to content

Puts the integer and number formats in words, so Try starts the patron fixture - #272

Merged
johnnyt merged 1 commit into
mainfrom
se-mey1-editor-try-and-help
Nov 23, 2026
Merged

johnnyt merged 1 commit into
mainfrom
se-mey1-editor-try-and-help

Conversation

@johnnyt

@johnnyt johnnyt commented Nov 23, 2026

Copy link
Copy Markdown
Member

What changes

  • Signup.Validation now words the integer and number formats ("must be a whole number", "must be a number"), choosing the sentence by the format the failing question names (pair/2). A number outside its min and max keeps riddler's own sentence. Signup.Validation.formats/0 answers ["email", "integer", "number"]; any other format (phone, pattern) still raises and is still refused by Try.start/1 before it starts.
  • Try.start/1 therefore starts a Journey on the patron registration fixture as authored. The fixture's age question is untouched, and the sealed-secret test starts through Try.start/1 with no format removed.
  • The help field on the boolean and choice blocks is kept, and the patron registration fixture now uses it on the card question and the lending-rules question.
  • A live test pins that a choice question inside a chosen variant candidate is seeded from its presented value in the screen editor draft. The seeding (presented/1) is unchanged.

Provenance

  • Decision: add Validation messages rather than change the fixture, and keep help rather than remove it: decided by the conductor under a standing consent, 2026-11-23.
  • Variant check, read in riddler 0.6.0 (Riddler.Screens, the container's winner replaces it): the presented nodes carry the winning candidate's questions at the top level, so the existing seeding reaches them; the new test would go red if the draft were seeded empty.
  • The live test that refused a text question format used integer as its example of a format the Journey cannot check; it now uses phone, which is still refused.

Verification

  • Full mix quality green on this branch: format, compile, dependencies, credo, dialyzer, 971 tests.
  • Each new test was sabotaged and went red (mutation, then restored from a copy):
    • the Validation format wording, caught by the new Validation test and the Try fixture test;
    • the pass-through for other findings, caught by the range test;
    • the boolean help in the fixture, caught by the help test;
    • an empty draft in presented/1, caught by the variant test.

…n fixture

Signup.Validation had a reader-facing message for the email format
alone, so ScreenEditor.Try.start/1 refused the patron registration
fixture as {:unsupported_format, ["age"]}. It now words the integer and
number formats too ("must be a whole number", "must be a number"),
choosing the sentence by the format the failing question names; a
number outside its min and max keeps riddler's own sentence. The
fixture stays as authored, and the sealed-secret test starts its
Journey through Try.start/1 with no format removed. Any other format
(phone, pattern) still raises and is still refused before Try starts.

The help field on the boolean and choice blocks is kept, and the
patron registration fixture now uses it on the card question and the
lending-rules question. A live test pins that a question inside a
chosen variant candidate is seeded from its presented value in the
screen editor draft: riddler resolves a variant to the winning
candidate, which replaces the variant, so the existing seeding already
reaches it and is unchanged.

Refs: se-mey1, se-u3qt
@johnnyt
johnnyt merged commit 285de5b into main Nov 23, 2026
4 checks passed
@johnnyt
johnnyt deleted the se-mey1-editor-try-and-help branch November 23, 2026 18:10
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