Skip to content

test(mobile): pin the decoded screencast frame with the base64 it now carries (OTA phase C, C6) - #21769

Merged
Jinwoo-H merged 1 commit into
mainfrom
fix-c6-decoded-frame-b64-pins
Sep 20, 2026
Merged

Jinwoo-H merged 1 commit into
mainfrom
fix-c6-decoded-frame-b64-pins

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​9 $\color{#cf222e}{\Huge{\mathbf{−}}}$​2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​7
Prod 0 0 0 0

Summary

Main is red at 6f0fb3fe39 on two mobile tests: bridge-host-screencast.test.ts "reconstructs the frame the native listener was handed" and bridge-screencast-encoder.test.ts "carries every metadata field, the format and the screencast seq". A semantic merge: C6.1 (#21758) pinned the decoded frame with an exact toEqual, and C6.2 (#21754) made decodeBridgeScreencastFrame carry the wire's b64 on the frame so the page's data URI can reuse it (pinned in bridge-rpc-client-frames.test.ts). Each PR was green against the main it branched from; their squashes together are not.

Test-only: the two pins stay exact and gain b64, spelled out as the encoded string ('AQID' for bytes 1, 2, 3; the wire's own b64 in the host test), not expect.any. No product code changes.

Verified

Reproduced on pristine origin/main 6f0fb3fe39 (2 failed, 25 passed); with this change both files pass (27), mobile tsc 0, tests-typecheck ratchet 0, oxlint clean, oxfmt applied. Found by the C6.3+C6.4 lane while merging main into #21760.

Part of the mobile OTA plan (Phase C). Reference PR #13386, never merged.

… carries (OTA phase C, C6)

C6.1 (#21758) pinned the frame `decodeBridgeScreencastFrame` hands back with an exact
`toEqual`; C6.2 (#21754) made that decoder carry the wire's `b64` on the frame so the page's
data URI can reuse it. Each PR was green against the main it branched from, and their
squashes together red two of C6.1's cases on main. The pins stay exact and gain the field,
with the encoded string spelled out rather than wildcarded.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
@coderabbitai

coderabbitai Bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 2ec16fcc-712f-4389-9b98-cce4f57c1adc

📥 Commits

Reviewing files that changed from the base of the PR and between 6f0fb3f and 1755133.

📒 Files selected for processing (2)
  • mobile/src/mobile-web-shell/bridge-host-screencast.test.ts
  • mobile/src/mobile-web-shell/bridge/bridge-screencast-encoder.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review.


📝 Walkthrough

Walkthrough

The screencast tests now verify that decoding preserves the original base64 payload in addition to frame data, metadata, and image bytes.

Area Change
Frame reconstruction Expects the decoded frame to include the wire base64 value.
Encoder round trip Requires the decoded image payload to equal AQID.

Priority: ⬇️ Low

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the problem, scope, implementation, and verification results. However, it does not follow the required template and omits required sections such as ELI5, What Changed, Why, Li… Rewrite the description using all required template sections. Add an ELI5 explanation, explicit before-and-after behavior, the reason for the approach, a valid Fixes #... issue reference, N/A with a reason for Visual Proof, testing step…
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the mobile screencast test change and the added base64 assertion. It is specific and related to the main change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the problem, scope, implementation, and verification results. However, it does not follow the required template and omits required sections such as ELI5, What Changed, Why, Linked Issue with a Fixes reference, Visual Proof or N/A, Testing checkboxes, AI Disclosure, Review, Notes, and Checklist.

Resolution

Rewrite the description using all required template sections. Add an ELI5 explanation, explicit before-and-after behavior, the reason for the approach, a valid Fixes #... issue reference, N/A with a reason for Visual Proof, testing steps and platform details, AI disclosure if applicable, review notes, the upstream-boundary declaration, and the required checklist statuses.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR

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.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes — test-only repair for the semantic merge that reddened main @ 6f0fb3fe39; no product code changes.

  • Host screencast pin updated — bridge-host-screencast.test.ts now expects { ...frame(41, IMAGE), b64: binary?.b64 }, matching the b64 that decodeBridgeScreencastFrame gained in C6.2 while keeping image/metadata/seq exact.
  • Encoder pin made exact — bridge-screencast-encoder.test.ts asserts b64: 'AQID' for bytes [1,2,3] on the decoded side, verified against the base64 alphabet, instead of letting a wildcard absorb a re-encode.

Verified by running both files (pnpm --dir mobile exec vitest run …): 2 files, 27 tests pass. I also checked the other mobile tests that touch decoded frames or b64; the remaining decodeBridgeScreencastFrame assertions compare ?.image or round-trip the pair, so no other stale exact pins are left behind.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@Jinwoo-H
Jinwoo-H merged commit 4e9d5b5 into main Sep 20, 2026
25 checks passed
@Jinwoo-H
Jinwoo-H deleted the fix-c6-decoded-frame-b64-pins branch September 20, 2026 08:51
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