fix(ci): dist gate + test job failures — miniyaml silent truncation & block-coverage gaps #47

Merged
peterswimm merged 1 commit from fix/ci-gates-miniyaml-forgeblock into main 2026-07-24 04:08:30 +00:00
Owner

Fixes the two red CI gates that every design PR has hit since mid-July (and that PR #44 was merged over):

1. dist/ matches dtcg + udg sources — failing on every PR since #35.
forgeblock.yml carried three multi-line quoted desc: scalars — outside _miniyaml's documented subset. Dev machines have PyYAML so the strict stdlib path never ran locally; CI's python:3.12-slim has no PyYAML, so _miniyaml ran — and silently returned a partial document truncated at the first multi-line scalar (record 35 of 795). artifact.py then saw an empty block vocabulary and failed with a wall of unknown block errors. (The stray 'green' runs #124-127 were PR branches forked before #35 — they ran their own older workflow without the artifact gate.)

  • Folded the three descs to one line each — value-identical to PyYAML's flow-scalar folding, so dist/ needs no rebuild.
  • _miniyaml.load() now raises when it can't consume the whole document; silent truncation is gone for good.
  • New generator/tests/unit/test_miniyaml_strict.py pins strict-raise behaviour, complete parse of every miniyaml-consumed manifest, and miniyaml == PyYAML equivalence (local/CI reproducibility).

2. test — failing on every PR since #41.
PR #41 registered appleContactCard + appleCalendarSlots in the vocabulary without extending the WP/email renderers; test_block_coverage (which CI runs via root pytest, unlike the CLAUDE.md-documented pytest generator/tests/) failed on the 30→32 count and the 'no mapping' fallbacks. Added both blocks to _PROGRAMMATIC in all three renderers + fixtures; count guard now 32.

Verified: 233/233 root pytest (the CI invocation); all nine just check gates green both locally (PyYAML) and under python3.12 without PyYAML (the CI condition).

Notes for follow-up:

  • sync-manifest.yml also uses an out-of-subset construct (block sequences of mappings) but is line-scanned by its consumers — left as-is.
  • Branch protection currently lets PRs merge over red required checks (#44 did); worth requiring the dist/ matches dtcg + udg sources + test contexts once this lands.
  • Merging this unblocks #45 and #46 (rebase them to pick up the fix).
Fixes the two red CI gates that every design PR has hit since mid-July (and that PR #44 was merged over): **1. `dist/ matches dtcg + udg sources` — failing on every PR since #35.** `forgeblock.yml` carried three multi-line quoted `desc:` scalars — outside `_miniyaml`'s documented subset. Dev machines have PyYAML so the strict stdlib path never ran locally; CI's `python:3.12-slim` has no PyYAML, so `_miniyaml` ran — and **silently returned a partial document** truncated at the first multi-line scalar (record 35 of 795). `artifact.py` then saw an empty block vocabulary and failed with a wall of `unknown block` errors. (The stray 'green' runs #124-127 were PR branches forked before #35 — they ran their own older workflow without the artifact gate.) - Folded the three descs to one line each — value-identical to PyYAML's flow-scalar folding, so **dist/ needs no rebuild**. - `_miniyaml.load()` now **raises** when it can't consume the whole document; silent truncation is gone for good. - New `generator/tests/unit/test_miniyaml_strict.py` pins strict-raise behaviour, complete parse of every miniyaml-consumed manifest, and miniyaml == PyYAML equivalence (local/CI reproducibility). **2. `test` — failing on every PR since #41.** PR #41 registered `appleContactCard` + `appleCalendarSlots` in the vocabulary without extending the WP/email renderers; `test_block_coverage` (which CI runs via root pytest, unlike the CLAUDE.md-documented `pytest generator/tests/`) failed on the 30→32 count and the 'no mapping' fallbacks. Added both blocks to `_PROGRAMMATIC` in all three renderers + fixtures; count guard now 32. **Verified:** 233/233 root pytest (the CI invocation); all nine `just check` gates green both locally (PyYAML) and under python3.12 **without** PyYAML (the CI condition). **Notes for follow-up:** - `sync-manifest.yml` also uses an out-of-subset construct (block sequences of mappings) but is line-scanned by its consumers — left as-is. - Branch protection currently lets PRs merge over red required checks (#44 did); worth requiring the `dist/ matches dtcg + udg sources` + `test` contexts once this lands. - Merging this unblocks #45 and #46 (rebase them to pick up the fix).
fix(ci): dist gate + test job failures — miniyaml silent truncation & block-coverage gaps
All checks were successful
UDG dist drift gate / dist/ matches dtcg + udg sources (pull_request) Successful in 19s
Test Generator / lint-workflows (pull_request) Successful in 21s
Security Scans / Gitleaks secret scan (pull_request) Successful in 25s
Test Generator / lint-prose (pull_request) Successful in 24s
Security Scans / Trivy filesystem scan (pull_request) Successful in 30s
Test Generator / test (pull_request) Successful in 3m12s
abed91e3d3
Every PR since #35 has failed the 'dist/ matches dtcg + udg sources' check,
and every PR since #41 the 'test' check. Both were real, masked locally:

1. forgeblock.yml carried three multi-line quoted scalars — outside the
   documented _miniyaml subset. With PyYAML absent (CI slim containers run
   the stdlib path; dev machines have PyYAML) _miniyaml silently returned a
   PARTIAL document truncated at the first offender, so artifact.py saw an
   empty block vocabulary and exploded with 'unknown block' errors.
   → fold the three descs to single lines (value-identical after PyYAML's
     flow-scalar folding — dist/ artifacts need no rebuild)
   → _miniyaml.load() now raises when it cannot consume the whole document;
     a partial parse is never returned silently again
   → new generator/tests/unit/test_miniyaml_strict.py pins: strict-raise
     behaviour, complete parse of every miniyaml-consumed manifest, and
     miniyaml == PyYAML equivalence (local/CI reproducibility)

2. PR #41 registered appleContactCard + appleCalendarSlots in the vocabulary
   without extending the WP/email renderers, so test_block_coverage failed
   (30→32 count + 'no mapping' fallbacks).
   → add both to _PROGRAMMATIC in forgeblock_{pattern,email,ascii}.py
   → add _SAMPLE fixtures; count guard now 32 with a bump-note

Verified: full pytest 233/233 from repo root (CI invocation); all nine just
check gates green BOTH locally (PyYAML) and under python3.12 without PyYAML
(the CI container condition). sync-manifest.yml also uses an out-of-subset
construct (block seq of mappings) but is line-scanned by its consumers, not
miniyaml-parsed — left as-is.
peterswimm deleted branch fix/ci-gates-miniyaml-forgeblock 2026-07-24 04:08:30 +00:00
Sign in to join this conversation.
No description provided.