Skip to content

fix(ci): preserve quoted strings in plan conditions - #1050

Merged
LunaStev merged 1 commit into
wavefnd:masterfrom
erenbati:fix/ci-condition-string-literals-998
Oct 25, 2026
Merged

LunaStev merged 1 commit into
wavefnd:masterfrom
erenbati:fix/ci-condition-string-literals-998

Conversation

@erenbati

Copy link
Copy Markdown
Contributor

Closes #998

Summary

  • Rewrite CI condition operators, built-ins and context references only outside quoted string literals, using a single lexical substitution pass.
  • Preserve single- and double-quoted literal content containing !, &&, ||, always(), cancelled() and context-looking names.
  • Keep the restricted AST visitor, context lookup, operator precedence and boolean short-circuiting. No use of eval or broader expression language.

Motivation

The previous unconditional replacements corrupted quoted strings. For example, inputs.value == 'a!b' evaluated false even when inputs.value was exactly a!b. Tokenizing strings and actual syntax together also avoids reinterpreting values generated by context substitutions.

Compatibility impact

Python CI tooling only. No Wave language syntax, ABI, standard-library revision or packaging changes.

Validation

  • TDD RED: the new literal regression failed for seven literal cases, five parsing errors, and an additional boolean logic case before the fix.
  • GREEN: python -m unittest tools.test_ci.TargetTests -q: 10 tests passed, including actual boolean operators, context lookup, literal handling, short-circuiting and unsupported syntax rejection.
  • python -m py_compile tools/ci/common.py tools/test_ci.py: passed (native Windows Python 3.12).
  • 10 additional expression smoke cases passed; 3 unsupported code-execution expressions were rejected.
  • git diff --check: passed; only tools/ci/common.py and tools/test_ci.py changed.
  • Wider tools.test_ci.RunnerTests ran 10 tests, 8 passed, 2 failed on Windows: one due to environment-specific Unicode summary matching, another due to hardlink/path-alias behavior. Neither failure concerns the expression evaluator; upstream CI is needed for complete multi-platform coverage.

Checklist

  • DCO Signed-off-by trailer present.
  • Safe AST whitelist retained.
  • Positive/negative evaluator regressions included in CI suite.
  • No compiler/std licensing-boundary changes.

AI assistance

AI assistance was used for inspecting the evaluator and preparing tests and changes. The contributor reviewed this submission and accepts responsibility for it.

@LunaStev
LunaStev merged commit 54fc031 into wavefnd:master Oct 25, 2026
50 checks passed
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.

Keep quoted string contents intact in CI condition expressions

2 participants