Skip to content

Epic: chat taint is visible and individually reviewable without clearing later triggers #3596

Open
12 of 17 issues completed

Description

@schlessera

Outcome

Every monitored taint exposure has a durable identity and a visible history indicator. A live owner can mark one finalized trigger safe without clearing any other trigger, and normal policy resumes only with complete detector coverage and zero unresolved triggers.

Why now

The original first-source-only sticky record could not support the requested retroactive review: deleting it could hide later inputs that were never retained. The user requested entry indicators with hover/tap reasons and a Mark as safe action, including a path back to normal policy.

Shared context

Part of #3428, under the controlled-egress work in #1645.

(sessionTaint, packages/ui-server/src/governance/session-taint.ts:10) and (recordFirstTaint, packages/ui-server/src/governance/session-taint.ts:21), createGovernanceWrites (packages/ui-server/src/governance/event-writes.ts:147), createTurnRecorder (packages/ui-server/src/activity/recorder.ts:134), prepareTurnEgress (packages/ui-server/src/brain/turn-egress.ts:87) and ToolCallTimeline (packages/ui-react/src/components/chat/tool-call-timeline.tsx:44) are the current boundaries.

The repository design and ADR are on main. The complete reviewed design and gpt-6-astra review disposition remain the recorded ruling. #3599/#3600/#3601/#3604/#3602/#3603 are delivered with complete selected candidate and automatic-main qualification. The prior source-pointer refresh was at main 29203c43424f1916e7b5d079db4b97da5dbb3ed4; this delivery reconciliation uses main 1619741f291f525d17cde4970a5ada40644117c1. Individual owner verdict mutation is now delivered by #3603 through merged #3661 at 1619741f291f525d17cde4970a5ada40644117c1. The persistent trust Settings/publication and qualified Git source-trust outcomes still require their separately scoped implementations. #3595 remains adjacent scoped network approval; classifier spike #3434 is separate.

Decision (maintainer, 2026-11-05)

The maintainer requested Settings CRUD for trusted origins and repositories/organizations, per-entry taint indicators with hover/tap details, and single-trigger human review that can restore a chat without clearing later triggers. This supersedes unconditional G6 stickiness for individually reviewed evidence once implemented. The requested gpt-6-astra source review found the exposure-lifecycle, coverage, authority, recipient-permission and provenance gaps; the revised design closes or explicitly qualifies them before implementation readiness. No additional runtime capability is claimed by filing this plan.

Constraints and non-goals

Keep evidence and provider conversation prefixes append-only. A human safe verdict does not remove content from model context. Only finalized exposures may be reviewed; an open stream/tunnel cannot exempt later input. Coverage is relative to a versioned detector contract with disclosed exclusions, not all possible untrusted content. Password-mode owners alone may mutate initially; other auth modes remain read-only until qualified. No global clear, model/agent/voice grant, retrospective source-wide update, inferred Git attribution or silent loss under capacity/retention.

Breakdown

The native sub-issue list carries implementation order and dependencies. Individual recovery, persistent origin settings and repository provenance are separate outcomes so repository transparency does not block the other capabilities. Contract/decision foundations precede production behavior changes; only fully specified foundations and bounded qualification work become agent-ready. Release milestones will be assigned when the work is actually committed to a release.

Current delivery — 2026-11-20

