Skip to content

test(agent): cover malformed base64 update failure (re-carry onto main) - #16923

Closed
christian-byrne wants to merge 3 commits into
mainfrom
christian-byrne/prbase-3-fec-base64-test
Closed

christian-byrne wants to merge 3 commits into
mainfrom
christian-byrne/prbase-3-fec-base64-test

Conversation

@christian-byrne

Copy link
Copy Markdown
Contributor

Summary

Re-carry of the malformed-base64 characterization test from the frozen integration base onto main.

Changes

  • What: Prove parseServerDocFrame throws for structurally valid doc_update data containing malformed base64, and prove DocFrameClient dispatches no doc_update event.
  • Cherry-picked with -x from 7d9e4fb4e2722b92d77293f98566cc777068ccd9 (original authorship preserved).
  • Base retarget note: the original test(agent): cover malformed base64 update failure #16660 was based on the frozen nathaniel/agent-panel-v1 branch. On current main the module is still at src/workbench/extensions/agent/crdt/docFrameClient.ts — no import-path retarget was needed. Main's decodeBase64 (atob, no try/catch) still throws on malformed base64, so the characterization applies as-is. No equivalent malformed-base64 test exists on main (checked docFrameClient.test.ts and the file list — the base64 test file in fix(agent): reject malformed document frames #16484 is not merged).

Supersedes #16660 (dead base, per the prbase re-carry sweep).

Evidence

$ pnpm test:unit src/workbench/extensions/agent/crdt/docFrameClient.test.ts
 Test Files  1 passed (1)
      Tests  7 passed (7)

$ pnpm exec oxfmt --check src/workbench/extensions/agent/crdt/docFrameClient.test.ts
All matched files use the correct format.

$ pnpm exec eslint src/workbench/extensions/agent/crdt/docFrameClient.test.ts
Exit code 0. No diagnostics emitted.

$ pnpm typecheck  (vue-tsc --noEmit)
Exit code 0.

Original lane attribution: lane-fec-base64-1 (test-only, authored by Christian Byrne).

@christian-byrne
christian-byrne requested a review from a team September 4, 2026 04:03
@vercel

vercel Bot commented Sep 4, 2026

Copy link
Copy Markdown

Deployment failed for project comfy-home-v1 with the following error:

You don't have permission to create a Preview Deployment for this Vercel project: comfy-home-v1.

View Documentation: https://vercel.com/docs/accounts/team-members-and-roles

@christian-byrne christian-byrne self-assigned this Sep 4, 2026
@coderabbitai

coderabbitai Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

  • Run on-demand review

On-demand reviews are free for the next 30 days. After that, they cost $0.25 per reviewed file.

Or wait 1 minute for your next included review.

Check out review usage here.

View limit details

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

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: aded3f98-b01f-40ad-9e0f-5e574b7fcb9d

📥 Commits

Reviewing files that changed from the base of the PR and between 1eede22 and 478661b.

📒 Files selected for processing (1)
  • src/workbench/extensions/agent/crdt/docFrameClient.test.ts

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

@github-actions

github-actions Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 09/10/2026, 02:31:27 AM UTC

Links

🎭 Playwright: ✅ 1938 passed, 0 failed · 1 flaky

📊 Browser Reports
  • chromium: View Report (✅ 1917 / ❌ 0 / ⚠️ 1 / ⏭️ 13)
  • chromium-2x: View Report (✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • chromium-0.5x: View Report (✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-chrome: View Report (✅ 18 / ❌ 0 / ⚠️ 0 / ⏭️ 0)

@github-actions github-actions Bot added the risk:high PR risk grade (advisory shadow check; grader-owned) label Sep 4, 2026
@codecov

codecov Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@            Coverage Diff             @@
##             main   #16923      +/-   ##
==========================================
+ Coverage   81.82%   83.24%   +1.41%     
==========================================
  Files        2518     2064     -454     
  Lines      128671   120437    -8234     
  Branches    33260    31225    -2035     
==========================================
- Hits       105290   100253    -5037     
+ Misses      22847    20004    -2843     
+ Partials      534      180     -354     
Flag Coverage Δ
e2e 67.03% <ø> (-0.01%) ⬇️
unit 77.99% <ø> (-0.02%) ⬇️
website-unit ?

Flags with carried forward coverage won't be shown. Click here to find out more.
see 457 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@christian-byrne
christian-byrne force-pushed the christian-byrne/prbase-3-fec-base64-test branch from eea6ca9 to 478661b Compare September 10, 2026 02:28

@DrJKL DrJKL 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.

Verdict: changes requested

I found that this test-only change is already covered by tests on the PR's current base. docFrameClient.base64.test.ts verifies malformed base64 returns null without throwing, and the existing reports the first malformed inbound frame per type test sends malformed base64 through DocFrameClient and verifies that no doc_update is dispatched. Both exercise the production parser; only telemetry is mocked. I also confirmed with mutation probes that the base64 test fails if invalid input is accepted and the client test fails if an invalid frame is dispatched.

The original throwing behavior was replaced by #16668 before this branch point. Since the added test has no distinct falsifier, there is no remaining regression coverage to merge after removing it.

@github-actions github-actions Bot added risk:medium PR risk grade (advisory shadow check; grader-owned) and removed risk:high PR risk grade (advisory shadow check; grader-owned) labels Sep 12, 2026

@DrJKL DrJKL 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.

Verdict: ready to close

The prior finding is addressed. Commit 05337e0248 removes the duplicate malformed-base64 test, and the current base-to-head diff is empty. The existing decoder and client tests still cover malformed input rejection and non-dispatch through production code; both focused files pass, with 14 tests total.

The PR description is now stale: it still says this branch carries a test, that parseServerDocFrame throws, and that equivalent coverage is absent from main. The current implementation returns null without throwing, and main already contains the decoder and dispatch coverage. Since there is no remaining change to merge, this PR can be closed.

@christian-byrne
christian-byrne deleted the christian-byrne/prbase-3-fec-base64-test branch September 14, 2026 15:15
@christian-byrne

christian-byrne commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor Author

Closing as superseded — this branch no longer carries any change: head 05337e0248 is tree-identical to main (compare API: zero changed files), and the malformed-base64 coverage already lives on main.

Full context
  • Verified live this pass at exact head 05337e02482232bfd42cc3973daed7fca45be501: compare/main...head reports ahead_by: 3 (retarget merge commits only) and an empty file list, so base-to-head diff is empty.
  • Coverage already on main, per the review: docFrameClient.base64.test.ts (malformed base64 returns null without throwing) and the reports the first malformed inbound frame per type case in docFrameClient.test.ts (no doc_update dispatched through production parsing).
  • History: this PR re-carried test-only commit 7d9e4fb4e from the closed slice PR #16660 onto main on 2026-09-04. The reviewer found the carried test duplicated coverage already on the base; it was removed in 05337e0248, leaving the empty diff, and the follow-up review verdict was ready to close — honored here.
  • The source PR #16660 was already closed as superseded on 2026-09-04. No merge is needed; nothing of value is lost. Head branch christian-byrne/prbase-3-fec-base64-test deleted.

@DrJKL DrJKL added the agent Comfy Agent product, integration, tests or product documentation label Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Comfy Agent product, integration, tests or product documentation flag-exempt risk:medium PR risk grade (advisory shadow check; grader-owned)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants