Repository navigation
Add model-aware video attachments and fix streaming Markdown recovery - #4585
reachjalil wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Test evidence — a-streaming-answer-renders-as-markdown-block-by-block-and-settles-to-the-same-do — ✅ passedSHA 352a639 · engine v1 ✅ passed · 0 expectations passed · 0 failed · 0 pending
[world] mock(mcp) · den(local) · desktop(as admin) · workspace(/tmp/openwork-streamed-markdown-answer-1788733503885) · [seed:raw] evalIn() ×5 · session("New task") · [seed:raw] evalIn() Test run created 2026-09-06T22:24:08.223Z · Source: Test evidence — video-keeps-the-draft-on-incompatible-models-sends-intact-with-the-image-on-goog — ✅ passedSHA 352a639 · engine v1 ✅ 0/5 screenshots passed · 0 expectations passed · 0 failed · 0 pending
[world] mock(mcp) · den(local) · desktop(as admin) · workspace(/tmp/openwork-attachment-upload-1788733589316) · [seed:raw] evalIn() ×4 · ❌ session("New task") · session("New task") · [seed:raw] evalIn() ⚪ UNVALIDATED — 1. video-keeps-the-draft-on-incompatible-models-sends-intact-with-the-image-on-goog artifact 1
⚪ UNVALIDATED — 2. video-keeps-the-draft-on-incompatible-models-sends-intact-with-the-image-on-goog artifact 2
⚪ UNVALIDATED — 3. video-keeps-the-draft-on-incompatible-models-sends-intact-with-the-image-on-goog artifact 3
⚪ UNVALIDATED — 4. video-keeps-the-draft-on-incompatible-models-sends-intact-with-the-image-on-goog artifact 4
⚪ UNVALIDATED — 5. video-keeps-the-draft-on-incompatible-models-sends-intact-with-the-image-on-goog artifact 5
Test run created 2026-09-06T22:25:33.110Z · Source: |
| // process polls after the heading. A buffered whole answer fails this too. | ||
| const frames = await transcript.firstSeenFrames(); | ||
| const headingFrame = frames[1]; | ||
| const closingFrame = frames[blockSentinels.length]; | ||
| expect(headingFrame).toEqual(expect.any(Number)); | ||
| expect(closingFrame).toBeGreaterThan(headingFrame ?? Number.POSITIVE_INFINITY); | ||
| await user.notSee({ text: "## Streamed" }); | ||
| }); |
There was a problem hiding this comment.
Streaming check allows the answer tail to remain buffered until completion
The replacement assertion only proves that the heading appeared in an earlier frame than the closing text, so a renderer that shows the heading and then buffers every later block until the stream completes would still pass the claimed block-by-block streaming behavior.
Evidence
streamedMarkdownemits 8-character chunks with a 1500ms delay between chunks (evals/worlds/chat.ts:766-768), creating a real interval in which later content is still arriving.- The changed test waits for
closingTextbefore readingfirstSeenFrames()and only comparesframes[1]withframes[6]. - A broken renderer can render the heading first, withhold all subsequent blocks, and insert the entire remaining answer at completion; the two first-seen frames are still ordered and all settled-document assertions pass.
- The previous
notSee({ text: closingText })check was removed, so the test no longer observes that later content is absent while the earlier block is displayed.
Identified by Warden · spec-provenance-review · 4UC-WSU
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (352a639926faa8bc0366bb1e843f5ff8819557f5). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
Pull request was closed
Summary
server.connectedhandshake. The SDK returns a lazy stream iterator before the connection opens; missing initial message declarations could otherwise assign assistant deltas an inferred user role and delay proper Markdown until completion.Verification
Overall verdict: Incomplete. Both focused local journeys passed on head
352a639926faa8bc0366bb1e843f5ff8819557f5; remote Desktop playback still needs end-to-end proof. This PR is ready for review, not a release assertion.Passed
Both commands printed
placement: local (--local), cold-started their isolated resources, and exited 0 with 1 passed, 0 failed, 0 skipped each:The streaming journey now targets the mounted composer, verifies the actual sent bubble rather than composer text, and records the first frame for each block. It requires the heading to appear before the closing paragraph and forbids raw Markdown under either message role throughout the stream. It also checks continuity, reload, and video playback. Focus emulation makes trusted input work in background Electron; the cold-start wait is separate from the per-frame rendering assertion.
The attachment journey checks incompatible-model draft preservation, exact video MIME/base64 received by a mock native Google endpoint, authenticated workspace playback, no duplicate players or autoplay, and playback after reload.
Supporting checks passed: app typecheck; 63 focused app tests (attachments, IPC, Markdown, message rendering, and handshake isolation); 16 server path/MIME tests; 15 binary-transfer/mock-provider tests; changed-spec channel ratchet and diff checks. Screenshots are supplementary, not the source of the verdict.
Failed — reproduced on clean base
bun test --isolate tests/prompt-file-parts.test.tsexits 1 with 20 passed, 1 failed on both this branch and clean base9a64fe1087aff7f5c552a446595d1325e1d1a91b. The unchanged app-mention assertion expectscomputer-use tools, while the current instruction namescomputer_discoverandcomputer_open_session. That unrelated wording mismatch is not changed here.Skipped / deferred
Exact-head evidence for both journeys is attached in the PR comments.