Skip to content

fix(ui-server): bind immutable reads to fresh GitHub transport identity - #4264

Merged
schlessera merged 5 commits into
mainfrom
feat/3613-owner-binding-20261120
Nov 20, 2026
Merged

schlessera merged 5 commits into
mainfrom
feat/3613-owner-binding-20261120

Conversation

@schlessera

@schlessera schlessera commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

Refs #3613

What changed

Immutable GitHub reads now retain their own fresh transport identity observation separately from the original sealed acquisition. A host-generated invocation ID binds each request through managed acquisition and both the reader and SQLite writer compare that exact ID with the returned observation. The evidence also binds brain, principal, turn, stable repository/current-owner identity, full ref, commit and sealed root. Another read in the same turn cannot substitute its observation. Metadata response time is retained at successful validation, including final revalidation, before publication, recording or lease waits.

Why this shape

A cached acquisition can belong to another principal and turn. Its metadata alone cannot describe the current read's transport observation. The new evidence supplies that correlation while preserving prepared/observed/unknown delivery, existing tool contracts and provider-facing bytes. Every read remains workspace input; approved-owner source trust is still disabled. The patch changeset covers tighter internal read admission.

Proof

The initial failing-first regression reached READ_BINDS_FRESH_TRANSPORT_OBSERVATION. Independent review then found operation IDs were only syntax-checked and metadata time was captured after waits. The findings are retained unchanged with fixed dispositions at 9eb5ef1f17895bc0726835450d4637b574bfb7e6; fresh independent review of that source returned no findings, valid through two clean main merges. The final head is 8beee3a6384fe459c82060044a1027a5b46ae3ee.

  • Focused offline proof passed 276 tests / 1207 assertions across the real TLS metadata wire, both backend collectors, installed Pi tool runner and SQLite writer. Local build/typecheck passed with NODE_OPTIONS=--max-old-space-size=6144; final-head preflight passed all five gates.
  • Same-turn substitution failed first on READ_REQUIRES_ITS_OWN_TRANSPORT_OPERATION. Removing exact operation-ID equality reproduced that failure and the independent writer's WRITER_RECHECKS_TRANSPORT_IDENTITY failure.
  • Publication-delay testing failed first on IDENTITY_TIME_COMES_FROM_METADATA_RESPONSE. Restoring lease-time stamping made the observation 1000 ms late; suppressing the final metadata timestamp made it 10 ms early. All mutations were restored. The reference operation-ID and timestamp sites were audited for both bug classes.
  • The initial filtered hook timeout and local real-Git unshare setup failures supply no failing-first or passing runtime proof. Supported hosted main subsequently executes all three real-Git transport cases successfully without skips.

Candidate run 44759799133, attempt 1, passed all thirteen selected jobs. The integration helper independently verified every actual selected checkout as a781404392d383c515f798a408ab8b716645ff63, with final-head parent and main base c5071f7025b4eab3ff40e2a7c77c5a0d8ee05542. Artifacts identify all sixteen unit workers there: 16,465 cases, zero failures/errors, twelve conditional zsh/vector skips. Both changed files pass two requested/observed repetitions under four CPU burners.

Squash 615a7fcfc21051612d48933097cada690d56c757 has that exact main parent and confirmed tree 4d682c052d79602d72b44933cff831345e9e8e82; remote-main ancestry and both 0.45.0 milestones are verified. No merged branch was pushed again.

Automatic main run 44763620457, attempt 1, passed all seventeen selected successful jobs. Every actual successful job checkout and all eight isolated unit workers independently identify the squash. All nine categories run fresh, with no retained proof; main determinism skips are intentional and candidate repetitions retain their own identities. Unit reports contain 21,490 cases, zero failures/errors and 46 conditional live-image/zsh/vector skips. All 39 provider-history, 276 managed-source/read/GitHub-access and three real-Git cases pass without skips. Website run 44763620447 also passes with its artifact checkout on the squash. Main coordination has no open red-main incident.

Native artifacts verify the actual maintenance-worker host read's own operation, identity, acquisition/root/generation, exact regular-blob range/digest, EROFS and revocation refusal. Four healthy backend/UID cells complete first/warm phases and cleanup; complete worker-identity proof has no skipped categories. The expected index-failure/recovery control remains separate. The pool reclaims all 53 roots. Host read delivery remains prepared; backendEquivalence and readTrustExemption remain false.

Guard scope

