Skip to content

test: send protocol-compliant Kitty image frames - #29519

Merged
OrcaWin merged 1 commit into
mainfrom
OrcaWin/test-audit-kitty-producer-framing
Oct 16, 2026
Merged

OrcaWin merged 1 commit into
mainfrom
OrcaWin/test-audit-kitty-producer-framing

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

ELI5

Make the terminal image test send a valid Kitty image upload. Its blue RGB image currently puts 17,280 base64 bytes into one frame, while the protocol limits each frame to 4,096 bytes.

What Changed

Split the same 120×36 RGB24 blue image into five adjacent frames. Only the first carries image metadata; continuation frames carry continuation/quiet flags, and the final frame completes the upload. Preserve every image byte, surrounding output, completion marker and existing pixel/resource assertion. Add one two-row protocol contract test against the actual producer, covering both placeholder settings. No production code changes.

Why

Existing decoder and rendered-image tests do not enforce the producer's protocol limit. A byte-level guard catches malformed framing cheaply, while the existing Windows/WSL rendered checks remain responsible for actual display. Keeping RGB24 preserves format coverage that converting the blue image to PNG would lose.

This is a confirmed producer-contract defect. It is not a confirmed explanation for the earlier WSL missing-blue-image failures; those traces did not establish which stage lost the image.

Linked Issue

Maintainer-requested CI audit; this addresses a fixture defect encountered while validating #29304.

Visual Proof

Test producer only. Rendered Windows/WSL validation at this head passed all 12 native/WSL × GPU-off/on image cases. All 36 PNG screenshots and participation JSON were retained and independently reviewed; expected blue Kitty and other protocol/file-backed images were visible in all four configurations.

Testing

  • I manually tested these changes locally
  • Automated tests added/updated

Linux Node 24.21 / Bun 1.4.3, background launch. Original producer fails both new rows at the intended 17,280 > 4,096 assertion. Candidate plus actual addon continuation/memory sibling: eight cases pass, zero unhandled errors. Deliberate truncated-body and repeated-continuation-metadata controls each fail both rows at the intended byte/header assertions; source restored. Independent whole-output comparison collapses the five frames back to the original framing and proves every unrelated output byte identical for both placeholder settings. Decoded image remains exactly 12,960 RGB bytes; chunk lengths are 4,096/4,096/4,096/4,096/896.

Normal lint, changed-code quality, formatting and whitespace checks pass. Final local module observations: protocol suite 374 ms; addon memory suite 219 ms; combined command wall 2,247 ms. The original protocol suite fails, so these do not establish a speed comparison. No speedup claimed. Full exact-head PR run 38867869176 passed, including aggregate 116869440319 and all five clean unit shards. Hosted producer-contract suite: both cases passed, official module duration 377 ms (Node 24.19 / Bun 1.4.3). Explicit full-SHA Windows/WSL run 38868503747 passed all 12 image cases and nine WSL participation cases with zero skipped, unexpected or flaky cases and no retries. Explicit paired-runtime/memory run 38867992124 passed both selected cases. The initial short-ref dispatch 38867885503 failed during checkout before tests and was replaced by the full-SHA run. No local rendered app launched.

Review

Independent producer/caller/decoder/routing review informed the patch. Final independent preservation review approved committed producer/test bytes, protocol framing, complete unrelated-output preservation and controls.

Agent skill upstream boundary

  • Not applicable; no upstream skill source copied.

Notes

No application, SSH wire, folder-workspace or platform behavior changes. Native/WSL × GPU off/on, all image pixel thresholds, file-backed coverage and resource checks are unchanged. Framing does not control OS PTY packet boundaries or shorten the outer shell command.

Checklist

  • Small and focused
  • Behavior, mechanism and rationale explained
  • N/A visual proof explained
  • Self-reviewed; remote and platform impact considered
  • Focused local proof and changed checks pass
  • Exact-head full PR gate and Windows/WSL rendered validation pass

@coderabbitai

coderabbitai Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 2 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 22aa2e51-9fd1-4784-af56-254c6d7d9d35
📥 Commits

Reviewing files that changed from the base of the PR and between 4cba0b1 and c67d35a.

📒 Files selected for processing: 2
  • tests/e2e/helpers/terminal-inline-image-proof.ts
  • tests/e2e/terminal-inline-image-payload.unit.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@OrcaWin
OrcaWin merged commit 98457f6 into main Oct 16, 2026
44 of 45 checks passed
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