From bfc46d2f6b79854e843ef7636eada88b86318959 Mon Sep 17 00:00:00 2001 From: ukimsanov Date: Fri, 5 Jun 2026 13:45:22 -0700 Subject: [PATCH 1/4] feat(lint): layout rules + hollow-master FP fix + deferred-token carve-out MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds rules that catch recurring bugs observed across w2h agent eval rounds: Layout (new file, ~22 rules): - absolute_width_collapse, absolute_center_missing_translate - hero_absolute_center_maxwidth_only - word_stagger_block_display (block on .word inside stagger animation) - nowrap_missing_max_width, gsap_css_transition_conflict - + others surfacing bad CSS contracts that render correctly in Studio but break under render-engine seek. Composition: - master_timeline_orchestrates_sub_compositions: FP guard for the xfade() helper pattern. Authors sometimes wrap tl.to in a helper (function xfade(outSel, inSel, t) { tl.to(outSel, ...); }) then call xfade('#beat-1-host', '#beat-2-host', 4.15). The tl.to args are variables so the original regex missed them — now we also match '#' literal anywhere in the script blob. CLI: - lintProject: skip audio_src_not_found for deferred tokens (<>, <>, <>, <>, <>, <>). Placeholders resolved post-finish; rule was breaking the SHIP GATE check. Tests: - composition.test.ts: 16 new tests + async migration for all sites - layout.test.ts: 72 tests covering all new rules - lintProject.test.ts: 4 tests for deferred-token carve-out --- packages/cli/src/utils/lintProject.test.ts | 69 + packages/cli/src/utils/lintProject.ts | 8 + packages/core/src/lint/hyperframeLinter.ts | 2 + .../core/src/lint/rules/composition.test.ts | 293 +- packages/core/src/lint/rules/composition.ts | 364 +- packages/core/src/lint/rules/layout.test.ts | 1278 +++++++ packages/core/src/lint/rules/layout.ts | 2968 +++++++++++++++++ 7 files changed, 4980 insertions(+), 2 deletions(-) create mode 100644 packages/core/src/lint/rules/layout.test.ts create mode 100644 packages/core/src/lint/rules/layout.ts diff --git a/packages/cli/src/utils/lintProject.test.ts b/packages/cli/src/utils/lintProject.test.ts index 157063d95..ff78fad1d 100644 --- a/packages/cli/src/utils/lintProject.test.ts +++ b/packages/cli/src/utils/lintProject.test.ts @@ -473,6 +473,75 @@ describe("audio_src_not_found", () => { // author can grep for it in their HTML. expect(finding?.message).toContain("../assets/missing.mp3"); }); + + it("errors when