fix(orchestrator): pace speech bubbles by voice and reading, never backwards

voicePace and readingPace set each row's floor, span and duration in one place: the spoken rest reveals the unread words over the speech audio, a procedure word reveals none, a burst and silent reading reveal the rest at reading pace, and wordsRead never goes below the floor. A sound that fails or is dropped still ends cleared. Requirement 003 W6 states it; probes cover quiet, burst, fallback, cut, auto, check, silent, rejected and faulty rows.

🎯 Fix: 92 %
💥 Break: 4 %
💸 Tokens: 100 %
⏱️ Velocity: 100 %
🛡️ Security: 100 %
🏆 Score: 88
🚦 Gate: ✅ 90/5, tokens and velocity <= 100, security 100 %

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kevin Veen-BirkenbachandClaude Opus 5.5 committed 2026-11-14 09:58:46 +00:00
1 parent c202429cf9
commit 4cef28ee19
5 files changed
+226 -22

No files matched your search

+6 -2
View File
@@ -87,7 +87,11 @@
}
function wordsRead(item) {
return item.started ? Bubbles.shown(saidOf(item).length, item.duration, (performance.now() - item.started) / 1000) : 0;
if (!item.started) {
return 0;
}
const [said, floor] = [saidOf(item).length, item.floor || 0];
return Math.min(said, floor + Bubbles.shown(item.span ?? said - floor, item.duration, (performance.now() - item.started) / 1000));
}
function drawBubble(entry, view) {
@@ -108,7 +112,7 @@
if (!settings.bubbles) {
return;
}
const planned = Bubbles.plan(speech.current || speech.loading, speech.pending);
const planned = Bubbles.plan(speech.current || speech.loading || speech.item, speech.pending);
const kept = new Set(planned.map((entry) => entry.item));
for (const [item, view] of bubbles.shown) {
if (!kept.has(item)) {