The clock-on-wait test's no-timer-edge half can now fail - #672
Merged
Merged
Conversation
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
force-pushed
the
sb-jpo8-clock-on-wait-test
branch
from
September 30, 2026 11:07
2641a04 to
0123d67
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.
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.waitfrom config alone, and a wait's schema has noeventfield, so the wait could never pair with the delayed send even ifStatifierBlocks.Mapcountedcore.waitamong its timer targets (@timer_targetsinlib/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.Fieldadded 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.mdexcludes tests).Sabotage
Added
"core.wait"to@timer_targetsinlib/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 qualitygreen 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.Fieldand a:stringtype fromBlockType.field_type;field/2in the map readsform.fieldsby 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