Skip to content

ui-server: let the user mark a file untrusted so reading it taints the session #2673

Closed

Description

@schlessera

Context

Split from #1667 (maintainer ruling, 2026-10-22). G6 lists "files the user marks untrusted" as a taint source (docs/decisions/governed-writable-workers.md, "Untrusted input (G6)"), and the taint governance event already reserves source: "user_marked" (taint: kind(1, …), packages/ui-server/src/governance/events.ts:202-207). Nothing can produce it: there is no UI control, HTTP route, storage or frontmatter key for marking a file untrusted.

The other #1667 sources and enforcement are delivered through merged #2676 (8f7430cd6): the host recorder classifies a completed call's input (inputTaintSource, packages/ui-server/src/activity/ingestion-taint.ts) and records the session's first source with recordFirstTaint (packages/ui-server/src/governance/session-taint.ts); a tainted session's outward actions all ask and, on the turn proxy, its egress narrows. A user-marked file only needs to become one more input to that recorder.

Settled policy and approved interaction design

The design brief proposes one confirmed toolbar control, purple glyph-plus-word cues in the viewer/tree, files only and a warning when clearing. The maintainer has selected its Files-only v1 scope, subject to the rename and authority rulings below. The maintainer approval of 2026-10-24 selects revision 3 plus unchanged revision 2 as the design of record, including missing records, role-dependent controls, copy, failure/offline/races and focus. This does not reopen the selected policy or placement.

Maintainer rulings:

  1. Rename/move semantics — settled (maintainer, 2026-10-23): option B. Keep marks keyed by brain-relative path. When a marked file moves or disappears, retain its old-path mark and expose it as missing/orphaned so the user can recover by marking the new path. Do not silently discard the record and do not automatically follow renames through the journal. The new path remains unmarked until explicitly marked; this limitation must be clear. The approved list and owner-only missing-file dialog below supply the recovery surface.
  2. Authority — settled (maintainer, 2026-10-23): option B. An authenticated principal with existing read authorization for the file may mark it untrusted. Only the owner may clear a mark, including a retained missing/orphaned mark. Marking grants no new file access. Enforce both checks on the host; hiding a UI control is not authorization. Do not introduce a new role or widen existing principal access.
  3. Visible scope — settled (maintainer, 2026-10-23): option A. Files views only in v1: a toolbar control, viewer/tree cues, and a Marked untrusted list including missing paths. No cues on chat links or attachment rows. The list names user marks only, not every untrusted-content source. Missing records must be explicitly listed from host records rather than inferred from the current filesystem tree. List/recovery states and reader-versus-owner controls follow the approved revision-3/revision-2 criteria below.

The brief’s shell-read item is a factual check, not a policy choice: at inspected main f3c6fdc9f9c6321fda5a384cf8cfd8bf2e4846da, a bounded keyless call to the production commandTaintSource (packages/ui-server/src/activity/command-taint.ts:2-27) classifies plain and rtk proxy-wrapped cat as unclassified_command for both Bash adapters; static ls and brain search remain null (eight observed classifier results). This is source-function evidence, not full shell/worker or universal reader coverage. Copy must not claim coverage beyond qualified admitted paths, and clearing a mark must not claim to erase taint from other sources. Exact additive HTTP fields/routes are implementation design under the chosen authority rule and the existing contract policy; the suggested shape is not preapproved.

The earlier rename B, authority B and Files-only A rulings remain settled. The revision 3 addendum, together with unchanged revision 2, is now approved by the maintainer. Revision 3 supersedes the older missing-record/marker disclosure alternatives and corrects the contacted-host proxy copy; the approved controls, state, copy and focus rules are incorporated below. Both additional disclosure choices remain settled. No design or policy approval is outstanding for this brief.

  1. Missing-record visibility — settled (maintainer, 2026-10-23): option A, owner only. Only the owner may list or inspect retained marks for missing paths. Non-owners see only present-file marks they currently have read access to, even when they created a now-missing mark themselves. Filter missing records and their contribution to counts on the host; hiding UI rows is insufficient. Recovery and clearing of missing marks belong to the owner. Reader copy explains that moved/deleted-file marks are shown to the owner, without disclosing those paths.
  2. Marker identity disclosure — settled (maintainer, 2026-10-23): option A. The owner may see the marker’s principal label; other authorized readers see only the marking date. Non-owner host responses must omit marker identity/label fields rather than merely hide them in the UI. This does not widen the visibility of files or missing records. The final revision-3/revision-2 interaction approval now covers this disclosure. The current P0/security scope and native parent Epic: controlled egress, credentials and outward actions #1645 remain correct.

Scope

  • A way for authorized readers to mark a brain file untrusted and for the owner to clear the mark, stored host-side (not in brain.db, which is disposable).
  • When an admitted file-tool read (Claude Read/Edit/Grep/Glob, pi read_file/edit_file/grep) touches a marked file, the recorder records taint with source: "user_marked" as the session's first source if none exists.
  • The capabilities note's untrusted-input sentence names marked files as a source.
  • Files-only v1 UI: toolbar control, viewer/tree cues and a Marked untrusted list. Missing paths appear only for the owner; non-owners see currently readable present marks.

Out of scope

Acceptance criteria

  • Marking a fixture file and reading it in an interactive turn records taint { source: "user_marked" }; reading an unmarked file records nothing. A test covers both and fails with the detector removed.
  • The mark survives a server restart and brain index --force, including a retained missing/orphaned old-path record.
  • Rename/move follows selected option B: the old-path mark persists and is discoverable as missing, the new path is not automatically marked, and the UI makes manual re-marking clear. Tests cover retained records and the absence of automatic transfer.
  • Record the selected rename, authority, Files-only scope and disclosure policies in the relevant durable decision record as part of implementation; the issue/comment rulings govern until that delivery.
  • Host authorization permits marking only with existing authenticated file-read access and clearing only for the owner, including missing/orphaned records. Tests cover authorized reader marking, unreadable-path refusal, non-owner clear refusal and owner clear success; direct HTTP requests cannot bypass the checks. Clearing neither grants file access nor erases existing session taint.
  • Clearing the mark stops new sessions from being tainted by that file; an already tainted session stays tainted.
  • Missing-record disclosure follows selected option A: direct list/detail requests and counts disclose missing marks only to the owner, including when a non-owner created the mark. Tests prove owner access and non-owner omission/refusal, with no missing paths or hidden-record counts returned to non-owners.
  • The Files toolbar, viewer/tree cues and Marked untrusted list follow selected scope A. The owner’s list includes retained missing paths and makes manual re-marking discoverable without claiming automatic rename tracking. No chat-link/attachment cues ship in v1.
  • Marker attribution follows selected option A: owner responses may include the marker principal label; non-owner responses expose only the date. Direct HTTP list/detail tests prove identity fields are omitted for non-owners, rather than relying on UI hiding.
  • Implement the approved revision 3 plus unchanged revision 2, including their 320px/desktop mocks, using the criteria below. The October 24 approval supersedes earlier pending-approval notes; it selects no exact HTTP route/field names. Clearing removes only this mark and never guarantees a clean session when another taint source applies.