Missing or inconsistent transport identity refuses only that immutable read before content delivery; it does not latch a chat or brain. Returning bytes without the promised acquisition correlation would lose evidence, so a fresh call automatically obtains its own observation. The reference-tool refusal reports the cause. The writer regression proves rejection leaves the earlier receipt intact and a subsequent independent call usable. Private grants, byte budgets, metadata credential-recipient authority and outward/Git-write approvals remain independent.

Anything left open

All five original #3613 criteria remain open pending approved-owner rename/transfer/name-reuse binding and final qualified resolver/integration, including explicit-untrusted precedence and required backend/native proof. Independent Settings publication supplies historical approval evidence, not current acquisition identity or source permission. Standing source-rule application remains #3615; origin/tunnel enforcement remains #3609. This is a qualified Refs slice and enables no source-trust exemption.

{"version":1,"kind":"brain-check-pr-receipt","head":"8beee3a6384fe459c82060044a1027a5b46ae3ee","base":"origin/main","mode":"focused","startedAt":"2026-11-20T15:03:25.374Z","finishedAt":"2026-11-20T15:04:52.755Z","checks":[{"name":"all lint and leakage gates","categories":["changeset"],"outcome":"passed","elapsedMs":17358.630633000004},{"name":"environment documentation","categories":["changeset"],"outcome":"passed","elapsedMs":121.92121400000178},{"name":"pending changeset package names","categories":["changeset"],"outcome":"passed","elapsedMs":115.60917800000607},{"name":"contribution changeset","categories":["changeset"],"outcome":"passed","elapsedMs":22.671217000002798},{"name":"affected fast invariants","categories":["verify","unit"],"outcome":"passed","elapsedMs":69737.25272799999}]}

@schlessera
schlessera marked this pull request as draft November 20, 2026 14:34
@schlessera schlessera added area: ui-server Hono app factory: turn coordinator, auth, session catalog, routes, cron. security Auth, isolation, egress, secrets, or anything in the threat model. type: fix Something is broken and must behave the way it is documented. labels Nov 20, 2026 — with schlessera-agent-fleet
@schlessera schlessera added this to the 0.45.0 milestone Nov 20, 2026 — with schlessera-agent-fleet

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head 4b43914 against base 65883f2. Reviewer: agent. 2 findings: 0 fixed, 0 filed, 0 rejected, 2 without a disposition.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4264,
  "head": "4b439145e2b3b8f4749ee2805779f70743750c70",
  "base": "65883f2d5332220db8a17fd1ddba0f926a1888be",
  "reviewer": "agent",
  "outcome": "findings",
  "findings": [
    {
      "summary": "packages/ui-server/src/brain/reference-acquisition.ts:65 checks only the syntax of operationId. Two reads in the same turn can share every compared field, so substituting the first read’s observation before the second snapshots it passes both the reader and writer guards. The second receipt can therefore identify the wrong transport operation."
    },
    {
      "summary": "packages/ui-server/src/brain/reference-source.ts:789 sets observedAt when the lease is ready. Metadata revalidation has already finished, and publication, writer and lease waits can intervene. A delayed request therefore records a later identity observation than the wire actually supplied."
    }
  ]
}

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head 4b43914 against base 65883f2. Reviewer: agent. 2 findings: 2 fixed, 0 filed, 0 rejected, 0 without a disposition.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4264,
  "head": "4b439145e2b3b8f4749ee2805779f70743750c70",
  "base": "65883f2d5332220db8a17fd1ddba0f926a1888be",
  "reviewer": "agent",
  "outcome": "findings",
  "findings": [
    {
      "summary": "packages/ui-server/src/brain/reference-acquisition.ts:65 checks only the syntax of operationId. Two reads in the same turn can share every compared field, so substituting the first read’s observation before the second snapshots it passes both the reader and writer guards. The second receipt can therefore identify the wrong transport operation.",
      "disposition": "fixed",
      "commit": "9eb5ef1f17895bc0726835450d4637b574bfb7e6"
    },
    {
      "summary": "packages/ui-server/src/brain/reference-source.ts:789 sets observedAt when the lease is ready. Metadata revalidation has already finished, and publication, writer and lease waits can intervene. A delayed request therefore records a later identity observation than the wire actually supplied.",
      "disposition": "fixed",
      "commit": "9eb5ef1f17895bc0726835450d4637b574bfb7e6"
    }
  ]
}

Copy link
Copy Markdown
Owner Author

