Skip to content

Pins the library cases' send types - #454

Merged
johnnyt merged 1 commit into
mainfrom
st-sm5s-library-send-types-test
Oct 11, 2026
Merged

johnnyt merged 1 commit into
mainfrom
st-sm5s-library-send-types-test

Conversation

@johnnyt

@johnnyt johnnyt commented Oct 11, 2026

Copy link
Copy Markdown
Member

Refs: st-sm5s

What this adds

conformance/README.md's library-world section says every library case
whose chart sends registers both send types, library:timer then
library:route, and that a case whose chart sends nothing carries no host
object. No test read host.send_types: the existing host test in
test/corpus/corpus_files_test.exs asserts that a case whose document sends
carries a host object, and nothing checked what that object registers. A
library case registering only library:timer, or the two types in the other
order, passed every test.

The new test in the same file reads every committed case JSON under
conformance/cases/library/, accepts/ and diff/ (the three directories
the README places in the library world), keeps those with a host object,
and asserts that each carries send_types exactly
["library:timer", "library:route"], naming any case that does not. It
fails when it finds no such case, so it cannot pass on nothing. The cases
under send/ and system_variables/ keep their own domain, as the README
says, and are not read. A library case added later is covered without a
change here.

The sabotage checks

Each in conformance/cases/library/loan_lost_after_timer.json, the file
copied first:

  • the two send types swapped: the test fails on its assertion, naming the
    case and ["library:route", "library:timer"];
  • library:route dropped: the test fails on its assertion, naming the case
    and ["library:timer"].

After each, the file was restored from the copy and confirmed byte-equal
(cmp, and git diff --exit-code), and the test passed again. The test
asserts committed case files and no lib/ behaviour, so its # sabotage:
line states the exemption and names these two mutations.

Test only; no changelog fragment (changelog.d/README.md excludes the test
harness and conformance fixtures).

Gate

Full mix quality (mix gate.verify) green on this commit's tree after the
rebase onto the current main, and the merge profile
(mix quality --profile merge) green, the ADR judge skipped because no file
is in a judged scope.

Review

Tier: gate (a test over committed fixtures). The in-turn review of the diff
found nothing to change.

conformance/README.md says every library-world case whose chart sends
registers both send types, library:timer then library:route, but no
test read host.send_types: a case registering only one of them, or the
two in the other order, passed every test.

- Adds a test to test/corpus/corpus_files_test.exs that reads every
  committed case under conformance/cases/library/, accepts/ and diff/
  (the three directories the README places in the library world) and
  asserts that each one with a host object carries send_types exactly
  ["library:timer", "library:route"]. It refuses to pass vacuously
  when no such case is found.
- Swapping the two types in one committed library case turns it red,
  as does dropping library:route; each was restored from a copy,
  byte-equal, and the test is green again.

Test only; no changelog fragment.

Full mix quality (mix gate.verify) ran green on this commit's tree
(write-tree 5d5a189).

Refs: st-sm5s
@johnnyt
johnnyt force-pushed the st-sm5s-library-send-types-test branch from 8b48f5e to 8f90b9a Compare October 11, 2026 16:03
@johnnyt
johnnyt merged commit 5d99937 into main Oct 11, 2026
1 check passed
@johnnyt
johnnyt deleted the st-sm5s-library-send-types-test branch October 11, 2026 16:05
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