Skip to content

CONTRACT: feat(ui-server): deliver immutable reference ranges through backend tools - #4238

Merged
schlessera merged 19 commits into
mainfrom
feat/3613-read-delivery-20261117
Nov 18, 2026
Merged

schlessera merged 19 commits into
mainfrom
feat/3613-read-delivery-20261117

Conversation

@schlessera

@schlessera schlessera commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

Merged and qualified on main — 2026-11-18

Automatic main run 44275220284, attempt 1, passed all seventeen selected jobs on squash c156dc2b278692980115f0db6c3294f553b2ebb8. Every actual successful job checkout and all eight isolated unit workers identify that exact squash, tree and single parent. Four unit partitions cover 1603 files and 21337 passing cases, with 46 existing conditional live-image, optional-vector and optional-zsh skips. All 37 installed-provider-history cases (20 Claude, 17 Pi), all 67 immutable-read cases and every changed test file executed successfully. Determinism categories were intentionally unselected on main; fresh candidate changed-test repetition retains run 44272304763 and is not presented as main execution.

Downloaded artifacts independently verify 9762 browser passes across 427 modules, five intentional fine-pointer skips with matching touch cases passing, 1707 layout passes across 92 modules, the real ten-minute endurance case and capture reproducibility. Native artifacts verify the actual maintenance-worker host read, exact regular-blob range/digest, sealed acquisition/root/commit/tree/native identity, EROFS, revocation refusal and complete pool reclamation. All four healthy Claude/Pi × UID 0/1000 cells finish first/warm phases and clean shutdown; the separate expected index-failure/recovery control and complete separate-worker identity proof pass. The native fixture Git commit is distinct from the brain-kit squash. Native backendEquivalence and readTrustExemption remain false. Automatic website run 44275220256 also passes; its actual artifact checkout is the squash.

This qualifies the delivered immutable read-entry/delivery slice. It does not enable source trust or complete #3613: stable approved-owner/rename/transfer/name-reuse verification and the final qualified resolver/integration remain. All five original #3613 acceptance criteria remain open; #3622 stays dependent. The PR and #3613 retain milestone 0.45.0, and the PR has no closing issue references.

Refs #3613

What changed

Both backends gain reference_read, which returns at most 64 KiB of a regular file from a freshly resolved managed GitHub commit. The host rechecks the sealed native acquisition and live turn/principal/grant authority across waits, preserves binary ranges through base64, and records acquisition/range/digest evidence before returning content. A final result hook separately records whether it observed the exact prepared text at that backend call identity; missing, altered, mixed or unfinished results cannot become verified observations.

Why this shape

The managed-only qualification selects immutable Git objects instead of directory-based trust. Model inputs cannot select a host root, credential, principal or call identity. Read records stay outside source files and provider history and survive acquisition eviction. Every read remains workspace input; this change enables no repository trust or outbound recipient permission.

Proof

Candidate head f31f119c94a57fd5563f49ba7b2b631326bb6842, cleanly merged with independently verified main 80a16d2b724cd3d6f979ad5c1313073d418bf987. Inventory and per-test storage corrections remain present. Review fixes fb2f7ada44930e66531f23d32341076207c30e21 and 16837853d6a64d324f7ded68031f1cea504eb360 preserve uncertainty across rejected and lost reports and require complete final read content. The shared experiment measurement roster also includes the new tool in edf323501fc64020a7885afb7112e28eede02f88.

  • Current-head bun run check:pr --base origin/main (resolved to 80a16d2b724cd3d6f979ad5c1313073d418bf987): all five gates passed; 1320 tests / 9385 assertions / 56 files in affected fast invariants.
  • Corrected focused host/writer, adapters, source lifecycle, safety collector, tool inventories and installed tool-surface proof: 139 tests / 1010 assertions / nine files passed at c5674ce6ce9c591e44820869a82561b470cedfdb, before the final clean UI-only main merge. Strict tsc --noEmit passed again at current head f31f119 with an 8 GiB Node heap. Fresh selected hosted types and complete unit proof remain required for the final candidate.
  • Eight guard mutations failed at their named behavioral assertions and restored exact source bytes: turn liveness, returned-range digest, writer authority fence, exact result digest, final collector observation, reuse of a failed call ID, late tool delivery and real repository names ending in .git. These receipts retain their original source identities; the later collector correction has its own mutation below.
  • API reports and the integration contract are updated; the minor changeset is present. PR CONTRACT: feat(ui-server): deliver immutable reference ranges through backend tools #4238 and advanced issue ui-server: bind trusted Git reads to the qualified host acquisition transport #3613 retain release milestone 0.45.0.

