Skip to content

Keep quoted string contents intact in CI condition expressions #998

Closed

Description

@LunaStev

Problem

The plan evaluator rewrites operators and function spellings before parsing quoted strings. Equality against the identical values a!b, a&&b, a||b, and always() returns false. Context-looking text inside a string needs the same protection.

Starting point: tools/ci/common.py:39.

Validation

Audited canonical Wave 540728c2eb6cc12f5c69c3fb3fdb96e07ba059a4 (0.0.1-alpha-dev), whose tree matches the local checkout. Validation: Executed Python evaluate() reproductions. Executed compiler probes use the matching checkout-built compiler and std on Linux amd64 (Rust 1.89.0 / LLVM 21.1.8). Source/header or mocked checks are not native execution on another OS.

from tools.ci.common import evaluate
print(evaluate("inputs.value == 'a!b'", {"inputs.value": "a!b"}))
# False; the comparison should be True.

Scope

Make expression token handling respect quoted literals while preserving the existing small checked expression language; do not broaden it into unrestricted evaluation.

Completion criteria

  • Identical quoted strings containing operators/function/context spellings compare equal.
  • Actual boolean operators, context lookup and short-circuiting retain their behavior.
  • Add focused positive/negative evaluator regressions.

This is a bounded, unassigned task with the starting point and focused checks above. Keep unrelated refactoring out of the change.

Activity

  1. added
    bug
    good first issue
    ci
    on Oct 24, 2026
  2. erenbati commented on Oct 25, 2026

    @erenbati
    Contributor

    I'd like to work on this. I will add regression tests around quoted string literals (operators, always()/cancelled(), and context-looking text), preserve the existing restricted AST evaluator and boolean short-circuiting, and update expression token substitution without introducing unrestricted evaluation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcigood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions