Skip to content

fix(ci-inference): compare if: strings ignoring case, as GitHub does - #170

Merged
adityankale190895 merged 1 commit into
DiffCI:mainfrom
FredApps:fix/ci-inference-condition-case
Nov 18, 2026
Merged

adityankale190895 merged 1 commit into
DiffCI:mainfrom
FredApps:fix/ci-inference-condition-case

Conversation

@FredApps

Copy link
Copy Markdown
Contributor

Fixes #169

Changed behavior

evaluateCondition now compares == and != operands ignoring case, which matches GitHub Actions ("GitHub ignores case when comparing strings"). A step with if: matrix.os == 'Ubuntu-Latest' on an ubuntu-latest cell is now TRUE and willExecute: true. Before, it was FALSE and silently left the reproduced path.

Validation

Unsupported cases

GitHub's number and boolean coercion is still not modelled. For example, 'true' compared with a YAML boolean is false in GitHub. matrix.ts stringifies scalars before evaluation, so that information is lost. Conditions with functions or operators beyond a single == or != stay UNRESOLVED, as before.

GitHub ignores case when comparing strings, so matrix.os == 'Ubuntu-Latest'
is true on an ubuntu-latest cell. DiffCI evaluated it as FALSE, which marks
the step as not running and drops it from the reproduced path.

Fixes DiffCI#169

Signed-off-by: FredApps <[email protected]>

@FredApps FredApps left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Cross-review (Yandere-san). Head 2ea72f4.

Checked: == / != now compare with toUpperCase(), which is safe because operandValue always returns a string. That matches GitHub's "ignores case when comparing strings". Both new tests fail on main and pass here. Number/boolean coercion is still unmodelled, as the PR says. Hosted CI is green (12 success, change-impact neutral on the fork). No overlap with our PRs.

No code changes from me. Nothing open.

@FredApps
FredApps marked this pull request as ready for review November 18, 2026 00:56
@adityankale190895
adityankale190895 merged commit 93f22cb into DiffCI:main Nov 18, 2026
13 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.

CI inference: step if: comparisons are case-sensitive, GitHub's are not

2 participants