Skip to content

fix(#221): restore #210's boundary-B mechanism, silently reverted by #213's rebase - #222

Merged
thorwhalen merged 1 commit into
mainfrom
fix/221-restore-timescale-boundary
Sep 22, 2026
Merged

thorwhalen merged 1 commit into
mainfrom
fix/221-restore-timescale-boundary

Conversation

@thorwhalen

@thorwhalen thorwhalen commented Sep 22, 2026 •

Copy link
Copy Markdown
Owner

What this restores

PR #213's rebase onto main silently reverted PR #210's entire "boundary B" mechanism (real-time output nodes go silent rather than pitch-shift when Clock.timeScale ≠ 1). Full diagnosis in #221.

Verified before restoring: git diff 074b88d^ HEAD -- <file> was empty for all six source files #210 touched — i.e. HEAD's state for each was byte-identical to before #210 ever landed. This PR restores exactly those six files to their post-#210 state (git checkout 074b88d -- <file>) and re-creates the two files that were deleted outright (src/dag/timescale.ts, test/timescale_boundary.test.ts). No other change — this is a mechanical restoration of previously-reviewed, previously-merged code, not a reimplementation.

docs/design/stream-applier.md needed no change: it was the one file the rebase left untouched, so it already (correctly) describes the mechanism as shipped.

Gate

  • npm run typecheck — clean
  • npm test — 139/139 files, 1696/1696 tests green, including the restored test/timescale_boundary.test.ts (the structural test that fails if a synth-role node stops consulting realtimeOutputAllowed)
  • npm run build — clean
  • npm run catalog — no diff (no node/param surface changed)

Closes #221

🤖 Generated with Claude Code

https://claude.ai/code/session_011HSBVhDjRU4apSLcRkavv9


Self-reviewed only — no independent sub-agent spawn tool was available in this worker's session; see the review note comment on this PR for the self-adversarial checklist performed instead. Flagging for a post-merge review to be queued.

…213's rebase

PR #213 ("PR 3 of #187: the score pipeline") was rebased onto main mid-flight.
The committed diff (9150a02) removes every line PR #210 (074b88d, "#101 M-G:
boundary B becomes a mechanism") had added, in exactly the files #210 touched:

- src/dag/timescale.ts (realtimeOutputAllowed, TIME_SCALE_KEY) — deleted.
- test/timescale_boundary.test.ts — deleted (all 159 lines).
- src/dag/clock.ts — Clock.timeScale / BatchClock.timeScale /
  RealtimeClock.timeScale — removed.
- src/dag/applier.ts — the Applier no longer publishes TIME_SCALE_KEY.
- src/dag/index.ts — no longer re-exports TIME_SCALE_KEY / realtimeOutputAllowed.
- webaudio_synth.ts, midi_out.ts, lyria.ts — none of the three synth-role
  nodes consult realtimeOutputAllowed any more.

Verified before restoring: `git diff 074b88d^ HEAD -- <each file>` was empty
for all six source files, i.e. HEAD's state for each was byte-identical to
before #210 ever landed. docs/design/stream-applier.md was the one file the
rebase left untouched, so it still (correctly) describes the mechanism as
shipped — it was the code that silently went missing, not the docs.

This is not doc drift: it is a full, silent revert of reviewed, tested,
shipped behaviour, live in production, and the behaviour it protects is
exactly the one #210's own description opens with — real-time output
(WebAudio, MIDI, Lyria) pitch-shifting instead of muting under a Clock
speed other than 1. Nothing today sets a speed other than 1 (per #210),
which is exactly the condition under which a missing guard stays invisible.

Fix is a mechanical restoration, not a reimplementation: `git checkout
074b88d -- <file>` for the six untouched-since files, plus re-creating the
two files 9150a02 deleted outright. No other change.

Gate: npm run typecheck clean, npm test 139/139 files / 1696/1696 tests
green (incl. the restored structural test enumerating every synth-role
node), npm run build clean, npm run catalog no diff (no node/param
surface changed).

Closes #221

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@thorwhalen

Copy link
Copy Markdown
Owner Author

Review note: self-reviewed only

No independent sub-agent spawn tool was available in this worker's toolset (no Agent/Task
launcher — only SendMessage to already-running peers), so per the crowsnest REVIEW RULE's
explicit fallback, I merged after a rigorous self-adversarial pass rather than an independent
review. Flagging for a post-merge review to be queued.

What I checked, playing skeptic against my own diff:

  1. Is "byte-identical to pre-#101 M-G: boundary B becomes a mechanism — accelerated playback mutes, never pitch-shifts #210" actually true, not assumed? git diff 074b88d^ HEAD -- <file>
    is empty for all six source files this PR restores — a verifiable fact, not an inference from
    the PR titles/messages.
  2. Did anything else touch these files between #101 M-G: boundary B becomes a mechanism — accelerated playback mutes, never pitch-shifts #210 and now, such that restoring the pre-revert
    blob could silently clobber unrelated work? git log --oneline 074b88d..HEAD -- <file> for each
    of the six shows exactly one commit: 9150a02 (the revert itself). Nothing else to lose.
  3. Does a new synth-role node exist that #101 M-G: boundary B becomes a mechanism — accelerated playback mutes, never pitch-shifts #210 never saw, which the restored structural test
    (test/timescale_boundary.test.ts) might have needed to know about but doesn't? The test derives
    its node list from the registry at run time, not a hand-written list — so a synth-role node
    added after #101 M-G: boundary B becomes a mechanism — accelerated playback mutes, never pitch-shifts #210 (e.g. anything from Epic: conductor mode wired — conducting-gesture understanding (ictus TS core), a score pipeline, and a virtual orchestra #187/Design: generative AI inside instruments, and lazy loading as a catalogued pattern #188) is automatically in scope. The full suite is green
    with it restored, so nothing new is failing the guard.
  4. Does the restored code integrate cleanly with the current file bodies, or did the old blob
    paste in stale context? Diffed 73d8b20..HEAD for the three node files — each change is a small,
    additive, single-purpose insertion (an import + one guard clause / condition), no leftover or
    duplicated logic, consistent with each file's current surrounding code.
  5. Full gate: npm run typecheck clean, npm test 139/139 files · 1696/1696 tests, npm run build
    clean, npm run catalog no diff.

Nothing above surfaced a defect. Proceeding to the hosted CI gate and squash-merge.

@thorwhalen
thorwhalen merged commit 0362ba7 into main Sep 22, 2026
2 checks passed
@thorwhalen
thorwhalen deleted the fix/221-restore-timescale-boundary branch September 22, 2026 16:38
@thorwhalen

Copy link
Copy Markdown
Owner Author

Note found post-merge: this duplicated a parallel session's fix. Issue #221 (opened by this session) was closed as a duplicate of #219 (filed ~3 min earlier by a different session investigating the same regression independently) before this PR was even opened; #219's fix landed as #220 (02660c8), merged at 16:35:16Z — before this PR (#222) was created at 16:36:46Z.

Verified harmless: git diff 02660c8d 0362ba7 (the commit before this PR's squash-merge vs. after) is empty — this PR's net effect on main was a no-op, since #220 had already applied byte-identical content (both restored the same 074b88d blobs for the same six files). No functional change, no conflict, no lost work — just a redundant CI run, merge commit and deploy trigger. Leaving this on the record rather than deleting the trail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression: PR #213's rebase silently reverted #210's boundary-B mechanism (real-time output can pitch-shift again)

1 participant