You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: strict GitHub-expression evaluator for managed-workflow runner wiring #1959
Prerequisite for #1935 (S8 of #1908), split out at the implementer's request to keep PR #1958 reviewable.
Problem. The consumer-matrix runner cells run only the resolve action's run: body with hand-written env. The real wiring in the managed workflows is never exercised: the mapping from vars.CI_RUNNER_* to the resolve step's with: inputs, and each job's runs-on lane expression. A review showed that runner-large: ${{ vars.CI_RUNNER_SMALL }} and a test job moved to fromJSON(...).large both stay green.
Scope. A small, strict evaluator for exactly the GitHub Actions expression subset the managed workflows use in runs-on and in resolve-step with: values:
context lookups: vars.*, github.event.pull_request.head.repo.fork (and the other github.* paths those expressions use), needs.<job>.outputs.<x>, inputs.*;
GitHub's truthiness and ||/&& value semantics (they return operands, not booleans), and ${{ }} interpolation inside a string.
Any construct outside the subset raises with the expression and position. It never evaluates to a default.
Acceptance.
A unit test for each operator and for the truthiness/value semantics, compared against GitHub's documented behaviour (cite the docs in the test module). Include unsupported-construct-raises cases.
A test that parses every runs-on and resolve-step with: expression in the shipped managed workflows (assets/workspace/.github/workflows/*.yml) and evaluates each without error for a representative context. A new unsupported construct added to a workflow then fails CI instead of silently escaping the gate.
Location: wherever the repo keeps test helpers that bats and pytest can both use (follow existing patterns), documented in its module docstring.
No consumer-facing behaviour change; no CHANGELOG entry unless the repo rules require one for test tooling.
Scope clarification (architect): the subset is exactly what the managed workflows use. assets/workspace/.github/workflows/ci.yml:742 passes toJSON(fromJSON(needs.resolve-toolchain.outputs.runners).extension) to a reusable job, so toJSON is in scope, with GitHub's semantics (pretty-printed JSON, documented in the expressions reference; cite it and test the exact output format). Every other function still raises.
Activity
gerchowl commentedon Oct 29, 2026
Scope clarification (architect): the subset is exactly what the managed workflows use.
assets/workspace/.github/workflows/ci.yml:742passestoJSON(fromJSON(needs.resolve-toolchain.outputs.runners).extension)to a reusable job, sotoJSONis in scope, with GitHub's semantics (pretty-printed JSON, documented in the expressions reference; cite it and test the exact output format). Every other function still raises.test: expose expression semantics and coverage gaps
test: specify exact managed toJSON serialization
test: cover runner JSON escaping and numeric conversion
test: reject unterminated expression string tokens
test: align evaluator with runner expression semantics
test: expose runner numeric and index mismatches
test: match runner numeric and array index semantics
test: add strict managed workflow expression evaluator (#1960)
test(consumer-matrix): gate release N runner migration (#1958)