Skip to content

CONTRACT: feat(ui-react): review individual safety triggers in chat - #3662

Merged
schlessera merged 19 commits into
mainfrom
feat/3605-chat-safety-20261107
Nov 14, 2026
Merged

schlessera merged 19 commits into
mainfrom
feat/3605-chat-safety-20261107

Conversation

@schlessera

@schlessera schlessera commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner

Refs #3605

Qualification pending: current-main refresh and local preflight are complete. Exact-candidate and automatic-main proof remain. All seven original acceptance criteria remain unchanged.

What changed

Chat entries show host-owned safety evidence through explicit turn and SDK tool correlation, including collapsed tool runs. Opaque input receives its own named turn event. Persistent details expose source, time, provenance, finalization and individual human verdicts. Password-mode owners can review Only this trigger; reviewing A preserves its Marked safe by you history while B/C remain unresolved.

Read and review capabilities are independent. Optional snapshot-pinned entries=1 / includeEntries:true metadata preserves older readers' strict shapes and survives detail pruning. Sidecars and review receipts stay outside provider-facing messages.

Containment and recovery

Uncertain, incomplete, stale or disconnected evidence disables review and normal-policy claims for that evidence scope. Labeled read-only history and ordinary chat remain available. A fresh authoritative snapshot restores eligible controls. Retained data is partitioned by host principal, session and auth epoch; auth loss, owner changes, deletion and refused reads purge the corresponding details. Reload/reconnect never replay a decision. Only complete, healthy zero-unresolved evidence prints Normal policy restored.

The refresh incorporates delivered session-binding, tracker-recovery and safety-target fixes. Host-only or invalid selections remain unavailable; valid sessions preserve correlation, paging, subscription and gap recovery. Current main's voice accessibility, test-health and trusted Pi web-executor changes are included.

Delivery

Merged as c82e30ae46cbd0815963147a73059fd6c476541c, with parent d64f893b513a5a1f6cd88735730ed5b0c4a74056 and tree 2c0790a5fa5f854d4f0758bde3c4e85e2a5bd832, matching the inspected candidate. Presence on fetched main and the immutable squash identity are verified.

Candidate confirmation 43595676137 passed. All eight selected jobs' actual checkout identities were independently verified. The four actual installed-backend provider-history suites pass 35 cases (Claude 19; Pi 16), verified from their worker JUnit reports.

Original automatic main run 43597810774 failed layout shard 2 and its aggregate. All 17 actual checkouts are verified: the other 15 jobs pass, including all 35 actual provider-history cases, four healthy native cells and the separate expected negative control. The failing transcript-ownership test directly clicks an initially clipped Details stop. The pinned original and reverse controls fail; the existing hover-and-click helper passes all eight cases. Declared recovery #3999 is a test-only repair for incident #3993. #3605 stays open through qualified automatic-main recovery.

Validation

Head 821569a3fdf5beb129da5fe86712478906a47a1c, live main base d64f893b513a5a1f6cd88735730ed5b0c4a74056, tree 2c0790a5fa5f854d4f0758bde3c4e85e2a5bd832. The actual synthetic merge d544b69875670daa98ad5f8198ce02a47110e62b and its parents/tree were independently verified against Git and the immutable API. This conflict-free refresh incorporates #3991's per-turn web recipient admission and #3992's host-owned current-model search. Thirty-seven contribution inputs are byte-identical; the SDK API report and package API contract compose the new model interfaces. The lockfile is unchanged from the verified copied installation of pinned pi-web-access 0.41.0.

  • The affected thirteen-package build, strict typecheck at 6,144 MiB, API reports regenerated unchanged relative to merged inputs, and complete pending changeset plan pass on this combined tree.
  • Fresh combined proof passes 725 tests / 66,905 assertions / 52 files. It covers safety read/review/correlation, real FULL writer/relay controls, real first-level executor containment, per-turn web recipient admission, budgets, installed model scope, host-owned subscription refresh/cancellation/custody and loopback providers. Backend worker protocol fixtures replace their worker launcher and do not establish full native containment.
  • bun run check:pr --base origin/main passes all five gates with 1,017 tests / 6,640 assertions / 42 files.
  • The last explicit first-level namespace probe passed; the nested namespace boundary used by provider-history capture failed locally. Earlier installed-backend capture failures remain attached to their actual execution identities, before prefix assertions. This combined head still requires selected hosted native and actual both-backend provider-history qualification.
  • Original mutation receipts cover exact attribution, retained pruned IDs, strict old-reader shapes, live owner checks, late receipts, automatic replay, open input, collapsed counts, disconnect display and incomplete normal-state display. Named failing/restored executions, including EXACT_TURN_TOOL_JOIN, NO_AUTOMATIC_REPLAY_AFTER_UNKNOWN_RESULT and PARTIAL_STATE_CANNOT_PRINT_NORMAL, retain their original identities.
  • The earlier 102-case pinned offline browser execution retains its actual e21f23b62 / 4a8c43f identity. Fresh selected browser/native/main proof for this combined head remains required. Upstream automatic-main workflow summaries are successful for both CONTRACT: feat(backends,ui-sdk,ui-server): admit each web provider request for the calling turn #3991 and CONTRACT: feat(backends,ui-sdk,ui-server): search on the turn's own Pi model through host-owned auth #3992; they are distinct executions and are not this branch's candidate or main proof.
{"version":1,"kind":"brain-check-pr-receipt","head":"821569a3fdf5beb129da5fe86712478906a47a1c","base":"origin/main","mode":"focused","startedAt":"2026-11-14T12:32:18.590Z","finishedAt":"2026-11-14T12:33:29.054Z","checks":[{"name":"all lint and leakage gates","categories":["changeset"],"outcome":"passed","elapsedMs":14500.705484},{"name":"environment documentation","categories":["changeset"],"outcome":"passed","elapsedMs":107.03291199999876},{"name":"pending changeset package names","categories":["changeset"],"outcome":"passed","elapsedMs":67.9961289999992},{"name":"contribution changeset","categories":["changeset"],"outcome":"passed","elapsedMs":34.04112199999872},{"name":"affected fast invariants","categories":["verify","unit"],"outcome":"passed","elapsedMs":55737.911614000004}]}

