Repository navigation
Checks the card steps' hook and params - #223
Merged
Merged
Conversation
The delay and failure hook now refuses what it does not take: a delay that is not a non-negative integer, a fail that is not true or false, any other key, or a setting that is not a keyword list raises an ArgumentError naming the step, where a bad delay raised a case clause error and any truthy fail failed the step. Params that are not a map get the keys-only refusal with an empty key list instead of a function clause error. Each step's library-system scope gets its own test and sabotage note, the area check and the sort included. The hook's moduledoc example outlasts the chart's five-second bound, and the area check's moduledoc says the chart hands its word to the patron system's route. Refs: se-635m
johnnyt
force-pushed
the
se-635m-card-steps-hook-settings
branch
from
October 11, 2026 09:15
e43f2aa to
040977b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs se-635m.
What changes
StatifierExamples.FormPost.Steps.hooked/2checks the delay and failure hook before it runs a step.:delay_mstakes a non-negative integer and:failtakestrueorfalse; any other value, any other key, or a setting that is not a keyword list raises anArgumentErrornaming the step. Before, a non-integer or negative delay raised a case clause error and any truthy:failfailed the step. The hook is a test's and a demo's configuration, so a mistake in it surfaces as a crash with that message, as a misconfiguredstatifier_obandoes inSteps.config/0, rather than as an answer the step gives about the application.Steps.application_id/1refuses params that are not a map with the same keys-only refusal,{:params_not_an_application_id, []}: such params have no keys to name, and the value is left out. Before, they raised a function clause error.priv/form_post/card_application.json). The Steps, Reader, screen and sort moduledocs already read true of it. Two sentences changed: the hook's example delay is now6_000, which outlasts the chart's five-second bound (the old5_000only tied it), and the area check's moduledoc says the chart hands its word on to the patron system's route with the card lane's send, since no condition in the chart reads that word.steps_test.exs: the shared library-system scope test is split so the screen, the area check and the sort each have their own test and sabotage note. New tests cover the non-map refusal and each hook refusal. Every new test was sabotage-checked: the mutation in its note turned that test, and only that test, red on an assertion, and the file was restored byte-equal afterwards.Provenance
Review
The kit's pre-request review round ran in-turn: the diff critic and the test critic. Neither raised a blocking finding. One advisory was taken: the first wording of the hook paragraph claimed a raise is not retried, which is not what
StatifierOban.Invoke.Workerdoes, and the paragraph now makes no claim about retries. No record text changes in this PR.Gate
Full
mix qualityis green on the pushed head: format, compile with warnings as errors, credo, dialyzer, and the full test suite with coverage.