Skip to content

CONTRACT: feat(ui-server): enforce prospective exact-origin trust - #4270

Merged
schlessera merged 49 commits into
mainfrom
feat/3609-exact-origin-trust
Nov 21, 2026
Merged

schlessera merged 49 commits into
mainfrom
feat/3609-exact-origin-trust

Conversation

@schlessera

@schlessera schlessera commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

Refs #3609

What changed

Verified future HTTP-origin and explicitly selected opaque-tunnel inputs can use prospective source trust without creating unresolved triggers. Each retains immutable rule-instance, exact policy hash, trust revision and collection revision evidence. Separately reviewed recipient permission skips only the taint-network card. Source/recipient standing rules do not become legacy hostname grants; an explicit Network-card answer remains a session recipient grant independently of source trust. A shared card excludes the occurrence writes of every connection admitted under that exact card from approval freshness, including exact owned local/durable pending reservations; independent evidence still fences dispatch.

Origin/tunnel matching uses exact schemes, hosts and ports. DNS comparison keys are separate from the exact authority used for resolution, preserving absolute DNS names; IPv6 comparison and rendered authorities stay canonical. Managed HTTPS and opaque CONNECT remain distinct in matching and pending cards. Deny/allowlists, byte ceilings, credentials, provider routing and outward-write approvals retain independent fences.

Settings reports enforced publication only after durable projection and live-fence notification. Live observation distinguishes valid policy, invalid/unreadable policy with last-valid rules plus an honest error, and a changed verification that fences admission. Unchanged chunk checks use cheap generation/revision paths. Rule instances retire durably on removal, disabling or selector change, including across independent publishers. An unrelated recipient edit preserves an active source instance.

All upstream constructors run inside the lifecycle's guarded dispatch: preparation observers, final typed fence, successful constructor/fetch return, then dispatched/contacted facts. A refusal or synchronous construction throw grants nothing; a successfully started attempt stays dispatched even if cancelled or failed before the client body arrives. Host web-model route builders require the shared remainingBytes reader internally and Pi forwards it unchanged. Public SDK route readers remain optional additive fields: older operation-only adapters still compile and run with a documented 32 MiB per-request compatibility ceiling. Without the reader, that fallback cannot know or saturate an older adapter’s shared turn remainder. Proxy HTTP/CONNECT and both relay uploads/responses share saturating received-byte accounting: an over-allowance chunk consumes all remaining capacity before refusing excess. The shared head reader meters proxy raw header pairs and the HTTP start line before any filtering; Fetch relays meter every unfiltered observable header pair before status/size branches and fence EOF. The http_wire_bound contract is conservative application accounting, not exact TLS/wire-byte reconstruction; that wording is clarified without replacing Fetch. Delivery closures run the final safety check and client enqueue synchronously after awaited reads. Synchronous transport throws and asynchronous upstream rejections share caller-owned failed/502 classification; dispatch does not preempt it by aborting or storing an admission refusal. Provider receipts preserve only observed upstream status (0 before any response); caller refusal statuses and reasons remain separate. Terminal lifecycle ownership releases every listener and per-operation key.

History distinguishes trusted-at-admission evidence, human-reviewed triggers and unresolved entries, including mixed groups and IPv6 origins. SDK wire admission variants match server evidence requirements while legacy detector IDs remain valid. Admission fields are negotiated through sessionSafetyAdmissionEvidence / includeAdmissions, pinned through cursor/subscription state, and omitted for old readers. Forking/pruning retain the same historical verdict. Ordinary policy snapshots and provider-facing history remain unchanged. Contract docs, generated API reports and a minor changeset accompany the change.

Why this shape

Implements the owner-reviewed safety decision and #3609's origin/recipient scope. CONNECT proves an opaque authority, never HTTPS or a Git path. Worker commands, URLs and overlapping calls establish no source identity. Repository identity/read/rule enforcement stays with #3613/#3615 and is not reported as available here. The separate tool-input qualification is tracked in #4271.

Collision ordering: #4270 integrates before #4273. That worker will merge main afterward and take any conflict-resolution review; this PR does not implement its root-continuity scope. Candidate confirmation must qualify the current combined main tree.

Candidate CI fixes

Current fix head is 1b58adbe2f6e1f4e4da976f2afe63bb7431f98da, based on the clean refresh below. It requires the requested narrow fix check before a new confirmation.

Candidate run44888315525 checked out d93ecb8 with the exact live-base/refreshed-head parents and tree recorded below. Verification, packaging, changed-test/browser repetitions and six unit shards passed; two unit shards failed on four revoked-owner403-versus503 assertions and one stale Pi native-auth503-versus502 assertion. The confirmation helper released its lease without merging.

Binding triage classified all five as fix. Session-binding settlement now returns its cause: authority loss is403 safety_changed, abortion is cancelled, and only pending/failed/missing binding is503 unavailable. The four unchanged root authority tests now pass. Reverting the cause split makes all four REVOKED_HISTORY_OWNER_NEVER_DISPATCHES assertions fail with503; the mutation is restored. Existing inference/provider catalog-failure and both failed-binding controls still return503. Pi's two stale expected statuses are502, matching the existing failed-credential-attempt contract; the relay was not changed.

Fresh exact-head proof:1039 fast invariants and every check:pr gate pass; build/typecheck pass with NODE_OPTIONS=--max-old-space-size=6144;316 affected non-native tests across six files pass,1869 assertions. The Pi native file was not run locally because unshare is unavailable; its updated expectations require hosted proof. In the prior hosted candidate, all ten locally excluded Claude delivery/retention cases passed (unit2/unit5 logs), as did the Claude provider-history guard. Those positive native cases do not make the failed candidate green and are not claimed as executions on this new fix head. Main qualification has not run because nothing merged.

Prior clean refresh

Issue #3609 stays open until the actual squash's main qualification, including required native/heavy proof, has been checked. It will be closed explicitly with that evidence.

Clean landing head7ec3df2bb4465b318554ea2b67fc254b1fd7a760 merges reviewed implementation b4e2b92 with live main134c0eee935f1c88ddbef5f1f59aee8b2363fe3a. There were no conflicts or manual edits; the resulting tree158319cfe5d735ff23c130be5aad46b4a52279f0 exactly matches the clean merge preview. The no-findings independent review is recorded and remains applicable under the clean-merge rule. Fresh check:pr passes on the landing head. The detailed local behavioral/type/build/browser receipts below belong to the reviewed implementation head; they are not presented as executions on this refreshed tree. Hosted confirmation and main qualification must establish the final combined result, including actual native Claude results. Locally excluded native cases remain unqualified until those hosted executions pass.

Proof

Reviewed implementation: b4e2b921ca8c7feb9a89cd7ab345b2413a27b629; merge base: 63bb400b31403ee319926d38e223711a9bf0e7e1. Clean source throughout exact-head qualification; all mutations restored. Local comparison ref is origin/main at 134c0eee935f1c88ddbef5f1f59aee8b2363fe3a; hosted confirmation must qualify the live combined tree.

  • bun run check:pr --base origin/main: every gate and all1039 selected fast invariants pass.
  • Typecheck and full build pass with NODE_OPTIONS=--max-old-space-size=6144; generated API reports remain current.
  • Real browser safety layout:35 pass, zero skips, using the pinned network-disabled browser fixture, current committed source and fresh package outputs.
  • Exact-head affected coverage:481 pass,0 fail,2775 assertions across14 files, including the real-writer regression, ledger/recovery, admission, recording settlement, session binding, HTTP/CONNECT and relay failure causes.
  • The real governance writer failing-first test gives one card then403/403 instead of200/200. The fix passes all three controlled cases: two peers with overlapping FULL SQLite write reservations both dispatch; independent input while the card is open refuses; a separate real writer's independent input still pending after the peers' own commits refuses at the final fence. The complete three-case fixture passes10/10 repetitions (30 cases total).
  • Five restored mutations independently remove the marker, local-reservation, durable-reservation and send-fence exemptions, or broaden the filter to all pending input. Each fails its intended assertion; the broad filter admits the independent input and is caught. No module-load or watchdog error is counted as mutation proof. Prior real Unix/socket, transport handoff, byte-cap and compatible inference-wire receipts remain in review comments.

