Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
efb2631
CONTRACT: feat(ui-server): bind managed source to turn authority
schlessera Nov 14, 2026
1893359
test(ui-server): prepare TLS prerequisites for native source proof
schlessera Nov 15, 2026
7990834
docs: refresh application citations after main reconciliation
schlessera Nov 16, 2026
fc396e5
test(ui-server): prove managed source maintenance waits
schlessera Nov 16, 2026
a8512c2
docs: align citations after extraction judge integration
schlessera Nov 16, 2026
1a67b35
docs: align app citations after markup route integration
schlessera Nov 17, 2026
1ffc94b
Merge commit '1e6c0c67d164e4df3a72a6655da89439d7f0264e' into feat/361…
schlessera Nov 17, 2026
521c8e9
Merge commit '7dfadc217c406255935f7fc626594acf2c2e8b9a' into feat/361…
schlessera Nov 17, 2026
3b7ac5d
fix(ui-server): fence managed reference authority after waits
schlessera Nov 17, 2026
dacdf2f
Merge commit 'aaa6221d46b3aa83991053750ae3059eb1486f82' into feat/361…
schlessera Nov 17, 2026
efa99c1
fix(ui-server): retain current private authority for worktree access
schlessera Nov 17, 2026
92e552b
Merge commit '9e7429a914a8aaf5967f074fa9e09984968fc9dc' into feat/361…
schlessera Nov 17, 2026
792094f
fix(ui-server): fence in-flight reference publication on authority loss
schlessera Nov 17, 2026
e9eb3b9
Merge commit '2aefe8f3fb199d931a12efbb2760b427306d106b' into feat/361…
schlessera Nov 17, 2026
094d0c7
fix(ui-server): fence incomplete metadata and canonical GitHub aliases
schlessera Nov 17, 2026
5e99329
Merge commit 'b0fc83f9b30082b258cf8f07129bb926251fcb5b' into feat/361…
schlessera Nov 17, 2026
0b63883
CONTRACT: fix(ui-server): preserve grant aliases and contain authorit…
schlessera Nov 17, 2026
697f1c8
Merge commit '16dfb9cac0b2762a27692aa7f0a4281f3c01f81e' into feat/361…
schlessera Nov 17, 2026
b2a9b5e
fix(ui-server): withdraw anonymous cache before private metadata retry
schlessera Nov 17, 2026
a7c6efc
Merge commit '1140799f2f13a37b1fee8f1fa8fe46c171966789' into feat/361…
schlessera Nov 17, 2026
c051099
fix(ui-server): retain source authority across worktree waits
schlessera Nov 17, 2026
08e3d86
Merge commit '2396966b8160990bf01ed7ed93d9fc6f00bffa54' into feat/361…
schlessera Nov 17, 2026
7a91843
CONTRACT: fix(ui-server): condition failed grant cleanup on native ho…
schlessera Nov 17, 2026
47e5688
fix(ui-server): recheck source authority after wire shutdown
schlessera Nov 17, 2026
bae8874
fix(ui-server): preserve shutdown failure without assigning catch par…
schlessera Nov 17, 2026
3e6710c
Merge commit 'd974052166f335cbf57b385fddc13875da1b98de' into feat/361…
schlessera Nov 17, 2026
c5f8b96
docs: align source authority citations after shutdown containment
schlessera Nov 17, 2026
da1797a
fix(ui-server): preserve literal suffixes in canonical reference grants
schlessera Nov 17, 2026
b967d72
Merge remote-tracking branch 'origin/main' into feat/3613-immutable-s…
schlessera Nov 17, 2026
6908f62
fix(ui-server): recheck durable source authority after worktree waits
schlessera Nov 17, 2026
2fa7ee3
Merge remote-tracking branch 'origin/main' into feat/3613-immutable-s…
schlessera Nov 17, 2026
b75e363
fix(ui-server): share source invalidation across publication owners
schlessera Nov 17, 2026
8b40ca1
Merge remote-tracking branch 'origin/main' into feat/3613-immutable-s…
schlessera Nov 17, 2026
644803b
fix(ui-server): include staged sources in cross-owner revocation
schlessera Nov 17, 2026
abcce4d
CONTRACT: fence managed source publication after permanent withdrawal
schlessera Nov 17, 2026
24d4553
Merge remote-tracking branch 'origin/main' into feat/3613-immutable-s…
schlessera Nov 17, 2026
1170652
CONTRACT: preserve newer source publications and worktree endpoints
schlessera Nov 17, 2026
352f711
Merge remote-tracking branch 'origin/main' into feat/3613-immutable-s…
schlessera Nov 17, 2026
5ddadd4
CONTRACT: bind source withholding to confirmed root validation
schlessera Nov 17, 2026
a31bcd7
Merge remote-tracking branch 'origin/main' into feat/3613-immutable-s…
schlessera Nov 17, 2026
8bf9a7b
CONTRACT: reconfirm reversible source hiding for each bind
schlessera Nov 17, 2026
55143cb
CONTRACT: preserve unpublished acquisition roots during bind preparation
schlessera Nov 17, 2026
ea8f20b
CONTRACT: retire exact source publications without cancelling fresh a…
schlessera Nov 17, 2026
77ab703
Merge remote-tracking branch 'origin/main' into feat/3613-immutable-s…
schlessera Nov 17, 2026
b0d83c1
Merge remote-tracking branch 'origin/main' into feat/3613-immutable-s…
schlessera Nov 17, 2026
7d8f838
Merge remote-tracking branch 'origin/main' into feat/3613-immutable-s…
schlessera Nov 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .changeset/managed-reference-source-authority.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"@schlessera/brain-ui-server": minor
"@schlessera/brain-ui-sdk": minor
---

