Repository navigation
fix(replay): stop on an unset ${VAR} in a when: or repeat until: condition - #862
Merged
Merged
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.
…conditions # Conflicts: # crates/flowproof-replay/tests/replay_calc.rs
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.
Problem
On replay, every step fails closed on an unset
${VAR}, except a condition.check_assertionreports the missing variable as a failed verdict, andreading_holdsreads any failed verdict as "does not hold":when: page shows ${X}(ordoes not show) withXunset skips its block, reported as "did not hold". The checks inside never run, and the run passes.repeat: until: … ${X}runs every pass against the app, then fails with "did not hold within N passes", blaming the app instead of the missing variable.Recording now refuses an unset variable in a condition (#859), so this shows up when a flow is recorded where the variable is set and replayed where it isn't: CI, another machine, or another environment profile.
Fix
reading_holdsresolves every text expectation (value_*,url_*,title_*) before reading, and returnsReplayError::Secretnaming the variable.Tests
a_when_whose_variable_is_unset_stops_the_replay_by_name: the condition would hold on the page, the variable is unset at replay, and the run stops by name without running the branch.Not built locally (no disk); CI is the first compile.