Draft heavy feedback 44170419198 failed overall at source head 5dae0ea352db1dd5aad4643574388cd3801da81f, requested base/workflow revision 743f1547503e9ed5078ca7a533691aade0676618: 17 executed jobs passed and five failed, including the aggregate. All twenty actual product-job checkout receipts identify that source head; controller identities are retained separately. Seven primary failed cases were stale expectations: four Claude SDK snapshots, the Pi roster, public-backend conformance and the installed tool count (46 versus 47). They are corrected by the commit above. Local failing-first reproductions and the restored focused suite are retained. A sibling browser-page closure followed fail-fast shutdown and is not separately attributed as a UI defect. This failed feedback is never candidate proof.

The same prior source-bound feedback passed native/runtime, browser, layout, captures, endurance, packaging, verification and determinism. Downloaded artifacts verify all 37 installed Claude/Pi provider-history cases, exercising actual read-call IDs across resumed turns with byte-identical tools/system/prior input. Local installed-runtime initialization failures remain recorded and are superseded only for that supported-host source execution. The native artifact verifies an actual maintenance-worker host-tool read and durable prepared record, with offset 9/length 13/content charts Ithaca and matching digest. Its backendEquivalence and readTrustExemption flags remain false. These results belong to 5dae0ea, not the new combined tree; fresh main proof remains required after integration.

{"version":1,"kind":"brain-check-pr-receipt","head":"f31f119c94a57fd5563f49ba7b2b631326bb6842","base":"origin/main","mode":"focused","startedAt":"2026-11-18T08:40:32.816Z","finishedAt":"2026-11-18T08:42:14.807Z","checks":[{"name":"all lint and leakage gates","categories":["changeset"],"outcome":"passed","elapsedMs":14566.860663},{"name":"environment documentation","categories":["changeset"],"outcome":"passed","elapsedMs":126.89695000000211},{"name":"pending changeset package names","categories":["changeset"],"outcome":"passed","elapsedMs":90.87763600000108},{"name":"contribution changeset","categories":["changeset"],"outcome":"passed","elapsedMs":23.114144999999553},{"name":"affected fast invariants","categories":["verify","unit"],"outcome":"passed","elapsedMs":87165.74196700001}]}

Diagnosed repetition failure

Draft determinism 44189374470 failed at b75fb11. All 480 cases across ten files ran four times and passed their assertions, but the outer launcher correctly detected writes to its disposable invoking Claude home. Actual checkout 64a2594b9f9a8e5597328e138aed3ff926409c98 has parents 51d0f6de637509a97bed014eb0a284a196199e80 and b75fb11b08165f2ced5fb6c7926e1c4ff1d9a290, tree 86376893978894ae64fff4f75df78c07e2a3cfac; downloaded artifacts and the log agree. The report's last-file fallback alone did not attribute the writer.

A local real-Bun reproduction showed the shared preload restores the invoking HOME/config after the first repetition; later repetitions then write prompt-context records there. This pre-existing shared lifecycle defect is filed separately as #4244; its harness files are unchanged here. This PR corrects its own two affected inventory fixtures to own and dispose storage per test. A focused four-repetition run of those fixtures first passed all 28 assertions-bearing cases but failed TEST_WROTE_INVOKING_CLAUDE_HOME; with isolation, the same 28 tests / 316 assertions pass including the outer storage guard. Four repetitions also pass under four CPU burners on this sixteen-CPU host. No assertion, repetition, offline boundary or invoking-home guard was dropped. The broader #4244 lifecycle correction was subsequently delivered separately by PR #4248; source-specific hosted repetition is recorded below.

Independent-review correction

The fresh review at eda2d17c7771b6397bfb9e95990b174953beea7c found that a conflicting duplicate result was rejected before reaching the read observer, leaving its earlier status observed. The finding is recorded unchanged. Commit fb2f7ada44930e66531f23d32341076207c30e21 routes result rejections through durable invalidation before failure containment, including wrong tool identities and both segment/collection-queue capacity guards. The scope is the actual turn/call identity, and unknown delivery remains sticky.

Twelve regression cases cover both backend names across altered, mixed, unfinished, wrong-tool and both capacity failures. They use the actual SQLite writer, verify that the read is unknown before the stop callback, retain another read's observation, and refuse restoration by replay. Disabling invalidation makes the actual-writer case fail the named COLLECTOR_REJECTION_INVALIDATES_READ_OBSERVATION assertion; exact source bytes were then restored. Restored read/collector-caller proof passed 109 tests / 521 assertions / four files before the clean UI-only main refresh. Earlier inline regressions independently failed at the intended assertion. Interrupted asynchronous-matcher probes are retained as incomplete diagnostics, never failing-first receipts; the final tests explicitly await the rejection before asserting its type. A fresh independent re-review and selected hosted proof remain required for this new head.

Lost and mixed result routes

The re-review at 02562127e6902785b027495b41c6b0364438503c found two further instances: Pi's malformed/replayed RPC route calls lost() before result(), and filtering non-text content could make a mixed result look like one exact text segment. Both findings were recorded unchanged and are fixed in 16837853d6a64d324f7ded68031f1cea504eb360.

The collector now invalidates a lost read before containment and tracks the loss through delayed preparation. The host accepts only complete plain text or the fixed single-text MCP envelope; extra images/resources, structured payloads and error envelopes cannot borrow a matching text segment. Pi's actual safety-wire serializer omits qualifying segments for mixed reference content without changing the provider result. Tests drive the real Claude PostToolUse hook and Pi RPC dispatcher/serializer into the actual SQLite writer. Four restored mutations independently break the lost route, complete-envelope comparison, Pi completeness marker and early-loss fence; each fails its named behavioral assertion. The restored combined suite passed 138 tests / 620 assertions / five files at the authoring tree of that fix. The later one-line measurement-roster correction was itself reproduced failing and restored: its focused actual-core/production-bridge inventory case passes one test / nine assertions. This is a focused experiment case, not a complete experiment-tier or release receipt. Current candidate and eventual main proof remain pending.

Pi final-result correction

The fresh review at edf323501fc64020a7885afb7112e28eede02f88 found that a preceding Pi after-tool hook could fail while the original read was still marked observed. The unchanged finding is retained in its review record. Fix b12fbb6db774f8db44c9f8cade14874416a2a011 carries final-result completeness through the actual worker serializer. A thrown hook, final error state or retained structured payload cannot qualify a text-only immutable read; a successful content replacement or cleared error follows the installed runner's finalization semantics. Structured content is programmatic output in this installed Pi version, not model-facing text. Provider results are unchanged.

Eleven regressions use the installed Agent/runToolCall, production safety hooks, serializer and RPC dispatcher, and the actual SQLite collector/writer. Before the fix, six fail at PI_FINAL_RESULT_STATE_GOVERNS_READ_OBSERVATION; restored, all eleven pass. The surrounding focused suite passes 138 tests / 755 assertions / four files. Four independent mutations remove the hook-failure, final-error, structured-payload and wire-completeness guards; each fails the named assertion, then exact source is restored. Strict types and all five preflight gates pass at the combined head above. The fresh review below covers this correction; selected hosted candidate proof remains pending.

Pi pre-dispatch rejection correction

The fresh review at e0b0fe33f0e050573baf171caca674c9fa2d53fb found that the actual worker reader could reject an outer frame before the dispatcher retained result loss. Its finding is recorded unchanged. Fix dd57360e431a17501f0022e13d211cada76b02ab retains loss before rejecting an identifiable safetyResult, including malformed envelope/input/ID fields and reports after turn completion. A known call ID scopes invalidation even when the tool name or envelope type is malformed; these raw fields confer no authority. Other calls retain their valid observations.

Ten regressions drive the actual protocol reader into the real SQLite writer and collector. The original six fail at PI_READER_REJECTION_INVALIDATES_ONLY_ITS_READ before the fix; four further missing/malformed tool/type variants fail before the correlation refinement. Restored, all ten pass, including invalidation before containment, another read's preservation and sticky uncertainty on replay. The final focused suite passes 154 tests / 820 assertions / five files. Disabling the reader loss guard makes four named schema/correlation/late-frame controls fail that assertion; exact source is restored and all ten regressions pass again. All five contribution-preflight gates and strict types pass at the candidate above. The fresh review below covers this correction; selected candidate proof is still required.

Final independent review and main refresh