Bind managed GitHub source acquisition and cached-source revalidation to the requesting turn's network budget and live authority. Retain sealed-root and tree acquisition facts outside source content; refuse contradictory retained roots after restart. Managed source and worktree file reads remain restricted until actual immutable-read provenance is qualified. Failed worktree grants condition native parking on their requesting generation, preserving another generation's access while still withdrawing a lost-reply grant of their own. Keep stored canonical grant suffixes literal during lookup and duplicate checks, so a repository grant cannot authorize a neighboring repository. Waiting worktree effects reread shared source authority, including durable invalidation by another app or cron owner. Shared repository/revision invalidation versions also fence first publication across app and cron owners, with validation/publication commit checks and retirement of invalidated sealed staging identities. Failed-attempt cleanup preserves another owner's newer publication. Metadata and Git wiring preserve the requested repository's literal canonical suffix, including when metadata reports it missing.

Keep stored worktree repository keys separate from raw clone input so revocation cannot borrow a neighboring repository's grant. Managed roots opt into durable, permanent native publication withdrawal: delayed publication cannot revive a revoked identity, while fresh authorized acquisition uses a new root and legacy withdrawal stays reversible. Recovery keeps invalidated roots masked, and committing a shared invalidation atomically expires matching cached validation.

Condition native publication and catalog updates on the previously observed root so concurrent acquisitions cannot roll a source back to an older revision. Worktrees retain their original acquisition URL after source-catalog cleanup, preserving authorized legacy endpoints without guessing clone suffixes.

