Skip to content

test(studio): the sealed parity gate counts a clip list read again giving its clips their ids - #9091

Merged
miguel-heygen merged 2 commits into
mainfrom
test/sealed-parity-clip-ids
Nov 29, 2026
Merged

miguel-heygen merged 2 commits into
mainfrom
test/sealed-parity-clip-ids

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

What

The sealed parity gate now counts a new behaviour: a clip list read again with the same clips gives them their ids on the timeline. The test runs in both modes.

Why

0.9.106 shipped a regression that only a sealed preview showed. A sealed film can post its clip list before its page loads, with clips known only by position. When the list was read again with the clips' real ids, Studio judged it unchanged and kept the old one, so a clip could not be found by id. #9076 fixed it for 0.9.107. No parity row checked this, which is how the regression reached a release. With this row, the gate fails if either mode drops such a re-read.

Related work

Follow-up to #9076.

How

  • useTimelinePlayer.reloadedTimeline.test.ts: in each mode, the timeline holds clip a by position only, as an early read leaves it. A reloaded film then answers with the same single clip. After its first state tick the timeline must hold a with its element id. reloadedFilm takes the film and its clip list as arguments, so the existing case is unchanged.
  • manifest.json: a new row, clip-ids-on-reread, lists the case. This PR adds only that row.

Test plan

  • fails without the fix: useTimelinePlayer.reloadedTimeline.test.ts ("gives a clip its ids when its list is read again with the same clips") fails in both modes with timelinePlayerSync.ts as it was before fix(studio): a clip list read again keeps every change, so sealed clips get their ids #9076.
  • The whole parity job, locally: check (40 behaviours, 2 without a test yet), run unsealed, run sealed, compare and gate pass, with 36 of 40 at parity. The other two not at parity are unrelated: the edit accuracy bench is measured only in CI, and the 200,000-character typing test times out sealed on this machine while main's CI has that row at parity.
  • With HF_PARITY_MODE unset, the changed file, timelinePlayerSync.test.ts and useTimelinePlayer.test.ts pass 63 tests, 3 runs in a row.
  • Studio tsc --noEmit, oxlint, oxfmt and the comment ratchet are clean.
  • Unit tests added/updated
  • Manual testing performed: the parity job above
  • Comments follow CONTRIBUTING.md "Comments"

No visible change

Tests and the parity manifest only.

@terencecho terencecho left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 — Make the reread differ only in clip identity. At packages/studio/src/player/hooks/useTimelinePlayer.reloadedTimeline.test.ts:128, the starting row also differs in fields such as label, kind, and authoredTrack. Both modes still passed when I removed every identity comparison added by #9076. Match the unrelated fields across the reread and assert the scoped key alongside domId. With that fixture, both modes passed on the current implementation and failed with the identity comparison removed.

63 focused Studio tests and 12 parity-runner tests passed. The local check used the test harness. Real-browser playback was unverified.

— tai (automated review)

@miguel-heygen

Copy link
Copy Markdown
Collaborator Author

Fixed in a24860e. The clip the timeline starts with now matches the re-read in every field except the ones that name it on its page.

  • A_BY_POSITION is clip a exactly as both modes derive it from the film (label, kind, authoredTrack, stackingContextId, compositionScope, zIndex and the rest), without key, domId and selector. Both modes derive the same clip.
  • The case asserts the whole clip: A_BY_POSITION plus key: "index.html#a", domId: "a" and selector: "#a".
  • With the current comparison skipping key, domId, hfId, selector, selectorIndex and sourceFile, the case fails in both modes. It also fails in both with timelinePlayerSync.ts as it was before fix(studio): a clip list read again keeps every change, so sealed clips get their ids #9076. Unbroken, it passes in both.
  • The changed file, timelinePlayerSync.test.ts and useTimelinePlayer.test.ts pass 63 tests, 3 runs in a row.

@terencecho terencecho left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The revised reread fixture holds the other clip fields constant and asserts the whole row, including the scoped key, domId, and selector. Both modes failed at that assertion with the old comparator and with only the identity comparisons removed.

63 targeted Studio tests and 12 parity-runner tests passed. The new manifest row reported parity from the two mode-specific reports. The full browser matrix was unverified locally, and the Studio checks were still running.

— tai (automated review)

@miguel-heygen
miguel-heygen added this pull request to the merge queue Nov 29, 2026
Merged via the queue into main with commit 05b34df Nov 29, 2026
76 checks passed
@miguel-heygen
miguel-heygen deleted the test/sealed-parity-clip-ids branch November 29, 2026 12:47
@miguel-heygen miguel-heygen mentioned this pull request Nov 29, 2026
5 of 6 tasks
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