Skip to content

fix(replay): stop on an unset ${VAR} in a when: or repeat until: condition - #862

Merged
HappyDevs1 merged 3 commits into
mainfrom
fix/unset-var-replay-conditions
Nov 23, 2026
Merged

HappyDevs1 merged 3 commits into
mainfrom
fix/unset-var-replay-conditions

Conversation

@HappyDevs1

Copy link
Copy Markdown
Collaborator

Includes #859 and #860, because it edits the same lines in reading_holds. Merge those two first, and this PR's diff drops to its own commit.

Problem

On replay, every step fails closed on an unset ${VAR}, except a condition. check_assertion reports the missing variable as a failed verdict, and reading_holds reads any failed verdict as "does not hold":

  • when: page shows ${X} (or does not show) with X unset 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_holds resolves every text expectation (value_*, url_*, title_*) before reading, and returns ReplayError::Secret naming 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.

Copilot AI balanced review requested due to automatic review settings November 23, 2026 05:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@HappyDevs1
HappyDevs1 merged commit 6db5cab into main Nov 23, 2026
13 checks passed
@HappyDevs1
HappyDevs1 deleted the fix/unset-var-replay-conditions branch November 23, 2026 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants