Repository navigation
Description
Blocked by #1673
Context
#1673 relays the brain CLI's paid providers from governed and strict workers through a metered host relay (startProviderRelay, packages/ui-sdk/src/server/provider-relay.ts). Under the maintainer's 2026-10-23 ruling on #1673 (D5), video is not relayed in the first slice: a relayed Gemini completion refuses a video part before any upload, with the [provider_unavailable … capability=video …] notice (packages/core/src/providers/completions/gemini.ts:106). brain video watch therefore stays unavailable in a relayed worker.
Video needs more than the relay's fixed POST routes. The Files lifecycle starts an upload session, sends the bytes to a provider-chosen upload URL, polls the file handle and deletes it with a fresh cleanup deadline (withVideoFiles, packages/core/src/providers/completions/video.ts:16-76). The qualification (docs/hosting/paid-cli-provider-qualification.md, "Admit each physical operation and retain native lifecycle") requires the host to validate upload destinations and keep a private registry of the handles a turn created. It must not accept worker-selected upload URLs or grant general GET/DELETE access.
Scope
- Relay the Gemini Files lifecycle for a relayed
brain video watch: the upload start, the byte upload to a host-validated upload URL, the poll and delete of the handles that turn's relay created, and the generation request. - Meter the generation and record the upload and cleanup attempts. Use the same budget admission and per-attempt receipts as the other relayed requests.
- Cancellation still deletes the owned files.
Out of scope
- JeV reranking, which is unrelayed by the same ruling.
- Vertex or enterprise endpoints and async batch embeddings.
- A general GET or DELETE route through the relay.
Acceptance criteria
- In a relayed governed worker with no key,
brain video watchruns against a fictional loopback Gemini endpoint the operator lists. The upstream sees the host key on every lifecycle request, and the worker sees none. - A worker-chosen upload URL, or a poll or delete for a handle the turn's relay did not create, is refused before contact. Each has a test.
- A cancelled request deletes its uploaded files, shown by a test.
- A blocked budget refuses the upload before any byte is sent.
- Mutation receipt: drop the handle-ownership check, and the foreign-handle test fails.
Verification
ui-sdk and core tests under real bubblewrap, then bun run check:pr --base origin/main and the native hosted-app proof.
Contract impact
Additive. The CLI contract's video provider_unavailable capability stops appearing for relayed workers.
2026-10-24 triage at main dc5d3c73282c29a3f0098306d398743ee18ec791: made the still-open first-slice relay prerequisite #1673 canonical. Priority p2 reflects deferred, unscheduled D5 follow-up work, not a current-release commitment. The additive contract and offline ownership/budget/cancellation proof are explicit; no live provider call was made.
Activity
schlessera commentedon Oct 23, 2026
Triage (maintainer, 2026-10-24): not in 0.44.0. Video was excluded from #1673's first slice (ruling D5), so this belongs to a later milestone. It stays on epic #1646 without a milestone until that milestone exists.
schlessera commentedon Oct 24, 2026
2026-10-24 triage: #1673 remains open and supplies the relay/accounting path this extension consumes. Added blocked plus its canonical declaration, contract and priority: p2. The complete ordinary brief has no unresolved needs, so it may carry agent-ready alongside blocked; it remains unpickable until the relay output is delivered. The maintainer’s no-0.44.0 ruling and existing parent are preserved.
schlessera commentedon Oct 24, 2026
Unblocked: #1673 is closed, so
scripts/sync-project.tsis removing theblockedlabel.schlessera commentedon Nov 2, 2026
Claimed (token
wi-2738-a411). Branchfeat/2738-relay-video-filesfromepic/1646-cost-limits@a62db8f27; the PR targets that epic integration branch.schlessera commentedon Nov 2, 2026
Implementation is in #3312 (base
epic/1646-cost-limits@a62db8f27, head4016e1970). It covers every acceptance criterion with keyless, offline tests, including a real-bubblewrap governed and strictbrain video watch. It also has failing-first receipts and the required handle-ownership mutation receipt. Localcheck:prpassed. The PR is marked ready and hosted ready-candidate proof has been requested. This issue closes when the epic batch lands onmain. Thevideo.ts:16-76andgemini.ts:106citations above describe the pre-change tree; the docs carry updated ones.CONTRACT: feat(ui-sdk): relay the Gemini Files video lifecycle for br…
schlessera commentedon Nov 2, 2026
Delivered to the epic integration branch
epic/1646-cost-limitsas7e69bfd63via #3312, after ready-candidate proof passed against the exact epic base. This issue closes when the epic batch lands on main.