Repository navigation
Asserts the upgrade host's palette pre-flight - #227
Merged
Merged
Conversation
The upgrade host recorded empty Palette.preflight/1 and /2 answers in a pull request, but no test asserted them. A test now checks both at the pinned statifier_blocks: the host's palette, and the loan document read back from its canonical JSON, each stored block resolving first.
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.
Resolves se-2q0v.
What
A test in the upgrade host asserts that
StatifierBlocks.Palette.preflight/1over the host's palette andPalette.preflight/2over the loan document, decoded from its canonical JSON the way a host stores it, both answer[]at the pinned statifier_blocks 0.42.1. Until now the empty answers were only recorded in a pull request, so a later upgrade step could not rerun them.The test is in
upgrade_host/test/upgrade_host/loan_document_test.exs, describe "the palette pre-flight". It asserts the palette first: the authoring edits write the same values as the defaults, so a field type that refuses its default also refuses the edit, and the document half could not be built to judge. Before the document half it asserts that every stored block resolves through the palette, becausepreflight/2passes over a block it cannot resolve, and an empty answer is then a judgement rather than a skip.No
lib/file changes, and no pin or lock line inupgrade_host/mix.exsorupgrade_host/mix.lockmoves.Sabotage
AssessFine'sassign_tofield declared:integerwith its default still"fine": thepreflight/1assertion failed, listing that default.%{"event" => 7}: thepreflight/2assertion failed, listing the stored block'sevent.UntilReturned.current_version/0answering 0: the resolve assertion failed, the stored root block being too new.Each mutation was reverted from a copy and the restore checked byte-equal before the next check and before the gates ran.
Gates
On the head rebased onto main:
mix qualitygreen.mix deps.get --check-locked,mix compile --warnings-as-errorsandmix testgreen.Review
An in-turn review of the diff and of the new test. Taken: the resolve assertion (the document half could otherwise pass over blocks it did not judge) and a more exact comment on why the palette is asserted first. No record text in this PR.