A fresh independent reviewer read dd57360e431a17501f0022e13d211cada76b02ab against immutable base 44d0d6402911dd85ee888287371eff8b66882eab and returned no findings. Its unmodified empty result is recorded through review-receipt.ts. Every earlier finding has a disposition.

Candidate 8378c7b4dd93cf84ee2e601e1f7444743b194062 is a clean merge of that reviewed head with main 969a020c2be2fdd54200f6e4c2d7c6ec8e9de0b8 (#4198's GitHub comment poster/target approval work). The read, collector, Pi safety and regression sources are byte-identical across the merge. Fresh current-head contribution preflight passes all five gates, including 1320 tests / 9385 assertions / 56 files, and strict types pass with an 8 GiB heap. The clean merge preserves review coverage under the repository gate. Exact-candidate and eventual automatic-main proof remain required; older hosted results retain their original source identities.

Prior-head draft qualification

Automatic draft run 44208219189, attempt 1, passes on head 8378c7b4dd93cf84ee2e601e1f7444743b194062 and base 969a020c2be2fdd54200f6e4c2d7c6ec8e9de0b8. The actual checkout of each of its three executed jobs is 8e6a1f4a3ddc32bb8ac92727202075cf328fba25; its immutable parents are that base/head and its tree is aab3f64accd3e35895702c80f48a42fbc1bb0068. Raw job logs, the artifact, immutable API metadata and local Git agree. Other categories were intentionally unselected for the draft.

Downloaded determinism/JUnit evidence verifies all ten changed Bun test files observed four repetitions under four CPU burners on four CPUs: 664 tests / 6048 assertions, zero failures and zero skipped cases. The final launcher succeeds, including the invoking-home guard that failed in the older run. This qualifies the corrected fixtures and changed-test repetition on this exact combined tree; the broader #4244 correction belongs to separate PR #4248, and the old failed run remains failed. The prior independent review remains accepted. At that draft audit, final ready-candidate proof was absent. The bounded confirmation attempt encountered the reservation held by #4240 and acquired no lease or candidate proof. Eventual automatic-main proof also remains required.

Current-main refresh — 2026-11-18

Candidate f31f119c94a57fd5563f49ba7b2b631326bb6842 cleanly merges reviewed source through 8378c7b4dd93cf84ee2e601e1f7444743b194062 with main 80a16d2b724cd3d6f979ad5c1313073d418bf987. The intervening main changes deliver #4240's streaming Markdown work and the separate #4251/#4253/#4248 test-harness corrections. The read, collector, Pi safety and regression sources remain byte-identical; the recorded independent review still covers this clean base merge. The broader #4244 issue is already closed by #4248 and is not completed by this slice; this PR advances only #3613.

Fresh current-head preflight passes all five gates (1320 tests / 9385 assertions / 56 files) and strict types pass with an 8 GiB heap. The two affected home-isolation fixtures also pass four repetitions on the updated launcher: 28 tests / 316 assertions / two files, including the invoking-home guard. Earlier hosted evidence retains its actual 8378c7b/base969 identity. The reservation was free at the latest read; fresh exact-candidate confirmation and eventual automatic-main proof remain required.

Guard containment

Missing call identity, invalid paths/ranges, ended turns, revoked authority, lost native identity or changed bytes withhold that call's content. Lost, conflicting or incomplete result reports make the affected read permanently unknown before existing failure containment stops its owner; identical duplicate hooks remain idempotent and another read's known observation remains intact. Keeping a verified marker after lost or mixed delivery would defeat the evidence contract. A new valid model call can retry after acquisition conditions clear, while failed call identities stay consumed; read-record uncertainty has no human reset. Structured tool refusals expose the cause class, host diagnostics retain scrubbed details, and existing safety collection records its chat gap. Tests show a later valid request survives invalid-path refusal and another call's observation survives a rejected result. Explicit-untrusted marks and workspace taint remain independently effective.

Checklist

  • Focused local preflight and behavioral/mutation receipts pass at the identities above.
  • Fresh selected candidate proof and actual checkout evidence are reconciled; all selected automatic-main proof and artifacts also pass.
  • Fresh independent review at dd57360 returned no findings and covers the clean base-only merge below; previous findings retain their recorded dispositions.
  • Original acceptance criteria remain open, with gaps named below.
  • PR and advanced issue have verified release milestones; minor changeset, API report and contract updates are present.
  • Lint/leakage passes and affected documentation is updated.
  • Guard containment is described above; installed provider-history evidence retains its actual source identity.

Anything left open

This independently useful Refs slice adds actual backend read entry points and host prepared/result observations; every read remains workspace input. All five original #3613 criteria remain open. Stable approved-owner/rename/transfer/name-reuse matching, final source-trust admission/capabilities and complete relevant runtime qualification remain. #3622 stays dependent on the complete resolver and its separate Settings publication authority. The slice is merged and qualified by the candidate and automatic-main evidence above. The separate main runtime timeout is tracked in #4242 and does not supply passing evidence here.

@schlessera schlessera added this to the 0.45.0 milestone Nov 17, 2026
@schlessera schlessera added type: feat A new capability or a change in user-visible behaviour. area: ui-sdk Wire protocol, runtime schemas, the server and client SDK surfaces. area: ui-server Hono app factory: turn coordinator, auth, session catalog, routes, cron. area: backends AgentBackend implementations and the seam they share. 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. labels Nov 17, 2026
@schlessera

Copy link
Copy Markdown
Owner Author

Current-head coordination for 5dae0ea352db1dd5aad4643574388cd3801da81f: the collision graph was built at that head. Textual overlap is with #3622 in docs/integration-contract/package-api.md, packages/ui-server/src/app.ts. Shared proof-closure reports also name #3054, #3056, #3059, #3069, #3581, #4151, #4179, #4196, #4198, #4199, #4234, #4235, #4236, #4237. This is detection, not ownership or a reservation.

Fresh draft heavy feedback 44170419198 was requested at this exact head and recorded base 743f1547503e9ed5078ca7a533691aade0676618. Required independent review is running. These are pending obligations, not passing candidate proof.

@schlessera

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head 5dae0ea against base 743f154. Reviewer: agent. No findings.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4238,
  "head": "5dae0ea352db1dd5aad4643574388cd3801da81f",
  "base": "743f1547503e9ed5078ca7a533691aade0676618",
  "reviewer": "agent",
  "outcome": "no-findings",
  "findings": []
}

@schlessera

schlessera commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner Author

Current-head collision check at b75fb11b08165f2ced5fb6c7926e1c4ff1d9a290: textual overlap with #3622 in docs/integration-contract/package-api.md, packages/ui-server/src/app.ts. Shared proof-closure reports also name #3054, #3056, #3059, #3069, #3581, #4151, #4198, #4234, #4235, #4237, #4240. These are detection reports, not ownership or a reservation. Required independent review is running for this corrected head; exact-candidate confirmation has not been requested.

@schlessera

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head b75fb11 against base 51d0f6d. Reviewer: agent. No findings.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4238,
  "head": "b75fb11b08165f2ced5fb6c7926e1c4ff1d9a290",
  "base": "51d0f6de637509a97bed014eb0a284a196199e80",
  "reviewer": "agent",
  "outcome": "no-findings",
  "findings": []
}

@schlessera

Copy link
Copy Markdown
Owner Author

Current-head collision check at eda2d17c7771b6397bfb9e95990b174953beea7c: textual overlap with #3622 in docs/integration-contract/package-api.md, packages/ui-server/src/app.ts. Shared proof-closure reports also name #3054, #3056, #3059, #3069, #3581, #4151, #4198, #4234, #4235, #4240, #4243. Detection does not assign ownership or take an integration reservation. Fresh review and full selected confirmation are pending for this head.

@schlessera

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head 0256212 against base 70c1000. Reviewer: agent. 2 findings: 2 fixed, 0 filed, 0 rejected, 0 without a disposition.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4238,
  "head": "02562127e6902785b027495b41c6b0364438503c",
  "base": "70c1000a89b1a94fa932b8e32b6aac640343157c",
  "reviewer": "agent",
  "outcome": "findings",
  "findings": [
    {
      "summary": "packages/ui-server/src/governance/safety-collector.ts:211: lost() does not invalidate reference-read evidence. Pi routes malformed or replayed safetyResult reports here before result(), bypassing the new invalidation guard. Actual dispatcher/SQLite reproduction leaves an earlier read observed after rejecting a malformed report, instead of making its delivery sticky unknown.",
      "disposition": "fixed",
      "commit": "16837853d6a64d324f7ded68031f1cea504eb360"
    },
    {
      "summary": "packages/ui-server/src/brain/reference-read.ts:106: mixed final content can be marked observed. Both backend adapters discard non-text parts when constructing segments, and this observer ignores output. A result containing the exact prepared text plus an image/resource therefore passes the one-segment digest check, contrary to the guard against accepting one matching part of mixed content.",
      "disposition": "fixed",
      "commit": "16837853d6a64d324f7ded68031f1cea504eb360"
    }
  ]
}

@schlessera

Copy link
Copy Markdown
Owner Author

Current-head collision check at edf323501fc64020a7885afb7112e28eede02f88: textual overlap with #3622 in docs/integration-contract/package-api.md, packages/ui-server/src/app.ts. Shared proof-closure reports also name #3054, #3056, #3059, #3069, #3581, #4151, #4198, #4234, #4240, #4243. Detection does not assign ownership or take a reservation. The two previous review findings are fixed/dispositioned in 1683785; fresh independent review of this head is running and exact-candidate proof is pending.

@schlessera

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head edf3235 against base 70c1000. Reviewer: agent. 1 finding: 0 fixed, 0 filed, 0 rejected, 1 without a disposition.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4238,
  "head": "edf323501fc64020a7885afb7112e28eede02f88",
  "base": "70c1000a89b1a94fa932b8e32b6aac640343157c",
  "reviewer": "agent",
  "outcome": "findings",
  "findings": [
    {
      "summary": "packages/ui-backend-pi/src/worker-entry.ts:205 forwards read content without the after-hook failure state. tool-safety.ts:67-70 reports the original content before rethrowing that failure, so the collector commits delivery='observed'. Reproduced with installed Pi runToolCall: its final result becomes an error while the read remains observed. Invalidate the read or report unfinished delivery when the preceding hook fails."
    }
  ]
}

@schlessera

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head edf3235 against base 44d0d64. Reviewer: agent. 1 finding: 1 fixed, 0 filed, 0 rejected, 0 without a disposition.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4238,
  "head": "edf323501fc64020a7885afb7112e28eede02f88",
  "base": "44d0d6402911dd85ee888287371eff8b66882eab",
  "reviewer": "agent",
  "outcome": "findings",
  "findings": [
    {
      "summary": "packages/ui-backend-pi/src/worker-entry.ts:205 forwards read content without the after-hook failure state. tool-safety.ts:67-70 reports the original content before rethrowing that failure, so the collector commits delivery='observed'. Reproduced with installed Pi runToolCall: its final result becomes an error while the read remains observed. Invalidate the read or report unfinished delivery when the preceding hook fails.",
      "disposition": "fixed",
      "commit": "b12fbb6db774f8db44c9f8cade14874416a2a011"
    }
  ]
}

@schlessera

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head edf3235 against base 70c1000. Reviewer: agent. 1 finding: 1 fixed, 0 filed, 0 rejected, 0 without a disposition.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4238,
  "head": "edf323501fc64020a7885afb7112e28eede02f88",
  "base": "70c1000a89b1a94fa932b8e32b6aac640343157c",
  "reviewer": "agent",
  "outcome": "findings",
  "findings": [
    {
      "summary": "packages/ui-backend-pi/src/worker-entry.ts:205 forwards read content without the after-hook failure state. tool-safety.ts:67-70 reports the original content before rethrowing that failure, so the collector commits delivery='observed'. Reproduced with installed Pi runToolCall: its final result becomes an error while the read remains observed. Invalidate the read or report unfinished delivery when the preceding hook fails.",
      "disposition": "fixed",
      "commit": "b12fbb6db774f8db44c9f8cade14874416a2a011"
    }
  ]
}

@schlessera

Copy link
Copy Markdown
Owner Author

Current-head collision check at e0b0fe33f0e050573baf171caca674c9fa2d53fb (base 44d0d6402911dd85ee888287371eff8b66882eab): textual overlap with #3622 in docs/integration-contract/package-api.md, packages/ui-server/src/app.ts. Shared proof-closure reports also name #3054, #3056, #3059, #3069, #3581, #4151, #4198, #4234, #4240. Detection does not assign ownership or take a reservation. The previous Pi final-result finding is fixed/dispositioned in b12fbb6; fresh independent review is running and exact-candidate proof is pending.

@schlessera

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head e0b0fe3 against base 44d0d64. Reviewer: agent. 1 finding: 0 fixed, 0 filed, 0 rejected, 1 without a disposition.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4238,
  "head": "e0b0fe33f0e050573baf171caca674c9fa2d53fb",
  "base": "44d0d6402911dd85ee888287371eff8b66882eab",
  "reviewer": "agent",
  "outcome": "findings",
  "findings": [
    {
      "summary": "packages/ui-backend-pi/src/worker-reader.ts:70: Outer-schema failures bypass lost-result invalidation. An identifiable safetyResult with an extra top-level property throws ZodError before the dispatcher calls collector.lost; an already observed reference_reads row remains observed. A malformed conflicting duplicate can therefore retain verified delivery despite the sticky-unknown guarantee. Confirmed with the actual reader and in-memory SQLite."
    }
  ]
}

@schlessera

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head e0b0fe3 against base 44d0d64. Reviewer: agent. 1 finding: 1 fixed, 0 filed, 0 rejected, 0 without a disposition.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4238,
  "head": "e0b0fe33f0e050573baf171caca674c9fa2d53fb",
  "base": "44d0d6402911dd85ee888287371eff8b66882eab",
  "reviewer": "agent",
  "outcome": "findings",
  "findings": [
    {
      "summary": "packages/ui-backend-pi/src/worker-reader.ts:70: Outer-schema failures bypass lost-result invalidation. An identifiable safetyResult with an extra top-level property throws ZodError before the dispatcher calls collector.lost; an already observed reference_reads row remains observed. A malformed conflicting duplicate can therefore retain verified delivery despite the sticky-unknown guarantee. Confirmed with the actual reader and in-memory SQLite.",
      "disposition": "fixed",
      "commit": "dd57360e431a17501f0022e13d211cada76b02ab"
    }
  ]
}

@schlessera

Copy link
Copy Markdown
Owner Author

Current-head collision check at dd57360e431a17501f0022e13d211cada76b02ab: textual overlap with #3622 in docs/integration-contract/package-api.md, packages/ui-server/src/app.ts. Shared proof-closure reports also name #3054, #3056, #3059, #3069, #3581, #4151, #4234, #4240. Detection does not assign ownership or take a reservation. The prior pre-dispatch finding is fixed/dispositioned in dd57360; fresh independent review is running and exact-candidate proof is pending.

@schlessera

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head dd57360 against base 44d0d64. Reviewer: agent. No findings.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4238,
  "head": "dd57360e431a17501f0022e13d211cada76b02ab",
  "base": "44d0d6402911dd85ee888287371eff8b66882eab",
  "reviewer": "agent",
  "outcome": "no-findings",
  "findings": []
}

@schlessera

Copy link
Copy Markdown
Owner Author

Current-head collision check at 8378c7b4dd93cf84ee2e601e1f7444743b194062 (base 969a020c2be2fdd54200f6e4c2d7c6ec8e9de0b8): textual overlap with #3622 in docs/integration-contract/package-api.md, packages/ui-server/src/app.ts. Shared proof-closure reports also name #3054, #3056, #3059, #3069, #3581, #4151, #4234, #4240. Detection does not assign ownership or take a reservation. Fresh independent review returned no findings at dd57360 and covers this clean main merge; the current-head review gate accepts it. Exact-candidate and eventual automatic-main proof remain pending.

@schlessera

Copy link
Copy Markdown
Owner Author

Current-head collision check at f31f119c94a57fd5563f49ba7b2b631326bb6842 (base 80a16d2b724cd3d6f979ad5c1313073d418bf987): textual overlap with #3622 in docs/integration-contract/package-api.md, packages/ui-server/src/app.ts. Shared proof-closure reports also name #3054, #3056, #3059, #3069, #3581, #4151, #4234. Detection assigns no ownership or reservation. The independent review remains accepted across clean main merges; current preflight/types and the repeated home fixtures pass. Final candidate and automatic-main proof remain pending. The unintended closing reference to the separately delivered #4244 is removed; this slice advances only #3613.

@schlessera
schlessera marked this pull request as ready for review November 18, 2026 08:47
@schlessera

Copy link
Copy Markdown
Owner Author

Recovering confirmation for unchanged head f31f119c94a57fd5563f49ba7b2b631326bb6842 / base 80a16d2b724cd3d6f979ad5c1313073d418bf987. The local confirmation holder was interrupted and its reservation expired. At recovery inspection, prior run 44269987423 was still in progress with no failing jobs. Restarting under a fresh reservation requires fresh candidate proof; earlier results retain their original run identity.