Collision scan at 821569a3fdf5beb129da5fe86712478906a47a1c: closure: #3054, #3069, #3116, #3437, #3464, #3581, #3806; textual: #3056, #3059, #3393, #3622. Existing branch ownership is preserved.

Checklist

  • Current exact-candidate proof and both actual provider-history guards pass.
  • Every selected category on the actual squash's main run passes, including supported-host native and browser proof.
  • All seven original issue criteria and required delivery qualification are complete.
  • PR and issue retain release milestone 0.45.0 (60).
  • Additive minor changesets, CONTRACT metadata, integration contracts and API reports are retained.
  • Leakage gates pass; sidecars add no provider conversation content.

Anything left open

Complete declared recovery #3999 through ordinary confirmation, verify its actual squash and a green automatic main run including layout, then reconcile #3993 and #3605. The failed original main identity remains retained; its passing jobs are not relabeled as recovery execution.

Standing rules, Settings publication, repository matching, #3606's combined recovery journey and both final combined epic reviews remain separately scoped. #3613 is in progress as the repository-identity prerequisite for #3622. Failure-image retention is tracked by #3663; no Uploads attachment is claimed.

@schlessera schlessera added this to the 0.45.0 milestone Nov 7, 2026
@schlessera schlessera added type: feat A new capability or a change in user-visible behaviour. area: ui-sdk Wire protocol, runtime schemas, the server and client SDK surfaces. area: ui-server Hono app factory: turn coordinator, auth, session catalog, routes, cron. area: ui-react React chat/files/voice components, stores, WebSocket transport. area: ui-kit The presentational design kit: components, tokens, Storybook, visual baselines. contract Touches the integration contract: CONTRACT: commit, contract doc updated in the same commit. breaking Breaks a published API or documented behaviour. Needs a maintainer ruling before code. security Auth, isolation, egress, secrets, or anything in the threat model. labels Nov 7, 2026
@uploads-sh

uploads-sh Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

No uploads on this PR yet

This PR changes UI files (packages/ui-react/src/components/chat/chat-page.tsx, packages/ui-react/src/components/chat/message-bubble.tsx, packages/ui-react/src/components/chat/safety-indicator.tsx and 6 more). Screenshots help reviewers see what changed.

  • From the CLI: uploads put before.png after.png --pr 3662
  • From an agent: ask it to attach screenshots with uploads.sh
  • By hand: drag images into the PR description and they're imported automatically
Tips for agents

Label each shot so reviewers know what they're seeing. Labels apply to every file in a call, so run one put per shot:

uploads put after.png --pr 3662 --meta path=/settings --state after --caption "Saved settings toast"
uploads put chat.png --pr 3662 --app ios --screen "Chat" --state after

No CLI? With the Uploads MCP, call sign_upload_url for files on disk (or put) with repo, pr: 3662 and the same screen, state and caption fields.

This comment updates with each upload, so you don't need to post the images yourself. A shot or two in the PR description is still welcome. Check what's attached with uploads list --pr 3662. More in the github-screenshots skill or the agent docs.

Workspace admins can turn this comment off in Settings → GitHub · docs

@schlessera
schlessera marked this pull request as ready for review November 7, 2026 12:18
@schlessera
schlessera marked this pull request as draft November 7, 2026 12:41
@schlessera
schlessera marked this pull request as ready for review November 7, 2026 13:14
@schlessera
schlessera marked this pull request as draft November 7, 2026 13:22
@schlessera
schlessera marked this pull request as ready for review November 7, 2026 13:27
@schlessera
schlessera marked this pull request as draft November 7, 2026 13:29
@schlessera
schlessera marked this pull request as ready for review November 7, 2026 13:36
@schlessera
schlessera marked this pull request as draft November 7, 2026 13:58
@schlessera
schlessera marked this pull request as ready for review November 7, 2026 14:21
@schlessera
schlessera marked this pull request as draft November 7, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ui-kit The presentational design kit: components, tokens, Storybook, visual baselines. area: ui-react React chat/files/voice components, stores, WebSocket transport. area: ui-sdk Wire protocol, runtime schemas, the server and client SDK surfaces. area: ui-server Hono app factory: turn coordinator, auth, session catalog, routes, cron. breaking Breaks a published API or documented behaviour. Needs a maintainer ruling before code. contract Touches the integration contract: CONTRACT: commit, contract doc updated in the same commit. security Auth, isolation, egress, secrets, or anything in the threat model. type: feat A new capability or a change in user-visible behaviour.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant