Skip to content

test: Add 27 EXPR expression-language conformance fixtures - #160

Open
leongdl wants to merge 1 commit into
OpenJobDescription:mainlinefrom
leongdl:conformance-expr-lang-gaps
Open

test: Add 27 EXPR expression-language conformance fixtures#160
leongdl wants to merge 1 commit into
OpenJobDescription:mainlinefrom
leongdl:conformance-expr-lang-gaps

Conversation

@leongdl

@leongdl leongdl commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Summary

27 new EXPR fixtures, 1 strengthened, 3 renamed, from a coverage audit of RFC 0005 / the published Expression Language spec. Suite: EXPR 350 → 379 passing, FEATURE_BUNDLE_1 55 → 57, 0 failing.

Areas covered

  • Direct path property access on all four routes — direct {{Task.File.<n>.name}}, embedded with surrounding text, inside a function call, and Env.File direct. This is the exact shape of the validator bug fixed in openjd-rs PR #292; the only pre-existing fixture reached the property through a let binding, the one route that never failed. All four now green on both implementations.
  • unresolved[T] progressive evaluation (zero prior fixtures mentioned it): valid op on an unresolved symbol passes check; type error on an unresolved value rejected at check; and the failing-arm suppression case — x if <unresolved bool> else <type-error arm> must validate, catching eager over-rejection.
  • let scope must-rejects: step-template let referencing Session.WorkingDirectory / Task.Param.* / Task.File.*; environment-script let referencing Task.Param.* — every §3.6.2 must-reject cell was previously empty.
  • Scope negatives inside expression trees (not just bare format strings): in-function-call and in-let variants.
  • Whole-field null-drop: an EXPR-computed null drops an optional scalar field (FEATURE_BUNDLE_1 timeout — audited every @fmtstring annotation; it is the only optional scalar expression field), plus the non-null control.
  • Operator precedence and associativity (zero prior fixtures): -2**2 == -4, 2**3**2 == 512 (right-assoc), a + b * c, not/and/or binding — 11 pins in one fixture.
  • Literal-table rows: \xhh/\uhhhh/\Uhhhhhhhh/\N{name} escapes; uppercase 0X/0O/0B/R prefixes; 00 valid; 1e10 is float (discriminated via §1.3.4 pass-through); three misplaced-underscore rejects.
  • Cross-type errors: 1 < "a", not 1, path(...)[0] rejected.
  • IEEE floats: 0.1 + 0.2 == 0.30000000000000004 asserted (the spec's own worked example); 0.0/0.0 rejected; float("-inf") rejected.
  • Session.HasPathMappingRules true branch via the runner's pathMapping: key — previously only ever asserted false.
  • Boundaries: exactly-50 let bindings, 512-char identifier, leading underscore, forward-reference chain; int64-max accept twins for param default and supplied value; supplied 2^63 reject (verified green on BOTH implementations in a dual run).
  • Strengthened: expr2.1.6--and-or-value-returning gained or-sentinel null discrimination and the false and x case.
  • Renamed: three expr1.3.11--* fixtures → expr1.3.12--* (they test §1.3.12 range field extensions; §1.3.11 is Error Handling).

Companion PR

Five spec-correct fixtures that FAIL today (int64 param-default acceptance, the openjd-rs 2^62 false-reject, and others) are in the expected-failures PR (branch conformance-expr-lang-expected-failures).

…gaps

27 new fixtures, 1 strengthened, 3 renamed: direct path property access on all four routes (pins PR #292), unresolved[T] progressive evaluation incl. the failing-arm suppression case, let-scope must-rejects, in-expression scope negatives, whole-field null-drop (FEATURE_BUNDLE_1 timeout), operator precedence and associativity pins, string escapes and uppercase numeric prefixes, misplaced-underscore rejects, cross-type ordering/membership/not errors, IEEE float precision and NaN-arithmetic, HasPathMappingRules true branch, let boundary edges, int64-max accept twins, and the supplied-value 2^63 reject verified green on both implementations. Suite: 350 -> 379 passing. Spec-correct fixtures that FAIL today are split to conformance-expr-lang-expected-failures.

Signed-off-by: David Leong <116610336+leongdl@users.noreply.github.com>
@leongdl
leongdl requested a review from a team as a code owner August 2, 2026 02:38
@leongdl

leongdl commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

CI note: the two failing fixtures on the Rust leg (7.3--task-file-property-direct / -embedded) are expected against the RELEASED openjd-rs — they pin the Task.File property-access fix merged in openjd-rs PR #292, which has not shipped in a release yet. They pass against openjd-rs main. Separately, mainline CI is currently red for every PR due to two pre-existing broken fixtures (wrap-env-let-bindings-in-hooks, wrap-failed-enter-still-runs-wrap-exit) unrelated to this change.

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.

1 participant