Repository navigation
test(ui): guard browser transcript media imports - #190086
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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs changes before merge. What this changesThis PR extracts transcript payload ownership into a dependency-free module so browser media readers avoid Node-only normalization imports. Example: Control UI reads a user 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 PR repairs a current-main browser import regression, but two incomplete import-cutover changes cause concrete CI failures. Priority: P1 Before merge
Findings
Tests
Agent review detailsHow this fits togetherControl UI transcript readers consume shared media facts; server-side transcript normalization establishes immutable payload ownership that cloning and replay consumers reuse. flowchart LR
A[Control UI transcript reader] --> B[Shared media facts]
B --> C[Payload ownership registry]
D[Node JSON normalizer] --> C
E[Transcript append] --> D
C --> F[Envelope cloning and replay]
Technical reviewBest possible solution: Keep one dependency-free ownership registry, migrate the remaining script consumers, and include its module in the trusted wrapper inventory. Do we have a high-confidence way to reproduce the issue? Current-main source traces message-extract.ts through media-facts.ts into node:util/types; the body reports the corresponding Chromium import failure, but this review ran no target code. Is this the best way to solve the issue? Extracting the existing registry is the smallest complete architectural fix: it preserves admission and sharing without shims or duplicate state, provided every consumer and extraction inventory is migrated. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8662c66b9050. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
PR surfaceSource +8, Tests +19. Total +27 across 16 files. Added test files: 1. View PR surface stats
Review metrics
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, 12:48 AM ET / 04:48 UTC. |
|
Merged via squash.
|
* fix(ui): keep transcript ownership imports browser-safe * fix(scripts): complete transcript ownership import cutover * test(ui): start sidebar invalidation tabs before snapshot capture * test(ui): keep browser import regression narrowly scoped
What Problem This Solves
A Node-only import broke the browser transcript media entry point. The runtime repair has already landed in #190089; this PR adds a focused browser regression test for that boundary.
Why This Change Was Made
The test imports the real
readTranscriptMediaEntriesentry point in the browser runner and checks extraction of a persisted synthetic attachment. It catches the Node-only module-graph failure before a broader E2E suite fails during import. There are no production changes.Evidence
Cross-tab sidebar deletion invalidation > retires chat:deleted-snapshot once per tab without wiping the sidebar across churn and reloadin run 41277413048 (two writes instead of at most one). The original test passed on scheduled main 41273079982 and the full picker run 41277424144. The fixture rewrite is removed entirely; the original test and all its assertions are unchanged. No inherited-failure exception or production-race fix is claimed.ci:fullrun 41278249869 passed on final one-file headf38ad3170eb5d905d5587009742de665ce00d8d1. Earlier successful or failing runs remain historical evidence, not proof of this head.Final diff: one new 20-line browser test. Production LOC unchanged; test LOC 0→20. No dependency, visual change, baseline exception, or test assertion weakening.