Repository navigation
fix(app): apply queued commands before frame advances - #1033
Conversation
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. |
Regression:
|
| ROM | Status | Details | Diff |
|---|---|---|---|
| jagniccc | â PASS | 0 pixels differ | - |
| yarc | â PASS | 0 pixels differ | - |
| jagniccc (determinism) | â PASS | identical across runs | - |
| yarc (determinism) | â PASS | identical across runs | - |
| jagniccc (frameskip) | â PASS | skip=0 matches skip=3 | - |
| yarc (frameskip) | â PASS | skip=0 matches skip=3 | - |
| jagniccc (save state) | â PASS | round-trip matches | - |
| yarc (save state) | â PASS | round-trip matches | - |
| jagniccc (rewind) | â PASS | rewind matches | - |
| yarc (rewind) | â PASS | rewind matches | - |
Platform: Linux aarch64
Updated by CI at 2026-10-20T01:35:34.867Z
Regression:
|
| ROM | Status | Details | Diff |
|---|---|---|---|
| jagniccc | â PASS | 0 pixels differ | - |
| yarc | â PASS | 0 pixels differ | - |
| jagniccc (determinism) | â PASS | identical across runs | - |
| yarc (determinism) | â PASS | identical across runs | - |
| jagniccc (frameskip) | â PASS | skip=0 matches skip=3 | - |
| yarc (frameskip) | â PASS | skip=0 matches skip=3 | - |
| jagniccc (save state) | â PASS | round-trip matches | - |
| yarc (save state) | â PASS | round-trip matches | - |
| jagniccc (rewind) | â PASS | rewind matches | - |
| yarc (rewind) | â PASS | rewind matches | - |
Platform: Darwin arm64
Updated by CI at 2026-10-20T02:19:23.716Z
ð Kimi reviewVerdict: The fix is correct and the regression test genuinely discriminates old vs new behavior; one edge-case defect in the new return path. Findings:
Notes on things I checked and am not flagging:
No other substantive issues. |
|
An automated review was posted after this notice; the reviewer is working again. |
Regression:
|
| ROM | Status | Details | Diff |
|---|---|---|---|
| jagniccc | â PASS | 0 pixels differ | - |
| yarc | â PASS | 0 pixels differ | - |
| jagniccc (determinism) | â PASS | identical across runs | - |
| yarc (determinism) | â PASS | identical across runs | - |
| jagniccc (frameskip) | â PASS | skip=0 matches skip=3 | - |
| yarc (frameskip) | â PASS | skip=0 matches skip=3 | - |
| jagniccc (save state) | â PASS | round-trip matches | - |
| yarc (save state) | â PASS | round-trip matches | - |
| jagniccc (rewind) | â PASS | rewind matches | - |
| yarc (rewind) | â PASS | rewind matches | - |
Platform: Linux x86_64
Updated by CI at 2026-10-20T02:42:31.380Z
ð Kimi reviewVerdict: the fix is sound â publishing the budget through the command FIFO closes the drain/budget-read race correctly. One minor edge-case finding, nothing blocking. Findings
Checked and clear
One description-vs-code note, not a defect: the follow-up says sleep "still asserts its no-early-return contract," but |
App packagesBuilt from
Updated by CI at 2026-10-20T05:42:08.653Z |
A frame-advance request could overtake an earlier queued controller/option change if it arrived between the ownerâs command drain and frame-budget read. This caused the Pro Controller assertion in #1031âs ThreadSanitizer job to intermittently run a frame with the old keypad mapping.
Publish the advance budget through the same FIFO as commands, and calculate its completion target on the owner. A gated regression waits for the request to be published before releasing the owner; it fails against the old implementation and passes with the fix. Existing in-flight-frame accounting remains covered.
Validation on Studio: 54/54 ThreadSanitizer tests and 158/158 release tests passed. Scheduler and real-core/controller tests each passed 15 consecutive sanitizer runs; after tightening the regressionâs publication handshake, the scheduler test was rebuilt and checked again. Independent review found no remaining issues. No sanitizer suppressions.
Refs #967
CI follow-up: the macOS runner exposed scheduler-sensitive timing assertions. The wait-hook test now holds its command until three callbacks arrive (five-second failure deadline), including a deliberately slow first UI callback. Sleep still asserts its no-early-return contract; upper sleep latency stays in the informational timer report because OS scheduling/coalescing is outside that contract. A fast queued call is checked as fast only when its measured wait is below the busy threshold.
Validation: reproduced both original macOS failures with injected coarse sleep/slow callback; updated test passes those conditions, plus 10/10 TSan runs. Fault controls fail as intended when sleep returns immediately or the wait hook invokes only once. Independent review: no findings.