Skip to content

Save linked movie clip ranges while retaining the complete movie - #136

Merged
mgradwohl merged 6 commits into
mainfrom
tracker-movie-clip-saving
Nov 9, 2026
Merged

mgradwohl merged 6 commits into
mainfrom
tracker-movie-clip-saving

Conversation

@mgradwohl

@mgradwohl mgradwohl commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Change

Clip Settings edits in audited, indexed constant-rate linked movies can now be saved to standard Tracker files alongside a native companion. The writer patches only start frame, stride and count, retaining all original-frame measurements, the complete movie and index, calibration and numeric timing. Desktop tests cover undo/redo, ordinary paired saving and reopening the selected source frames.

Two new acceptance modes cover strided and single-frame movies after native reopen and source-project removal. Independent XML, pixel, timing and full-movie hashes check edited and untouched data. After Tracker saves and freshly reopens, the saved reference must still resolve to the complete pinned movie; malformed/remote paths, lost marks, changed timing and changed bytes fail acceptance. This also strengthens the baseline and ordinary movie-edit cases.

Linux static analysis found an optional image-sequence access inside a test loop. The checked reference is now obtained before the loop; this passes Linux analysis in the prior b56cd4e run. Fresh checks remain required on the final correction below.

Review correction: a desktop regression reproduced a single-frame standard reopen limiting Clip Settings to the shortened endpoint. Index completion now refreshes the full source-frame count, allowing expansion to all retained frames without dirtying the document or dropping measurements. The red-then-green regression also resaves and displays the retained final frame.

Further review reproduced an unreadable native save when the available movie is shorter than the recorded clip. Index completion now preserves existing bounds and extends them only when the decoded movie contains the clip. Red/green regressions cover a five-frame clip with a frame-4 mark and a four-frame movie, plus an already trimmed native copy that retains its larger known bound. Native save/reopen preserves range and measurements; standard export still rejects an incomplete movie/index match without replacing an existing destination.

Related: #65 and Tracker #10. The upstream report/discussion were refreshed. The historical MOV/Open Recent defect is not reproduced or claimed fixed.

Validation

  • Windows: all ten CTest groups pass after the shorter-movie correction (129.56 s); 95.64% production C++ line coverage (8844/9247). Three existing LLVM function-profile mismatch warnings remain visible.
  • All 86 Python corpus tests pass, including negative scientific/media oracles.
  • Both new native exports pass full XML/movie-byte comparison and native reimport.
  • All tracked C++ formatting and static analysis for all five changed C++ source files pass. Four focused writer tests and four desktop tests also pass.
  • All 61 local Markdown links resolve; Python syntax and git diff --check pass.
  • Prior revision b56cd4e passed all six checks in run 42558679912, including both new actual-Tracker movie-clip load/save/fresh-reopen/native-reimport modes and 95.72% combined line coverage (8869/9266). That run predates the shorter-movie correction.
  • Final revision 4cf2b0f2e125c52518571334bc7d1138c51bfc43 passes all six required checks in run 42561178958: Windows, macOS, Linux, both setup jobs and 95.72% combined line coverage (8874/9271). Linux verifies both new movie-clip modes through MoTrack edit/native reopen/standard export, actual Tracker load/save/fresh reopen and native reimport. Review recommends approval on this exact revision; all findings are resolved.

Compatibility and review

The existing movie schema, constant-rate index checks, 500000 edited-range endpoint bound and destination-preservation guards remain. Numeric timing, filters, movie archives, rename/membership changes and broader schemas are still refused. No Java runtime dependency is added to MoTrack.

  • R03/R05 remain partial; plan, format, corpus and user guides updated.
  • Applied docs/code-review.md.
  • Documentation updated; no new user-facing strings, so translations are unchanged.
  • Distinguished local validation from final three-platform and actual-Tracker acceptance.

Includes merged status/guidance from #135 and test grouping from #138; targets main.

Copilot AI balanced review requested due to automatic review settings November 9, 2026 03:09
@mgradwohl
mgradwohl changed the base branch from port-status-merge-queue to main November 9, 2026 03:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Reopening an exported .trk leaves sourceFrameCount too low to restore the retained final frame; the completed movie index must refresh this bound, with a desktop regression covering expansion to all four frames.

1 open issue
What changed in this PR

Enables saving clip-range and stride edits for audited, indexed constant-rate linked movies while preserving the complete movie, original-frame measurements, and numeric timing.

Changes:

  • Extends the Tracker writer to accept movie clip start, stride, and count edits.
  • Adds writer, desktop, and corpus coverage for strided and single-frame clips, including complete-movie verification after Tracker resaves.
  • Updates compatibility documentation while keeping actual-Tracker acceptance and current-head platform CI explicitly pending.
File Description
tools/​corpus.py Adds movie clip acceptance modes and post-resave movie verification.
tests/​tracker_writer_test.cpp Tests movie range exports, preserved marks, and invalid bounds.
tests/​test_corpus.py Tests clip expectations and movie-reference/hash validation.
tests/​paired_workspace_test.cpp Extends desktop clip settings and paired-save coverage to movies.
tests/​corpus/​README.md Documents movie clip acceptance scenarios and pending validation.
tests/​corpus/​manifest.json Enables linked-movie clip round-trip cases.
tests/​corpus_probe.cpp Adds strided and single-frame movie export modes.
src/​tracker_writer.hpp Documents support for movie clip-range edits.
src/​tracker_writer.cpp Permits movie range changes through the shared clip writer.
README.md Describes linked-movie Clip Settings saving.
docs/​native-format.md Defines supported movie edits and validation limits.
docs/​migration-plan.md Records progress and remaining movie-range acceptance gates.

Review effort: Balanced

Comment thread src/tracker_writer.cpp Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Current-revision Tracker load/save, fresh-reopen, native-reimport, and three-platform checks remain pending, leaving movie clip-range compatibility unverified.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Replacing a linked movie with a shorter valid file can produce a saved MoTrack copy that cannot reopen because the updated frame count excludes the saved clip endpoint.

1 open issue

Review effort: Balanced

Comment thread src/main_window.cpp Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are identified for the scoped linked-movie clip-range saving changes.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@mgradwohl
mgradwohl merged commit 77dab68 into main Nov 9, 2026
7 checks passed
@mgradwohl
mgradwohl deleted the tracker-movie-clip-saving branch November 9, 2026 04:39
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.

2 participants