Rich UI slice 10: phone session reads (read, outline, zoom)
Merged
AF
6d ago+546+546+012345678901234567890123456789-0-0-0123456789
Rich UI slice 10. The phone carrier can run read, outline and zoom inside the session it is viewing, under that session's carried policy. Production stays unpublished, and schemas, the golden manifest and the carrier gate are unchanged.
- Admission order:
session_reads::preflightfirst validates each target withvalidate_read_pathfor the viewed session, before it reads any byte, so a media refusal never reveals the type of a file outside the session's fence. It then sniffs content, not extensions, under the call's bounded I/O. Images (PNG, JPEG, GIF, WebP), PDFs, NUL-binary files and invalid UTF-8 anywhere in the file are refused asunsupported_mediabefore the native handler runs. Valid UTF-8 split across a buffer boundary and directories are accepted. - Tests: all seven native handlers are exercised through the outer V1 route for core head, authorized non-core head, worker and flow head sessions. Every frozen target-refusal row has a check. Outside-root paths are refused with
path_outside_rootwhether or not a worker grant exists. Before the implementation,session_reads_media_refused_before_native_handlersfailed with "media reached native handler".
Verified on the build server: 406 rich_ui, consent and access_policy tests, the formatting check and the Windows target check. The worker's full gate failed only on secret-bash tests that need a prebuilt binary, plus four views tests under load that this slice does not touch.
Summary by cubic
Enables phone carriers to run read, outline, and zoom inside the session they are viewing, under that session's carried policy. Production stays unpublished; schemas, the golden manifest, and the carrier gate are unchanged.
- Admission validates each target against the viewed session's fence before reading any bytes, so a media refusal never reveals a file type outside that fence. It then sniffs content rather than extensions under bounded I/O, refusing images, PDFs, NUL-binary files, and any invalid UTF-8 as
unsupported_mediabefore the native handler runs. - All seven native handlers are exercised through the outer V1 route across head, worker, and flow-head sessions, with checks for every frozen target-refusal row and for outside-root paths regardless of worker grants.