Strengthen all_arms_must_agree test to pin rendered diagnostic wording - #453
Closed
onatozmenn with Copilot wants to merge 1 commit into
Closed
Strengthen all_arms_must_agree test to pin rendered diagnostic wording#453onatozmenn with Copilot wants to merge 1 commit into
all_arms_must_agree test to pin rendered diagnostic wording#453onatozmenn with Copilot wants to merge 1 commit into
Conversation
Copilot
AI
changed the title
[WIP] Update all_arms_must_agree test to assert rendered wording
Strengthen Jul 29, 2026
all_arms_must_agree test to pin rendered diagnostic wording
onatozmenn
marked this pull request as ready for review
July 29, 2026 20:49
6 tasks
onatozmenn
added a commit
that referenced
this pull request
Jul 29, 2026
onatozmenn
force-pushed
the
copilot/update-all-arms-must-agree-test
branch
from
July 29, 2026 20:55
40f4c06 to
136d15f
Compare
onatozmenn
force-pushed
the
copilot/update-all-arms-must-agree-test
branch
from
July 29, 2026 20:57
136d15f to
cf14c77
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.
The test only verified the diagnostic code (
TYPE_MISMATCH) but not the message text, leaving regressions in rendered output undetected.What this changes
Pin the rendered wording of the
all_arms_must_agreediagnostic by capturingsourcesfromcheck_sourceand asserting the output contains"found \Bool`"or"expected `Int`"`:Why this way
The
||covers both "found unexpected type" and "expected type" phrasing conventions without over-constraining the exact message format, while still catching silent regressions in diagnostic rendering.What it still does not do
Does not pin the full rendered message verbatim — intentional, to avoid brittleness from minor wording tweaks that don't affect diagnostic quality.
Checks
cargo fmt --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspacecargo run -p deed-cli -- check examples/andtest examples/, if this touches the compilerdesign/updated in this PR, if this changes behaviour one ofthem describes. A design that lags the code is worse than no design.
guard test that only passes values the guard accepts proves nothing, and that is how
the worst bug here went unnoticed.
AI assisted.
Original prompt