Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions conformance-tests/2023-09/WRAP_ACTIONS/jobs/proposed/README.md
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.

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.

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 -c convention (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.

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
Loading