FableLoom shot autopilot sends the whole episode per call and times out on normal-size episodes; nothing is resumable
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- express, javascript
Research direction
Start with runEpisodeShotAutopilot in server/services/fableLoom/shots.js and trace the shot planning route, then compare how editorial autopilot starts runs and records runEvents. Map how draft and review results are stored and how provider timeouts reach the caller. Done means the stated acceptance criteria pass for a roughly 20-scene episode, including recovery after restart and stage, round, and provider details in timeout errors.
Written by the indexing model from the issue text.
Description
Bug
Shot autopilot (POST /api/fableloom/:id/episodes/:episodeId/shots/plan, runEpisodeShotAutopilot in server/services/fableLoom/shots.js) sends the whole episode in one prompt per round, for both the draft stage and the review stage. On a moderately sized helper episode (~19 single-cut scenes, ~1.1k chars of teleplay each), a single call regularly takes longer than a provider's per-run timeout (300 s is common in providers.json).
What happens:
CLI run timed out after 300000ms→ HTTP 500, after 10–24 minutes of wall time. Earlier rounds can finish before a later call times out.- Nothing is kept. Round output that passed isn't persisted, so every retry starts over.
- A PortOS restart during the run (e.g. auto-update) ends the request with an empty reply, and there's no way to resume or poll it.
Proposed fix
- Chunk the work by dramatic group. Draft and review the shot split per outline scene (or a small window of adjacent scenes, plus a compact digest of the rest for context), then run one cheap whole-episode consistency pass over the plan JSON, not the teleplay. Each call stays well under the timeout and parallelizes.
- Run it as a background run, like editorial autopilot. Use
start/status/cancelroutes plusrunEvents, so a long split doesn't depend on one held HTTP request and can be resumed after a restart. - Persist per-round results (draft, review verdict, feedback), so a retry resumes from the last good round.
- Size-aware timeout: let the stage request a timeout that scales with prompt size (capped), or warn up front that the selected provider's
timeoutis likely too short for this episode size. - Error message: name the stage and round that timed out (e.g.
fableloom-shot-review round 2 timed out after 300 s on provider X) instead of the bare runner message.
Acceptance criteria
- An episode of ~20 scenes with ~1k chars each completes a shot plan on a provider with a 300 s timeout.
- Killing the server mid-run and restarting leaves the run resumable, or reported as failed with its completed rounds preserved, never silently lost.
- A timeout error names the stage, round and provider.
- Dominant language
- JavaScript
- Stars
- 38
- Forks
- 32
- Avg merge
- 36m
- Merged PRs (30d)
- 989
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from atomantic/PortOS
-
GitHub inbox: Dependabot and Actions PRs count as outside, and Enterprise accounts cannot trust their own instancePossibly taken @atomantic claimed this today. Openarea:devtools effort:medium enhancement in-progress model:heavy plan
atomantic/PortOS#13203 · 1 assignee ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
-
GitHub inbox: make triage suggestion pills actionable buttonsPossibly taken @atomantic claimed this today. Openarea:devtools effort:medium enhancement model:light plan ux
atomantic/PortOS#13193 · 1 assignee ·
Maintainers usually reply within 1 day
-
GitHub inbox: add an automation rule from any item so similar items are handled on AutopilotPossibly taken @atomantic claimed this today. Openarea:devtools effort:high enhancement model:heavy plan
atomantic/PortOS#13192 · 1 assignee ·
Maintainers usually reply within 1 day
-
GitHub inbox: Resolve with agent on every item, with a provider/model/effort pickerPossibly taken @atomantic claimed this today. Openarea:devtools effort:high enhancement in-progress model:heavy plan
atomantic/PortOS#13191 · 1 assignee ·
Maintainers usually reply within 1 day
All issues in atomantic/PortOS
Similar issues
-
ew
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
priority: medium status: needs-decision work-class: scoped
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
melodic-software/claude-code-plugins#9339 · 2 comments ·
Maintainers usually reply within 1 day
-
bug-report bug-report-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Codeinwp/templates-patterns-collection#539 ·
Maintainers usually reply within 1 day
-
建议增加URL参数构建的工具Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
[Bug] dsh 0.2.1 返回 session/not-found 时 sessionExists 不重建会话,消息恒失败并被误报为 INTERNAL_UNKNOWNPossibly taken @ANIIAN91 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
xmanrui/dsh-im#444 · 1 comment ·
Maintainers usually reply within 1 day