Full package comparison at the exact committed head and a separate clean merge-base worktree (Bun1.4.4, uid1001, ordinary non-setuid bubblewrap0.13.1, network-disabled fixtures, parallelism3; fresh build per source tree):

Tree ui-server ui-sdk complete repeat
Head b4e2b92 6698 pass,51 fail,9 errors;6749 cases/503 files,59608 assertions 1715 pass,9 fail,1 error,1 skip;1725 cases/137 files,9239 assertions
Base63bb400b31403ee319926d38e223711a9bf0e7e1 6438 pass,51 fail,9 errors;6489 cases/501 files,58625 assertions 1462 pass,9 fail,1 error,1 skip;1472 cases/133 files,7868 assertions

There are no unmatched failing test IDs in the complete server runs or the complete SDK repeat: all51 server failures (42 distinct failure names) and all9 SDK failures reproduce at the merge base. The new real FULL-writer cases all pass in the complete head suite. The existing SQLite migration flake #4369 passed in both trees this time. Shared failures include browser discovery, namespace/capacity identity, mounted runtime probes and private-maintenance transport timeouts. These failed suites are not described as globally green; hosted qualification remains required.

The first full SDK attempt is retained: head1714 pass/10 fail/1 error/1 skip (9238 assertions), baseline1462 pass/9 fail/1 error/1 skip (7868 assertions). Its extra failure was maintenance-temp-budget.test.ts:116, “simultaneous admissions from two owned processes atomically admit at most one default allowance”: exactly one process was admitted as required, but the losing error class assertion failed. The complete isolated11-case file then reproduced the identical10-pass/1-fail result at BOTH the unchanged merge base and the head. Its implementation, test and ledger child fixture have no diff between those commits. The complete SDK repeat subsequently passed that case in BOTH trees and returned the matching9-failure sets above. This pre-existing race-sensitive reliability failure is filed without a milestone as #4382; no unrelated product or test code was changed. No failed attempt is counted as a pass.

The binding fix check at d56683c confirmed the doc row, compatible inference wire, test-only follow-up, no-borrowing and SQL occurrence exclusions. Its remaining pending-reservation finding is fixed here with exact host-owned reservation IDs at the marker and send fence. Default/global reads still see all pending input; no ambient exemption or persistent history mutation is used. C remains filed as unmilestoned flake #4369; E remains filed at p2/0.45.0 as #4370. Earlier accepted fail-closed deferrals remain #4351 and #4352. Superseded candidates, incomplete setup, restored mutants and cancelled runs are not passing proof.

Local native Claude/provider-history receipts are invalid under #4313. Both installed-Claude files, safety-native-delivery and safety-result-retention (ten cases total), are excluded from these full runs and require hosted proof. Cases excluded: complete/writer-loss delivery; recorder-refused replay; stopped as result arrives; stopped while search runs; duplicate admission ID; permission-card search denial; other-tool denial under the same ID; reused search ID shell denial with late=false/true. An earlier isolated-container run used an incomplete filter and is discarded. The one SDK skip is the delegated-cgroup pids.max/memory.max worker test; no other deliberate exclusion is used.

Containment

Trust uncertainty restricts the affected input or dispatch, never silently treats an unknown as clean, and records its cause. Last-valid policy remains readable with an error; changed verification fences until a stable observation recovers automatically. Only the same admitted source instance can continue an existing stream. Rule removal and delivery revocation do not latch the whole turn or host; tests prove unrelated traffic and subsequent valid attempts remain usable. Malformed destinations refuse locally before unsafe durable evidence. Recorder loss keeps its established scope and typed unavailable cause. Already-received byte overflow exhausts the remaining turn allowance before refusing excess. No new restart, owner script or manual cleanup is added. The accepted limitations in #4351/#4352 remain: tolerated permanent-gap loss can refuse ordinary traffic or stop the turn after terminal-audit loss, and an out-of-band mid-turn rule edit can fence egress until refresh or the next turn. Preparation refusals create no future recipient grant; started connections retain honest exposure evidence.

{"version":1,"kind":"brain-check-pr-receipt","head":"1b58adbe2f6e1f4e4da976f2afe63bb7431f98da","base":"origin/main","mode":"focused","startedAt":"2026-11-21T09:42:38.570Z","finishedAt":"2026-11-21T09:43:55.855Z","checks":[{"name":"all lint and leakage gates","categories":["changeset"],"outcome":"passed","elapsedMs":14276.678239},{"name":"environment documentation","categories":["changeset"],"outcome":"passed","elapsedMs":141.1482160000014},{"name":"pending changeset package names","categories":["changeset"],"outcome":"passed","elapsedMs":102.93890800000008},{"name":"contribution changeset","categories":["changeset"],"outcome":"passed","elapsedMs":25.29951599999913},{"name":"affected fast invariants","categories":["verify","unit"],"outcome":"passed","elapsedMs":62721.137117}]}

Checklist

  • Complete selected hosted proof and fresh independent review of this head pass before confirmation.
  • Issue implementation and compatibility requirements are covered by focused runtime/mutation tests.
  • Re-read release milestones on the PR and completed issues before merge.
  • Consumer-visible changeset, contract components and current docs are included.
  • Leakage gates and proportionate-containment requirements are addressed.
  • Hosted provider-history/native proof qualifies this turn-path change; local installed-native Claude proof is invalid under ci: native Claude tests can escape offline isolation through managed settings #4313.

Anything left open

Selected hosted candidate proof, parent confirmation, merge and squash/main qualification remain required. Repository enforcement is excluded as specified above. Final binding deferrals are tracked in #4351, #4352, #4369 (unmilestoned flake) and #4370 (pre-dispatch provider receipt); the existing maintenance-budget test race is #4382 without a milestone.

@schlessera
schlessera marked this pull request as draft November 20, 2026 15:21
@schlessera schlessera added 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. labels Nov 20, 2026 — with schlessera-agent-fleet
@uploads-sh

uploads-sh Bot commented Nov 20, 2026

Copy link
Copy Markdown

No uploads on this PR yet

This PR changes UI files (packages/ui-react/src/components/chat/safety-indicator.tsx and packages/ui-react/tests/browser/safety-review.layout.tsx). Screenshots help reviewers see what changed.

  • From the CLI: uploads put before.png after.png --pr 4270
  • 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 4270 --meta path=/settings --state after --caption "Saved settings toast"
uploads put chat.png --pr 4270 --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: 4270 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 4270. More in the github-screenshots skill or the agent docs.

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

Copy link
Copy Markdown
Owner Author

Final collision scan for head 6693089bb32fa6566e9c2e0a6ea89b87424f1879 (bun scripts/collisions.ts --json --pr 4270):

