Repository navigation
fix(ui): prevent Node-only imports from breaking browser tests - #190089
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs changes before merge. What this changesThis PR separates Node-only transcript normalization from browser-safe payload ownership and updates normalization callers. Example: Chromium imports the transcript media reader for a message containing /synthetic/attachment.png.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenancePossible regression — probable (reviewed change; known regression link). No predecessor PR is attributed. Merge readiness⛔ Needs changes before merge - 2 items remain Keep open: this maintainer-authored PR repairs a current browser import failure, but its benchmark cutover breaks frozen-baseline measurements. Priority: P2 Before merge
Findings
Provenance
Tests
Agent review detailsHow this fits togetherBrowser transcript readers consume shared media helpers, while server-side append owners normalize and seal payloads before persistence; both reuse the same ownership registry. flowchart LR
A[Browser transcript reader] --> B[Shared media helpers]
B --> C[Payload ownership registry]
D[Session append owner] --> E[Node JSON normalizer]
E --> C
E --> F[Transcript persistence]
Technical reviewBest possible solution: Keep the shared browser-safe ownership registry and make the benchmark select and instrument the normalizer actually present in each frozen snapshot. Do we have a high-confidence way to reproduce the issue? Source traces browser message extraction through media-facts into the Node-only normalizer on main, matching the reported Chromium import failure; this read-only review executed no target code. Is this the best way to solve the issue? Moving normalization preserves one ownership registry and the existing serialization behavior, but the dynamic benchmark must continue accepting frozen owners from before the split. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2952110b2a14. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource +12, Tests -1, Other +2. Total +13 across 20 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 1, 2026, 1:13 AM ET / 05:13 UTC. |
|
Merged via squash auto-merge.
|
What Problem This Solves
Fixes: Control UI browser suites fail during module loading because shared transcript helpers import a Node-only proxy API.
User Impact
Developers can run the affected browser suites while transcript persistence retains its existing JSON and payload-sharing behavior.
Why This Change Was Made
Move normalization into a Node-only module and migrate its static and dynamic callers. Browser-safe envelope cloning and ownership tracking retain one shared owner; the normalization algorithm is unchanged.
Evidence
node:util/types.isProxy; both now pass (30 tests).pnpm tsgo:corepass.pnpm ui:buildpasses its budget checks.Live-provider turns were outside this import-boundary proof.