Repository navigation
Runs the upgrade host's cascade over a child - #231
Merged
Merged
Conversation
The cascade test failed a loan with no child, so its {:ok, 0} would
hold even if cascade_cancel did nothing. A second loan document in the
test support opens a core.subchart for an overdue notice, driven
through StatifierPersistence.Driver and DurableSubchart; the new test
reads the notice's linkage, fails the loan from outside, and asserts
the cascade cancels the notice. The upgrade host's pins do not move.
Refs: se-u6hl
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.
The upgrade host's cascade test failed a loan and ran
Executions.cascade_cancel/3over it, but the loan document opens nosubchart, so the answer
{:ok, 0}and the:no_linkageread would alsohold if the cascade did nothing. A later bump step that changed the
cascade or the linkage reads would not have been caught.
What changes
upgrade_host/test/support/loan_with_notice.ex(new, test support): asecond loan document whose
core.subchartnames an overdue-noticedocument (which waits for
notice.sent), theStatifierBlocks.Runtime.DurableSubcharthost callbacks that resolveit, and a
StatifierPersistence.Driverover the host's own store.upgrade_host/test/upgrade_host/loan_test.exs: a new test opens sucha loan through
Driver.create/3, finds the notice throughLinkage.parent_match/1, reads its linkage back throughLinkage.from_metadata/1andDriver.parent_link/2(the parent id,the invoke id, the child index, the content hash, the derived child id), fails the
loan with
Executions.fail/3, checks the notice is still active, andasserts
Executions.cascade_cancel/3answers{:ok, 1}and leaves thenotice
:cancelled; a second run answers{:ok, 0}. The existingno-child test stays as it was, with its comment pointing at the new
one.
upgrade_host/README.md: one bullet under "What it holds" for theloan with a child execution.
No file under
lib/changes, and the upgrade host's exact pins inupgrade_host/mix.exsand itsmix.lockdo not move.Sabotage
Each mutation was applied, the test run, and the file restored
byte-equal (a dependency mutation recompiled the dependency for the
test env before and after):
(
statifier_persistence'scancel_counted): red, the notice was stillactive after the cascade;
Linkage.from_metadata/1read a key the package never writes: red, thenotice's linkage read
:no_linkage;:pendingwithout starting a child:red, the loan had no child.
Gate
Both gates green on the branch: the root
mix quality, and fromupgrade_host/the CI job's steps (mix deps.get --check-locked,mix compile --warnings-as-errors,mix testagainst Postgres).Provenance
Exercising the cascade over a loan with a child, with a README limit
only as the fallback, was decided by the conductor under a standing
consent, 2026-10-10. The bounded attempt fitted inside the test support
with no package change, so the fallback was not taken. No record text
changes in this PR.