This is detection, not ownership or a reservation. Other workers retain their branches and leases. The delivered #4262 browser append was retained during the base refresh; repository trust remains outside this PR. Reconcile any subsequently delivered overlapping change before exact-candidate confirmation.

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head 6693089 against base c5071f7. Reviewer: agent. 4 findings: 0 fixed, 0 filed, 0 rejected, 4 without a disposition.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4270,
  "head": "6693089bb32fa6566e9c2e0a6ea89b87424f1879",
  "base": "c5071f7025b4eab3ff40e2a7c77c5a0d8ee05542",
  "reviewer": "agent",
  "outcome": "findings",
  "findings": [
    {
      "summary": "packages/ui-sdk/src/server/egress-proxy.ts:286 — Once a taint-network card is approved, `granted` short-circuits every later recipient check. If an independent trigger arrives during the subsequent durable occurrence write, commit still dispatches using the stale approval. Its safety check compares scope, policy hash and authority epoch but omits the evidence and trust revisions."
    },
    {
      "summary": "packages/ui-sdk/src/server/egress-proxy.ts:350 — Removing a trusted tunnel rule after connect() starts but before the upstream connect event aborts the operation while `connected` is false, leaving both sockets open. The connect callback then sends 200 for the cancelled tunnel. An idle peer can keep it open after the enforced-removal receipt."
    },
    {
      "summary": "packages/ui-sdk/src/server/egress-proxy.ts:286 — Managed GitHub reference acquisition represents its fixed HTTPS transport internally as CONNECT. Passing that synthetic method to the recipient matcher lets an opaque-tunnel rule skip the network card for a managed HTTPS request, while an exact HTTPS recipient rule cannot match it. The committed callback also skips managed references, so the standing decision is absent from the receipt."
    },
    {
      "summary": "packages/ui-server/src/app.ts:1345 — The host refreshes disk-backed trust at startup and during Trust Settings operations. A valid policy change through another policy writer can therefore leave even newly started turns enforcing a removed rule from SQLite until someone reads Settings or restarts the host."
    }
  ]
}

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head 6693089 against base c5071f7. Reviewer: agent. 4 findings: 4 fixed, 0 filed, 0 rejected, 0 without a disposition.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4270,
  "head": "6693089bb32fa6566e9c2e0a6ea89b87424f1879",
  "base": "c5071f7025b4eab3ff40e2a7c77c5a0d8ee05542",
  "reviewer": "agent",
  "outcome": "findings",
  "findings": [
    {
      "summary": "packages/ui-sdk/src/server/egress-proxy.ts:286 — Once a taint-network card is approved, `granted` short-circuits every later recipient check. If an independent trigger arrives during the subsequent durable occurrence write, commit still dispatches using the stale approval. Its safety check compares scope, policy hash and authority epoch but omits the evidence and trust revisions.",
      "disposition": "fixed",
      "commit": "69442c1c0eac16e3c1ad7756beac1728527012f3"
    },
    {
      "summary": "packages/ui-sdk/src/server/egress-proxy.ts:350 — Removing a trusted tunnel rule after connect() starts but before the upstream connect event aborts the operation while `connected` is false, leaving both sockets open. The connect callback then sends 200 for the cancelled tunnel. An idle peer can keep it open after the enforced-removal receipt.",
      "disposition": "fixed",
      "commit": "69442c1c0eac16e3c1ad7756beac1728527012f3"
    },
    {
      "summary": "packages/ui-sdk/src/server/egress-proxy.ts:286 — Managed GitHub reference acquisition represents its fixed HTTPS transport internally as CONNECT. Passing that synthetic method to the recipient matcher lets an opaque-tunnel rule skip the network card for a managed HTTPS request, while an exact HTTPS recipient rule cannot match it. The committed callback also skips managed references, so the standing decision is absent from the receipt.",
      "disposition": "fixed",
      "commit": "69442c1c0eac16e3c1ad7756beac1728527012f3"
    },
    {
      "summary": "packages/ui-server/src/app.ts:1345 — The host refreshes disk-backed trust at startup and during Trust Settings operations. A valid policy change through another policy writer can therefore leave even newly started turns enforcing a removed rule from SQLite until someone reads Settings or restarts the host.",
      "disposition": "fixed",
      "commit": "69442c1c0eac16e3c1ad7756beac1728527012f3"
    }
  ]
}

Copy link
Copy Markdown
Owner Author

All four findings on reviewed head 6693089bb32fa6566e9c2e0a6ea89b87424f1879 are fixed in the follow-up commit; none is rejected or moved out of scope.

  1. Both taint-network and outward cards retain an evidence/trust/authority marker across all later waits. The host excludes only the exact connection's own immutable occurrence, while independent committed/pending input, coverage loss, trust and authority changes terminate the stale card. Valid approvals survive their own trusted or untrusted input write. The shared backend exact-input outward helper was audited too; its separate tool-input causal qualification is recorded as needs-repro backends: qualify post-card revision fencing across tool input collection #4271, not claimed fixed here.
  2. Cancellation closes the client and already-created upstream socket even before the connect callback; the callback rechecks cancellation and admission before sending 200. The real-socket regression deliberately holds the upstream connect event after TCP establishment and proves both sockets close without a successful tunnel response.
  3. Managed reference HTTPS carries its host-only verified transport tag to recipient matching instead of inferring an opaque tunnel from its synthetic wire method. Exact HTTPS origin rules can match; raw CONNECT rules cannot cover it. The committed path retains the standing recipient decision while managed acquisition still creates no input trust or legacy host grant. Private credentials/grants and immutable-read evidence remain independent.
  4. Every turn refreshes only the trust projection, and the other protected policy publisher joins a durable refresh while holding the same brain lock before reporting updated. A synchronous anchored disk/projection check prevents stale rules being used during the publication/refresh gap or after an outside valid edit. Invalid policy retains the last-valid projection. Ordinary admitted profiles, commands and budgets are untouched.

Failing-first proof: the original reviewed implementation has six failures across seven review cases, at the stale-card, cancelled-connect, two managed-transport, stale-disk and publisher-join assertions; the unchanged own-write positive control passes. The additional outward-card case also fails before its fix. Restored mutation receipts independently reintroduce each bug class (network, outward, both tunnel guards, synthetic identity, stale disk and missing publisher refresh); each fails its intended named assertion. Restored targeted review tests pass. The broader egress/Settings/proposal/live-safety run passes 209 tests before the final added positive case.

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head 15b0969 against base 615a7fc. Reviewer: agent. 4 findings: 0 fixed, 0 filed, 0 rejected, 4 without a disposition.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4270,
  "head": "15b09695d3a42500f5abac701cb8993345f73726",
  "base": "615a7fcfc21051612d48933097cada690d56c757",
  "reviewer": "agent",
  "outcome": "findings",
  "findings": [
    {
      "summary": "packages/ui-server/src/brain/turn-egress.ts:192 — Pending Network cards are keyed only by hostname. If new evidence arrives while a card is open, a second request to that host captures the new revision but joins the old card. Its revision check passes when the old answer arrives, allowing dispatch on an approval that predates the trigger."
    },
    {
      "summary": "packages/ui-server/src/governance/safety-store.ts:250 — Fork creation still selects every occurrence without a human decision. It copies an unpruned trusted admission into the fork as an unresolved interrupted occurrence, even though the parent has zero unresolved triggers. Pruning before the fork changes the result because the retained top-level admission survives the copy."
    },
    {
      "summary": "packages/ui-sdk/src/server/egress-proxy.ts:375 — CONNECT invokes op.commit() both before dialing and after connection. Both calls invoke the public committed callback, so observers receive two commit notifications for one successful tunnel. The second fence needs to revalidate without repeating the notification."
    },
    {
      "summary": "packages/ui-react/src/components/chat/safety-indicator.tsx:75 — A turn containing one trusted admission and one human-reviewed trigger is labelled “Trusted at admission: 2 triggers”. With an unresolved trigger instead, line 76 names the first entry as reviewable even when it is the trusted one. Both summaries misattribute historical verdicts in mixed groups."
    }
  ]
}

…n-trust

