From 3542a79b3aeb0aa31eecf1b4be54fff66abe6bc1 Mon Sep 17 00:00:00 2001 From: ukimsanov Date: Fri, 22 May 2026 12:15:39 -0700 Subject: [PATCH] =?UTF-8?q?fix(skill):=20reconcile=20SFX=20drift=20toleran?= =?UTF-8?q?ce=20to=20=C2=B10.1s=20across=20script=20+=20prose?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Vai (vanceingalls) caught a 10× tolerance mismatch between the script and the prose. Rames confirmed as blocking: step-5-build.md:458 (per-beat evidence rule): ±0.05s step-6-validate.md (playback verification): ±0.1s w2h-verify.mjs:29 (SFX_DRIFT_TOLERANCE_S): 0.5s So an agent writing per-beat evidence at ±0.05s reports a 0.3s drift as FAIL, while the script reports the same drift as PASS. The pasted- verbatim report contradicts the agent's evidence block — exactly the kind of internal contradiction this PR was built to eliminate. Converged on ±0.1s everywhere: - w2h-verify.mjs:29: SFX_DRIFT_TOLERANCE_S = 0.1 (3 frames at 30fps) - step-5-build.md:458: ±0.05s → ±0.1s, with cross-reference noting it matches the script + step-6 playback floor The other ±0.5s constants in step-6 are for total audio/video duration and storyboard beat-range matching — those are coarser-grained timing checks (not SFX-to-visual sync). Left as-is intentionally. Regression check: huly-v3 now flags 4 SFX drifts instead of 3 — the new one is glitch-1.mp3 at 0.20s drift (6 frames). The old 0.5s tolerance was masking this real timing issue. Co-Authored-By: Claude Opus 4.7 (1M context) --- skills/website-to-hyperframes/references/step-5-build.md | 2 +- skills/website-to-hyperframes/scripts/w2h-verify.mjs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/skills/website-to-hyperframes/references/step-5-build.md b/skills/website-to-hyperframes/references/step-5-build.md index 5bcb94a6a..c723bf5a4 100644 --- a/skills/website-to-hyperframes/references/step-5-build.md +++ b/skills/website-to-hyperframes/references/step-5-build.md @@ -455,7 +455,7 @@ For each SFX entry: 3. Add beat-local + global start: `3.5 + 1.2 = 4.7s`. 4. Write `data-start="4.7"` in index.html. -**Forbidden:** writing `data-start=""` by reading the storyboard and estimating by eye. The evidence block above MUST quote both the storyboard SFX line and the index.html `data-start` line — and confirm they match within ±0.05s. A 1-second drift is not a rounding error; it's a build failure. +**Forbidden:** writing `data-start=""` by reading the storyboard and estimating by eye. The evidence block above MUST quote both the storyboard SFX line and the index.html `data-start` line — and confirm they match within ±0.1s (≈3 frames at 30fps; same tolerance `w2h-verify.mjs` enforces and `step-6-validate.md` uses for playback verification). A 1-second drift is not a rounding error; it's a build failure. ### Surface recurring sub-agent workarounds to the user diff --git a/skills/website-to-hyperframes/scripts/w2h-verify.mjs b/skills/website-to-hyperframes/scripts/w2h-verify.mjs index 26ce8eefd..a67dcd1b0 100644 --- a/skills/website-to-hyperframes/scripts/w2h-verify.mjs +++ b/skills/website-to-hyperframes/scripts/w2h-verify.mjs @@ -26,7 +26,7 @@ const PROJECT_DIR = resolve(process.argv[2] || "."); // Thresholds — change here, not by interpretation. const HEADLINE_MIN_PX = 80; // 80px floor for primary headline at 1920×1080 const TIMELINE_COVERAGE_MIN = 0.7; // max GSAP event position must reach ≥70% of beat duration -const SFX_DRIFT_TOLERANCE_S = 0.5; +const SFX_DRIFT_TOLERANCE_S = 0.1; // 3 frames at 30fps; matches step-5 evidence rule + step-6 playback floor const BEAT_DURATION_DRIFT_TOLERANCE_S = 0.5; const SHADER_NAMES = [