Current-head collision check at f31f119c94a57fd5563f49ba7b2b631326bb6842:

textual overlap with #3622 in docs/integration-contract/package-api.md, packages/ui-server/src/app.ts.

Shared proof closure also names #3054, #3056, #3059, #3069, #3581, #4151, #4234. Detection assigns no ownership or reservation. Current preflight, types, release milestones and the independent review remain accepted; no source changed during recovery.

@schlessera
schlessera marked this pull request as draft November 18, 2026 09:03
@schlessera
schlessera marked this pull request as ready for review November 18, 2026 09:03
@schlessera
schlessera merged commit c156dc2 into main Nov 18, 2026
93 of 96 checks passed
@schlessera

Copy link
Copy Markdown
Owner Author

PR #4238 merged as c156dc2b278692980115f0db6c3294f553b2ebb8. Its actual parent is 80a16d2b724cd3d6f979ad5c1313073d418bf987 and its tree 8ceb47b53db0a1a4e7cf48cbd101b5892833012c exactly matches the confirmed candidate from head f31f119c94a57fd5563f49ba7b2b631326bb6842. Remote-main ancestry is verified. The PR and still-open #3613 retain milestone 0.45.0, and the PR carries no closing issue reference.

Candidate run 44272304763, attempt 1, passed all thirteen selected jobs. Every actual job checkout is b3799b24e2796240c0a84e3cb6b5250b5a561ef3, with the verified base/head parents and delivered tree above. All sixteen isolated unit workers independently report that checkout/tree/parents. Eight unit partitions cover 1603 files and 21337 passing cases. The artifacts retain 46 existing conditional skips for live image calls, optional vector availability and optional zsh. All 37 installed-provider-history cases and the immutable-read regressions executed successfully. Changed-test determinism passed all ten files with two requested/observed repetitions under four CPU burners, 332 cases with zero failures/skips.

The restarted confirmation used its own reservation and fresh proof. Earlier cancelled runs retain their recorded identities. The integration helper completed and released its reservation, and another session now holds the next slot.

Automatic main run 44275220284, attempt 1, is running on the actual squash. Runtime/native, browser/layout/capture/endurance and complete automatic-main artifact reconciliation remain in progress. This slice advances #3613 with actual immutable backend reads and host delivery evidence. Its original five acceptance criteria remain open for the approved-owner resolver and remaining qualified integration. #3622 continues to depend on that output.

@schlessera

Copy link
Copy Markdown
Owner Author

Automatic-main qualification completed — 2026-11-18

Automatic main run 44275220284, attempt 1, passed all seventeen selected jobs on squash c156dc2b278692980115f0db6c3294f553b2ebb8. Every actual successful job checkout and all eight isolated unit workers identify that exact squash, tree and single parent. Four unit partitions cover 1603 files and 21337 passing cases, with 46 existing conditional live-image, optional-vector and optional-zsh skips. All 37 installed-provider-history cases (20 Claude, 17 Pi), all 67 immutable-read cases and every changed test file executed successfully. Determinism categories were intentionally unselected on main; fresh candidate changed-test repetition retains run 44272304763 and is not presented as main execution.

Downloaded artifacts independently verify 9762 browser passes across 427 modules, five intentional fine-pointer skips with matching touch cases passing, 1707 layout passes across 92 modules, the real ten-minute endurance case and capture reproducibility. Native artifacts verify the actual maintenance-worker host read, exact regular-blob range/digest, sealed acquisition/root/commit/tree/native identity, EROFS, revocation refusal and complete pool reclamation. All four healthy Claude/Pi × UID 0/1000 cells finish first/warm phases and clean shutdown; the separate expected index-failure/recovery control and complete separate-worker identity proof pass. The native fixture Git commit is distinct from the brain-kit squash. Native backendEquivalence and readTrustExemption remain false. Automatic website run 44275220256 also passes; its actual artifact checkout is the squash.

This qualifies the delivered immutable read-entry/delivery slice. It does not enable source trust or complete #3613: stable approved-owner/rename/transfer/name-reuse verification and the final qualified resolver/integration remain. All five original #3613 acceptance criteria remain open; #3622 stays dependent. The PR and #3613 retain milestone 0.45.0, and the PR has no closing issue references.

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

Labels

area: backends AgentBackend implementations and the seam they share. 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. 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