Skip to content

Fix three crash bugs: compactor NameError, ShotBriefDescription.__str__, novel2movie __call__#56

Open
fviolette26 wants to merge 1 commit into
HKUDS:mainfrom
fviolette26:fix/batch1-crash-fixes
Open

Fix three crash bugs: compactor NameError, ShotBriefDescription.__str__, novel2movie __call__#56
fviolette26 wants to merge 1 commit into
HKUDS:mainfrom
fviolette26:fix/batch1-crash-fixes

Conversation

@fviolette26

Copy link
Copy Markdown

Summary

Three crash bugs, each verified with a regression test (all written test-first):

  • agent_runtime/context_compactor.py_message_preview referenced the undefined bare name tool_calls instead of the string "tool_calls", raising NameError for any message carrying tool calls.
  • interfaces/shot_description.pyShotBriefDescription.__str__ read sound_effect/speaker/emotion/line, fields that are commented out of the model, so any str() of a shot raised AttributeError. It now renders the live audio_desc field.
  • pipelines/novel2movie_pipeline.py__call__ was a stale duplicate of plan_text_artifacts/render_video_artifacts: it re-gathered already-awaited coroutines from its retrieval step (RuntimeError: cannot reuse already awaited coroutine on every fresh run), called script2video with a nonexistent character_registry kwarg and no required user_requirement, and used character.idx on a model that only defines index. It now delegates to the two maintained helpers, which contain the corrected logic (−514 lines).

Test plan

uv run --with pytest python -m pytest tests/ — 105 passed (102 existing + 3 new in tests/test_crash_regressions.py).

🤖 Generated with Claude Code

…__, novel2movie __call__

- context_compactor._message_preview referenced the undefined name
  tool_calls instead of the string "tool_calls", raising NameError for
  any message carrying tool calls.
- ShotBriefDescription.__str__ read sound_effect/speaker/emotion/line,
  fields long since commented out of the model, so str() raised
  AttributeError; it now renders the live audio_desc field.
- Novel2MoviePipeline.__call__ was a stale duplicate of the planning and
  rendering helpers: it re-gathered already-awaited coroutines from its
  retrieval step (RuntimeError on every fresh run) and called
  script2video with a nonexistent character_registry kwarg and no
  user_requirement. It now delegates to plan_text_artifacts and
  render_video_artifacts, which contain the corrected logic.

Adds regression tests for all three.

Co-Authored-By: Claude Fable 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