Repository navigation
fix: fail a check or condition whose ${VAR} resolves to blank - #860
Closed
HappyDevs1 wants to merge 2 commits into
Closed
HappyDevs1 wants to merge 2 commits into
HappyDevs1 wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
This was referenced Nov 23, 2026
Collaborator
Author
|
Closing: these commits shipped in #863, which contained them and merged to main. Nothing is left to merge here. |
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.
Closes #837.
Problem
The grammar refuses blank expected text, but a
${VAR}reference gets past it, and an empty value is accepted when it resolves.page shows ${ORDER_ID}withORDER_ID=then checksactual.contains(""), which is always true. The same holds for counts,url containsandtitle contains, on record and replay. A data source that returns a blank value turns a check into a silent pass.Replicated on 0.23.34 against a local page reading "Hello world": recorded
assert: page shows ${FP_ORDER}withFP_ORDER=Hello, thenflowproof run --var FP_ORDER=gave[PASS] s0001 page shows ${FP_ORDER}.Fix
flowproof-trace:secret::blank_refs(raw, resolved)returnsBlankRefsnaming the variables when the text is blank only because of its references. Literal text without references is left to the grammar.check_assertionrefuses a blankvalue_contains(counts included),url_containsortitle_contains, so element, surface, framed, url and title checks all fail the step:${ORDER_ID} is empty, so this check would hold whatever the app shows.page does not showblank text never holds, so a blank reference would skip its branch as silently as the positive form takes it. Replay'sreading_holdsreturnsReplayError::BlankRefs, which stops the run by name. The recorder'scondition_holdsfails the recording the same way.Contains,CountEquals,UrlContainsandTitleContains.docs/trace-format.mdsays so next to "an unset variable fails closed".Exact forms (
shows exactly,url is, attributes, styles) are untouched: blank text there is a real comparison, not one that holds on anything.Tests
blank_refs_names_the_references_that_made_the_text_blank(flowproof-trace).a_condition_whose_reference_is_blank_fails_the_recording: page shows, page does not show, and the element form.a_check_whose_reference_is_blank_fails_by_name: replay fails the step, and recording refuses it.a_when_whose_reference_is_blank_stops_the_replay_by_name.Not built locally (no disk); CI is the first compile.