Approved interaction and copy acceptance

  • Toolbar slot: between Copy path and Share, using existing 44px IconButtons. Unmarked authorized readers/owners get Mark untrusted; marked readers get only the cue; marked owners get pressed Untrusted: clear mark. Clear authority comes from host facts and is checked again by the host. Saving leaves the dialog open and busy; unknown lookup shows Couldn't check the untrusted mark plus Retry and no mark control; unsupported servers show neither control nor extra line; forbidden/file-load failure uses the existing viewer failure without a cue.
  • Present marks use the existing purple unverified glyph plus the word untrusted, never color alone. Tree rows keep flag="purple", the untrusted meta and accessible-name suffix. Owner cue/rail may show the host principal label or by you; every reader cue/rail/list has the date only, never an identity or by you. Use existing theme tokens.
  • A Marked untrusted entry replaces the disabled filter in both drawer and panes and switches only the tree area to a host-record flat list. Keep an already-open viewer. Visible counts, singular/plural accessible names and empty states are principal-filtered. All files returns to the tree. Owner rows sort missing first, then present newest-first; reader rows contain only currently readable present files. Rows are individual buttons in a list, never a tree or nested controls. Long paths wrap and remain inert text with a full-path accessible description.
  • Owner list subtitle: Files you or others marked. Doesn't list other untrusted sources. Reader subtitle: Files marked by you or others. Doesn't list other untrusted sources. Marks on moved or deleted files are shown to the owner. Reader empty copy is exactly No files you can open are marked untrusted. / Open a file and use Mark untrusted. It does not hint at hidden counts or particular records. Owner empty copy is No files are marked untrusted. / Open a file and use Mark untrusted.
  • List loading uses the existing Placeholder with Loading marked files; refusal reads This list isn't available with your current access.; offline reads Can't reach your brain right now. plus Try again. Refetch on entry, mark/clear and window focus. A stale action refetches and announces The list was out of date and has been refreshed. Reader rows for moved/deleted paths disappear silently; an old-tab/deep-link read uses File not found without a mark cue/detail.
  • Owner-only missing rows open the approved Missing file dialog, not a file. Explain that the path may have moved/renamed/deleted, the mark stays with the old path and will apply if a file returns, and the new path must be marked separately. Find it in Files returns to the tree with Open the moved file and use Mark untrusted.; Clear old mark opens its own confirmation. Readers have no missing dialog variant.
  • Mark confirmation title/actions: Mark this file untrusted?, Cancel / Mark untrusted. Use the approved file-tool coverage explanation: a new chat opening the file with its file tools handles untrusted content until it ends; outward actions ask even when policy allows them; skills/instructions/memory changes are flagged in the journal. The proxy bullet is exactly: On turns that run through the egress proxy, web access is limited to the untrusted allow-list and sites this chat already contacted. Your other web rules still apply. Do not claim shell coverage, blocked reads, retroactive taint or proxy enforcement on other turns. Keep the approved reader-only owner/moved-path paragraphs from revision 3 §1.
  • Present clear confirmation: Clear the untrusted mark?, Cancel / Clear mark. Copy: New chats that open this file won't be treated as untrusted because of it. Chats that already opened it stay untrusted until they end. A chat can still be untrusted for other reasons. Missing clear title/action: Clear the old mark? / Clear old mark; explain that only this old-path record is removed, the new location must be marked separately and existing chats stay tainted.
  • Host acknowledgement owns every visible change: no optimistic cue, pressed state or list row. Retry repeats the captured path and same mark/clear intent, never toggles it; switching files closes the dialog and sends nothing. An uncertain mark stays Checking rather than reoffering a mark, and uncertain clear keeps the marked cue until a fresh host read resolves it. Reconcile concurrent changes and revoked access from the host.
  • Exact result/race announcements: <filename> marked untrusted, Untrusted mark cleared, This file was already marked untrusted., This mark was already cleared. Refusals retain the dialog and use You don't have access to this file any more. Nothing was marked. or Only the owner can clear this mark. Nothing changed. Gone-before-mark uses There's no file at this path any more. Nothing was marked. and reloads the viewer. Preserve revision-2 unreachable, uncertain and auth-lock recovery: Couldn't reach your brain. Nothing has changed yet., Couldn't confirm the change. Checking…, then a fresh host result or Still couldn't check. Try again.; after sign-in reload host state.
