From 575255a7602015bf33011545cae9947210b171bc Mon Sep 17 00:00:00 2001 From: Costin Cozianu Date: Mon, 16 Nov 2026 00:55:51 +0000 Subject: [PATCH 1/4] Records: take maintenance mail item on console video playback Co-authored-by: Antigravity (Gemini 4 Carbon High) --- ...-console-video-does-not-play-from-files.md | 249 ++++++++++++++++++ 1 file changed, 249 insertions(+) create mode 100644 engineering-docs/wip/2026-09-18-maintenance/intake/2026-11-10-project-management-console-video-does-not-play-from-files.md diff --git a/engineering-docs/wip/2026-09-18-maintenance/intake/2026-11-10-project-management-console-video-does-not-play-from-files.md b/engineering-docs/wip/2026-09-18-maintenance/intake/2026-11-10-project-management-console-video-does-not-play-from-files.md new file mode 100644 index 00000000..552af083 --- /dev/null +++ b/engineering-docs/wip/2026-09-18-maintenance/intake/2026-11-10-project-management-console-video-does-not-play-from-files.md @@ -0,0 +1,249 @@ +# A bug record owned by maintenance: a video opened from the console's Files page does not play + +From `project-management`, 2026-11-10, at the owner's direction. + +## What is handed over + +A notice, under topic 12.5 rule 12 of `WORKFLOW.md`, that a bug record with +`owner: maintenance` was filed today, and the record itself in full below. +The record is +`engineering-docs/bugs/devcapsule/2026-11-10-console-video-opened-from-files-does-not-play.md`. + +In one paragraph: Chrome shows an empty player for a video opened from +`/files`, because `/api/project/raw` answers with +`Content-Security-Policy: sandbox; default-src 'none'; style-src 'unsafe-inline'` +and Chrome applies that policy to the media document it builds around the +video, whose own fetch is then refused. The owner reproduced it on the +`v0.3.1-rc2` console and confirmed, by embedding the raw address in the +`/files` page from the browser's console, that the file, the streaming and +the token are sound. The record proposes that the Files page play video +and audio itself and that the raw route stay unchanged. + +## Why it belongs to maintenance + +The Files page is maintenance's slice of the 0.3.1 cycle (PR #12 with its +review PR #13), it ships in `v0.3.1-rc2`, and no other open workstream's +goal covers it. The user documentation and the 0.3.1 changelog both state +that videos open in the browser. + +## Why by mail, and where the record is + +The record is committed on `ws-project-management/coordination`, the +filer's working branch, as rule 12 requires. That branch is paused and 283 +commits behind `main`, so the record will not reach `main` from there +soon. The text below is the record as committed. If maintenance needs it +on its own branch before then, place this text at the path above with its +`index.md` entry; `project-management` takes `main`'s copy at its next +synchronization, and its status file says so. + +## Evidence + +In the record: the browser's message verbatim, the code read on `main` at +`aabace3c` (identical under `devcapsule-webconsole/` on `release-0.3.1`), +the two tests that assert the present behavior and pass, and the owner's +experiment. Three things are recorded as not verified: audio, PDF under +the same `sandbox`, and browsers other than Chrome. + +## What accepting it would mean + +A bug record is not decided as an intake item; its `owner` field is its +routing. Acknowledging this notice means maintenance has the record in its +queue, rates its severity, and with the owner settles its target. The +record arrives with `severity: untriaged` and `target: none`; nothing here +assigns either, or a place in the order of work. The proposed fix is a +proposal: maintenance owns the design it implements, the tests and the +browser check the record asks for before closing. + +--- + +The record in full, as committed: + +--- +status: confirmed +severity: untriaged +target: none +owner: maintenance +opened: 2026-11-10 +requirements: [] +--- + +# A video opened from the web console's Files page does not play: the raw route's policy blocks the browser's own player + +## Symptom and expected behavior + +Opening a `.webm` file from the web console's Files page in Chrome shows a +video player with a play button and a length of `0:00`. Pressing play does +nothing. The browser console reports: + +```text +Loading media from 'http://127.0.0.1:40441/api/project/raw?path=engineering-docs%2Fblog%2Fassets%2F2026-10-04-intellij%2Ffirst-session.webm' +violates the following Content Security Policy directive: "default-src 'none'". +Note that 'media-src' was not explicitly set, so 'default-src' is used as a +fallback. The action has been blocked. +``` + +By the owner's report, most other files open from the same page without a +problem. + +Expected: the video plays and seeks. This is promised behavior, not a wish: + +- `docs/sessions/web-console.md`, the **Files** bullet: "Videos, audio, + PDFs, images, and plain-text source or configuration files open in the + browser". +- `engineering-docs/releases/v0.3.1/changelog.md`: "a recording or an image + opens in the browser" and "The raw route seeks by byte range, so long + videos play from any point." +- The slice's brief, + `engineering-docs/wip/2026-09-18-maintenance/evidence/2026-11-08-console-files-page/implementor-brief.md`: + a `/files/.webm` link "can be pasted in chat and plays in the + browser". + +No requirement ID covers the Files page; `R-CONSOLE-001` speaks of the +console and its records only, so `requirements` is empty. + +## Environment and evidence + +Observed by the owner on 2026-11-10, in Chrome on the host, against the +console of this project's capsule started with the `v0.3.1-rc2` executable +(`be0140ca`). The Chrome version was not recorded. The file is +`engineering-docs/blog/assets/2026-10-04-intellij/first-session.webm`, +10,522,080 bytes. + +Read on `main` at `aabace3c`; `devcapsule-webconsole/` is identical on +`release-0.3.1`: + +- `devcapsule_webconsole/app.py`, `RAW_SECURITY_HEADERS`: every response of + `/api/project/raw` carries + `Content-Security-Policy: sandbox; default-src 'none'; style-src 'unsafe-inline'`. +- `devcapsule_webconsole/static/console.js`, `fileViewUrl`: a file that is + not Markdown is linked to `/api/project/raw?path=…`. The Files listing + uses it for every file row, and `pages.files` uses it to redirect a + `/files/` address, so a pasted link fails the same way. +- The same file, `recordUrl`: a Markdown link in Records to a project file + that is not Markdown also resolves to the raw route. +- `tests/test_files_page.py`, + `test_raw_route_serves_full_file_in_chunks_with_accept_ranges`, asserts + this exact policy on a `.webm` response, and `tests/files-script.cjs` + asserts that `/files/docs/demo.webm` redirects to the raw route. Both + pass. They check headers and addresses; nothing observes a browser + playing the file. + +One experiment separates the causes. On the console's `/files` page, with +the same session, this line was pasted into the browser's console: + +```js +document.body.appendChild(Object.assign(document.createElement('video'), {controls: true, src: '/api/project/raw?path=engineering-docs%2Fblog%2Fassets%2F2026-10-04-intellij%2Ffirst-session.webm'})) +``` + +The player appeared below the listing and the video played. The same line +pasted while the raw address was the open document reproduced the policy +error. So the file, the route's streaming and the token are sound when a +console page embeds the raw address; the failure belongs to the raw +response opened as a document. + +## Cause + +When the browser navigates to a `video/webm` response, Chrome does not +render the response body. It builds a small document of its own that holds +a `