-
Notifications
You must be signed in to change notification settings - Fork 35
test: [expected failures] WRAP_ACTIONS fixtures needing implementation fixes #162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
leongdl
wants to merge
1
commit into
OpenJobDescription:mainline
Choose a base branch
from
leongdl:conformance-wrap-actions-expected-failures
base: mainline
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+101
−0
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
conformance-tests/2023-09/WRAP_ACTIONS/jobs/proposed/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # Proposed WRAP_ACTIONS fixtures (parked) — jobs | ||
|
|
||
| Fixtures in this directory are believed spec-correct but FAIL against the | ||
| current reference implementations. They are parked here so the main suite | ||
| stays green; promotion is a mechanical move up one directory | ||
| (kind-level `<component>/<kind>/proposed/` placement). The conformance | ||
| runner does not scan `proposed/` directories. | ||
|
|
||
| ## wrap-repr-py-escapes-newline-in-wrapped-args | ||
|
|
||
| **Classification: spec conflict to resolve first; then an implementation | ||
| bug in BOTH implementations.** | ||
|
|
||
| Expression Language §2.2.6 documents `repr_py` as following Python's | ||
| `repr`, with the explicit example `repr_py("hello\nworld")` → | ||
| `'hello\\nworld'`. Both reference implementations (openjd-rs AND the | ||
| Python CLI — 2026-08-12 sweep, fails on both) instead embed the newline | ||
| raw into the emitted literal, so round-tripping a multi-line `python -c` | ||
| program through `repr_py(WrappedAction.Args)` produces broken Python: | ||
|
|
||
| ``` | ||
| File "<string>", line 1 | ||
| print(repr(['-c', 'import sys | ||
| ^ | ||
| SyntaxError: EOL while scanning string literal | ||
| ``` | ||
|
|
||
| Reproduce: run this fixture through the conformance runner, or wrap any | ||
| action whose args contain U+000A and forward with the reference | ||
| `repr_py` pattern. | ||
|
|
||
| **The promotion gate is a spec decision, not just the repr_py fix:** | ||
| Template Schemas §5.2 restricts `<ArgString>` to characters outside the | ||
| Cc unicode category, which excludes newlines — so this fixture's own | ||
| onRun args are arguably spec-INVALID as written, and a conforming | ||
| validator could reject the template before repr_py is ever exercised. | ||
| Neither implementation enforces §5.2 today, and several merged fixtures | ||
| (plus the common multi-line `python -c` convention, which container | ||
| queue environments also rely on) depend on the acceptance. Either §5.2 | ||
| is relaxed to permit newlines (making this fixture promotable once | ||
| repr_py is fixed), or the validator rejects them (making this fixture, | ||
| and the multi-line convention suite-wide, invalid). The two cannot both | ||
| stand; resolve the spec question first. | ||
|
|
||
| Unit-level twin: `EXPR/jobs/proposed/expr2.2.6--repr-py-newline-roundtrip` | ||
| (func-lib expected-failures PR) pins the same repr_py defect without the | ||
| WRAP_ACTIONS forwarding layer; this fixture adds the end-to-end path. |
54 changes: 54 additions & 0 deletions
54
...2023-09/WRAP_ACTIONS/jobs/proposed/wrap-repr-py-escapes-newline-in-wrapped-args.test.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| # PARKED — fails against openjd-rs (implementation bug); see proposed/README.md. | ||
| # | ||
| # Expression Language §2.2 (String Functions): "repr_py follows the | ||
| # behavior of Python's repr", with the worked example | ||
| # repr_py("hello\nworld") returning 'hello\\nworld' — control characters | ||
| # in the value MUST be escaped in the emitted Python literal. RFC 0008's | ||
| # reference forwarding pattern round-trips WrappedAction.Args through | ||
| # repr_py; a wrapped action whose arg carries a real newline (a multi-line | ||
| # python -c program, the suite's own portable-fixture convention) must | ||
| # survive the round-trip and run. | ||
| # | ||
| # Against openjd-rs the newline is embedded RAW into the generated Python | ||
| # source, which dies with "SyntaxError: EOL while scanning string | ||
| # literal" — the grand-child never runs. Catches a repr implementation | ||
| # that quotes but does not escape. | ||
| template: | ||
| specificationVersion: jobtemplate-2023-09 | ||
| name: WrapReprPyEscapesNewlineInWrappedArgs | ||
| steps: | ||
| - name: Step1 | ||
| script: | ||
| actions: | ||
| onRun: | ||
| command: python | ||
| args: | ||
| - "-c" | ||
| - "import sys\nprint('GRAND_CHILD_RAN')" | ||
| environments: | ||
| - specificationVersion: environment-2023-09 | ||
| extensions: | ||
| - WRAP_ACTIONS | ||
| - EXPR | ||
| environment: | ||
| name: WrapEnv | ||
| script: | ||
| actions: | ||
| onWrapEnvEnter: | ||
| command: python | ||
| args: | ||
| - "-c" | ||
| - "import subprocess,sys; sys.exit(subprocess.run([{{repr_py(WrappedAction.Command)}}]+{{repr_py(WrappedAction.Args)}}).returncode)" | ||
| onWrapTaskRun: | ||
| command: python | ||
| args: | ||
| - "-c" | ||
| - "import subprocess,sys; sys.exit(subprocess.run([{{repr_py(WrappedAction.Command)}}]+{{repr_py(WrappedAction.Args)}}).returncode)" | ||
| onWrapEnvExit: | ||
| command: python | ||
| args: | ||
| - "-c" | ||
| - "import subprocess,sys; sys.exit(subprocess.run([{{repr_py(WrappedAction.Command)}}]+{{repr_py(WrappedAction.Args)}}).returncode)" | ||
| expected: | ||
| output: | ||
| - GRAND_CHILD_RAN |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quorum verdict: GOOD-WITH-NITS (4 reviewers flagged variants of the same two issues) — spec: EL §2.2.6 repr_py (newline must be escaped — spec gives the exact worked example) via RFC 0008 WrappedAction.Args forwarding.
(1) Spec self-tension, correctly disclosed but under-weighted: the fixture's own onRun args contain a literal U+000A, which §5.2's ArgString Cc-exclusion arguably forbids — as written the template may be spec-invalid, so promotion is contingent on resolving §5.2 vs the multi-line
python -cconvention (which the Deadline Docker container env also relies on; if §5.2 is enforced, that breaks service-wide). Resolve the spec question first.(2) Attribution: README says "implementation bug (openjd-rs)" but the 2026-08-12 sweep shows it fails BOTH implementations — state Python's status.
(3) Partial overlap with PR #165's expr2.2.6--repr-py-newline-roundtrip (same root defect); the end-to-end wrap path justifies keeping both, but cross-reference them.