Repository navigation
Keep every chapter mark: fix dropped marks, strip pause markers, cut a segment at each heading - #210
Merged
Merged
Conversation
With headings not read aloud a heading takes no time of its own, and its mark was lost wherever it had no shot of its own to start: when a quote or code block took over the picture's section, right before a clip with sound, on a missing picture or an empty continuation that was then left out, and at the end of a section that already had a mark (a heading above each picture, the commonest shape of note). Each now starts whatever comes where the heading stands; when two land on the same moment the first is kept, as with two headings in a row. A section's chapter was also set after its shot was built, so its [pause:...] markers reached the MP4 chapter list and the chapter overlay. The importer now takes the mark without them, the compiler builds it into the shot so a hand-written spec is stripped too, and a heading that is nothing but markers no longer makes a blank card or chapter entry. The same fixes are written independently into tests/segment_reference.py, so the parity tests still compare two implementations; every note of up to five blocks under each chapter setting comes out identical both ways. Docs: both quirks marked fixed, Phase 0 done, and open decision 15 on marks inside a section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PwaujUokXQAxnebBArpZuj
Open decision 15: a section was one segment and so held one chapter mark,
so with chapter screens off a second heading inside it (## A, text, ## B,
more text, over one picture) got no entry, read aloud or not, and a note
of text alone with three headings had one chapter.
Now a heading after something has been said in its section starts a new
scene there, over the same picture, carrying its chapter and the beats
from the heading on, with transition_in {style: "none"}. A heading with
only headings after it before the picture changes opens nothing: it is
read (if read at all) at the end of the section above, and its mark
starts the next segment, so a heading above an image now marks the image.
The compiler accepts transition_in "none" (any other per-segment style is
still refused) and sets Shot.cut_in. The renderer joins such a shot by a
straight cut on every transition path: no dip at either side of the join,
a concat instead of an xfade in the blend stitch, and no overlap eaten in
the timeline, chapter marks or estimate.
The oracle in tests/segment_reference.py gets the same split, written
independently. Two heading-pause tests now expect the heading to open
its own shot.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PwaujUokXQAxnebBArpZuj
davior
marked this pull request as ready for review
October 15, 2026 13:39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This fixes the last two chapter-mark quirks listed in
docs/gecko-video-creator.md§3.2, which completes Phase 0. It also settles open decision 15: a heading partway through a section now starts a segment of its own.Commit 1: marks that were dropped, and pause markers
A chapter mark can vanish. When headings are not read aloud, a heading takes no time of its own. Its mark was dropped wherever there was no shot for it to start:
_take_overnow keeps the mark);flushnow returns the mark and the clip takes it);When two marks land on the same moment, the first is kept, as two headings in a row always have been.
Pause markers leaked into chapter marks. A section's chapter was set after its
Shotwas built, so__post_init__never stripped it.The Road [pause:2s]reached the MP4 chapter list and the chapter overlay exactly as typed. Now:Commit 2: a segment at each heading (open decision 15)
A section was one segment, so it held one mark. With chapter screens off, a second heading inside a section got no chapter entry, and a note of plain text with three headings had one chapter.
Now a heading that comes after something has been said in its section starts a new
sceneat that point, over the same picture. The new scene carries the heading's chapter and every beat from the heading on, plustransition_in: {style: "none"}.A heading followed by nothing but other headings before the picture changes opens no segment. It is read (if it's read at all) at the end of the section above, and its mark starts the next segment. So a heading above an image now marks that image.
transition_inwith style"none"and sets the newShot.cut_in. Any other per-segment style is still refused.cut_inshot with a straight cut on every transition path:build_shot_command(dip_in=, dip_out=));concatinstead of anxfadein the blend stitch (build_xfade_command(cuts=));build_timeline,crossfade_totalor the estimate.min_shot_seconds. A looping clip or a Ken Burns drift restarts at the cut.Oracle. Both commits' changes were written independently into
tests/segment_reference.py, each markedFixed:. The parity tests therefore still compare two implementations. Two heading-pause tests now expect the heading to open its own shot.Docs. In §3.2, both quirks are marked fixed, and the heading-above-image entry is updated: the mark now goes to the image, and only where the heading is read is left to decision 5. §7 has a mapping row for the cut, Phase 0 is marked done, and decision 15 is recorded as decided.
Test plan
concatjoin in the xfade stitch,crossfade_totaland the timeline.chapter_screens,read_chaptersandnarrate_codesetting: 374,576 notes, identical between the importer and the oracle.🤖 Generated with Claude Code
https://claude.ai/code/session_01PwaujUokXQAxnebBArpZuj