Skip to content

Adds the waiting loan's diff cases, one per class - #348

Merged
johnnyt merged 2 commits into
mainfrom
st-j1x8-waiting-loan-diff-cases
Sep 26, 2026
Merged

johnnyt merged 2 commits into
mainfrom
st-j1x8-waiting-loan-diff-cases

Conversation

@johnnyt

@johnnyt johnnyt commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds diff and position cases for a library loan that waits in awaiting_return with its due-date timer handed to the host, while its chart is edited so that the check_in state routing after the wait gains a damaged outcome (a damaged key, an in_repair final state and the transition to it). One case per class, each with expect_diff and expect_compatible_at for the position the loan waits at:

Case Edit to awaiting_return Class Predicate
loan_waiting_across_a_damaged_arm none: unchanged, id and content alike compatible true
loan_waiting_across_a_mapped_rename renamed to awaiting_check_in, with a mapping mapped false (it takes no mapping)
loan_waiting_across_a_regrouping id kept, gathered with overdue under a new compound state breaking false (parent differs)

The expected reasons are the ones Statifier.Chart.diff/3 answers today, order included; test/corpus/diff_cases_test.exs compares them over the committed corpus.

  • Corpus re-emitted with mix statifier.corpus: manifest.json's statifier case_count goes from 28 to 31, the corpus hash moves; mix statifier.corpus --check passes.
  • conformance/README.md: the diff-case paragraph now says the pairs take a hold_queue or a loan chart, and a new paragraph describes the loan pairs.
  • No lib/ change (git diff origin/main --stat -- lib is empty). No changelog fragment: changelog.d/README.md excludes conformance fixtures. No release.

Provenance

  • In the Compatible case awaiting_return is unchanged, id and content alike: the damaged outcome is the only edit, which is what makes the pair compatible. An id change is the Mapped case.
  • The Breaking case moves the waiting state under a new parent rather than removing it, so it differs from the existing hold_queue rename-without-mapping case.
  • The three cases are also ratcheted into test/passing_tests.json with mix test.baseline add, and registry.json is re-emitted, so the registry's statifier claim names them as it names every other authored case. The file map did not name this; it keeps the claim complete.
  • The execution waits at its initial state (steps is empty), as hold_queue_identical and hold_queue_data_added do; the library world gains no event.

Checks

  • mix quality, full, green on the head tree (re-run after the description correction): 3,067 of 3,067 tests passed, Dialyzer, Credo, conformance corpus and regression ratchet all passed. mix quality --profile merge green on the first commit; the ADR judge skipped (no file in a judged scope).
  • Sabotage, each restored from a copy and re-run green: the compatible case's expect_compatible_at flipped to false in the corpus file -> the position test red, naming that case; the breaking case's class changed to compatible -> the diff test red, naming that case.

Review tier: contract (a corpus expectation).

Three authored cases under conformance/cases/diff/ take a loan that waits
in awaiting_return with its due-date timer handed to the host, while its
chart is edited so that the check_in state routing after the wait gains a
damaged outcome: a damaged key, an in_repair final state and the
transition to it. Each case carries expect_diff and expect_compatible_at
for the position the loan waits at:

- loan_waiting_across_a_damaged_arm: awaiting_return keeps its id; the
  pair is compatible and the predicate answers true.
- loan_waiting_across_a_mapped_rename: awaiting_return becomes
  awaiting_check_in, diffed with a mapping; the pair is mapped and the
  predicate answers false, since it takes no mapping.
- loan_waiting_across_a_regrouping: awaiting_return keeps its id but is
  gathered with overdue under a new compound state; the pair is breaking
  and the predicate answers false.

The corpus is re-emitted with mix statifier.corpus: the statifier suite
goes from 28 to 31 cases and the corpus hash moves. The three cases are
ratcheted in with mix test.baseline add, so the registry's statifier
claim names them. conformance/README.md describes the loan pairs beside
the hold_queue ones.

No lib/ change. No changelog fragment: conformance fixtures.

Refs: st-j1x8
loan_waiting_across_a_damaged_arm said the waiting step was renamed in
the name a reader sees. The pair has no rename of any kind: awaiting_return
is byte-identical in both charts, and a chart carries no reader-facing
name. The sentence now says awaiting_return is unchanged, id and content
alike, and that the damaged outcome is the only edit.

Corpus re-emitted with mix statifier.corpus; --check passes.

Refs: st-j1x8
@johnnyt
johnnyt merged commit eb11494 into main Sep 26, 2026
1 check passed
@johnnyt
johnnyt deleted the st-j1x8-waiting-loan-diff-cases branch September 26, 2026 18:44
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