Skip to content

The clock-on-wait test's no-timer-edge half can now fail - #672

Merged
johnnyt merged 1 commit into
mainfrom
sb-jpo8-clock-on-wait-test
Sep 30, 2026
Merged

johnnyt merged 1 commit into
mainfrom
sb-jpo8-clock-on-wait-test

Conversation

@johnnyt

@johnnyt johnnyt commented Sep 30, 2026

Copy link
Copy Markdown
Member

What

The map test "a wait carries the clock mark and hears no timer edge" could not fail on its edge half. It built its core.wait from config alone, and a wait's schema has no event field, so the wait could never pair with the delayed send even if StatifierBlocks.Map counted core.wait among its timer targets (@timer_targets in lib/statifier_blocks/map.ex). Only the mark half could bite.

The test now gives the wait the send's event on its form (a ViewModel.Field added to the built view model, the same way the neighbouring marked-leaf test edits a built view model) before drawing the graph. A wait that joined the timer targets would then hear the send, and the timers assertion ([{"reminder", "overdue"}]) fails.

Test-only: no lib/ change, no changelog fragment (changelog.d/README.md excludes tests).

Sabotage

Added "core.wait" to @timer_targets in lib/statifier_blocks/map.ex: the test went red on the timers assertion (left [{"reminder", "loan_period"}, {"reminder", "overdue"}]). Reverted from a copy, byte-equal, recompiled. The mutation is noted above the test.

Gate

Full mix quality green on the committed tree: 3,951 of 3,951 tests, 95.3% coverage, dialyzer clean, ADR cites green.

Review

In-turn review: re-read the diff against the bead. The acceptance asks that the test go red when a wait joins the timer targets, pinned by a sabotage; the sabotage above does that, and the test name keeps its claim. The added field is built with every enforced key of ViewModel.Field and a :string type from BlockType.field_type; field/2 in the map reads form.fields by key, which is why the wait now carries an event the map can see. The mark half and its existing sabotage note are unchanged. The test module's moduledoc is untouched.

Refs: sb-jpo8

The map test "a wait carries the clock mark and hears no timer edge"
built its wait from config alone. A wait's schema has no event field,
so the wait could never pair with the delayed send even if the map
counted core.wait among its timer targets, and the edge half of the
test could not go red.

The test now gives the wait the send's event on its form before
drawing the graph, so a wait that joined the timer targets would hear
the send and the timers assertion fails. Sabotaged: adding core.wait to
the map's timer targets turns the test red. Test-only; no lib change.

Gate: full mix quality green on this staged tree (3,951 of 3,951
tests, 95.3% coverage, dialyzer clean, ADR cites green).

Refs: sb-jpo8
@johnnyt
johnnyt force-pushed the sb-jpo8-clock-on-wait-test branch from 2641a04 to 0123d67 Compare September 30, 2026 11:07
@johnnyt
johnnyt merged commit 9f4544d into main Sep 30, 2026
2 checks passed
@johnnyt
johnnyt deleted the sb-jpo8-clock-on-wait-test branch September 30, 2026 11: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