# Conflicts:
#	packages/ui-react/src/components/chat/safety-indicator.tsx
#	packages/ui-react/tests/browser/safety-review.layout.tsx

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head 15b0969 against base 615a7fc. Reviewer: agent. 4 findings: 4 fixed, 0 filed, 0 rejected, 0 without a disposition.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4270,
  "head": "15b09695d3a42500f5abac701cb8993345f73726",
  "base": "615a7fcfc21051612d48933097cada690d56c757",
  "reviewer": "agent",
  "outcome": "findings",
  "findings": [
    {
      "summary": "packages/ui-server/src/brain/turn-egress.ts:192 — Pending Network cards are keyed only by hostname. If new evidence arrives while a card is open, a second request to that host captures the new revision but joins the old card. Its revision check passes when the old answer arrives, allowing dispatch on an approval that predates the trigger.",
      "disposition": "fixed",
      "commit": "ca759ce38c93d3e1abdc560ffcd049c315a94b51"
    },
    {
      "summary": "packages/ui-server/src/governance/safety-store.ts:250 — Fork creation still selects every occurrence without a human decision. It copies an unpruned trusted admission into the fork as an unresolved interrupted occurrence, even though the parent has zero unresolved triggers. Pruning before the fork changes the result because the retained top-level admission survives the copy.",
      "disposition": "fixed",
      "commit": "ca759ce38c93d3e1abdc560ffcd049c315a94b51"
    },
    {
      "summary": "packages/ui-sdk/src/server/egress-proxy.ts:375 — CONNECT invokes op.commit() both before dialing and after connection. Both calls invoke the public committed callback, so observers receive two commit notifications for one successful tunnel. The second fence needs to revalidate without repeating the notification.",
      "disposition": "fixed",
      "commit": "ca759ce38c93d3e1abdc560ffcd049c315a94b51"
    },
    {
      "summary": "packages/ui-react/src/components/chat/safety-indicator.tsx:75 — A turn containing one trusted admission and one human-reviewed trigger is labelled “Trusted at admission: 2 triggers”. With an unresolved trigger instead, line 76 names the first entry as reviewable even when it is the trusted one. Both summaries misattribute historical verdicts in mixed groups.",
      "disposition": "fixed",
      "commit": "a64defeb9296ea7da217eefe7ac3e1b262cd9492"
    }
  ]
}

Copy link
Copy Markdown
Owner Author

Collision scan at head a64defe: closure overlaps with #3054, #3056, #3059, #3069, #3581, #4151, #4234, #4265 and #4266; no path or unknown collisions. The earlier indicator overlap with #4269 is delivered and incorporated. Shared proof categories require fresh candidate qualification; no other branch or reservation was changed.

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head a64defe against base 63bb400. Reviewer: agent. 2 findings: 0 fixed, 0 filed, 0 rejected, 2 without a disposition.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4270,
  "head": "a64defeb9296ea7da217eefe7ac3e1b262cd9492",
  "base": "63bb400b31403ee319926d38e223711a9bf0e7e1",
  "reviewer": "agent",
  "outcome": "findings",
  "findings": [
    {
      "summary": "packages/ui-server/src/brain/turn-egress.ts:200 — Managed HTTPS acquisition and a worker’s opaque CONNECT to the same host and port both reach approveTainted with method CONNECT. Their pending-card keys are identical at the same revision, so an owner’s answer for the managed transport can also authorize the concurrent opaque tunnel."
    },
    {
      "summary": "packages/ui-server/src/brain/trust-settings.ts:113 — A valid policy edit that leaves trusted_sources unchanged passes the disk check but returns the previous policyHash. Until refresh runs, an active turn can record a trusted admission against the old hash even though the anchored read verified different policy bytes, violating the exact-policy-hash evidence contract."
    }
  ]
}

@schlessera schlessera left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Binding fix-check triage at adb2ac2 (claude-fable-5-2), recorded alongside the machine-readable summaries:

  • A — fix: the shared-card peer occurrence exclusion is the same bug class as fix 1; the untouched test passes at merge base and fails403/403 at head.
  • B — fix: document recipientAdmission, recipientApproved, standingRecipient and trustedSource in the egress_connection contract row in the same CONTRACT commit.
  • C — defer/filed #4369: load-timing SQLITE_BUSY flake; seven isolated head runs passed; no demonstrated causal product regression. No release milestone and does not block merge.
  • D — fix: restore “Inference network admission refused”; keep specific causes in denialReason, preserving hostRefusal classification and stored history.
  • E — defer/filed #4370: pre-dispatch cancelled provider receipt adds an unknown-cost attempt for a request that never left the host; low impact, p2 follow-up in0.45.0 with acceptance criteria.

The three fixes are being verified; C and E are left unchanged under this binding triage.

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head adb2ac2 against base 63bb400. Reviewer: agent. 5 findings: 3 fixed, 2 filed, 0 rejected, 0 without a disposition.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4270,
  "head": "adb2ac275decbca38081d37b2883e695c8e2471c",
  "base": "63bb400b31403ee319926d38e223711a9bf0e7e1",
  "reviewer": "agent",
  "outcome": "findings",
  "findings": [
    {
      "summary": "A: packages/ui-sdk/src/server/egress-proxy.ts:444 — dispatch re-checks the Network grant with a marker that excludes only the connection's own occurrence (turn-egress.ts:250), so two connections approved by one shared card invalidate each other and both get 403 safety_changed (tainted-destination-ask.test.ts:158).",
      "disposition": "fixed",
      "commit": "7ec9e9d680f19691fa0cda862efccdfece1e339e"
    },
    {
      "summary": "B: docs/http-api.md:1910 — the egress_connection row omits recipientAdmission, recipientApproved, standingRecipient and trustedSource, which this PR added to the schema in packages/ui-server/src/governance/events.ts:82 (governance-events.test.ts:272).",
      "disposition": "fixed",
      "commit": "7ec9e9d680f19691fa0cda862efccdfece1e339e"
    },
    {
      "summary": "C: packages/ui-server/tests/safety-account-partition.test.ts:392 — SQLITE_BUSY when reopening the file database for the upgrade migration; seen only in the full-suite run.",
      "disposition": "filed",
      "issue": "schlessera/brain-kit#4369"
    },
    {
      "summary": "D: packages/ui-sdk/src/server/inference-relay.ts:130 — chargeDenied sends new wire messages (network policy refused the request / safety or authority changed / egress unavailable) that hostRefusal's fixed list in packages/ui-backend-claude/src/host-refusal.ts:21 does not match (inference-egress.test.ts:168).",
      "disposition": "fixed",
      "commit": "7ec9e9d680f19691fa0cda862efccdfece1e339e"
    },
    {
      "summary": "E: packages/ui-sdk/src/server/provider-relay.ts:545 — an attempt refused after prepare() but before dispatch now emits a terminal 'cancelled' receipt with no prior 'dispatched' (also the dispatch refusal just below and the cleanup() paths), contradicting 'One receipt per dispatched attempt'.",
      "disposition": "filed",
      "issue": "schlessera/brain-kit#4370"
    }
  ]
}

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head d56683c against base 63bb400. Reviewer: agent. 1 finding: 0 fixed, 0 filed, 0 rejected, 1 without a disposition.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4270,
  "head": "d56683c3d5c3c388da512e7f71ee3c4da93398d0",
  "base": "63bb400b31403ee319926d38e223711a9bf0e7e1",
  "reviewer": "agent",
  "outcome": "findings",
  "findings": [
    {
      "summary": "packages/ui-server/src/brain/turn-egress.ts:259: A is not resolved with the real governance writer. A peer's in-flight write reservation still changes the shared-card marker (pendingCount, recording_pending, recordingAvailable), so two concurrent connections on one card both refuse 403 safety_changed with zero dispatch. tainted-destination-ask.test.ts:143 passes only because its fixture has no governanceWrites."
    }
  ]
}

