Skip to content

fix: restore dropped _build_continuation_prompt, sync dashboard lock, add free TTS skill - #93

Open
kevindevops wants to merge 4 commits into
crisng95:mainfrom
kevindevops:fix/continuation-prompt-regression
Open

kevindevops wants to merge 4 commits into
crisng95:mainfrom
kevindevops:fix/continuation-prompt-regression

Conversation

@kevindevops

Copy link
Copy Markdown

Summary

  • Bug fix: _build_continuation_prompt was removed in 76c4d3f (provider-neutral platform refactor) but both call sites in agent/sdk/services/operations.py (generate_scene_image, edit_scene_image) were left calling it. Any CONTINUATION scene hit a NameError at runtime, discovered while running a real multi-scene project end-to-end through the batch API. Restored the original helper and added a regression test per call site — each fails with the exact NameError if the function is removed again (verified by reverting locally before opening this PR).
  • Dashboard fix: dashboard/package-lock.json had drifted out of sync with package.json — npm ci failed with Missing: @emnapi/core@1.11.3 from lock file. Regenerated via npm install.
  • New skill — fk-gen-narrator-free: /fk-gen-narrator hard-aborts without a voice template (/fk-gen-tts-template / /fk-import-voice), which is a real barrier for a one-off project. This skill drives Microsoft Edge TTS instead (no account, no API key), writing the same tts/scene_<IDX3>_<id>.wav layout /fk-concat --with-tts already expects. Also documents a duration-fit-and-retry loop for Step 4, since Edge TTS has no built-in word-count gate against the scene's 8s clip length — found by hand when one scene's narration (8.26s) overran its clip.
  • start_agent.ps1: python -m agent.main launched through a bash background job dies once the launching shell session ends (Windows doesn't fully detach nohup'd processes under Git Bash job control). This script uses Start-Process to launch the agent as an independent, detached Windows process, and is idempotent (checks /health first).

Test plan

  • python -m pytest tests/unit — 510 passed, 1 skipped (full suite, unchanged pass count plus the 2 new regression tests)
  • Reverted the fix locally and confirmed both new regression tests fail with the original NameError, then restored it
  • Ran the full pipeline against a live Flow project end-to-end (project → ref images → scene images via GENERATE_IMAGE + EDIT_IMAGE waves → videos → concat) to confirm the fix resolves the real failure
  • Generated narration for all 5 scenes of that project via the new fk-gen-narrator-free skill and mixed it into the final video

kevindevops and others added 4 commits November 15, 2026 08:13
…ctor

Commit 76c4d3f (provider-neutral platform refactor) removed the
_build_continuation_prompt definition but left both call sites in
operations.py intact, so any CONTINUATION scene's image generation or
edit hit a NameError at runtime. No existing test set parent_scene_id
on the scene fixture, so the dead code path went uncaught by the
suite - it only surfaced against a live Flow project.

Restores the original transformation-prefix helper and adds a
regression test per call site that fails with the exact NameError
when the function is removed again.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
npm ci failed with "Missing: @emnapi/core@1.11.3 from lock file" and
a peer-dependency mismatch on @babel/core — the lock file had drifted
out of sync with package.json. Regenerated via npm install.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
python -m agent.main run through a bash background job dies silently
once the launching shell session ends (Windows doesn't fully detach
nohup'd processes under Git Bash job control). start_agent.ps1 uses
Start-Process to launch the agent as an independent Windows process
that survives the parent shell closing, and is idempotent — it checks
/health first and no-ops if an agent is already listening.

Also adds venv/ and the agent_out/err.log files this script writes to
.gitignore.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…l voices

/fk-gen-narrator hard-aborts without a voice template (OmniVoice clone),
which needs /fk-gen-tts-template or /fk-import-voice set up first. For a
one-off project or a language with no trained template yet, that's a
real barrier before any narration can be heard.

This skill drives Microsoft Edge TTS instead — no account, no API key,
just `pip install edge-tts`. Produces the same tts/scene_<IDX3>_<id>.wav
layout /fk-concat --with-tts already expects, so it's a drop-in
alternative, not a parallel pipeline.

Also documents a duration-fit loop for Step 4: unlike the cloned-voice
path, Edge TTS has no built-in word-count gate against the 8s scene
length, so narration can run long and get clipped by concat. Generate
once, probe with ffprobe, and only escalate the speaking rate if it
doesn't fit under the clip — found by hand during a real narrated video
where one scene's TTS (8.26s) overran its 8s clip.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.

1 participant