Repository navigation
Commit ce06fa8
committed
feat: EXPR runtime parity with openjd-rs in the v0 session
Implement the RFC 0005-0007 runtime behaviors in the v0 session so the
spec conformance suite passes the EXPR jobs fixtures, mirroring the
openjd-rs session runtime.
- Evaluate EXPR `let` bindings at run time on all four action paths
(environment enter/exit, task run, and the private no-session-env
task path). Bindings evaluate against the live symbol table via the
model's evaluate_value, so a let-bound path stays a path for
property access and float rendering fidelity is preserved.
- Type the session symbol table like openjd-rs's session scope:
Param.*/Task.Param.* carry their declared OpenJD types (a PATH is a
host-format path value with path mapping applied element-wise for
LIST[PATH]), RawParam.* stays the raw string form,
Session.WorkingDirectory / HasPathMappingRules /
PathMappingRulesFile are path/bool/path, and Job.Name / Step.Name
are seeded when known (new optional Session job_name kwarg; the
existing run_task step_name feeds Step.Name).
- RFC 0005 §1.3.2 argument resolution, mirroring openjd-rs's
resolve_action_args: a whole-field expression argument resolves
typed — null skips the argument, a list flattens inline (one
argument per element, engine display coercion), and a scalar becomes
a single argument.
- URI path mapping rules (RFC 0006 §2.3.2): PathFormat.URI with
RFC 3986 semantics (case-insensitive scheme+authority,
case-sensitive path, component-boundary matching), ported from
openjd-expr's apply_uri. Rules are also converted to their engine
form and carried on the session's symbol tables so host-context
functions such as apply_path_mapping() apply them during expression
evaluation.
The unit suite passes (639 passed; the two known-flaky timer tests in
test_runner_base.py pass serially), and mypy/black/ruff are clean.
Together with the openjd-model-for-python and openjd-cli parity
changes, the spec conformance suite improves from 1062/1145 to
1128/1145 against the Python CLI.
Signed-off-by: David Leong <116610336+leongdl@users.noreply.github.com>1 parent 2c743a8 commit ce06fa8
3 files changed
Lines changed: 309 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
15 | 19 | | |
16 | 20 | | |
17 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
18 | 25 | | |
19 | 26 | | |
20 | 27 | | |
21 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
22 | 33 | | |
23 | 34 | | |
24 | 35 | | |
25 | 36 | | |
26 | 37 | | |
27 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
28 | 44 | | |
29 | 45 | | |
30 | 46 | | |
| |||
49 | 65 | | |
50 | 66 | | |
51 | 67 | | |
52 | | - | |
| 68 | + | |
53 | 69 | | |
54 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
55 | 74 | | |
56 | 75 | | |
57 | 76 | | |
| |||
76 | 95 | | |
77 | 96 | | |
78 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
79 | 157 | | |
80 | 158 | | |
81 | 159 | | |
82 | 160 | | |
83 | 161 | | |
84 | 162 | | |
85 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
86 | 172 | | |
87 | 173 | | |
88 | 174 | | |
89 | 175 | | |
90 | 176 | | |
91 | 177 | | |
92 | | - | |
| 178 | + | |
93 | 179 | | |
94 | 180 | | |
95 | | - | |
96 | | - | |
97 | | - | |
| 181 | + | |
98 | 182 | | |
99 | 183 | | |
100 | 184 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
554 | 554 | | |
555 | 555 | | |
556 | 556 | | |
557 | | - | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
558 | 574 | | |
559 | 575 | | |
560 | 576 | | |
| |||
0 commit comments