Collision scan for head 9eb5ef1f17895bc0726835450d4637b574bfb7e6: no path or unknown collisions. Shared proof closures overlap #3056, #3059, #3069, #3581, #4151, #4234, #4262 and #4265. Those workers retain their ownership. All five local preflight gates pass; independent re-review and exact-candidate hosted proof remain pending.

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head 9eb5ef1 against base 65883f2. Reviewer: agent. No findings.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4264,
  "head": "9eb5ef1f17895bc0726835450d4637b574bfb7e6",
  "base": "65883f2d5332220db8a17fd1ddba0f926a1888be",
  "reviewer": "agent",
  "outcome": "no-findings",
  "findings": []
}

Copy link
Copy Markdown
Owner Author

Refreshed candidate 1215bfb4baa2c5c8738a78b01b8bb97e23cc3e7d cleanly merged main cb4236234c1cce1f45d034e9eb34d15eda41f934; the reviewed feature files are unchanged, the clean review still gives refusal: null, and fresh preflight passes all five gates. The current collision scan has no path/unknown collisions; shared proof closures overlap #3056, #3059, #3069, #3581, #4151, #4234, #4262 and #4265. Both this PR and #3613 read back as milestone 0.45.0. Requesting ordinary exact-candidate confirmation under the shared reservation.

Copy link
Copy Markdown
Owner Author

Candidate 8beee3a6384fe459c82060044a1027a5b46ae3ee cleanly merges main c5071f7025b4eab3ff40e2a7c77c5a0d8ee05542 after #4262. Reviewed implementation files remain byte-identical and review-receipt.ts check reports refusal: null. Current collision scan: no path or unknown collisions; shared proof closures overlap #3056, #3059, #3069, #3581, #4151, #4234, #4265 and #4266. Other workers retain their ownership. Refreshing local preflight before confirmation.

@schlessera
schlessera marked this pull request as ready for review November 20, 2026 15:05
@schlessera
schlessera merged commit 615a7fc into main Nov 20, 2026
51 of 64 checks passed

Copy link
Copy Markdown
Owner Author

Merged and squash-verified as 615a7fcfc21051612d48933097cada690d56c757, from head 8beee3a6384fe459c82060044a1027a5b46ae3ee. Parent c5071f7025b4eab3ff40e2a7c77c5a0d8ee05542 and tree 4d682c052d79602d72b44933cff831345e9e8e82 exactly match confirmed candidate checkout a781404392d383c515f798a408ab8b716645ff63; remote-main ancestry is verified. The helper independently verified all thirteen selected candidate jobs in run 44759799133 and released its lease. Both milestones read back as 0.45.0; #3613 remains open.

Downloaded artifacts independently identify all sixteen unit workers at the exact candidate checkout: 16,465 tests, zero failures/errors and twelve conditional optional-zsh/vector skips. All 39 installed-provider-history cases and all 276 managed-source/read/GitHub-access cases pass without skips. Both changed test files pass two requested/observed repetitions under four CPU burners. The clean review remains valid through the two clean main merges.

Automatic main run 44763620457 is in progress and has not yet been qualified. Native/backend/browser proof is not inferred from candidate unit proof. No source-trust exemption or completion of #3613 is claimed.

Copy link
Copy Markdown
Owner Author

Automatic main qualification is complete for squash 615a7fcfc21051612d48933097cada690d56c757: run 44763620457, attempt 1, passed all seventeen selected successful jobs, and every actual successful job checkout and all eight isolated unit workers independently identify that exact squash. The selection aggregate uses nine fresh categories, no retained proof and intentional main determinism skips. Unit reports contain 21,490 tests, zero failures/errors and 46 existing conditional live-image/zsh/vector skips; all 39 provider-history, 276 source/read/GitHub-access and three real-Git transport cases pass without skips.

Downloaded native evidence confirms the host read's own operation ID, separate from acquisition, and exact principal/repository/current owner/ref/commit/root/range/digest binding, EROFS and revocation refusal. Four healthy backend/UID cells, complete worker-identity proof and owned cleanup pass, with the expected index-failure/recovery control separately identified. The pool reclaims 53 roots. backendEquivalence and readTrustExemption remain false; the native read is prepared host delivery, not provider-inference proof.

Website run 44763620447 and its exact-squash artifact checkout also pass. Main coordination has no open red-main incident. Both milestones read back as 0.45.0. #3613 is updated and remains open with its original five criteria and remaining approved-owner/final resolver qualification. No merged branch was pushed again.

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

Labels

area: ui-server Hono app factory: turn coordinator, auth, session catalog, routes, cron. security Auth, isolation, egress, secrets, or anything in the threat model. type: fix Something is broken and must behave the way it is documented.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant