Skip to content

shape_debug: grade rotation-pick samples on their own frame's pick - #5226

Merged
jakildev merged 1 commit into
masterfrom
claude/5219-rotation-pick-frame-wait
Nov 21, 2026
Merged

jakildev merged 1 commit into
masterfrom
claude/5219-rotation-pick-frame-wait

Conversation

@jakildev

Copy link
Copy Markdown
Owner

Summary

--rotation-pick-test sweep|tie|cube used to grade each sample on whatever pick record was served one render after the sample's pose was written. On OpenGL, which keeps frames in flight, that record is the previous sample's, so the cube probe failed 140/288. Now each sample stores the presenting frame id of the render that wrote its pose. The probe holds that pose and grades the sample on the first served record whose frameId_ reaches that id. Stale records and records that don't arrive within a 16-render budget count as misses and get their own log lines. The ROTATION-PICK <mode> frames=… result=… summary contract is unchanged. Only the probe changed: the engine pick path and gui mode are untouched.

Screenshots

No visual change: the diff touches only the headless --rotation-pick-test grading path and never runs in a normal or --auto-screenshot session.

Acceptance evidence

Host: Windows 10, NVIDIA RTX 3060 Ti, windows-debug, OpenGL. Head 77b7b0f48. The master control is the same tree with main.cpp taken from origin/master eea79792d.

Criterion Check run Observed
1. GL cube PASS, run 1 fleet-run --timeout 180 IRShapeDebug --rotation-pick-test cube frames=288 hits=288 misses=0 result=PASS, RESULT=CLEAN exit=0 (waits max=1 total=287)
1. GL cube PASS, run 2 same frames=288 hits=288 misses=0 result=PASS, RESULT=CLEAN exit=0 (waits max=1 total=288)
1. GL cube PASS, run 3 same frames=288 hits=288 misses=0 result=PASS, RESULT=CLEAN exit=0 (waits max=1 total=285)
1. Master control same, master main.cpp frames=288 hits=142 misses=146 result=FAIL, RESULT=CRASH exit=2
2. GL sweep fleet-run --timeout 180 IRShapeDebug --rotation-pick-test sweep frames=360 hits=360 misses=0 result=PASS, RESULT=CLEAN exit=0
2. GL tie, three runs, identical tallies fleet-run --timeout 600 IRShapeDebug --rotation-pick-test tie ×3 All three: yaw 20 2018/1259/566, 70 1908/1288/647, 160 1900/1289/654, 250 1894/1254/695; frames=15372 hits=15372 misses=0 result=PASS, RESULT=CLEAN; wall 59 s / 60 s / 63 s
3. Extra-lag tolerance, head fleet-run --timeout 180 IRShapeDebug --rotation-pick-test cube --config-preset configs/presented-pick-previous.lua frames=288 hits=288 misses=0 result=PASS (waits max=2 total=576)
3. Extra-lag tolerance, master same, master main.cpp frames=288 hits=136 misses=152 result=FAIL, exit 2
4. Grading bites: shifted expected (local mutation, not committed) cube, each sample graded against samples_[previous - 1].expected_ frames=288 hits=141 misses=147 result=FAIL, exit 2
4. Grading bites: unreachable frame id (local mutation, not committed) cube, sampleFrameId_ = UINT64_MAX frames=288 hits=0 misses=288 result=FAIL, exit 2; waits max=16 total=4608 timeouts=288; 19 s wall, inside --timeout 180
5. gui mode unchanged python3 scripts/gui-verify.py IRShapeDebug -- --rotation-pick-test gui 8/8 assertions passed
5. macOS cube with and without the preset; tie preset tallies equal the no-preset tallies Mac fleet-run arms unverifiable on windows: Metal host. Deferred as smoke debt per the issue's ## Plan corrections item 1; not merge-gating
Reviewer notes

Plan departures

  • Decision 5 leaves the wait statistics to the implementer. They go on a separate ROTATION-PICK waits max= total= timeouts= line, printed before the unchanged summary line.
  • Decision 3 (a stale record is a miss) also covers the tie tallies: they count only graded records (completed and non-stale), so a timed-out or stale record never enters the nearer/farther/background tallies.

Notes for reviewer

Closes #5219

🤖 Generated with Claude Code

The sweep, tie and cube rotation-pick probes graded each sample on
whatever pick record was served one render after its pose was written.
On OpenGL, which keeps frames in flight, that record belongs to the
previous sample, so the cube probe failed 140/288.

Each sample now stores the presenting frame id of the render that wrote
its pose, holds the pose, and is graded on the first served record whose
frame id reaches it. A stale record or one that misses a 16-render wait
budget counts as a miss with its own log line; wait statistics go on a
separate ROTATION-PICK waits line and the summary contract is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jakildev jakildev added fleet:wip Work in progress — not ready for review fleet:author-claude Implementation last authored by Claude; route review to Codex fleet:authored-on-windows PR was opened from a Windows (MSYS2) host and removed fleet:wip Work in progress — not ready for review labels Nov 20, 2026

@jakildev jakildev left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Review — shape_debug: grade rotation-pick samples on their own frame's pick

Verdict: approve

The probe now keys its one-read completion and grading decision to the pose-writing frame, holds the pose while awaiting that record, and bounds the no-record path; I found no correctness defect in the scoped change.

Acceptance (issue #5219)

4 of 5 met. The Windows GL cube, sweep, tie, extra-lag, and both negative-control criteria are evidenced in the PR. The Windows GUI arm is 8/8; the macOS cube/preset/tie arms are explicitly deferred smoke debt in the issue's plan corrections, so they are unverifiable here rather than unmet.

Checked

  • Read the complete PR and issue #5219 threads, the changed probe and design-contract context, and the MouseTrixelPick readback API.
  • Confirmed the pending branch reads exactly one pick record, uses its frameId_ for both completion and grading, and does not advance pose/input while waiting.
  • Confirmed the timeout path records a miss and the tie tallies only count completed, non-stale records.
  • CI: completed format/header/instruction/whitespace and PR-lint checks are successful; linux-build and aggregate all-checks are still in progress, so unread.
  • Local fleet-build --target IRShapeDebug was not run: the runtime aborted it before dispatch and provided no terminal build result.

🤖 Reviewed by Codex (GPT-5; review-pr skill)
Opus recheck required: the frame-keyed probe exercises asynchronous GPU readback completion semantics.

@jakildev jakildev added fleet:needs-opus-recheck Sonnet flagged this PR for Opus recheck before merge and removed fleet:reviewing-mac-pool-2 labels Nov 20, 2026

@jakildev jakildev left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Review — shape_debug: grade rotation-pick samples on their own frame's pick

Verdict: approve

Sonnet flagged asynchronous GPU readback completion semantics; on closer read I confirm the probe respects them: it copies one completed record per attempt, keys completion to the pose-writing frame, and holds that pose until the accepted record or bounded timeout.

Acceptance (issue #5219)

4 of 5 met; 0 unmet; 1 unverifiable. The Windows GL cube, sweep, tie, extra-lag, negative-control, and GUI evidence satisfy the executable criteria. The macOS cube/preset/tie arms remain explicitly deferred, non-merge-gating smoke debt under the issue's plan corrections.

Checked

  • Read the complete PR and issue threads, the changed probe and design contract, and the MouseTrixelPick producer, history, resolve, and frame-stamping paths.
  • Confirmed tickRotationPickSweep performs one draining read, never retains GPU-backed storage, rejects stale records, excludes ungraded records from tie tallies, and cannot wait without bound.
  • Detached fleet-build --target IRShapeDebug: fleet-jobs: 20261120T035309Z-build-72578f succeeded exit=0.
  • CI: all completed checks are green; linux-build and aggregate all-checks are still pending, so unread.

🤖 Reviewed by Codex (GPT-5; review-pr skill)

@jakildev jakildev added fleet:approved Fleet reviewer approved — ready for human merge and removed fleet:needs-opus-recheck Sonnet flagged this PR for Opus recheck before merge fleet:reviewing-mac-pool-2 labels Nov 20, 2026
@jakildev
jakildev merged commit 4d8ef66 into master Nov 21, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fleet:approved Fleet reviewer approved — ready for human merge fleet:author-claude Implementation last authored by Claude; route review to Codex fleet:authored-on-windows PR was opened from a Windows (MSYS2) host

Projects

None yet

Development

Successfully merging this pull request may close these issues.

shape_debug: the rotation-pick cube probe grades a GL pick one render after the sample and reads the previous sample's owner

1 participant