@schlessera schlessera left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Binding fix check at d56683c (claude-fable-5-2), recorded alongside the machine-readable receipt:

{"summary":"packages/ui-server/src/brain/turn-egress.ts:259: A is not resolved with the real governance writer. A peer's in-flight write reservation still changes the shared-card marker (pendingCount, recording_pending, recordingAvailable), so two concurrent connections on one card both refuse 403 safety_changed with zero dispatch. tainted-destination-ask.test.ts:143 passes only because its fixture has no governanceWrites.","verdict":"fix","reason":"Reproduced 10/10 with a scratch probe outside the checkout, reusing the origin-trust.test.ts fixture with full=true (createGovernanceWrites plus the SQLite writer): taint, hold one card, two concurrent GETs to the same origin, allow. Result: asks=1, statuses [403,403], hits=0, both egress_connection records denied/safety_changed. After a peer's own commit the projection shows pendingCount=1, reasons include recording_pending and recordingAvailable=false, all from the other peer's reservation. The group excludes only committed occurrence ids and collection starts, not peers' pending reservations. A regression test needs the real writer."}

B, D, the test-only follow-up, #4369 and #4370 were confirmed correct by this review; A's no-borrowing and SQL rewrite also hold. The pending-reservation fix is being verified with the real governance writer.

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head d56683c against base 63bb400. Reviewer: agent. 1 finding: 1 fixed, 0 filed, 0 rejected, 0 without a disposition.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4270,
  "head": "d56683c3d5c3c388da512e7f71ee3c4da93398d0",
  "base": "63bb400b31403ee319926d38e223711a9bf0e7e1",
  "reviewer": "agent",
  "outcome": "findings",
  "findings": [
    {
      "summary": "packages/ui-server/src/brain/turn-egress.ts:259: A is not resolved with the real governance writer. A peer's in-flight write reservation still changes the shared-card marker (pendingCount, recording_pending, recordingAvailable), so two concurrent connections on one card both refuse 403 safety_changed with zero dispatch. tainted-destination-ask.test.ts:143 passes only because its fixture has no governanceWrites.",
      "disposition": "fixed",
      "commit": "b4e2b921ca8c7feb9a89cd7ab345b2413a27b629"
    }
  ]
}

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head b4e2b92 against base 63bb400. Reviewer: agent. No findings.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4270,
  "head": "b4e2b921ca8c7feb9a89cd7ab345b2413a27b629",
  "base": "63bb400b31403ee319926d38e223711a9bf0e7e1",
  "reviewer": "agent",
  "outcome": "no-findings",
  "findings": []
}

Copy link
Copy Markdown
Owner Author

Landing collision scan at reviewed head b4e2b92: import graph built; 14 overlapping PRs. Textual overlaps: #4273 (app.ts, brain/trust-settings.ts), #4312 (package API contract, reviewable-session-safety plan), #4315 (HTTP/package API docs plus effective-safety.ts, event-writes.ts, safety-queue.ts), #4323 (wire contract). Remaining detected overlaps are path/closure reports with #3054, #3056, #3059, #3069, #3581, #4151, #4314, #4327, #4329 and #4362. Detection is not a lease.

Maintainer ordering remains #4270 before #4273. #4314's heavy-feedback admission must wait while this confirmation holds a lease; it will not be cancelled. Initial confirm refused the stale ordinary base before acquiring a lease. Merging live main134c0eee935f1c88ddbef5f1f59aee8b2363fe3a produced clean merge7ec3df2bb4465b318554ea2b67fc254b1fd7a760 without conflicts or manual edits. The recorded no-findings review remains applicable under the clean-merge rule. Fresh focused preflight and hosted exact-candidate proof will qualify this combined tree.

@schlessera
schlessera marked this pull request as ready for review November 21, 2026 09:10

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head 7ec3df2 against base 134c0ee. Reviewer: agent. 5 findings: 0 fixed, 0 filed, 0 rejected, 5 without a disposition.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4270,
  "head": "7ec3df2bb4465b318554ea2b67fc254b1fd7a760",
  "base": "134c0eee935f1c88ddbef5f1f59aee8b2363fe3a",
  "reviewer": "agent",
  "outcome": "findings",
  "findings": [
    {
      "summary": "tests/provider-history-host-authority.test.ts:49 (pi/inference): revoked owner gets 503, contract says 403. settleTurnSessionBinding (packages/ui-server/src/ws/bridge-session-binding.ts:19) returns false when !ctx.current(), and packages/ui-server/src/brain/turn-egress.ts:432 finishes every false as session_binding_unavailable, which packages/ui-sdk/src/server/egress-proxy.ts:46 now maps to 503."
    },
    {
      "summary": "tests/provider-history-host-authority.test.ts:49 (pi/provider): same defect through startProviderRelay. Revocation is finished as session_binding_unavailable at packages/ui-server/src/brain/turn-egress.ts:432 and answered 503 instead of 403."
    },
    {
      "summary": "tests/provider-history-host-authority.test.ts:49 (claude/inference): same defect with the fake Claude backend. Revoked owner gets 503 from the session-binding path (packages/ui-server/src/brain/turn-egress.ts:432) instead of the 403 authority refusal."
    },
    {
      "summary": "tests/provider-history-host-authority.test.ts:49 (claude/provider): same defect. Revoked owner gets 503 via packages/ui-server/src/brain/turn-egress.ts:432 and packages/ui-sdk/src/server/egress-proxy.ts:46 instead of 403."
    },
    {
      "summary": "packages/ui-backend-pi/tests/fixtures/native-host-auth-probe.ts:162 asserts 503 for an ungoverned credential-resolver failure; the relay returns 502 (packages/ui-sdk/src/server/inference-relay.ts:195 via captureEgressFailure, egress-proxy.ts:39). The same stale 503 is at packages/ui-backend-pi/tests/native-host-auth-qualification.test.ts:76."
    }
  ]
}

@schlessera
schlessera marked this pull request as draft November 21, 2026 09:37

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head 1b58adb against base 134c0ee. Reviewer: agent. No findings.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4270,
  "head": "1b58adbe2f6e1f4e4da976f2afe63bb7431f98da",
  "base": "134c0eee935f1c88ddbef5f1f59aee8b2363fe3a",
  "reviewer": "agent",
  "outcome": "no-findings",
  "findings": []
}

Copy link
Copy Markdown
Owner Author

Pre-confirmation collision scan at head 1b58adb completed. Textual overlaps: #4273 (app.ts, trust-settings.ts), #4312 (package-api/reviewable-session-safety docs), #4315 (HTTP/package contract docs, effective-safety/event-writes/safety-queue), #4323 (wire contract), #4327/#4394 (ui-server API report), #4362 (API report/HTTP docs), #4395 (egress-proxy/inference-relay/turn-egress). Closure overlaps: #3054, #3056, #3059, #3069, #3581, #4151, #4314, #4329, #4393. Agreed ordering remains #4270 first, then #4273 refreshes and takes conflict review. Other workers retain their branches and leases; confirmation serializes the actual main integration. Fresh independent fix check reports no findings and review-receipt check reports refusal=null.

Copy link
Copy Markdown
Owner Author

Final #3609 reconciliation is complete. The original squash edf1a3b, admission fix #4405 (6baa116) and required socket fix #4409 (a09942a) are all delivered on main. Final automatic run 44903045249 passed all 17 selected jobs on the exact final squash/tree, including native/provider-history, FULL-writer and browser proof. The two repetition jobs are intentionally unselected for push events, as verified against the planner and workflow conditions; no selected proof is missing. The red-main coordinator cleared its record on that run. All five original #3609 criteria are checked, the issue is closed with milestone 0.45.0 read back, and #3610/#3611 have no remaining active blockers and retain agent-ready. Accepted follow-ups remain tracked; no repository enforcement outside this issue is claimed.

