Repository navigation
Conversation
2e9a62c to
e4f07a9
Compare
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
1 issue found across 2 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/spf/src/core/signals/effect.ts">
<violation number="1" location="packages/spf/src/core/signals/effect.ts:17">
P3: This makes every flush scan every live effect, even when only one effect is pending. Keep registration order while iterating only the pending effects, for example by assigning each effect a registration index and sorting the pending list by that index before running it.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
|
|
||
| for (const c of pending) { | ||
| pending.delete(c); | ||
| for (const c of effects) { |
There was a problem hiding this comment.
P3: This makes every flush scan every live effect, even when only one effect is pending. Keep registration order while iterating only the pending effects, for example by assigning each effect a registration index and sorting the pending list by that index before running it.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At packages/spf/src/core/signals/effect.ts, line 17:
<comment>This makes every flush scan every live effect, even when only one effect is pending. Keep registration order while iterating only the pending effects, for example by assigning each effect a registration index and sorting the pending list by that index before running it.</comment>
<file context>
@@ -1,21 +1,22 @@
- for (const c of pending) {
- pending.delete(c);
+ for (const c of effects) {
+ if (!pending.has(c)) continue;
+
</file context>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e4f07a95b7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| for (const c of pending) { | ||
| pending.delete(c); | ||
| for (const c of effects) { |
There was a problem hiding this comment.
Update ordering documentation with the scheduler
For future scheduler and reactor maintenance, this loop now derives registration order from the live effects set rather than from Watcher.getPending(), but internal/design/spf/actor-reactor-factories.md:418-431, internal/design/spf/decisions.md:33-35, and internal/design/spf/signals.md:453-465 still say this load-bearing guarantee depends on watcher insertion order, while internal/design/spf/text-track-architecture.md:473-484 still treats explicit ordering as an open option. Those explanations are now factually wrong about the mechanism this fix relies on, so update them as part of this scheduler change.
AGENTS.md reference: AGENTS.md:L16-L16
Useful? React with 👍 / 👎.
Replacing a MoQ player in the same page can leave its renderer idle while its subscriber receives decodable frames. Destroying the old composition calls
Watcher.unwatch(), which swaps the last watched effect into the removed slot and can run the replacement renderer binding before setup. The binding returns without tracking the subscriber and never wires the renderer.Keep live effects in registration order independently of watcher storage order. Disposing an effect also removes it from the flush iteration, so an earlier effect cannot cause a disposed body to run again.
Targets
mmcc/moqat8bf5170e1directly. One commit, two files: the shared SPF scheduler and two regression tests. No publisher commits or publisher dependency are included. Supersedes a-bro#1.Validation on this base:
mmcc/moqscheduler (2 failed, 3 passed).pnpm exec vp run '@videojs/spf#build') passes; focusedvp checkhas zero errors and three existing warnings.The same scheduler change previously passed a separate 11/11 live workflow gate on the broader publisher integration tree, including normal H.264 browser publication, actual MoQ20 playback, same-page replacement and rebind after gateway renewal. That supplemental integration evidence is recorded in https://github.com/muxinc/relay-dev/pull/255; it is distinct from the current-base test run above.