-
Notifications
You must be signed in to change notification settings - Fork 35
test: Add 34 base 2023-09 conformance fixtures, strengthen 6 #161
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
base: mainline
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # Pins the bash SimpleAction desugaring contract: $0 is the implicitly generated | ||
| # embedded file with a .sh extension, and user args follow it. | ||
| runOn: | ||
| - posix | ||
| template: | ||
| specificationVersion: jobtemplate-2023-09 | ||
| extensions: | ||
| - FEATURE_BUNDLE_1 | ||
| name: TestJob | ||
| steps: | ||
| - name: Step1 | ||
| bash: | ||
| args: | ||
| - --marker-arg | ||
| script: | | ||
| case "$0" in | ||
| *.sh) echo "EXT_IS_SH:True";; | ||
| *) echo "EXT_IS_SH:False";; | ||
| esac | ||
| echo "FIRST_ARG:$1" | ||
| expected: | ||
| output: | ||
| - EXT_IS_SH:True | ||
| - FIRST_ARG:--marker-arg | ||
| forbidden: | ||
| - EXT_IS_SH:False |
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quorum verdict: GOOD (5/5) — spec: §8 python desugaring. Cross-language twin, same non-vacuous construction; ungated matches the python-baseline convention. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| # Pins the python SimpleAction desugaring contract: argv[0] is the implicitly generated | ||
| # embedded file with a .py extension, and user args follow it. | ||
| template: | ||
| specificationVersion: jobtemplate-2023-09 | ||
| extensions: | ||
| - FEATURE_BUNDLE_1 | ||
| name: TestJob | ||
| steps: | ||
| - name: Step1 | ||
| python: | ||
| args: | ||
| - --marker-arg | ||
| script: | | ||
| import sys | ||
| print('EXT_IS_PY:' + str(sys.argv[0].endswith('.py'))) | ||
| print('FIRST_ARG:' + sys.argv[1]) | ||
| expected: | ||
| output: | ||
| - EXT_IS_PY:True | ||
| - FIRST_ARG:--marker-arg | ||
| forbidden: | ||
| - EXT_IS_PY:False |
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quorum verdict: GOOD-WITH-NITS (3 reviewers same nit) — spec: §2 closed parameter-definition schemas. Matches the reference implementation (pydantic extra=forbid) and suite precedent, but the spec never explicitly states unknown keys must be rejected — a one-sentence spec clarification would put this whole family on solid ground. Distinct validation site from the root-level unknown-field fixture. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # Parameter definition objects are closed; an unknown key inside one must be rejected. | ||
| specificationVersion: jobtemplate-2023-09 | ||
| name: TestJob | ||
| parameterDefinitions: | ||
| - name: MyParam | ||
| type: STRING | ||
| unknownExtraField: value | ||
| steps: | ||
| - name: Step1 | ||
| script: | ||
| actions: | ||
| onRun: | ||
| command: python | ||
| args: | ||
| - "-c" | ||
| - "print()" |
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quorum verdict: GOOD (5/5) — spec: §2.1 (minValue is not a STRING-definition field). Stronger than a generic unknown-key test: minValue is a known key globally, so single-class-with-optional-fields implementations pass the unknown-key test but fail this. Genuinely distinct path. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # minValue is not a JobStringParameterDefinition field; a STRING parameter with minValue must be rejected. | ||
| specificationVersion: jobtemplate-2023-09 | ||
| name: TestJob | ||
| parameterDefinitions: | ||
| - name: MyParam | ||
| type: STRING | ||
| minValue: 1 | ||
| steps: | ||
| - name: Step1 | ||
| script: | ||
| actions: | ||
| onRun: | ||
| command: python | ||
| args: | ||
| - "-c" | ||
| - "print()" |
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quorum verdict: GOOD (5/5) — spec: §2.1 maxLength inclusive. Completes the off-by-one pair with the existing over-limit reject; catches exclusive-bound implementations. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # A STRING parameter default whose length exactly equals maxLength is accepted (bound is inclusive). | ||
| specificationVersion: jobtemplate-2023-09 | ||
| name: TestJob | ||
| parameterDefinitions: | ||
| - name: MyParam | ||
| type: STRING | ||
| maxLength: 5 | ||
| default: abcde | ||
| steps: | ||
| - name: Step1 | ||
| script: | ||
| actions: | ||
| onRun: | ||
| command: python | ||
| args: | ||
| - "-c" | ||
| - "print('{{Param.MyParam}}')" |
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quorum verdict: GOOD (5/5) — spec: §2.1 minLength inclusive. Symmetric partner; not redundant with the global value-length-cap fixture. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # A STRING parameter default whose length exactly equals minLength is accepted (bound is inclusive). | ||
| specificationVersion: jobtemplate-2023-09 | ||
| name: TestJob | ||
| parameterDefinitions: | ||
| - name: MyParam | ||
| type: STRING | ||
| minLength: 3 | ||
| default: abc | ||
| steps: | ||
| - name: Step1 | ||
| script: | ||
| actions: | ||
| onRun: | ||
| command: python | ||
| args: | ||
| - "-c" | ||
| - "print('{{Param.MyParam}}')" |
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quorum verdict: GOOD (5/5) — spec: §2.3 allowedValues entry at the bound; completes the 4-field accept matrix. Partner in #163. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # An INT parameter allowedValues entry of 2^63-1 (largest signed 64-bit integer) is a valid integer value. | ||
| specificationVersion: jobtemplate-2023-09 | ||
| name: TestJob | ||
| parameterDefinitions: | ||
| - name: MyParam | ||
| type: INT | ||
| allowedValues: | ||
| - 9223372036854775807 | ||
| steps: | ||
| - name: Step1 | ||
| script: | ||
| actions: | ||
| onRun: | ||
| command: python | ||
| args: | ||
| - "-c" | ||
| - "print('{{Param.MyParam}}')" |
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quorum verdict: GOOD (5/5, shared nit) — spec: §2.3 default at exactly 2^63-1, accepted (verified against openjd-model 0.11.2). Family nit: the int64 premise isn't normative in base — as accepts these are the safe direction, but the family deserves a base-spec int-bounds erratum. Reject partner correctly parked in PR #163. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # An INT parameter default of 2^63-1 (largest signed 64-bit integer) is a valid integer value. | ||
| specificationVersion: jobtemplate-2023-09 | ||
| name: TestJob | ||
| parameterDefinitions: | ||
| - name: MyParam | ||
| type: INT | ||
| default: 9223372036854775807 | ||
| steps: | ||
| - name: Step1 | ||
| script: | ||
| actions: | ||
| onRun: | ||
| command: python | ||
| args: | ||
| - "-c" | ||
| - "print('{{Param.MyParam}}')" |
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quorum verdict: GOOD (5/5) — spec: §2.3 default at exactly -2^63; only fixture exercising the negative extreme (catches abs-value/unsigned-parse bugs). Partner in #163. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # An INT parameter default of -2^63 (smallest signed 64-bit integer) is a valid integer value. | ||
| specificationVersion: jobtemplate-2023-09 | ||
| name: TestJob | ||
| parameterDefinitions: | ||
| - name: MyParam | ||
| type: INT | ||
| default: -9223372036854775808 | ||
| steps: | ||
| - name: Step1 | ||
| script: | ||
| actions: | ||
| onRun: | ||
| command: python | ||
| args: | ||
| - "-c" | ||
| - "print('{{Param.MyParam}}')" |
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quorum verdict: GOOD (4/5) — spec: §2.3 maxValue at the bound. Same family notes as minValue sibling; partner in #163. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # An INT parameter maxValue of 2^63-1 (largest signed 64-bit integer) is a valid integer value. | ||
| specificationVersion: jobtemplate-2023-09 | ||
| name: TestJob | ||
| parameterDefinitions: | ||
| - name: MyParam | ||
| type: INT | ||
| maxValue: 9223372036854775807 | ||
| steps: | ||
| - name: Step1 | ||
| script: | ||
| actions: | ||
| onRun: | ||
| command: python | ||
| args: | ||
| - "-c" | ||
| - "print('{{Param.MyParam}}')" |
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quorum verdict: GOOD (4/5, mild family redundancy noted) — spec: §2.3 minValue at the bound. Per-field coverage defensible (separate parse paths); partner in #163. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # An INT parameter minValue of 2^63-1 (largest signed 64-bit integer) is a valid integer value. | ||
| specificationVersion: jobtemplate-2023-09 | ||
| name: TestJob | ||
| parameterDefinitions: | ||
| - name: MyParam | ||
| type: INT | ||
| minValue: 9223372036854775807 | ||
| steps: | ||
| - name: Step1 | ||
| script: | ||
| actions: | ||
| onRun: | ||
| command: python | ||
| args: | ||
| - "-c" | ||
| - "print('{{Param.MyParam}}')" |
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quorum verdict: GOOD (5/5) — spec: §2.3 (minLength is not an INT-definition field). Mirror of minvalue-on-string in the other direction; together they cover both directions of the shared-fields modeling hazard. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # minLength is not a JobIntParameterDefinition field; an INT parameter with minLength must be rejected. | ||
| specificationVersion: jobtemplate-2023-09 | ||
| name: TestJob | ||
| parameterDefinitions: | ||
| - name: MyParam | ||
| type: INT | ||
| minLength: 1 | ||
| steps: | ||
| - name: Step1 | ||
| script: | ||
| actions: | ||
| onRun: | ||
| command: python | ||
| args: | ||
| - "-c" | ||
| - "print()" |
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quorum verdict: GOOD (5/5) — spec: §2.4 (largest finite double accepted; verified against the model). Positive control for the 1e309 twin; guards clamp-or-reject parsers. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # A FLOAT parameter default of 1e308 is within the double-precision range and is valid. | ||
| specificationVersion: jobtemplate-2023-09 | ||
| name: TestJob | ||
| parameterDefinitions: | ||
| - name: MyParam | ||
| type: FLOAT | ||
| default: 1.0e+308 | ||
| steps: | ||
| - name: Step1 | ||
| script: | ||
| actions: | ||
| onRun: | ||
| command: python | ||
| args: | ||
| - "-c" | ||
| - "print('{{Param.MyParam}}')" |
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quorum verdict: GOOD-WITH-NITS (3/5; 1 NOT-GOOD dissent) — the base spec never states binary64 for |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # A FLOAT parameter default of 1e309 overflows double precision (infinity) and must be rejected. | ||
| specificationVersion: jobtemplate-2023-09 | ||
| name: TestJob | ||
| parameterDefinitions: | ||
| - name: MyParam | ||
| type: FLOAT | ||
| default: 1.0e+309 | ||
| steps: | ||
| - name: Step1 | ||
| script: | ||
| actions: | ||
| onRun: | ||
| command: python | ||
| args: | ||
| - "-c" | ||
| - "print('{{Param.MyParam}}')" |
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quorum verdict: GOOD-WITH-NITS — spec: §2.4 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # A FLOAT parameter default of infinity is not a base-10 floating point value and must be rejected. | ||
| specificationVersion: jobtemplate-2023-09 | ||
| name: TestJob | ||
| parameterDefinitions: | ||
| - name: MyParam | ||
| type: FLOAT | ||
| default: .inf | ||
| steps: | ||
| - name: Step1 | ||
| script: | ||
| actions: | ||
| onRun: | ||
| command: python | ||
| args: | ||
| - "-c" | ||
| - "print('{{Param.MyParam}}')" |
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quorum verdict: GOOD-WITH-NITS — spec: §2.4, same non-finite reading; NaN additionally breaks min/max/allowedValues comparability (a different hazard from inf, justifying the pair). Same codify-in-spec nit. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # A FLOAT parameter default of NaN is not a base-10 floating point value and must be rejected. | ||
| specificationVersion: jobtemplate-2023-09 | ||
| name: TestJob | ||
| parameterDefinitions: | ||
| - name: MyParam | ||
| type: FLOAT | ||
| default: .nan | ||
| steps: | ||
| - name: Step1 | ||
| script: | ||
| actions: | ||
| onRun: | ||
| command: python | ||
| args: | ||
| - "-c" | ||
| - "print('{{Param.MyParam}}')" |
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quorum verdict: GOOD (5/5) — spec: §3.6 (let gated on EXPR). Every rejection path IS the gating rule (unknown key without the extension); model rejects with a targeted error. StepScript attachment point previously uncovered. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # StepScript 'let' requires the EXPR extension (spec 3.6); in base it must be rejected. | ||
| specificationVersion: jobtemplate-2023-09 | ||
| name: TestJob | ||
| steps: | ||
| - name: Step1 | ||
| script: | ||
| let: | ||
| - x = 1 | ||
| actions: | ||
| onRun: | ||
| command: python | ||
| args: | ||
| - "-c" | ||
| - "print()" |
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quorum verdict: GOOD (5/5, one craft nit) — spec: §3.6 at the StepTemplate level; with the env-template fixture this covers all three let attachment points. Nit: template body is byte-identical to EXPR/job_templates/3.6--let-requires-expr.invalid.yaml — defensible for base-only runners, but document the duplication. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # StepTemplate 'let' requires the EXPR extension (spec 3.6); in base it must be rejected. | ||
| # (Template body deliberately mirrors EXPR/job_templates/3.6--let-requires-expr | ||
| # .invalid.yaml: base-only conformance runs need their own copy of the gate.) | ||
| specificationVersion: jobtemplate-2023-09 | ||
| name: TestJob | ||
| steps: | ||
| - name: Step1 | ||
| let: | ||
| - x = 1 | ||
| script: | ||
| actions: | ||
| onRun: | ||
| command: python | ||
| args: | ||
| - "-c" | ||
| - "print()" |
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quorum verdict: GOOD (5/5) — spec: §5.3 (mode discriminates the CancelationMethod union; required in both forms). Catches mode-defaulting single-object models. Distinct from the existing bad-mode-value fixture. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # A cancelation object without the 'mode' key matches neither CancelationMethod form and must be rejected. | ||
| specificationVersion: jobtemplate-2023-09 | ||
| name: TestJob | ||
| steps: | ||
| - name: Step1 | ||
| script: | ||
| actions: | ||
| onRun: | ||
| command: python | ||
| args: | ||
| - "-c" | ||
| - "print()" | ||
| cancelation: | ||
| notifyPeriodInSeconds: 30 |
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quorum verdict: GOOD (5/5) — spec: §5.3 (fmtstring mode is FB1-only; base admits only the two literals). The unused-looking Mode parameter is load-bearing (makes the fmtstring resolvable, isolating the gating rule) — nice construction. Targets FB1-capable implementations forgetting the gate, which the bad-mode-value fixture can't catch. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # A format-string cancelation mode requires the FEATURE_BUNDLE_1 extension; in base it must be rejected. | ||
| specificationVersion: jobtemplate-2023-09 | ||
| name: TestJob | ||
| parameterDefinitions: | ||
| - name: Mode | ||
| type: STRING | ||
| default: TERMINATE | ||
| steps: | ||
| - name: Step1 | ||
| script: | ||
| actions: | ||
| onRun: | ||
| command: python | ||
| args: | ||
| - "-c" | ||
| - "print()" | ||
| cancelation: | ||
| mode: "{{Param.Mode}}" |
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quorum verdict: GOOD (5/5) — spec: §5.3.1 (CancelationMethodTerminate is |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # CancelationMethodTerminate (5.3.1) has only the 'mode' key; notifyPeriodInSeconds with TERMINATE must be rejected. | ||
| specificationVersion: jobtemplate-2023-09 | ||
| name: TestJob | ||
| steps: | ||
| - name: Step1 | ||
| script: | ||
| actions: | ||
| onRun: | ||
| command: python | ||
| args: | ||
| - "-c" | ||
| - "print()" | ||
| cancelation: | ||
| mode: TERMINATE | ||
| notifyPeriodInSeconds: 30 |
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quorum verdict: GOOD-WITH-NITS — spec: §7.3/§7.3.1. Note the failure kind: |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # A bare dot-free reference {{MyParam}} names no value defined in base scope and must be rejected. | ||
| specificationVersion: jobtemplate-2023-09 | ||
| name: TestJob | ||
| steps: | ||
| - name: Step1 | ||
| script: | ||
| actions: | ||
| onRun: | ||
| command: echo | ||
| args: | ||
| - "{{MyParam}}" |
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quorum verdict: GOOD (5/5, overlap nit) — spec: §7.1/§7.3 (Identifier charset). Any tokenization is a grammar rejection of the same expression. Partial path overlap with digit-start (same production), but they catch different regex mistakes — acceptable. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # A reference segment containing a dash ({{Param.a-b}}) is not a valid Identifier and must be rejected. | ||
| specificationVersion: jobtemplate-2023-09 | ||
| name: TestJob | ||
| steps: | ||
| - name: Step1 | ||
| script: | ||
| actions: | ||
| onRun: | ||
| command: echo | ||
| args: | ||
| - "{{Param.a-b}}" |
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 (5/5) — spec: §8 bash desugaring (
bash <generated .sh> <args...>). EXT_IS_SH:True can only come from the script executing with $0 set — not satisfiable by CLI echo; FIRST_ARG pins ordering. posix-gated correctly. First argv-contract test in the FB1 suite.