Action Approved focus destination
Open mark/clear confirmation Cancel
Cancel / Escape Triggering toolbar button
Mark succeeds, owner Same button, now Clear
Mark succeeds, reader File title, because the button disappears
Clear succeeds Same button, now Mark
Enter list Marked untrusted heading
All files Entry row
Missing dialog Close Missing row
Clear old mark succeeds Next row or empty-list heading
  • One polite live region per Files surface, with no load announcement. Toolbar tab order remains reveal → title → copy → mark/clear → share → mode. List rows use Tab; tree-only j/k and its footer hint are suspended while the list shows. Buttons/rows have at least 44px effective height, long paths wrap, and dialogs stack actions where required at 320px/200% zoom. Keep both themes and existing accessible tone tokens.
  • Native browser/copy proof covers owner/reader marked, unmarked, unknown, unsupported and forbidden states; host-filtered missing records/counts including the reader who originally marked the path; no reader identity/label/by-you bytes; inert hostile-looking path text; each race/uncertain reply/file-switch retry; keyboard focus and live-region text. Test 320×640 and 1440×900 in light/dark, plus 200% zoom at 320px. The exact proxy-string test fails when already contacted is removed. Use the approved Odysseus moved Antinous letter / present Eurymachus message fixtures dated 2026-07-12.

Verification

ui-server and ui-react tests, then bun run check:pr --base origin/main.

Contract impact

Likely additive: a new HTTP route or field for the mark (CONTRACT: commit, server minor). The taint event shape is unchanged.

2026-10-23 triage at main f3c6fdc9f9c6321fda5a384cf8cfd8bf2e4846da: verified the delivered #1667 detector/first-source storage and reserved user_marked event. Native parent #1645 and P0 security scope are correct. The October 22 design prompt remains usable: placement, marked-state cues and clearing interaction still require approval; files-only scope, sticky session taint, host-side persistence and truthful proxy limitations remain binding. Clarified merged prerequisite versus pending UX. No duplicate prompt, selected design, new policy choice or readiness.

2026-10-24 triage: reconciled actual prerequisite labels with the recorded final disclosure ruling: all named policy choices are settled, while revision 3 still awaits interaction/copy approval. Replace needs: decision with needs: design; no new prompt, approval, readiness or release commitment is inferred.

2026-10-24 triage at main af6300478a07379178bd30221a31c0b917df2283: The latest approval packet still requests approval of revision 3 plus unchanged revision 2; it records no new policy choice or approval. Keep the implementation prerequisite as needs: design until that interaction/copy is approved. All settled authority, rename and disclosure rulings stand; no duplicate prompt is posted.

2026-10-24 triage at main e1ab485669565554ca6cb61ce5d130303647230f: Folded the new explicit maintainer approval of revision 3 plus unchanged revision 2 into the active scope and acceptance criteria, including exact disclosure/copy, host-ack/race recovery, focus and browser proof. Earlier pending notes are historical. The complete brief has no own prerequisite left, so add agent-ready and contract; preserve p0/security and the absence of an invented release milestone.

