Skip to content
Draft
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

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 (5/5) — spec: §7.3/§7.3.1 Task.File.<name> is path-typed; EL §2.3.1 .name/.suffix properties; direct member access in a format string (RFC 0005 shows this exact form).

Explicit filename: run.txt makes both expected values deterministic; SUFFIX:.txt can't be satisfied by a wrong SUFFIX:run.txt. Distinct from the existing let-binding fixture (7.3--task-file-expr-properties): the inline {{Task.File.Run.name}} form exercises the validator path that misparses the dotted tail as an embedded-file key — exactly the divergence this PR documents. Header comment is a model of maintainer-in-a-year readability.

Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# RFC 0005 declares `Task.File.<name>` and `Env.File.<name>` as `path` typed, and
# shows property access on one directly inside a format string:
#
# echo "Script: {{Task.File.Run.name}}"
#
# (rfcs/0005-expression-language.md, "Since Session.WorkingDirectory,
# Task.File.<name>, and Env.File.<name> are path typed ...").
#
# The existing 7.3--task-file-expr-properties fixture only reaches the property
# through a `let` binding (`cfg = Task.File.config`, then `cfg.parent`), and a
# property reached inside a function call (`len(Task.File.Run.name)`) parses
# differently again -- so neither covers the direct member-access form the RFC
# uses. An implementation whose template validator resolves a `Task.File.*`
# reference by looking the whole dotted tail up as an embedded-file key rejects
# this template with "references undefined embedded file 'Run.name'", even though
# its own runtime resolves the expression correctly and its environment-template
# validator accepts the equivalent `Env.File.<name>.name`.
#
# `filename` is set so the expected value of `.name` is deterministic.
template:
specificationVersion: jobtemplate-2023-09
extensions:
- EXPR
name: TestJob
steps:
- name: Step1
script:
embeddedFiles:
- name: Run
type: TEXT
filename: run.txt
data: "contents\n"
actions:
onRun:
command: python
args:
- -c
- |
print(r'NAME:{{Task.File.Run.name}}')
print(r'SUFFIX:{{Task.File.Run.suffix}}')
expected:
output:
- "NAME:run.txt"
- "SUFFIX:.txt"
Loading