Commit 53b2d5d
test(ts): YAML conformance fixtures (ADR-0006 D4)
YAML is a TS-only authoring front-end, so its conformance corpus lives in
this package — not under the repo-root fixtures/conformance/ corpus consumed
by Java/Python/C#. Six fixtures cover the D1 desugar happy paths and the D2 +
ERR_RESERVED_ATTR error paths:
- yaml-sigil-free-attrs: bare @column/@objectRef/@storage/@required/@fields
authored without `@` lower to canonical @-prefixed attrs.
- yaml-mixed-bare-and-prefixed: an already-`@`-prefixed attr coexists with
bare attrs (backward-compat accept-both).
- yaml-array-suffix: `field.long[]` → canonical `field.long` + isArray: true.
- error-yaml-coerced-bool-in-string: `column: TRUE` → ERR_YAML_COERCION.
- error-yaml-coerced-num-in-enum: unquoted 42 in @values → ERR_YAML_COERCION
+ ERR_BAD_ATTR_VALUE (the coerced "42" then fails the enum identifier
pattern).
- error-yaml-reserved-as-attr: `@isArray` in YAML still triggers
ERR_RESERVED_ATTR (the JSON corollary applies after desugar).
The harness auto-discovers fixture directories — adding one adds a test.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 5e0e6f4 commit 53b2d5d
13 files changed
Lines changed: 263 additions & 0 deletions
File tree
- server/typescript/packages/metadata/test
- fixtures/yaml-conformance
- error-yaml-coerced-bool-in-string
- error-yaml-coerced-num-in-enum
- error-yaml-reserved-as-attr
- yaml-array-suffix
- yaml-mixed-bare-and-prefixed
- yaml-sigil-free-attrs
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
server/typescript/packages/metadata/test/fixtures/yaml-conformance/yaml-array-suffix/expected.json
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
0 commit comments