Activity

  1. added this to the 0.44.0 milestone on Oct 22, 2026
  2. added
    type: feat
    area: ui-server
    priority: p0
    needs: design
    security
    on Oct 22, 2026
  3. added
    area: ui-react
    on Oct 22, 2026
  4. schlessera commented on Oct 22, 2026

    @schlessera
    OwnerAuthor

    needs: design: the detector, the event shape and the enforcement it feeds are decided (#1667). What is left is how a user marks a file untrusted and sees that it is marked: where the control lives, what a marked file looks like in the file views, and how clearing works. That is a judgement about what the user is shown, so the code cannot settle it.

    Read first
    - schlessera/brain-kit#2673 (this issue) and its parent epic #1645.
    - docs/decisions/governed-writable-workers.md, section "Untrusted input (G6)", including the 2026-10-22 "Implemented" paragraph: what taint changes (outward actions always ask; egress narrows on the turn proxy; steering writes flagged in the journal).
    - packages/ui-server/src/governance/events.ts:202-207 (the `taint` event; `source: "user_marked"` is reserved).
    - packages/ui-server/src/activity/ingestion-taint.ts (how file-tool reads become taint sources).
    - The existing provenance language in ui-kit: purple = untrusted origin (packages/ui-kit/src/types.ts:17, packages/ui-kit/src/internal/tone-cue.ts:43, Chip "untrusted · …" stories).
    
    The problem
    A user knows a file came from somewhere they do not trust (a pasted email, a forwarded document) but brain-kit only taints a session for web, inbox, workspace, MCP and shell sources. Reading that file today leaves the session clean, so outward.allow still applies after the agent read it.
    
    Design — answer each:
    1. Where is the control to mark and unmark a file: file panel header, file list row menu, Storage settings, or more than one? Is it available on phone (320px) as well as desktop?
    2. How does a marked file read in each place it appears (file list, file panel, links/attachment rows)? Reuse the purple provenance chip or a different cue? The cue must not rely on colour alone.
    3. What does the confirmation or explanation say when marking ("Sessions that read this file will ask before every outward action…")? Keep it to what the code actually enforces, including that egress narrowing only applies where the turn proxy runs.
    4. Unmarking: does it warn that sessions already tainted stay tainted?
    5. Can a marked folder exist, or only files? (Folder marking is currently out of scope; "files only" is an acceptable answer.)
    
    Requirements to hold
    - The G6 decision record binds: taint is sticky for the session and never blocks a read.
    - Honesty rules: never imply that marking blocks the agent from reading, or that egress is narrowed on a turn without the proxy.
    - Accessible names on every control, 44px touch targets, legible at 320px.
    - Storage is host-side; brain.db is disposable and cannot be authoritative.
    
    Deliverable
    A comment on #2673 with ASCII mocks at 320px and desktop width for the control and the marked state, the exact copy, and the answers to 1-5. "Mark only from the file panel header, with the existing purple chip" is an acceptable, small outcome.
    
  5. schlessera commented on Oct 23, 2026

    @schlessera
    OwnerAuthor

    2026-10-23 triage at main f3c6fdc9f9c6321fda5a384cf8cfd8bf2e4846da: verified the delivered #1667 detector/first-source storage and reserved user_marked event. Native parent #1645 and P0 security scope are correct. The October 22 design prompt remains usable: placement, marked-state cues and clearing interaction still require approval; files-only scope, sticky session taint, host-side persistence and truthful proxy limitations remain binding. Clarified merged prerequisite versus pending UX. No duplicate prompt, selected design, new policy choice or readiness.

  6. schlessera commented on Oct 23, 2026

    @schlessera
    OwnerAuthor

    Design brief: marking a file untrusted

    Answers the design prompt. Read against main f3c6fdc9f: ViewerToolbar (packages/ui-react/src/components/files/file-viewer-frame.tsx), TreeRow (file-tree-view.tsx), FilePanes (file-panel.tsx), VALUE_CUE.purple (packages/ui-kit/src/internal/tone-cue.ts).

    Summary

    • One control, in one place: a toggle in the file viewer toolbar. The drawer (phone/tablet) and the panes (laptop+) both render ViewerToolbar, so it works at every width.
    • Marked state: the existing purple provenance cue (unverified glyph + the word "untrusted") in two places: under the file title and on the tree row. Colour is never the only cue.
    • Both marking and clearing ask for confirmation. Each dialog states only what the code enforces.
    • Files only. No folders.

    1. Where the control lives

    The viewer toolbar, and nowhere else in v1.

    • The tree has no row menu today: FileRow takes a click and the fold keys. Adding a row menu just for this would create a new interaction pattern on every row.
    • Storage settings would need a path picker. It's the wrong place to decide about a file you're looking at.
    • The toolbar is where the file is open and its content is visible, which is when you'd judge whether it's trustworthy.

    The control is a kit IconButton with aria-pressed, 44×44, using the unverified glyph. It goes between Copy path and Share.

    State Accessible name Look
    Not marked Mark untrusted ghost, muted ink
    Marked Untrusted: clear mark pressed, purple ink, glyph filled

    The name changes with the state. aria-pressed alone would announce a "Mark untrusted, pressed" toggle, which reads wrong.

    Phone, 320px (drawer), not marked. The toolbar already wraps (flex-wrap, title basis-[140px]). The new button sits in the first row because the title shrinks first:

    ┌──────────────────────────────────┐
    │ Files                         ✕  │
    ├──────────────────────────────────┤
    │ ▾ Hide tree          Close file  │
    ├──────────────────────────────────┤
    │ [📂]  forwarded-offer.md  [⧉][?][⇪]│
    │       inbox/forwarded-o… · 4.2 KB│
    │ [ Preview | Raw ]                │
    ├──────────────────────────────────┤
    │ # Offer from Acme                │
    │ …                                │
    └──────────────────────────────────┘
     [?] = Mark untrusted (44×44)
    

    Phone, 320px, marked. A cue line goes under the path, inside the title block, so it wraps with the title and costs no new row of controls:

    ├──────────────────────────────────┤
    │ [📂]  forwarded-offer.md  [⧉][◆][⇪]│
    │       inbox/forwarded-o… · 4.2 KB│
    │       ◆ untrusted · marked by you │
    │ [ Preview | Raw ]                │
    ├──────────────────────────────────┤
     [◆] = pressed, purple: "Untrusted: clear mark"
     ◆ untrusted … = purple Chip (variant "flag"), unverified glyph
    

    Desktop, laptop+ (panes), marked:

    ┌ rail ┬ Files ───────────────┬ forwarded-offer.md · 4.2 KB ─────────────── [Close] ┬ Evidence ─────────┐
    │      │ Untrusted only  (off)│ [📂] forwarded-offer.md                [⧉][◆][⇪][Preview|Raw]│ FRONTMATTER 3 keys │
    │      │──────────────────────│      inbox/forwarded-offer.md · 4.2 KB                       │ …                  │
    │      │ ▾ inbox              │      ◆ untrusted · marked by you                             │                    │
    │      │ ◆  forwarded-offer.md│──────────────────────────────────────────────────────────────│ UNTRUSTED  ◆       │
    │      │    untrusted         │ # Offer from Acme                                            │ marked by you      │
    │      │    notes.md          │ …                                                            │ 23 Oct 2026        │
    │      │ ▸ people             │                                                              │ MODIFIED …         │
    └──────┴──────────────────────┴──────────────────────────────────────────────────────────────┴────────────────────┘
    

    The evidence rail block (wide only) follows the rail's existing rule: shown only when its fact exists. It shows who marked the file and when, from the host record. It has no control of its own. The toolbar is the only place to change the mark.

    2. How a marked file reads

    Place Cue Non-colour carrier
    Viewer toolbar purple Chip untrusted · marked by you under the path unverified glyph + the word
    Tree row (drawer and panes) FileRow flag="purple", meta="untrusted", metaTone="purple" glyph via VALUE_CUE.purple + the word
    Evidence rail (wide) Label text="Untrusted" icon="unverified" tone="purple" + who/when glyph + the word
    Chat links / attachment rows none in v1 (see decision B) —

    This reuses the purple "untrusted origin" meaning the kit already has. A new tone would create a second word for the same idea.

    Stale and untrusted on one row. FileRow has one flag. Untrusted takes the flag, and the meta carries both: untrusted · stale 38d. Stale is a hint. Untrusted changes enforcement.

    The tree row's accessible name gets the suffix , untrusted, so screen readers don't depend on the meta line.

    3. Mark confirmation (exact copy)

    This is a modal Overlay (dialog), opened by the toolbar button. Focus goes to Cancel.

    ┌──────────────────────────────────┐
    │ Mark this file untrusted?        │
    │                                  │
    │ From now on, any chat that reads │
    │ forwarded-offer.md is treated as │
    │ handling untrusted content for   │
    │ the rest of that chat:           │
    │                                  │
    │ • Every outward action asks you  │
    │   first, including ones your     │
    │   policy allows.                 │
    │ • Changes to skills,             │
    │   instructions or memory are     │
    │   flagged in the journal.        │
    │ • Where the egress proxy runs,   │
    │   web access narrows to the      │
    │   untrusted allow-list.          │
    │                                  │
    │ The agent can still read the     │
    │ file. Chats that already read it │
    │ are not changed.                 │
    │                                  │
    │ [ Cancel ]   [ Mark untrusted ]  │
    └──────────────────────────────────┘
    

    What each line maps to:

    • Line 1 matches the G6 "Implemented" paragraph: outward actions always ask.
    • Line 2 matches the journal flagging of steering writes.
    • Line 3 is qualified ("where the egress proxy runs") because narrowing only applies on the turn proxy.
    • "The agent can still read the file" holds the never-blocks-a-read rule.
    • "Chats that already read it are not changed" holds the out-of-scope line: no retroactive taint.

    After confirming, the button becomes pressed, the chip appears, and a polite live region announces forwarded-offer.md marked untrusted. No toast.

    Failure: if the server refuses or can't be reached, the dialog stays open with an inline red Callout: Couldn't save the mark. The file is not marked. The button and chip don't change until the host confirms.

    4. Clearing (exact copy)

    Yes, clearing warns.

    ┌──────────────────────────────────┐
    │ Clear the untrusted mark?        │
    │                                  │
    │ New chats that read              │
    │ forwarded-offer.md will no longer│
    │ be treated as untrusted.         │
    │                                  │
    │ Chats that already read it stay  │
    │ untrusted until they end.        │
    │                                  │
    │ [ Cancel ]       [ Clear mark ]  │
    └──────────────────────────────────┘
    

    "Until they end" is how the user sees sticky session taint. Focus goes to Cancel here too. The live region announces Untrusted mark cleared.

    5. Folders

    Files only. The button isn't rendered when a folder is selected (folders don't open in the viewer anyway). Folder and glob marking stay out of scope, as the issue says.


    Requirements check

    • Sticky, never blocks a read: the copy says so in both directions.
    • Honest about the proxy: narrowing is the only qualified line, and it is qualified.
    • Accessible names on every control: given above. All targets are 44px. At 320px the new button replaces about 44px of title width. The title already truncates, with the full path in title.
    • Host-side storage: the button and every cue read the host mark only, never brain.db or frontmatter.

    Open decisions

    A. What happens to the mark on rename or move? The host keys the mark by brain path. A mv by the agent or a pulled commit would silently drop it, and the renamed file would read clean.

    • (a) Key by path and drop silently.
    • (b) Key by path and keep orphaned marks. The tree's Untrusted filter (see C) lists them as missing so the user can re-mark.
    • (c) Follow renames through the change journal.

    Recommendation: (b). It's honest and needs no journal coupling. (c) can come later.

    B. Cue on chat file links and attachment rows? It needs a mark lookup per rendered link, a new read path. Recommendation: not in v1. The trust decision is made in the viewer, and the chat-side signal that matters is the session's taint state, which #1667 owns.

    C. Enable the "Untrusted only" filter? FilePanes draws it disabled with needs provenance. User marks are a partial provenance source.

    • (a) Enable it for marked files only now.
    • (b) Keep it disabled until the provenance record exists.

    Recommendation: (a), relabelled Marked untrusted so it doesn't claim to cover inbox or workspace origins.

    D. Shell reads. The copy says "any chat that reads" the file. The issue's detector covers file tools. A cat in Bash is caught only if commandTaintSource already classifies it, whether as fetching or unclassified.

    • (a) Confirm shell reads are covered.
    • (b) Change line 1 to any chat that opens forwarded-offer.md with its file tools.

    Recommendation: (a), because the plainer copy is better. Otherwise (b).

    E. Who can mark? Any authenticated user who can open the file, or the operator only? Recommendation: anyone who can open it. The mark only tightens rules, so it needs no extra authority. Clearing loosens rules for future chats, so it may deserve the same check as other loosening settings.

    F. Contract shape. The UI needs the mark on file content responses (untrusted?: { by, at }) and on directory listing entries (for the tree), plus PUT/DELETE routes for the mark. All additive. This is for confirmation, not a design choice.

  7. added
    needs: decision
    and removed
    needs: design
    on Oct 23, 2026
  8. schlessera commented on Oct 23, 2026

    @schlessera
    OwnerAuthor

    2026-10-23 triage at main f3c6fdc9f9c6321fda5a384cf8cfd8bf2e4846da: read the new design response and folded its unresolved rename/move, authority and visible-scope choices into the body. The proposal is not a maintainer ruling; retain needs: decision and no readiness. The existing native parent, P0 and milestone are preserved. The bounded eight-case production-classifier probe resolves the brief’s ordinary-cat question only; it supplies no new full runtime qualification. The current user interview starts with rename semantics, then authority and design scope. No choice is selected and no duplicate design prompt is posted.

  9. schlessera commented on Oct 23, 2026

    @schlessera
    OwnerAuthor

    Decision (maintainer, 2026-10-23): Option B for rename/move semantics, selected in the current issue interview. Marks remain keyed by brain-relative path. Retain missing/orphaned old-path records and expose them so the user can re-mark a moved file. Do not silently discard them or automatically follow renames through the journal. The new path remains unmarked until explicitly marked. This selects behavior, not the yet-unapproved missing-record UI.

    Folded the ruling into the body and acceptance criteria, including persistence and no-transfer proof plus durable decision-record delivery. Authority to mark/clear and the remaining visible scope/design approval are still unresolved; preserve needs: decision, no agent-ready, parent #1645, priority, assignment and milestone.

  10. 32 remaining items

  11. schlessera commented on Nov 2, 2026

    @schlessera
    OwnerAuthor

    Claiming for implementation (claim token claim-2673-412d7236). Branch: feat/2673-untrusted-file-taint from main b228b1f21. Collision check on the cited files reports only a closure overlap with draft evaluation PR #3056 (do-not-merge experiment); no path collision.

  12. added this to the 0.45.0 milestone on Nov 2, 2026
  13. schlessera commented on Nov 2, 2026

    @schlessera
    OwnerAuthor

    Delivered by #3287, squash f7eb0e498 on main. Its parent is 2bdcfec3b and its tree is 56d9d10e4, which equals the confirmed candidate checkout 80aa87089 (candidate run 41473471888). Milestone 0.45.0 is set on the PR and on this issue.

    • Host. Marks are stored in the UI database (074_untrusted_marks.sql) and served by four internal /api/files/untrusted routes. Readers can mark a file; only the owner can clear a mark or see missing records and marker labels, and the host filters both. An admitted file-tool read or a search naming a marked file records taint with source: "user_marked".
    • UI. Files gains the toolbar control, the purple cues, the Marked untrusted list and the Missing file dialog, using the approved revision 3 plus revision 2 copy and focus rules.
    • Records. The rulings are recorded under G6 in docs/decisions/governed-writable-workers.md.
    • Proof. Host tests, Chrome runtime tests at 320 and 1440 px in light and dark plus 200% zoom, and mutation receipts are in the PR. The main-push CI run is 41476872067.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

agent-readyarea: ui-reactarea: ui-servercontractpriority: p0securitytype: feat

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions