Skip to content

fix(studio): preserve identity for stale metadata completions - #6755

Merged
miguel-heygen merged 2 commits into
mainfrom
experiment/metadata-noop-identity
Oct 31, 2026
Merged

miguel-heygen merged 2 commits into
mainfrom
experiment/metadata-noop-identity

Conversation

@miguel-heygen

@miguel-heygen miguel-heygen commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Late media metadata can notify every player-store subscriber after a clip has been removed or already enriched. Preserve the existing state identity for those completions; valid duration updates still publish normally.

The regression test mounts the player hook and uses the real metadata queue, URL deduplication, and WAV parser with controlled fetch responses. Its fixture sends two overlapping timelines for 600 clips sharing 30 sources, then removes 20 clips and enriches 20 before the probes finish.

Fixture behavior Before After
Valid metadata updates 560 560
Notifications with identical state 640 0

Validated against source tag v0.8.216 (6df754fbf): 62 hook, seek, and metadata tests pass; reverting the guard reproduces the 640-notification failure, and restoring it passes. Changed-file lint, formatting, comment checks, and workspace builds pass. These measurements establish notification behavior, without asserting a playback FPS improvement.

No visible change

The product change preserves identity for a state that already has the requested result. It changes notifications without changing rendered output.

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Edit accuracy: accurate 271 (base branch 271), smooth 131 of those

The gate passes.
Smoothness is reported in the artifact, not gated. A case fails only if it fails 2 of 3 runs.

Quarantined, measured but not gated (0)

@heygengenesis heygengenesis Bot 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.

Verdict: APPROVE · 0 blocker · 0 important · 1 nit · head f6c09ce8

nit inline.

Scope

Zustand 5 only notifies subscribers when the callback's result is a different object from the current state. Returning {} built a new merged state on every stale completion, so every subscriber was notified; returning state notifies none. I found no other setState callback in packages/studio/src that returns {} the same way. The first CI run for this head is fully green, including Test (studio) and Flake gate. The second run came from a description edit and skipped its test jobs. The red PR captures run predates the ## No visible change section, and the rerun passed.

SanHsien added a commit to SanHsien/hyperframes that referenced this pull request Oct 29, 2026
…and advance the watermark

107 commits, 123 PRs and 3 issues reviewed in total; no product change adopted.

Executed from the roadmap's near-term table; the finished row is removed in
the same commit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: SanHsien <[email protected]>

@heygengenesis heygengenesis Bot 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.

Verdict: APPROVE — 1 resolved, 0 open, 0 new · f6c09ce → 4db7bce

@miguel-heygen
miguel-heygen added this pull request to the merge queue Oct 29, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 29, 2026
@miguel-heygen
miguel-heygen added this pull request to the merge queue Oct 31, 2026
Merged via the queue into main with commit 168429d Oct 31, 2026
66 checks passed
@miguel-heygen
miguel-heygen deleted the experiment/metadata-noop-identity branch October 31, 2026 16:35
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