Compare expiry against the current root and validation inside the catalog transaction. Preserve independent authorized acquisitions while retiring expired roots, and refuse late publication or validation of retired identities.
7 changes: 4 additions & 3 deletions api-report/ui-server.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1696,6 +1696,7 @@ signatures (every public export and the types it is made of)
NativePoolRecord (packages/ui-sdk/src/server/native-brain-manager-protocol.ts)
export interface NativePoolRecord {
id: string;
publicationRevoked?: boolean;
purpose: "source" | "worktree" | "staging" | "checkpoint";
from: string | null;
allowanceBytes: number;
Expand Down Expand Up @@ -2564,12 +2565,12 @@ signatures (every public export and the types it is made of)
poolAccessClose: (access: string, signal?: AbortSignal) => Promise<NativePoolAccess>;
poolAccessOpen: (access: string, signal?: AbortSignal) => Promise<NativePoolAccess>;
poolCheckpoint: (id: string, from: string, signal?: AbortSignal) => Promise<NativePoolCheckpoint>;
poolCreate: (id: string, purpose: NativePoolCreatePurpose, from: null | string, allowanceBytes: number, signal?: AbortSignal) => Promise<NativePoolRecord>;
poolCreate: (id: string, purpose: NativePoolCreatePurpose, from: null | string, allowanceBytes: number, signal?: AbortSignal, permanentWithdrawal?: true) => Promise<NativePoolRecord>;
poolDelta: (from: string, to: string, signal?: AbortSignal) => Promise<NativeDeltaStream>;
poolGrowth: (signal?: AbortSignal) => Promise<NativePoolGrowth>;
poolListCheckpoint: (id: string, path: string, expectedWorkerUid: number, signal?: AbortSignal) => Promise<NativeCheckpointMetadata[]>;
poolPark: (id: string, signal?: AbortSignal) => Promise<NativePoolRecord>;
poolPublish: (id: string, view: string, name: string, signal?: AbortSignal) => Promise<NativePoolRecord>;
poolPark: (id: string, signal?: AbortSignal, expectedAccess?: string) => Promise<NativePoolRecord>;
poolPublish: (id: string, view: string, name: string, signal?: AbortSignal, expectedRoots?: readonly (null | string)[]) => Promise<NativePoolRecord>;
poolReadCheckpoint: (id: string, path: string, maximum: number, expectedWorkerUid: number, signal?: AbortSignal) => Promise<NativeCheckpointFile>;
poolRelease: (id: string, signal?: AbortSignal) => Promise<NativePoolRecord>;
poolSeal: (id: string, signal?: AbortSignal) => Promise<NativePoolRecord>;
Expand Down
2 changes: 1 addition & 1 deletion docs/decisions/claude-code-runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ next to it.
of this binary. The only version probe in the server is for the `brain` CLI
(`Probe the selected content CLI`,
`packages/ui-server/src/brain/client.ts:180-248`, called at
`probeBrainCliVersion(config.brainPath`, `packages/ui-server/src/app.ts:478`).
`probeBrainCliVersion(config.brainPath`, `packages/ui-server/src/app.ts:510`).
`brain doctor` runs `claude mcp list` from `PATH` (`which("claude")`,
`packages/core/src/cli/commands/doctor.ts:507-511`) — the user's own Claude
Code on their own machine, to check the MCP registration, not the server's
Expand Down
10 changes: 5 additions & 5 deletions docs/decisions/governed-writable-workers.md
Original file line number Diff line number Diff line change
Expand Up @@ -1695,7 +1695,7 @@ worker does:
- **Only interactive turns are journaled, and they load project
configuration.** Evidence is wired only into the session-run turn request
for a governed turn with a journal (`export function turnRequest`,
`packages/ui-server/src/ws/session-run/backend-entry.ts:203-218`). That turn
`packages/ui-server/src/ws/session-run/backend-entry.ts:217-232`). That turn
is never a restricted autonomous one. It runs with `settingSources:
["project"]` and without `strictMcpConfig`
(`const sdkOptions: Options`, `packages/ui-backend-claude/src/sdk-options.ts:406-422`).
Expand Down Expand Up @@ -2047,7 +2047,7 @@ fresh globals per request, with the path as its only argument, and answers
with the program's output, its exit status and the traceback a fresh launch
printed, without the loop's own frame. The manager turns a failure into the
same refusal a failed launch produced (`async function inspection`,
`packages/ui-sdk/src/server/native-brain-manager.ts:189-193`). Every
`packages/ui-sdk/src/server/native-brain-manager.ts:215-219`). Every
`qualify` and `verifyOwned` still inspects the live path on every operation;
nothing is cached between requests. An interrupted, timed-out, oversized or
malformed exchange, or one with an interpreter that died, kills the
Expand Down Expand Up @@ -4310,7 +4310,7 @@ outside the brain and the strict area root counts any such segment); a
fetching or unclassified Bash call (only on a turn without the egress proxy
since 2026-11-03, see below); and any MCP tool whose server is not
brain-kit's own `brain` or `brain-ui`
(`inputTaintSource`, `packages/ui-server/src/activity/ingestion-taint.ts:95-105`).
(`inputTaintSource`, `packages/ui-server/src/activity/ingestion-taint.ts:99-109`).
The fixed list of external-content MCP sources is therefore "every other MCP
server", following the rule above that erring towards taint costs only tighter
rules (maintainer ruling, 2026-10-22). Historically the first source was the
Expand Down Expand Up @@ -4364,7 +4364,7 @@ proxy is up, the host tells the turn's recorder
(`recorder?.setEgressProxied();`, `packages/ui-server/src/ws/run-session.ts:747`),
and its shell calls skip the classifier
(`const command = shellProxied ? null : commandTaintSource(tool, input);`,
`packages/ui-server/src/activity/ingestion-taint.ts:97`). A `curl` on such a
`packages/ui-server/src/activity/ingestion-taint.ts:101`). A `curl` on such a
turn taints through the proxy's `egress_connection` record. Every non-shell
source (web tools, other MCP servers, untrusted areas, marked files) still
taints there. A turn without the proxy keeps the classifier unchanged
Expand Down Expand Up @@ -4508,7 +4508,7 @@ admitted file-tool read of it as untrusted input: a `Read`, `Edit`, `Grep`,
reader, whose normalized brain-relative path is marked, or a search whose
output names it, records `taint` with `source: "user_marked"` as the session's
first source (`fileSource`,
`packages/ui-server/src/activity/ingestion-taint.ts:81-86`). An untrusted area
`packages/ui-server/src/activity/ingestion-taint.ts:85-90`). An untrusted area
still names its own source first, and an absolute path outside the brain's
host path is not matched against marks. A mark is looked up when the call
completes; a lookup that fails counts as marked
Expand Down
8 changes: 4 additions & 4 deletions docs/decisions/http-api-boundary.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ explicit supported rows, not silently excluded by this distinction.

The source audit on 2026-09-30 used
`e0875269b21b707482545be9e94901acb897893b`. The public health mount precedes auth
(`createHealthRoutes`, `packages/ui-server/src/app.ts:1019`), the API guard follows
public ceremonies (`authGuard`, `packages/ui-server/src/app.ts:1040`), and the
WebSocket admission is separate (`"/ws"`, `packages/ui-server/src/app.ts:1261`).
(`createHealthRoutes`, `packages/ui-server/src/app.ts:1102`), the API guard follows
public ceremonies (`authGuard`, `packages/ui-server/src/app.ts:1123`), and the
WebSocket admission is separate (`"/ws"`, `packages/ui-server/src/app.ts:1364`).
Static serving is conditional (`if (options.staticRoot)`,
`packages/ui-server/src/app.ts:1285-1306`). That order establishes access;
`packages/ui-server/src/app.ts:1384-1405`). That order establishes access;
it does not select compatibility status.

A hermetic real-app launch, with temporary brain root, in-memory database,
Expand Down
Loading
Loading