The original ten native children (#3599–#3606, #3725 and #3811) are closed. Integrated qualification #3606 is delivered by #4262, squash c5071f7025b4eab3ff40e2a7c77c5a0d8ee05542, with passing candidate confirmation 44756418291 and complete automatic-main proof 44759131939. All 17 successful main job checkouts match that squash; both installed provider-history guards, native cells, browser/layout and the integrated delayed-write/failure/restart/two-client journeys passed.

The first combined review’s #4267 safety-history resnapshot and #4268 grouped-reason repairs are closed through #4269, squash 63bb400b31403ee319926d38e223711a9bf0e7e1. The selected automatic main run passed on attempt 2 after an endurance image-pull failure before test execution. Operational controller recovery is tracked in #4272.

The follow-up combined review prompted four open native tasks: #4271 (approval revision qualification), #4274 (durable delivery obligations), #4275 (search path fidelity), and #4276 (known empty search results). Each retains its scoped acceptance criteria. Complete these tasks and reconcile the next combined review against their resulting main tree. Persistent Settings and Git provenance remain in their sibling epics.

Definition of done

  • Every distinct later trigger is retained even while already restricted, with lifecycle, coverage and finite-capacity behavior.
  • Resolving A leaves B/C, including later same-source C, unresolved. Only finalized individual verdicts plus complete coverage restore normal.
  • Indicators use the existing ShieldAlert/ShieldCheck/CircleHelp icon system with accessible hover/focus/tap details, exact attribution or honest fallback, and persistent reviewed history.
  • Live admissions revalidate evidence/policy/authority revisions after waits; recording failures retain restrictions.
  • Legacy clean/tainted/resumed/imported histories degrade honestly, and restart/two-client/provider-history proof passes.

Triage 2026-11-05 at main 35217d283b849b5ef81700d5d4c2ec7486405d12: verified source anchors and the published plan/review, retained all still-open output dependencies and existing native parent, and classified this requested but unscheduled work as priority: p2 without inventing a release milestone. This remains an epic, never an agent-ready coding task.

Source refresh 2026-11-07: folded the delivered decision/collector/verdict/history/live-admission foundations and source-anchor drift into the current context at 29203c43424f1916e7b5d079db4b97da5dbb3ed4. Definition of done, scope exclusions and all sub-issue criteria remain unchanged; no unfinished parent release commitment is inferred.

Triage 2026-11-08 at main 1619741f291f525d17cde4970a5ada40644117c1: Folded the recorded #3603/#3661 owner-verdict delivery into current context. Preserve the separate remaining UI, persistent trust and Git-provenance scopes, native membership and epic-only readiness. No new safety/runtime qualification is claimed.

2026-11-15 triage at main 3f8ff29341fbe25665cea42659f92e6f3d3ccef0: Folded #3605's qualified completion into the current native breakdown and refreshed source anchors; #3606 still owns the integrated outcome and the epic remains outside readiness.

2026-11-20 reconciliation: recorded #3606's merged and qualified delivery, verified the expanded native list (ten closed, #4267/#4268 open), corrected the proxy source-anchor drift, and retained the epic's definition of done and separate combined-review obligation. No epic closure is claimed.

2026-11-20 triage — Reconciled #4269 and the four open native review tasks with main 63bb400b3 and GitHub readback.

Activity

  1. added
    type: feat
    area: ui-sdk
    area: ui-server
    area: ui-react
    epic
    contract
    breaking
    security
    on Nov 5, 2026
  2. schlessera commented on Nov 5, 2026

    @schlessera
    OwnerAuthor

    Reviewable session safety and trusted sources

    Outcome and authority

    A person can inspect the inputs that put a chat into tainted mode, mark one
    trigger safe, and manage the origins and GitHub repositories or owners they
    trust. Clearing one trigger never clears another trigger, including a later
    one from the same source. A chat returns to its normal policy only when every
    recorded trigger is resolved and the host knows its trigger history is complete.

    The maintainer requested these semantics on 2026-11-05. The settled boundaries
    are recorded in the decision. This deliberately
    supersedes G6's unconditional session stickiness once implemented. It preserves
    append-only evidence and provider history, restrictive admission on uncertainty,
    ordinary deny/allowlist rules, budgets, credential boundaries and outward-action
    approvals. This is a design for future implementation; the current runtime is
    not changed by this document. Work and readiness belong in the issue tracker.

    Trust configuration belongs to the served brain, with empty built-in lists.
    Actual accounts, organizations and deployment configuration never appear in this
    public design or its fixtures. Fictional examples use the Odysseus world.

    Existing boundaries

    • Only the first taint is currently stored (recordFirstTaint,
      packages/ui-server/src/governance/session-taint.ts:17-23). A session query
      returns that first row (sessionTaint,
      packages/ui-server/src/governance/session-taint.ts:11-14). The hosted writer
      tracks pending first-taint writes (createGovernanceWrites,
      packages/ui-server/src/governance/event-writes.ts:57-85).
    • Tool ingestion has separate input and output classifiers (inputTaintSource,
      packages/ui-server/src/activity/ingestion-taint.ts:95-109;
      outputTaintSource, packages/ui-server/src/activity/ingestion-taint.ts:112-119).
      Workspace paths currently taint regardless of repository ownership.
    • The turn proxy memoizes taint and skips subsequent recordings (prepareTurnEgress,
      packages/ui-server/src/brain/turn-egress.ts:82-240). A raw CONNECT reveals
      only an authority and opaque bytes, not a repository path or inner protocol
      (startEgressProxy, packages/ui-sdk/src/server/egress-proxy.ts:123-352).
    • Outward decisions read session taint at admission (prepareOutwardPlan,
      packages/ui-sdk/src/server/outward-policy.ts:46-73). Existing historical
      steering attribution must remain attribution at the time of a write.
    • Governance policy is protected Markdown, validated by a strict schema
      (GovernancePolicySchema, packages/common/src/governance-policy.ts:99-128).
      The privileged proposal writer already provides exact-base review,
      descriptor-bound publication, authority rechecks and crash receipts
      (createPolicyProposals, packages/ui-server/src/brain/policy-proposal.ts:76-240).
    • Private reference access already matches canonical repository prefixes and
      live principal grants; that is access authority, not content trust
      (reference-source grants). Its
      fixed Git transport separates network acquisition from credential-free,
      network-free checkout (createReferenceTransport,
      packages/ui-server/src/brain/reference-transport.ts:97-170).
    • The Security and Devices & agents surfaces already exist; policy facts are
      currently read-only (AgentPolicyGroup,
      packages/ui-react/src/components/settings/agent-policy-group.tsx:8-51).

    Line citations describe the current working implementation, including the
    unmerged scoped-approval work tracked by #3595. That issue is an adjacent
    network-approval feature, not an implementation of persistent trust or taint
    resolution. The extraction-classifier spike #3434 remains separate.

    Every trigger, plus an effective state

    Keep an append-only ledger of taint occurrences and explicit owner decisions.
    An occurrence has a stable host-issued identity, session/history-owner and turn
    identity, server sequence and time, source kind, bounded/redacted evidence,
    operation identity when provable, and verified provenance when available. A
    trusted operation still has an auditable trust decision and policy hash; it
    never becomes an unrecorded assertion that the source was safe.

    Persist every distinct occurrence, even after the session is already tainted.
    Each occurrence has open, finalized or interrupted/unknown exposure state.
    Only a finalized, bounded input exposure may be marked safe. A stream/tunnel
    remains unresolved until it closes; the UI explains why review is unavailable.
    Stopping the operation permits review only after the host proves input delivery
    has ended. Later segments/results become new occurrences rather than inheriting
    a previous verdict. A lost host or uncertain completion remains restrictive.

    Deduplicate only the same host operation/occurrence identity, never by hostname,
    repository, command text or a time window. Unknown attribution stays unknown.
    Several signals may be displayed together only when their relationship is
    proven; grouping never discards their independent identities.

    A resolution references exactly one occurrence identity and the reviewing
    principal, idempotent request identity, channel, timestamp and explicit safe
    verdict. It never deletes or rewrites an occurrence. A compact, versioned
    projection reports unresolved count, earliest unresolved source, history
    coverage, durable revision and current restriction state. Repeated submission
    of the same request returns its receipt; reuse with a changed body is refused.

    Current state is normal only with complete coverage and zero unresolved
    occurrences. Otherwise it is restricted, with distinct reasons for recorded
    unresolved triggers and incomplete history. Pending new occurrences restrict
    admission immediately. Pending safe verdicts never loosen admission before
    commit. Database/write failures stop affected admissions rather than showing
    success or treating unknown as normal.

    The reducer and write worker serialize occurrence and resolution updates per
    session. New events committed while a review is open remain unresolved. A safe
    verdict authorizes only its immutable selected ID; a client cannot send a range,
    "clear through", origin-wide historical update or session-wide clear.

    Persistent trust rules

    Add a bounded taint.trusted_sources policy section with typed entries and
    stable opaque rule IDs: exact web origin, explicit tunnel authority, exact
    GitHub repository, or GitHub owner/organization. Include a user label, with
    matching entirely independent of that label. The settings API exposes these
    as the two requested lists: Trusted origins and Trusted repositories &
    organizations
    . Defaults are empty; no personal account is compiled in.

    An origin is a canonical scheme, hostname and effective port. Accept HTTP and
    HTTPS origins without paths, credentials, query or fragments; define IDNA,
    trailing-dot DNS, IPv4/IPv6 and unsupported-proxy forms in the canonical parser; lowercase DNS
    names and normalize default ports. No substring, implicit subdomain or wildcard
    matching. A raw CONNECT endpoint is shown separately as host:port · tunnel;
    it cannot borrow a web-origin rule or pretend to establish HTTPS. No origin
    rule covers a redirect destination automatically. Unknown or unverified
    provenance offers only an occurrence-specific review.

    A GitHub selector is exact github.com plus either one owner or one owner/repository,
    matched at path-segment boundaries with GitHub's case-insensitive identity
    semantics. Normalize an optional .git suffix through a single canonical
    parser. Reject lookalike hosts, credentials, encoded separators, traversal,
    extra path components and ambiguous remote helpers. Pin identity semantics in the repository qualification: owner rules explicitly
    cover current and future repositories currently owned by that namespace. Exact
    repo rules require a verified stable repository identity plus the approved
    owner boundary: name reuse or transfer must not silently inherit a grant.
    Rename, transfer and metadata unavailability need tested behavior before these
    rules enforce. A name parsed from a worker-provided remote is not identity proof.
    Supporting another Git host is a later concrete implementation, not a new seam.

    A trusted source does not produce a new unresolved taint when a verified future
    input matches its incoming-content capability. It still records the matched rule
    ID, exact policy hash, collection revision and provenance, surviving subsequent
    rule deletion. Auto-trusted input can be collapsed by default in history while
    remaining inspectable. No origin rule overrides ordinary egress deny/allowlist
    settings, byte ceilings, provider routing, credentials or outward write approval.
    Repository trust never becomes a host-wide GitHub exemption or a Git push,
    force-push or arbitrary configured pull permission.

    Source trust and destination permission are separate capabilities on a rule.
    Trust incoming content is the source-trust choice; Allow sending data while
    restricted
    is an additional explicit origin/tunnel capability, off by default.
    A source-only rule never bypasses a taint-network card after another trigger.
    The review names that broader recipient effect in its primary control when
    selected, not merely in helper text. Repo/owner rules grant source trust for
    qualified Git reads only, never general recipient permission. #3595's one-time
    and chat-session network grants remain independent, narrower-lifetime approvals.

    Rules apply prospectively from their recorded publication revision. Creating,
    editing or deleting a rule never reclassifies previously recorded occurrences.
    Removing a rule affects future matching; it does not undo a person's historical
    safe verdict. Changing a rule's target is a reviewed remove/add, retaining the
    old audit identity. Duplicate/equivalent normalized entries are rejected or
    returned as the existing entry, never shadowed silently.

    Repository identity must be enforced, not guessed

    Raw Git shell commands and the existing shared TLS proxy cannot prove which
    repository supplied a connection. A familiar directory name, origin string,
    GitHub hostname or an overlapping tool-call window is insufficient. Checking
    an argv then exempting the next GitHub connection would allow unrelated traffic
    to borrow the decision.

    Use a fixed, host-mediated Git read path with a canonical owner/repository
    bound to the actual transport. Reuse managed reference acquisition and its
    credential/grant checks where it fits. Qualify how ordinary clone, fetch
    and pull reach that path without disabling existing raw Git behavior. An
    owner-scoped smart-HTTP read relay plus injected Git URL rewrites is a concrete
    candidate, not yet an accepted implementation: qualification must prove its
    Git configuration, private-access, push, protocol, redirect and concurrency
    behavior against installed Git. The spike must also prove that arbitrary worker clients
    cannot use the relay as generic authenticated HTTP, credential probing,
    receive-pack/upload or unrestricted object/ref acquisition. Every request binds
    the live principal, allowed repo/ref/read operation, byte accounting, cancellation
    and credential grant. Test protocol v2, URL-rewrite precedence, push URLs,
    configuration overrides and revocation during parallel requests. If that candidate cannot enforce the boundary,
    use an explicit managed operation rather than a hostname exemption.

    Private access continues to require the existing principal/credential grant;
    trust is never permission to acquire a private repository. SSH, LFS, submodules,
    redirects, custom helpers and fork/PR refs require independently proven provenance
    and explicit handling. Initially only qualified ordinary branch/tag acquisition
    may be trusted; PR/fork refs cannot inherit owner trust. Trusting accepted branch
    content also accepts that it may include upstream contributions. pull is a
    local mutation/configured execution as well as acquisition, so only a separately
    qualified read phase is eligible. Unsupported paths retain their restrictions and
    are surfaced as such. A trusted parent never grants a foreign submodule/fork.

    The host records acquisition provenance and the immutable revision/root
    identity. Initially only immutable managed-source bytes may inherit repository trust.
    Directory lineage alone never blesses mutable content. Writable worktrees need
    a separate bounded qualification of per-file/read-bound content provenance and
    invalidation on edits, copies, merges, generated files and refresh. Until that
    is qualified and implemented, their reads retain current restrictions. Rewriting local remotes or naming a
    directory after a trusted owner cannot establish it. Symlink/hard-link escapes,
    new nested repositories and foreign mounts cannot inherit trust. Explicit
    user-untrusted file marks take precedence and need their own selected review.

    Mark as safe: resolve one event, optionally trust future operations

    In the chat's host-owned history, render each restriction-triggering event
    beside its operation where correlation is authoritative, otherwise as a named
    network/source event within its turn. Show the reason, time, source, evidence
    coverage and current verdict. Never identify an opaque connection as a specific
    Git command merely because their timestamps overlap.

    Mark as safe opens one compact scope chooser:

    • Only this trigger is the default: resolve the selected finalized occurrence
      only. Display authoritative operation grouping and per-trigger counts, without
      promising that resolving one signal resolves every signal from the operation.
    • Trust this origin is offered only with verified web origin, or an explicitly
      labelled tunnel destination. It saves incoming-content trust for the future and resolves only the
      selected finalized occurrence; destination permission is a separate unchecked
      choice with its own explicit effect.
    • Trust this repository is offered only with host-verified repository
      identity. Organization-wide trust is managed separately in Settings so this
      action does not silently widen a one-repository decision.

    The review shows the exact target, the standing rule's effect and the current
    remaining-trigger count. Marking an input safe is a human risk decision: its
    content remains in the model context. Other occurrences, including later occurrences from
    that same origin or repository, remain unresolved. A settings-only CRUD action
    changes no occurrence. After a decision, annotate the original event Marked
    safe by you
    , append the human decision receipt, and show either Normal
    policy restored
    or Still restricted · N other triggers. Coverage gaps have
    separate wording; never print normal merely because a fetched page is empty.

    Only the live owner can save trust or resolve taint in password mode. For the initial implementation, proxy, tailscale and local/no-auth modes are
    read-only for trust mutation and safe verdicts until an independently qualified
    human-owner mechanism exists; a proxy username or network location is not that
    mechanism. Explicit capabilities explain this limitation. The access contract
    pins read visibility, browser-origin/CSRF policy, commit-time revocation and
    private-acquisition behavior for each mode. Existing reference-grant restrictions
    are not bypassed for ambient principals. An agent credential, model
    tool call, voice transcript, request-body principal, or a forged channel: card
    never supplies that authority. Recheck authority/brain/session identity and the
    auth epoch at commit. Auth revocation clears pending UI work without replay.

    Reuse/extract the existing descriptor-bound protected publication core rather
    than adding a second file writer or fabricating an agent turn. Settings review
    has a host-owned operation identity bound to principal, brain, selected trigger,
    exact reviewed bytes and policy base hash. Durable stages distinguish prepared,
    file-published, verdict-committed, partial and unknown. Publication proof must
    survive a restart; matching current file bytes alone is not proof that this
    operation published them. Unproven crash completion remains unknown and needs
    fresh review, never blind replay. For a combined rule-and-resolution request, publication is a recoverable
    ordered operation: save the reviewed rule with an exact-base check, then commit
    the single-event verdict. A crash/failure between those commits leaves the
    original taint active. Return an explicit partial receipt when the rule was
    saved but the event was not resolved; an idempotent retry must not silently
    republish or clear a different event. If another device removes the rule
    before verdict completion, the receipt states its current absence rather than
    claiming that future trust remains enabled. A failed rule publication leaves the
    original occurrence unresolved. No successful all-or-nothing claim spans the
    Markdown and SQLite authorities without proof.

    Settings and transcript interaction

    Place both trust lists in Settings → Security, separate from passkeys and
    sign out, following the existing kit typography and controls. Each list has an
    empty explanation, Add origin or Add repository or organization, full
    canonical targets, and Edit/Remove actions with accessible names. Forms
    use persistent labels, target-type validation and a specific Save/Remove review
    that states the effect. Invalid policy and stale-base errors preserve the draft
    and link to the enforcing policy. Show last-valid/default policy honestly.

    At 320px, rows become stacked target/detail/actions with 44px targets and wrapped
    host/repository text; desktop uses the same records with inline actions. No
    settings rebuild or new visual language is needed. Preserve focus across edit,
    removal, error recovery, drawer width changes and background invalidation.

    Each affected entry has a compact indicator using the existing kit policy
    icon (Lucide ShieldAlert) for unresolved taint, secure (ShieldCheck) for
    an explicitly reviewed safe occurrence, and unverified (CircleHelp) for
    incomplete/unknown evidence. Use these states with accessible text, never color
    alone. The safe shield means Marked safe by you, not Verified safe.
    A count represents multiple independently reviewable triggers on the same entry;
    a collapsed tool run retains a summary indicator so hiding steps hides no risk.

    Hover and keyboard focus expose the short reason and scope. Click, Enter/Space
    or tap opens a persistent anchored details panel with source, timestamp,
    provenance/coverage, verdict and the Mark as safe action. The indicator is a
    44px reachable button with a state-and-count accessible name, expanded state and
    focus return. Do not put actionable controls inside a tooltip. Touch details
    stay open until explicit close or outside dismissal; Escape closes them. A
    resolved marker remains in history and still opens its decision evidence.
    Attach to the exact tool/message entry only with authoritative correlation;
    otherwise use a separate turn-scoped network event, without blaming the nearest
    message. Examples of accessible names are Safety restrictions: 2 unresolved
    triggers
    and Marked safe by you: show details. Reuse the kit's icon map
    (ICONS, packages/ui-kit/src/primitives/Icon.tsx:131-193).

    The transcript uses a compact safety notice, not an assistant-generated message
    or modal interruption. It records every new trigger even when another trigger
    already restricts the session. Mark-as-safe pending/error/partial/safe states and
    the session restriction count are shared between devices and recovered after
    reload. A stale device cannot optimistically label the chat normal. A browser
    with insufficient authority sees the event and its reason without grant buttons.

    A 320px event can read:

    Safety restrictions enabled
    Git read · github.com/odysseus/navigation
    Source: fetched repository · 12 Jul, 10:00
    2 unresolved triggers
    [Mark as safe]
    

    After reviewing this one event:

    Marked safe by you · 10:05
    Still restricted · 1 other trigger
    

    The UI must also handle unavailable provenance, duplicate deliveries, unbound
    first-turn session identities, rapid consecutive triggers, deleted sessions,
    expired/pruned Activity detail, auth loss and cancelled requests. Structured
    host evidence is text, never trusted HTML or model-provided instructions.

    Admission, history and compatibility

    Remove sticky in-memory taint booleans and route proxy admissions, backend
    outward decisions, policy-derived allowances and new journal attribution through
    one revisioned live projection. Resolve-versus-new-event races must remain
    restrictive. Pin an admission commit point immediately before irreversible
    dispatch, using the tuple of session-evidence revision, trust-policy revision
    and authority epoch. Revalidate after every async wait; an old granted boolean
    cannot stand in for a live standing rule. Distinguish an explicit once grant
    from authority derived from a rule that has since been removed. Failed
    occurrence recording leaves a durable restriction/coverage latch until recovery,
    not a pending entry that disappears while another turn can dispatch.

    Only taint evidence and the new trust-policy revision become live within this
    feature. Ordinary governance budgets/commands/profiles keep their admitted-turn
    semantics; broad policy hot reload is out of scope. Successful Remove fences new
    dispatch on active turns before its receipt reports enforcement; already
    irreversibly dispatched operations cannot be recalled. Source-rule removal
    while input is still arriving must finalize/split that exposure at the rule
    boundary or interrupt it; later input never inherits the removed source grant.
    Invalid trust publication retains last-valid policy and honest error facts.
    A mid-turn human clear changes only later admissions; already
    denied, approved or in-flight operations are not replayed automatically. Stale
    pending approval cards are withdrawn/expired through the existing coordinator
    before a covered operation is retried, with a visible terminal receipt.

    Keep all historical egress/approval decisions, journal taint attribution and
    policy hashes as facts at their original times. UI security annotations and
    future human decision receipts live in host-owned storage. They never edit the
    provider's system prompt, tools, earlier messages or scripted answers. If the
    agent must learn a state change, only a necessary new tail event/tool result
    may say it; do not inject internal ledger data into provider history.

    Add bounded authenticated safety-history snapshots and incremental revisioned
    updates to the SDK/host/client contract, using existing session/history identity
    and replay boundaries. Include coverage, cursor/high-water identity and deletion
    semantics. Define pagination and a complete-snapshot marker so page omission is
    not mistaken for zero unresolved events. Auth revocation and history retirement apply to this host evidence too.
    Keep aggregate unresolved state independent of paginated detail. Bound rows,
    bytes, write queues and idempotency retention: capacity exhaustion stops/restricts
    new ingestion before it can lose evidence, never silently drops a trigger.
    Unresolved state and minimal audit/tombstone metadata survive detail pruning and
    unbound-row retention until safe binding or explicit session retirement. Late
    callbacks and expired request IDs cannot recreate a deleted session. Deletion
    removes private evidence per the existing history contract while retaining only
    the permitted bounded retirement tombstone for stale-reply refusal.

    Coverage means completeness relative to a versioned enumerated detector
    contract, never all actual untrusted input. Preserve and disclose the existing
    proxied-shell local-read exclusion unless a separately qualified detector closes
    it. Record all applicable input and output signals independently; a trusted
    input does not suppress an untrusted output. Pin granularity for multi-file
    searches, mixed sources and redirects; enumerate mandatory detectors and known
    exclusions. Backend changes, resumed/imported/forked histories and pre-session
    binding carry collection-epoch and coverage facts rather than an assumed clean
    start. All pre-upgrade sessions need classification, including those with no old
    taint row. Newly instrumented sessions have complete collection only after every
    mandatory detector reports the new recorder/epoch; never claim exhaustive
    content safety. Legacy first-taint rows cannot prove the
    absence of later triggers: migrate them with incomplete coverage. A retained,
    fully verifiable history may be reconstructed by an explicit tested migration;
    otherwise resolving the known legacy event leaves history-unknown restrictions,
    with a clear option to start a new chat. Do not fabricate missing events or
    provide a disguised global clear. Changing trust rules does not fix old coverage.

    Contract additions include the policy section, review/query receipts, event
    schemas and history/update DTOs. Changing effective taint stickiness is a
    breaking-before-1.0 behavior change requiring the maintainer ruling, breaking
    and contract labels, a CONTRACT: commit, a minor changeset naming the break,
    and a dated G6 supersession. Update provider capability wording without mutating
    an existing provider conversation prefix. Existing sessions can still carry old sticky-policy
    wording: do not regenerate their system prompt on upgrade. Only a necessary
    once-only tail fact can communicate changed enforcement.

    Sequencing and proof

    First pin the decision, ownership/auth matrix, identities and compatibility
    contracts. Recording every occurrence and trustworthy coverage must land before
    any feature can clear a trigger. In parallel, define the protected policy trust
    model and qualify repository-scoped transport/provenance. Then integrate the
    live effective state and verified source matching into every enforcing path.
    Expose owner review and Settings/history controls only when their host reports
    that complete enforcement is available. Occurrence-specific review can ship independently of persistent trust, and
    origin trust can ship independently of repository transparency. Cross-device
    recovery and legacy rollout proof qualify each advertised capability before
    personal configuration is enabled. The tracker uses separate outcomes for
    individual reviews, persistent settings and verified repository trust rather
    than blocking the entire feature on transparent Git interception.

    Each implementation task supplies its own meaningful failing-first or mutation
    receipt. Integration proof uses real loopback transport and Git fixtures with
    multiple owners/repositories, real browser tests at 320px/desktop in both themes,
    real write-worker failure/restart injection, and both keyless provider-history
    guards. No network or provider key is needed in tests.

    The decisive scenario has A, then B, then C from A's same origin. Resolving A
    and saving its future-origin rule leaves B and C active; a future matching D
    creates no new unresolved occurrence. Resolving B still leaves C active; only
    resolving C can restore normal policy with complete coverage. Repeat with
    simultaneous tool and proxy events, a late write, a stale tab, origin/repository
    rule revocation, a crash between file and ledger commits, legacy incomplete
    history, a redirected Git request and a repository-identity spoof. Deny rules,
    byte ceilings, private-access requirements, outward writes and voice authority
    remain independently enforceable throughout.

  3. schlessera commented on Nov 5, 2026

    @schlessera
    OwnerAuthor

    Requested gpt-6-astra review and disposition

    The requested reviewer inspected the design and current recorder, governance writer, proxy, outward-policy path, protected policy writer and reference transport. This was a source/design review, not runtime qualification, and the reviewer changed no files. The draft was revised after review; no claim is made that this revision received a second review or that unbuilt capabilities already enforce.

    The reviewer found four blocking gaps and eight major gaps. All are addressed in the revised plan or made explicit qualification prerequisites:

    1. Unfinished exposure: only finalized input triggers can be marked safe. Open streams/tunnels and delayed/unknown input remain unresolved; later segments need new events. The implementation must test streaming and late input, not just completed calls.
    2. Source versus recipient authority: separate incoming-content trust from permission to send data while restricted. Recipient permission defaults off, is explicit in the review, and stays independent of ui-server: offer once, origin and session scopes for tainted network approvals #3595's session grants.
    3. Coverage: enumerate and version detector coverage and known exclusions. Collect applicable input/output signals independently; classify every pre-upgrade session, including those without an old taint row. No claim of detecting every actual untrusted input.
    4. Admission races: revalidate evidence revision, trust revision and authority epoch after async waits immediately before irreversible dispatch. Failed recording retains a restrictive latch; a past boolean is not a current standing grant.
    5. Active policy changes: only the new trust revision and effective taint update live. Other governance policy remains turn-bound. Removal must fence new dispatch before returning its enforcing receipt, and ongoing source exposure must split or stop at that boundary.
    6. Protected publication: reuse/extract its privileged core with a Settings operation identity, not an agent turn. Persist prepared/published/verdict/partial/unknown stages. Recovery requires publication proof; matching file contents alone do not authorize replay. Report when another device has since removed a saved rule.
    7. Mutable source lineage: initially trust immutable acquired bytes only. A separate bounded spike must qualify per-file/read-bound content identity and invalidation before any writable-worktree exemption; root membership is not enough.
    8. Transport feasibility: a bounded real-Git spike must prove principal/repo/ref/read binding, no generic authenticated HTTP/credential probing/write or arbitrary object access, bytes/cancellation and private-grant revocation. Explicit managed acquisition is a valid fallback; transparent Git is not a blocker for basic recovery/settings.
    9. Namespace identity: owner rules explicitly include future repositories in the current namespace; exact repo rules require stable identity and approved-owner semantics. Rename/transfer/name reuse and PR/fork ref behavior must be qualified.
    10. Operation wording: the default is Only this trigger. One operation may have multiple signals; authoritative grouping can display them but cannot hide their independent unresolved IDs.
    11. Human authority matrix: initially only live password-mode owners mutate. Proxy, tailscale and local/no-auth modes are explicitly read-only for these controls until human-owner authority is independently qualified. Agent credentials and forged UI/channel fields do not count.
    12. Retention/capacity/idempotency: aggregate state is not derived from a page; unresolved state and minimal audit facts survive detail pruning. Overflow stops/restricts ingestion rather than dropping triggers. Retired sessions cannot be recreated by late replies; request identity has bounded explicit lifetime and conflicting retries are refused.

    The added entry-indicator requirement is included: existing kit ShieldAlert (policy) for unresolved, ShieldCheck (secure) labeled Marked safe by you, CircleHelp (unverified) for unknown coverage, counts for multiple triggers, collapsed-run summary, hover/focus reason, persistent tap/click/keyboard details and actions outside tooltips. No color-only state, false verification claim or guessed attribution of opaque traffic to a nearby tool.

    The work is split into three epics: individual trigger review; persistent source/recipient settings and optional future-rule workflow; verified repository acquisition/provenance. Only specified foundations become ready first, and the transport/mutable qualification tasks are bounded spikes. The public project contains no actual trusted owner seed list or deployment details.

  4. 18 remaining items

  5. added
    priority: p1
    on Nov 11, 2026
  6. schlessera commented on Nov 11, 2026

    @schlessera
    OwnerAuthor

    2026-11-11 triage: folded the closed #3725/#3726 binding-settlement delivery into the body and reconciled the remaining #3811/#3605/#3606 native outputs. Earlier draft/wait statements are historical. This does not claim those separate outputs or the final combined epic review are complete.

  7. schlessera commented on Nov 11, 2026

    @schlessera
    OwnerAuthor

    2026-11-11 final readback: #3811 was closed concurrently through #3977. Updated the delivery inventory to eight of ten complete; only #3605 and #3606 remain open. Their assignments and final combined-review requirement are preserved.

  8. schlessera commented on Nov 15, 2026

    @schlessera
    OwnerAuthor

    Epic reconciliation — 2026-11-15. Nine of ten native children are closed. #3605 is delivered through #3662, test-only recovery #3999 and fresh inclusive main run 43612181306 at 03805baf5c0dc22e8dbd991956039c61b53641d0. Its completion receipt maps all seven original criteria and retains earlier failed runs. Source/ancestry and the successful push identity were checked at main 3f8ff29341fbe25665cea42659f92e6f3d3ccef0; this is no fresh runtime or independent full job-log audit.

    #3606 is now the sole open native child: complete integrated recovery/security proof, then assess this epic's full definition of done. It is agent-ready without needs/blocked; this parent remains open without agent-ready. Sibling persistent-trust and Git-provenance outcomes, assignments and release attribution are unchanged.

  9. schlessera commented on Nov 20, 2026

    @schlessera
    OwnerAuthor

    Final combined epic review — 2026-11-20

    All ten sub-issues are delivered. #4262 (#3606) merged as c5071f7025b4eab3ff40e2a7c77c5a0d8ee05542, and its automatic-main qualification is still being reconciled. The requested combined-commit review ran in a fresh gpt-6.2-astra context at main c5071f7025b4eab3ff40e2a7c77c5a0d8ee05542. It read this epic, the reviewed design and earlier review/disposition, every sub-issue's criteria, the plan, the decision and AGENTS.md, and it changed no files. The findings are recorded verbatim:

    1. packages/ui-react/src/lib/safety-client.ts:51 — When more than 100 records accumulate between subscription polls, the host drops the subscription and sends capacity. The client clears the evidence without requesting the fresh paginated snapshot required by the wire contract. Both new and previously visible triggers stay unavailable in the selected chat until reselection or reconnect.
    2. packages/ui-react/src/components/chat/safety-indicator.tsx:75 — A grouped indicator always takes its hover, focus and accessible reason from the first occurrence. If a reviewed web fetch precedes an unresolved workspace read in a collapsed run, the indicator reports one unresolved trigger and names the web fetch as its reason. The owner gets the wrong source for the restriction that remains.

    Both are being verified and filed as sub-issues of this epic. The epic stays open until they are delivered and a follow-up combined review of the resulting commit is clean.

  10. schlessera commented on Nov 20, 2026

    @schlessera
    OwnerAuthor

    2026-11-20 delivery reconciliation: #3606 is complete through #4262, squash c5071f7025b4eab3ff40e2a7c77c5a0d8ee05542. Candidate confirmation and automatic main 44759131939 passed; all 17 successful main execution checkouts were verified, including the installed provider guards and full selected heavy proof.

    The original ten native children are closed. The expanded native list still has #4267 (capacity subscription-loss resnapshot recovery) and #4268 (unresolved source reasons in grouped indicators) open. Their fixes, proof and combined-review dispositions remain. The epic body now reflects this current state; #3596 remains open for the parent to complete that work and reconcile the final review.

  11. schlessera commented on Nov 20, 2026

    @schlessera
    OwnerAuthor

    Follow-up combined epic review — 2026-11-20

    #4269 delivered #4267 and #4268 at main 63bb400b31403ee319926d38e223711a9bf0e7e1, and that commit is qualified. The follow-up combined-commit review ran in a fresh gpt-6.2-astra context at that commit, with the same scope as the first review plus #4267 and #4268. It changed no files. The findings are recorded verbatim:

    1. packages/ui-server/src/governance/safety-collector.ts:125 — Two concurrent same-tool calls admitted under one tool-use ID share one durable result obligation. The first recorded result discharges it and finalizes their occurrences. If the second call is interrupted without a result hook, collection end sees nothing owed. The owner can then clear the first exposure despite the second call's unknown delivery.
    2. packages/ui-server/src/activity/ingestion-taint.ts:202 — The search detector splits every path at its first colon, including structured Glob filenames. A marked file named notes/voyage:home.md is looked up as notes/voyage. That prefix passes the path check, so a root-level search can return the marked file without recording either its explicit mark or an unknown-remainder trigger.
    3. packages/ui-server/src/activity/ingestion-taint.ts:204 — Pi's grep emits the literal No matches. for an empty result. The detector treats that known empty response as an unparseable path and creates an unresolved legacy_unknown occurrence. A search of an ordinary directory that returns no files therefore restricts a previously normal chat and requires an owner verdict.
    4. packages/ui-sdk/src/server/outward-policy.ts:82 — After a per-use approval, both backend gates await input collection. The final check compares scope, policy hash and authority epoch but omits evidence and trust revisions. An independent trigger during that wait leaves the old approval eligible. The pinned commit also lacks the held-wait backend dispatch qualification required by backends: qualify post-card revision fencing across tool input collection #4271, which is still open.

    Findings 1–3 are being verified and filed as sub-issues. Finding 4 is tracked by the existing #4271, which is being attached here. The epic stays open until they are delivered and another combined review is clean.

  12. schlessera commented on Nov 20, 2026

    @schlessera
    OwnerAuthor

    Epic state — 2026-11-20. Twelve native children are closed, including #4267 and #4268 through #4269. The follow-up review now tracks #4271 and #4274–#4276 as the four open native children. Their proof and the next combined review remain the closure criteria.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: ui-reactarea: ui-sdkarea: ui-serverbreakingcontractepicpriority: p1securitytype: feat

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions