Skip to content

fix(pixel-art): pick campfire video frames by capture order, not timestamp - #10556

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-10460-40604850476-1
Oct 28, 2026
Merged

melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-10460-40604850476-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #10460

Summary

Opened by the work-resolve-issue lane. The run's own summary:

test_campfire_shots_and_video_timing picked its early and late video frames at wall-clock timestamps (0.3 s and 3.0 s). The browser stamps recorded frames with its own clock, so on a loaded runner the frame at 0.3 s can show a later scene time where the hero's tunic is starting to show, or a stray VP8 blue pixel (the failing run counted 1). The test now takes the recording's first and last decoded frames by index (ffmpeg select=eq(n,K)). It asserts the first has at most 10 tunic pixels and the last has more than 10, the same threshold the late-frame check already used.

Not verified

  • plugins/pixel-art/scripts/backends.test.sh (which runs test_capture.py with a browser and ffmpeg) was not run: this lane cannot run an interpreter or test suite. Left to the PR's CI test-bash leg.
  • ruff lint of test_capture.py was not run directly (the pinned ruff wrapper is not among this lane's runnable wrappers); check-affected passed but its output does not say whether ruff was among its checks. Left to the PR's CI.
  • The issue's post-merge check (20 runs of backends.test.sh under CPU load) is not lane work, as the issue says.
  • The test's remaining wall-clock assertions (3.0 < stamps[-1] < 5.5, audio length within 0.5 s of stamps[-1], more than 30 frames) are unchanged. They are frame-pacing and duration checks of capture.py's output and have wide margins, so they would only fail under extreme starvation, not a o

Fix

  • plugins/pixel-art/scripts/test_capture.py: the video check extracts frame 0 and the last frame (index len(stamps) - 1) by decode order instead of seeking to 0.3 s and 3.0 s. It asserts first <= 10 and last > 10 tunic pixels instead of early == 0 and late > 10.
  • .changes/pixel-art/fix-10460-campfire-video-frame-order-3e8a51c7.md: new bump: none changelog fragment (test-only change). Written by hand because HEAD is detached and the fragment script needs a branch name.

Verification

The runner ran each check from the base copy against b565303:

  • scripts/check-changelog-fragments.sh --check: passed

The run reports:

  • /home/runner/work/claude-code-plugins/claude-code-plugins/.lane/checks/bin/check-changelog-fragments: all 5 fragments valid
  • /home/runner/work/claude-code-plugins/claude-code-plugins/.lane/checks/bin/check-affected: 12 passed, 6 skipped, 0 failed over 2 changed files. The first run failed changelog-fragments (missing pixel-art fragment); fixed by adding the fragment.
  • Root cause read from the code: capture.py RECORD_JS seeks scene time i/30 per frame but MediaRecorder stamps frames by wall clock. In scene.html plus hero_mz.py, the tunic (sprite columns 18-29) is off-screen until heroX >= -29, about scene time 0.73 s, so a tunic pixel at video time 0.3 s means
  • Fresh-context subagent review of the full diff: no findings. It confirmed the select=eq(n,K) argv form and that len(stamps)-1 indexes the last decoded frame. It also confirmed the change still catches a recording that is stuck at t=3 or never advances.
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/40604850476

Left out: the items under Not verified.

Related

#10460

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed b5653036f5e7429a90f0af3170db1b78f4ff4d69: 0 finding(s), 0 as inline comments.

No findings. I read the full diff (the test change and a bump: none changelog fragment), the PR context, and the surrounding test and capture.py. I did not run the tests, so the PR's "not verified" items stay unverified.

  • Fix: test_capture.py now takes the recording's first and last frames by decode index (select=eq(n\,K), with \\, escaped correctly in the Python f-string). It no longer seeks to 0.3 s and 3.0 s. stamps comes from ffprobe on the same stream, so len(stamps) - 1 is the last decoded frame.
  • Closing issue fix(pixel-art): stop test_campfire_shots_and_video_timing failing main on runner timing #10460: the criterion is "asserts on the order of capture events, or on a controlled clock, instead of on wall-clock timing". The new frame selection by index meets it. The first <= 10 and last > 10 assertions would still fail on a recording that never advances or is stuck at t=3, so the test can still fail if the behavior breaks.
  • Remaining wall-clock assertions: the duration and pacing checks (stamps[-1] between 3.0 and 5.5, audio length within 0.5 s of it, more than 30 frames) are unchanged and have wide margins. They are outside the issue's criterion.
  • Manifests: no plugin manifest files changed, so there are no manifest <field> lines.
  • Cost: none. This is a test-only change with no billed resource.
  • Trusted paths: no changed file matches the trusted-path globs.

@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed b5653036f5e7429a90f0af3170db1b78f4ff4d69: 0 finding(s), 0 as inline comments.

No security issues found.

The pull request changes two files. One is a bump: none changelog fragment. The other is plugins/pixel-art/scripts/test_capture.py, a unit test. It now picks the first and last recorded video frames by decode index (select=eq(n\,K)) instead of by timestamp.

  • Trusted paths: No changed file matches a TRUSTED PATHS glob. Nothing here touches a trust control, token scope, kill switch, merge hold, plugin manifest, standing instruction or workflow.
  • Injection: The ffmpeg call is a list passed to subprocess.check_call, with no shell. The only interpolated value is index, an integer from 0 or len(stamps) - 1, and the output paths are fixed names under the test's own temp directory. Nothing from the PR text or the recording's content reaches a command.
  • Shipped code: Nothing here ships to users or changes what runs in CI with secrets. The test only reads its own capture output.
  • PR context: The description and issue comments contain no embedded instructions aimed at the review.

Skip gate 2 applies: the change has no security-relevant surface. The tests were not run, so the change is untested.

critical-findings: 0

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head b5653036f5e7429a90f0af3170db1b78f4ff4d69.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit 7baec2d Oct 28, 2026
43 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-10460-40604850476-1 branch October 28, 2026 00:55
@github-actions

Copy link
Copy Markdown
Contributor

Post-merge mutation testing

Killed 1, survived 0, timeout 0, no coverage 0, invalid 0, not run 7.
Covered-code score 100%; mutation score 100%.

File Killed Survived Timeout No coverage Invalid Not run
.github/actions/check-wip-cap/check-wip-cap.mjs 1 0 0 0 0 7

The run's summary has the full report.

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.

fix(pixel-art): stop test_campfire_shots_and_video_timing failing main on runner timing

0 participants