schlessera added a commit that referenced this pull request Nov 21, 2026
* CONTRACT: feat(ui-server): enforce prospective exact-origin trust (#4270)

* CONTRACT: feat(ui-server): enforce prospective exact-origin trust (#3609)

* CONTRACT: fix(safety): fence reviewed origin admissions across publication and connect waits

* CONTRACT: fix(safety): bind shared cards to context and preserve trusted fork admissions

* CONTRACT: fix(ui-react): distinguish mixed source trust and human safety verdicts

* CONTRACT: fix(safety): separate transport approvals and hash verified policy bytes

* test(ui-sdk): type transport approval evidence explicitly

* CONTRACT: fix(safety): enforce IPv6 tunnels and retain last-valid trust on read failures

* test(ui-server): preserve selector scheme literal type

* CONTRACT: fix(safety): unify live trust observation and cache stable generations

* CONTRACT: fix(egress): canonicalize hosts and fence every send independently

* fix(egress): reject unmatched brackets in policy host patterns

* CONTRACT: docs(api): record independent recipient approval evidence

* CONTRACT: fix(safety): validate admission evidence and cache only verified live state

* test(ui-react): keep admission fixture discriminants literal

* CONTRACT: fix(safety): bind unmatched evidence to live snapshot and render IPv6 authorities

* test(ui-react): use supported polling assertion options

* CONTRACT: fix(egress): preserve DNS dial authority and version-one detector IDs

* test(ui-sdk): preserve legacy history fixture literals

* CONTRACT: fix(egress): cancel queued refresh and discriminate charge refusals

* CONTRACT: fix(trust): scope revocation to source rule and validate byte charges

* CONTRACT: fix(trust): retire source instances and unify send decisions

* CONTRACT: fix(egress): allow safe completion at exact byte cap

* CONTRACT: fix(egress): publish recipient grants only at dispatch

* CONTRACT: fix(egress): retain one typed refusal across all callers

* CONTRACT: fix(egress): guard the complete operation lifecycle

* CONTRACT: fix(egress): validate provenance and cancel every dispatch

* CONTRACT: preserve relay failure causes and own terminal cleanup

* CONTRACT: fence provider sends and preserve cancellation evidence

* CONTRACT: preserve upstream status and fence buffered provider responses

* CONTRACT: share relay response accounting and terminal fences

* CONTRACT: publish dispatch facts after transport starts and fence delivery

* CONTRACT: fence HTTP connection construction and prove selector retirement

* CONTRACT: preserve route allowance and debit all received overflow

* CONTRACT: classify synchronous transport failures before terminal cleanup

* CONTRACT: meter received HTTP headers before forwarding filters

* CONTRACT: publish egress exposure only after transport construction succeeds

* CONTRACT: bind recipient receipts to dispatch and share admission validation

* CONTRACT: meter relay request heads before filtering

* CONTRACT: preserve legacy egress routes and meter interim HTTP heads

* CONTRACT: require durable occurrence confirmation before trusted dispatch

* CONTRACT: preserve own-input approvals and classify peer recorder changes

* CONTRACT: retain dispatched session grants and preserve outward callback inputs

* CONTRACT: preserve shared-card approvals and inference refusal compatibility

* test: preserve compatible inference text at relay boundaries

* CONTRACT: exclude exact shared-card peer write reservations

* CONTRACT: preserve refusal causes through session binding

* CONTRACT: avoid unchanged trust refresh waiting behind indexing (#4405)

* CONTRACT: isolate HTTP proxy upstream connections per operation (#4409)

* feat(ui-server): bind immutable reads to approved owner evidence (#4273)

* feat(ui-server): bind immutable reads to approved owner evidence

* fix(ui-server): retain publication root identity across restarts

* fix(ui-server): require live host continuity for owner qualification

* fix(ui-server): close owner continuity during normal shutdown

* fix(ui-server): attest owner approval against pinned native brain identity

* fix(ui-server): wire native owner identity into host publication

* chore(ui-server): keep native root helper types private

* fix(ui-server): resolve owner evidence through live Settings policy

* test(ui-server): adapt trust refresh fixtures to journal areas

* fix(ui-server): boot past the receipt recovery update on a full journal
schlessera added a commit that referenced this pull request Nov 23, 2026
…d cut what its guarantees don't need (#4278) (#4444)

* docs(ui-server): retain boundary requirements without runtime activation (#4318)

* CONTRACT: feat(ui-server): prove state boundaries and pin host module generations

* docs: align boundary citations with host generation changes

* fix(ui-sdk): retain activated module generation on directory sync failure

* fix(ui-sdk): recognize the pinned module CLI in worker guidance

* test(ui-server): supply the complete maintenance worker result

* CONTRACT: chore(ui-sdk): refresh the state boundary API report

* CONTRACT: fix(ui-server): contain state exposure and keep module storage inactive

* fix(ui-server): preserve masked state aliases and existing refusal diagnoses

* CONTRACT: fix(ui-server): withdraw unqualified state boundary proof

* CONTRACT: feat(backends): persist observed backend startup phases (#4316)

* CONTRACT: feat(backends): persist observed backend startup phases

* test(ui-server): verify parsed backend timing fields

* CONTRACT: fix(backends): preserve clients and qualify startup evidence

* CONTRACT: fix(startup): contain diagnostics and validate native timing

* CONTRACT: fix(startup): contain async diagnostics and qualify native intervals

* CONTRACT: fix(startup): use observed fixture bounds and missing evidence

* CONTRACT: feat(ui): retain owner-bound client turn arrival receipts (#4321)

* CONTRACT: feat(ui): retain owner-bound client turn arrival receipts

* fix(ui): contain client timing report transport failures

* CONTRACT: docs(ui): clarify client clock observation bounds

* CONTRACT: chore(ui): refresh client receipt API reports

* test(ui): preserve previous activity wire schema compatibility

* CONTRACT: fix(ui): negotiate client turn receipt support

* CONTRACT: fix(ui): isolate client timing receipts through host completion

* test(ui-sdk): preserve receipt fixture literal types

* test(ui): defer serialization assertions to query integration

* CONTRACT: fix(ui): preserve Send boundaries and receipt integrity

* docs: refresh draft client citations after receipt timing changes

* chore: record loose server timing schema API

* test(ui-server): preserve Activity frame discriminant literals

* CONTRACT: fix(ui): omit timing when a snapshot loses its Send boundary

* test(ui-server): keep client receipts out of Activity tool results

* CONTRACT: fix(ui): keep receipt timing nonblocking and snapshot consistent

* chore: record optional lifecycle snapshot API

* docs: distinguish lexical probe bounds from receipt byte validation

* CONTRACT: fix(ui): decouple client receipts from terminal persistence

* docs: align governed refresh citation after receipt changes

* test(ui-server): scope idle probe to publisher input

* fix(ui-server): read Activity snapshots without waiting for writes

* CONTRACT: feat(ui-server): inspect workspaces read-only by default (#4317)

* CONTRACT: feat(ui-server): inspect workspaces read-only unless a session enables code changes

* CONTRACT: fix(ui-server): enforce workspace ownership and isolation

* CONTRACT: fix(ui-sdk): preserve governed writes and skip sealed workspace traversal

* CONTRACT: fix(ui-sdk): close workspace attribution and admission gaps

* CONTRACT: fix(ui-server): preserve inspection across host and tool paths

* CONTRACT: fix(ui-server): enforce workspace boundaries across read aliases and per-turn policy

* CONTRACT: fix(ui-sdk): mask staged areas and give conditional workspace remedies

* CONTRACT: fix(ui-sdk): separate native request and control response bounds

* CONTRACT: fix(ui-server): bound index writes and batch journal observations (#4320)

* CONTRACT: fix(ui-server): batch journal observations and release unused startup views

* test(ui-server): pin startup backlog mutation and drain native output

* CONTRACT: docs(ui-server): record index refresh attribution signature

* test(ui-server): complete failed cleanup startup view fixture

* test(ui-server): measure native observations after ten thousand retained versions

* test(ui-server): verify journal activity with previous SDK schemas

* CONTRACT: fix(ui-server): close journal observation review gaps

* CONTRACT: fix(ui-server): keep maintenance receipt spans out of model context

* test(ui-server): type the owner receipt span assertion

* CONTRACT: fix(ui-server): preserve bounded observation and receipt ownership

* CONTRACT: test(ui-server): omit journal timing from model activity

* test(ui-server): return the verified private-reader identity

* CONTRACT: docs(ui-server): refresh journal code citations

* fix(ui-server): enforce independent pauses in both grant orders

* docs(ui-server): align the scope observation citation

* fix(ui-server): release admission ownership on early policy failure

* CONTRACT: fix(ui-server): resolve admission ownership and bound conflicts

* CONTRACT: fix(ui-server): validate unknown measurements and metadata admission

* docs(ui-server): document unknown scope event measurements

* CONTRACT: fix(ui-server): preserve admitted conflict state in backups

* docs(ui-server): repair citations after conflict backup integration

* test(ui-server): use a literal hardlink suffix predicate

* CONTRACT: fix(ui-server): retain batch versions and bound checkpoint ownership

* test(native-proof): remove the unused tool trace type

* CONTRACT: fix(ui): recover copy intents and preserve released history

* docs(ui-server): refresh merged journal source citations

* CONTRACT: fix(backends): enforce retained Claude request policy (#4319)

* CONTRACT: preserve hosted session requests and qualify native relay modes

* test(backends): qualify the exact host inference placeholders

* test(backends): isolate managed policy on fresh runners

* fix(backends): refuse dangling session selection aliases

* test(backends): retain fixture storage and prove previous MCP parsing

* fix(backends): qualify referenced discovery and retain validated session inputs

* fix(backends): hold unqualified discovery and preserve session inputs

* CONTRACT: fix(backends): enforce retained policy before prompt release

* docs: record sandboxed MCP bridge follow-up

* CONTRACT: fix(backends): withhold prompt state until settings admission

* CONTRACT: docs(sdk): refresh settings-conflict API report

* CONTRACT: fix(backends): preserve roster and snapshot provenance on resume

* CONTRACT: docs(sdk): record shared prompt-context storage bound

* CONTRACT: feat(ui-server): record host turn clocks and large-tree timing (#4322)

* CONTRACT: feat(ui-server): record host turn timing boundaries

* test(native-proof): add large observation timing scenario

* docs(ui-server): regenerate build revision environment table

* test(ui-server): verify selected runtime on lifecycle records

* chore: refresh host timing API reports

* test(ui-server): retain hold evidence through lifecycle terminals

* CONTRACT: fix(ui-sdk): keep new timing phases compatible with published clients

* CONTRACT: fix(ui-server): route future timer phases through open timing evidence

* CONTRACT: fix host clock accuracy and report per-request cache usage

* CONTRACT: fix completed clock evidence across turn cleanup

* CONTRACT: keep clock evidence independent from worker control

* test(ui-sdk): initialize worker evidence assertion results

* CONTRACT: define hold clocks by worker control acknowledgements

* CONTRACT: refresh worker control acknowledgement API report

* fix(ui-sdk): remove obsolete worker probe from startup type

* CONTRACT: isolate inference relay diagnostic failures

* CONTRACT: retain first-read failures and self-contained identity fixtures

* CONTRACT: refresh merged lifecycle and catalog API report

* test(ui-server): preserve owner receipts across host timing enrichment

* fix(ui-server): complete client receipt and callback type integration

* fix(ui-server): adapt hold diagnostics to journal change batches

* CONTRACT: refresh merged lifecycle and catalog API report

* test(ui-server): include workspace areas in lifecycle dispatch fixtures

* fix(ui-sdk): export inference timing types for declaration emit (#4397)

* fix(ui-sdk): export inference timing types for declaration emit

prepareTurnEgress's inferred return type names InferenceTimingMark and
InferenceUsage, which the internal barrel did not export, so declaration
emit failed with TS2883 after #4322 (typecheck alone does not catch it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: add changeset for inference timing type exports

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* docs(native-proof): distinguish admission component timings from native proof (#4393)

* test(ui-server): preserve throwaway admission spike measurements

* docs(native-proof): distinguish admission component timings from native proof

* CONTRACT: fix(storage): discard uncertain Git output and bound journal cleanup (#4323)

* fix(ui-server): compute retained finish references once

* fix(core): prune excluded directories during file discovery

* fix(ui-server): quarantine orphan journal objects during maintenance

* test(core): prove excluded discovery never opens unreadable trees

* CONTRACT: fix(core,ui-server): reserve hosted packing and discard failed Git output

* fix(ui-server): discard Git scaffolding from the ordinary maintenance pass

* test(core): prove failed packing removes only its temporary outputs

* test(native): run packing proof after timing samples

* fix(storage): distinguish preflight skips from unknown packing failures

* CONTRACT: fix(core): include packed-ref text in packing headroom

* fix(ui-server): report unresolved quarantine charges in maintenance

* test(ui-server): prove finish reference cleanup shares its terminal transaction

* test(core): make the discovery negative control explicit

* fix(ui-server): qualify dedicated packing no-space results

* fix(ui-sdk): preserve memory headroom for dedicated packing stages

* test(native): refuse packing before a stage exhausts memory

* test(native): acquire the memory-control checkpoint before overriding its observation

* CONTRACT: fix(storage): preserve legacy enums and put packing skips in optional metadata

* test(ui-server): account for the maintenance system principal

* test(storage): cover legacy Activity parsing for scrub failures

* CONTRACT: docs(ui-server): record optional native packing API metadata

* test(core): retain the complete statfs shape in the compatibility fixture

* fix(core): restrict temporary-pack cleanup to declared private stages

* CONTRACT: fix(storage): address maintenance review and reserve disk packing

* test(ui-sdk): preserve disk packing with no memory headroom

* fix(ui-server): share the scrub work bound fairly with retries

* test(ui-server): prove the combined scrub batch bound

* fix(ui-sdk): attest usable capacity of disk packing stages

* fix(ui-sdk): clean up staging configuration admission failures

* test(core): validate headroom types and tracked asset pruning

* style(ui-sdk): use suffix predicates for pack publication

* fix(ui-server): charge recreated orphans beside corrupt quarantine

* fix(ui-server): reserve packing filesystem metadata headroom

* CONTRACT: fix(storage): split dedicated packing and address cleanup review

* fix(ui-server): replay scrub phases under the database writer lock

* fix(core): clean failed incremental MIDX temporary companions

* fix(storage): publish pack metadata after its complete indexed set

* fix: make maintenance publication crash-safe and retry durable cleanup

* fix: require reflinks for existing pack publication generations

* fix: contain malformed scrub reservation sizes per entry

* test: update native output doubles for Git step receipts

* fix: preserve existing pack ages across atomic publication

* CONTRACT: fix(storage): narrow Git publication and contain cleanup failures

* fix: retain selected Git runtime inputs and stage setup cleanup

* CONTRACT: fix(storage): bound scrub enumeration and Git ignore batches

* test(storage): enable default publication in hosted pack proof

* fix(core): reuse shared containment for Git candidate paths

* fix(host): scope failed Git publication to maintenance

* CONTRACT: docs: describe idle journal recovery refresh and temporary reservations

* CONTRACT: fix(host): collect completed maintenance results before publication

* CONTRACT: docs: align maintenance publication with completed report capture

* fix(core): skip discovery names that cannot round-trip through UTF-8

* CONTRACT: fix(journal): admit optional scrub schema within quota

* fix(core): refuse incomplete media-reference discovery

* CONTRACT: fix(activity): preserve startup evidence and reconnect state (#4327)

* CONTRACT: fix(activity): preserve snapshots and monotonic startup timing

* CONTRACT: fix(activity): keep snapshot evidence and sequence floors consistent

* CONTRACT: fix(activity): bound backend evidence and preserve legacy snapshot coverage

* CONTRACT: fix(activity): preserve reconnect floors and isolate lifecycle repair

* fix(activity): restore scoped atomic lifecycle snapshots

* test(activity): align dispatch fixtures with workspace admission

* CONTRACT: fix(activity): preserve legacy REST lifecycle sequence

* test(native): retain admission bounds in merged timing fixture

* CONTRACT: feat(ui-server): retain Git checkout change receipts (#4362)

* CONTRACT: feat(ui-server): retain Git checkout change receipts

* test(ui-server): verify filter refusal without executing canaries

* CONTRACT: fix(ui-server): respect pool allowances and preserve final note capture

* fix(ui-server): contain receipt failures and restore checkout refactors

* fix(ui-server): enforce live receipt scope and capture boundaries

* docs: record managed receipt scope and retained owner history rulings

* CONTRACT: fix(ui-server): qualify receipt inputs and enforce checkout ceilings

* fix(ui-server): restrict code preview to owner principals

* fix(ui-server): boot past malformed checkout receipts

* fix(ui-server): quarantine unusable checkout receipts

* CONTRACT: chore: merge main into epic/4278-host-overhead (#4435)

* CONTRACT: feat(ui-server): enforce prospective exact-origin trust (#4270)

* CONTRACT: feat(ui-server): enforce prospective exact-origin trust (#3609)

* CONTRACT: fix(safety): fence reviewed origin admissions across publication and connect waits

* CONTRACT: fix(safety): bind shared cards to context and preserve trusted fork admissions

* CONTRACT: fix(ui-react): distinguish mixed source trust and human safety verdicts

* CONTRACT: fix(safety): separate transport approvals and hash verified policy bytes

* test(ui-sdk): type transport approval evidence explicitly

* CONTRACT: fix(safety): enforce IPv6 tunnels and retain last-valid trust on read failures

* test(ui-server): preserve selector scheme literal type

* CONTRACT: fix(safety): unify live trust observation and cache stable generations

* CONTRACT: fix(egress): canonicalize hosts and fence every send independently

* fix(egress): reject unmatched brackets in policy host patterns

* CONTRACT: docs(api): record independent recipient approval evidence

* CONTRACT: fix(safety): validate admission evidence and cache only verified live state

* test(ui-react): keep admission fixture discriminants literal

* CONTRACT: fix(safety): bind unmatched evidence to live snapshot and render IPv6 authorities

* test(ui-react): use supported polling assertion options

* CONTRACT: fix(egress): preserve DNS dial authority and version-one detector IDs

* test(ui-sdk): preserve legacy history fixture literals

* CONTRACT: fix(egress): cancel queued refresh and discriminate charge refusals

* CONTRACT: fix(trust): scope revocation to source rule and validate byte charges

* CONTRACT: fix(trust): retire source instances and unify send decisions

* CONTRACT: fix(egress): allow safe completion at exact byte cap

* CONTRACT: fix(egress): publish recipient grants only at dispatch

* CONTRACT: fix(egress): retain one typed refusal across all callers

* CONTRACT: fix(egress): guard the complete operation lifecycle

* CONTRACT: fix(egress): validate provenance and cancel every dispatch

* CONTRACT: preserve relay failure causes and own terminal cleanup

* CONTRACT: fence provider sends and preserve cancellation evidence

* CONTRACT: preserve upstream status and fence buffered provider responses

* CONTRACT: share relay response accounting and terminal fences

* CONTRACT: publish dispatch facts after transport starts and fence delivery

* CONTRACT: fence HTTP connection construction and prove selector retirement

* CONTRACT: preserve route allowance and debit all received overflow

* CONTRACT: classify synchronous transport failures before terminal cleanup

* CONTRACT: meter received HTTP headers before forwarding filters

* CONTRACT: publish egress exposure only after transport construction succeeds

* CONTRACT: bind recipient receipts to dispatch and share admission validation

* CONTRACT: meter relay request heads before filtering

* CONTRACT: preserve legacy egress routes and meter interim HTTP heads

* CONTRACT: require durable occurrence confirmation before trusted dispatch

* CONTRACT: preserve own-input approvals and classify peer recorder changes

* CONTRACT: retain dispatched session grants and preserve outward callback inputs

* CONTRACT: preserve shared-card approvals and inference refusal compatibility

* test: preserve compatible inference text at relay boundaries

* CONTRACT: exclude exact shared-card peer write reservations

* CONTRACT: preserve refusal causes through session binding

* CONTRACT: avoid unchanged trust refresh waiting behind indexing (#4405)

* CONTRACT: isolate HTTP proxy upstream connections per operation (#4409)

* feat(ui-server): bind immutable reads to approved owner evidence (#4273)

* feat(ui-server): bind immutable reads to approved owner evidence

* fix(ui-server): retain publication root identity across restarts

* fix(ui-server): require live host continuity for owner qualification

* fix(ui-server): close owner continuity during normal shutdown

* fix(ui-server): attest owner approval against pinned native brain identity

* fix(ui-server): wire native owner identity into host publication

* chore(ui-server): keep native root helper types private

* fix(ui-server): resolve owner evidence through live Settings policy

* test(ui-server): adapt trust refresh fixtures to journal areas

* fix(ui-server): boot past the receipt recovery update on a full journal

* fix(ui-server): keep journal finish and receipt tables safe on a full journal (#4447)

* fix(ui-server): keep journal finish and receipt tables safe on a full journal

* docs: distinguish workspace file history from checkout receipts

* fix(ui-server): leave receipt schema admission refusals unclassified

* test(ui-react): give client turn receipt polls a load-safe watchdog (#4455)

The composer snapshot case waited on the default 1 s poll for the draft
PUT and failed once in five repetitions under CPU load in the pinned
determinism container. Every poll in the file now uses watchdogMs(5000),
matching the sibling outgoing-snapshot specs. The product timing
assertions (send-to-frame lower bounds) are unchanged.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* CONTRACT: fix: repair epic exhaustive-suite regressions (#4457)

* fix(ui-server): preserve journal capture deduplication and purge counts

* CONTRACT: fix(ui-sdk): register malformed checkout receipt diagnostics

* CONTRACT: test: align exhaustive fixtures with epic behavior

* test(native): evaluate checkpoint reader exports in hosted controls

* test(native): isolate provider proof admission lifetimes

* test(ui-server): force reversed retention completion in inspection proof

* fix(ui-server): prepare Git mask targets before maintenance checkpoints

* fix(ui-server): scope Git target preparation to maintenance operations

* test(ui-server): own the complete wiring database family

* test(ui-server): type the asynchronous maintenance probe double

* test(ui-sdk): supply owned-prune target preparation and force cleanup ordering

* test(ui-server): bound purge pin work independently of wall clock

* test(ui-server): retain a load-scaled purge complexity proxy

* docs(changeset): state the brainCli boot exception for Git target refusal (#4468)

The release note promised host boot stays available after a Git mask
target refusal. With versionRequirements.brainCli set, the startup
version probe is a maintenance operation, so a refused probe leaves the
CLI version unknown and stops boot (tracked in #4466).

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* fix(ui-react): await hello in client turn receipt fixtures (#4473)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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