Skip to content

feat(split-reel v8): every voice decision happens before the charge - #5890

Merged
gHashTag merged 4 commits into
masterfrom
claude/split-reel-v8-voice-before-charge
Oct 4, 2026
Merged

gHashTag merged 4 commits into
masterfrom
claude/split-reel-v8-voice-before-charge

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

What

specs/automation/split-reel.t27 goes from v7 to v8: every voice decision now happens before the charge. The one refusal that cannot happen before the charge now refunds the voice. Closes #5885.

  1. An ordinary caller with no voice of her own is refused before the charge.

    • Applies to a caller who is not the house, names no voice_id and has no clone.
    • She used to be charged first, then given the first custom voice in the house's ElevenLabs account, else its first library voice. That voice is not hers, may be the owner's own, and comes from a provider the house no longer calls.
    • New: STOCK_VOICE_FOR_ORDINARY = false and fn voice_refused(house, has_voice_id, has_clone).
    • There is no stock voice to offer her: OWN_VOICE holds, and no Kie speech leg is measured working on this path.
    • The house with no voice keeps its own path (crm-story-reel.t27 HOUSE_SKIPS_ELEVENLABS, unchanged).
  2. A new voice's length is estimated from its text before it is paid for.

    • New: fn speech_ms_estimate(chars) and fn text_fits(chars), at MS_PER_CHAR = 56.
    • The boundary: 214 characters fit (11984 ms) and 215 do not (12040 ms).
  3. A voice refused for its length after it is paid is refunded, once.

    • New: REFUND_TOO_LONG_VOICE = true, fn voice_too_long(measured_ms) and fn backstop_refund(paid_here, measured_ms, charged_now).
    • It refunds the exact sum that voice was charged, only when this call paid for it, and only past SPEECH_MAX_SECONDS * 1000.
    • It refunds nothing for:
      • a voice_url passed back from an earlier call;
      • a voice that fits;
      • a charge of 0 (the house).
    • The REFUSED_BEFORE_SPEND note now says why its "nothing to refund" does not cover this case: this refusal comes after the charge.

Where 56 ms/char was measured

  • The source is apps/vibee-editor/player/public/lipsync/captions.json in gHashTag/999-multibots-telegraf. It is whisper output on 75 Russian words of the owner's clone.
  • The text is 464 characters with the words joined by single spaces.
  • The audio is lipsync.mp4 in the same directory, 25920 ms by ffprobe.
  • 25920 / 464 = 55.9 ms per character, rounded up to 56 so the estimate errs long.

Why a refund and not a conservative estimate

The host repo holds one voice with its text: the clip above, which is Russian and is the owner's clone.

  • Its other voice files have no text: render/public/vo/vo1..vo5.wav (Silero, cut to fit their scenes) and avatar_brain's mp3.
  • No English voice and no client voice is in the repo at all.

A "slowest measured pace per language" would therefore be a guess. A guess cannot promise that no voice passes the estimate and then fails the backstop, so the backstop's refusal refunds the voice instead.

Checks (from output, on the merge of origin/master 7943bc4)

  • t27c test-report --verbose: 20 tests, 20 pass, 0 FAIL. Three are new:
    • "an ordinary caller with no voice of her own is refused before the charge";
    • "a voice too long for the format is refused from its text, before it is paid";
    • "a voice refused for its length after it is paid is given back, once".
  • t27c seal --verify: all hashes MATCH, spec_hash sha256:ea49a4b1….
  • Host tri spec-check on the byte-identical vendored copy: 20/20, 0 of 20 vacuous, 23/23 negative controls red. Three of the controls are new for the refund:
    • no refund;
    • a refund when !paid_here;
    • >= at the ceiling.
  • The merge of origin/master (crm-story-reel v23, spec(crm-story-reel): v23 -- house marks read as a reader reads them (#5897) #5898) did not touch split-reel.t27.

Claim status

This PR adds a rule and one measurement. No reel has been rendered under v8 yet.

The host binding is gHashTag/999-multibots-telegraf#3567, where the refund is wired at the length backstop and pinned by a binding test and eight mutants.

phi^2 + 1/phi^2 = 3 | TRINITY

🤖 Generated with Claude Code

gHashTag and others added 2 commits October 4, 2026 10:23
An ordinary caller (not the house) who names no voice and has no clone is
refused before the charge. Before, she was charged and then given the first
voice in the house's ElevenLabs account. STOCK_VOICE_FOR_ORDINARY = false and
fn voice_refused. The house keeps its own path.

A new voice's length is estimated from its text before it is paid for:
MS_PER_CHAR = 56. It is measured on the host's lipsync captions: 464
characters over 25920 ms, rounded up. fn speech_ms_estimate and fn text_fits
add a boundary at 214 characters (fits, 11984 ms) and 215 (refused, 12040 ms).

Two new tests (19/19 pass), vacuity 0 of 19, and three negative controls,
each red: pace 55, nobody refused, and the ceiling one character wide. Sealed.

Closes #5885

phi^2 + 1/phi^2 = 3 | TRINITY

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #5885

phi^2 + 1/phi^2 = 3 | TRINITY

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-04 03:25:36 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 44
PRs with All Checks Green 6
READY 5
FAILING 44
PENDING 0
NO CHECKS YET 0

These columns do not partition: 5 + 44 + 0 + 0 = 49, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=b45a356c2eb6 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

…is given back

The estimate from the text (MS_PER_CHAR = 56) is one voice's pace: the
owner's Russian clone, the only voice in the host repo with its text. A
slower voice can pass it and still be measured past SPEECH_MAX_SECONDS once
it exists. That backstop refusal is the one refusal that comes after the
charge, so REFUSED_BEFORE_SPEND's "nothing to refund" does not cover it.

The slowest-per-language pace was not an option: the host's other voice
files have no text (render/public/vo/vo1..vo5.wav, avatar_brain's mp3) and
no English or client voice is there, so such a pace would be a guess.

REFUND_TOO_LONG_VOICE = true, fn voice_too_long and fn backstop_refund: the
exact sum this call was charged goes back, and nothing for a voice_url
from an earlier call, a voice that fits, or the house (charged 0).

20/20 tests pass, vacuity 0 of 20. Three more negative controls, each red:
no refund, a refund for a passed-back voice, a refund at the ceiling.
Re-sealed; VERSION stays 8.

Refs #5885

phi^2 + 1/phi^2 = 3 | TRINITY

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-04 05:51:23 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 46
PRs with All Checks Green 4
READY 3
FAILING 46
PENDING 0
NO CHECKS YET 0

These columns do not partition: 3 + 46 + 0 + 0 = 49, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=b45a356c2eb6 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@gHashTag
gHashTag merged commit 3435bff into master Oct 4, 2026
33 of 34 checks passed
gHashTag added a commit that referenced this pull request Oct 4, 2026
Closes #5913.

crm-story-reel v24 removes HOUSE_SKIPS_ELEVENLABS and its assertion. The flag described audio_generate asking ElevenLabs for a voice when no voice and no clone was chosen, skipped for the house; split-reel v8 (#5890, host 999#3567) deleted that lookup, so the flag was true of nothing. The test keeps its delivery half (DELIVER_VIA_HOME_BOT, HOUSE_DELIVERY_BOT) as "the finished reel reaches the house through its own bot". VERSION 24 with a dated header note; seal regenerated.

Reviewer bee checks at 2f503cf: t27c test-report 60/60 pass, 0 fail; t27c seal --verify all hashes MATCH; host copy (999#3575) byte-identical (sha256 2ec980e5...); host gen.ts equals fresh t27c gen-ts. Only red check is spec-guards (DRIFTED ring-096-rust specs/numeric/formats.t27), the same red as on master.

Host: gHashTag/999-multibots-telegraf#3575
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.

split-reel v8: every voice decision happens before the charge

1 participant