Skip to content

CONTRACT: feat(ui-server): add bounded immutable reference blob reads - #4200

Merged
schlessera merged 4 commits into
mainfrom
feat/3613-immutable-read-20261117
Nov 17, 2026
Merged

schlessera merged 4 commits into
mainfrom
feat/3613-immutable-read-20261117

Conversation

@schlessera

@schlessera schlessera commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

Refs #3613

What changed

The host reference transport can read a bounded range from an exact regular Git blob in a host-selected sealed acquisition. It verifies the recorded commit/tree and complete object hash before returning binary bytes with blob ID/mode, total size, offset/length and the range's SHA-256 digest. Git paths are literal. Symlinks, gitlinks, directories, traversal, corrupt objects, mismatched evidence and cancellation refuse only the selected read. Full blobs are limited to 4 MiB and returned ranges to 64 KiB. The reader owns a snapshot of the request, so replacing the caller's signal cannot admit a cancelled result.

This is a host-only primitive after #4002. Its caller still owns native root attestation and live turn/principal/grant fences. It creates no model-delivery receipt, new agent tool or source-trust capability; ordinary file tools retain their existing restrictions.

Why this shape

The selected qualification requires immutable object bytes from a host-owned acquisition. The maintenance worker runs fixed offline commands without credentials; checkout edits or an altered origin cannot relabel the selected blob. The internal contract and decision record pin the bounds and caller obligations. The server has a minor changeset; the complete pending release plan remains twenty minor bumps, with no patch or major bumps.

Proof

Current head 0f4362f15364e43257cef7dcfa44d3cfa085656b is a clean merge of reviewed head 8632aa485296254592993b01b1f3947dbd67e261 and main 18da31bc64a03c8bafa5ea8043028e32df80f7d1. Main adds the off-main qualification gate, Android panel-close handling and the writer-transaction reference-grant expiry fix. The authored reader is unchanged. The pinned base below avoids shared remote-tracking ref movement during local verification.

  • Fresh bun run check:pr --base 18da31bc64a03c8bafa5ea8043028e32df80f7d1: all five gates passed, including 839 fast-invariant tests / 6261 assertions / 30 files.
  • Fresh offline execution with Docker networking disabled: 46 tests / 250 assertions / four files passed, including the reader and the newly inherited reference-grant expiry cases. Strict current-head tsc --noEmit passed with an 8 GiB Node heap.
  • Failing-first receipts cover the missing reader and the caller-input cancellation race. Six guard mutations failed on their intended assertions and both source files were restored byte-for-byte: tree identity, complete object hash, returned-range digest, post-wait cancellation, range ceiling and request ownership. Their reader inputs are unchanged by this clean main merge.
  • Fresh independent review returned no findings at 8632aa485296254592993b01b1f3947dbd67e261. Only a clean main merge follows it; the merge gate rechecks coverage before confirmation.
  • Four affected anchored code citations passed. The authoritative classifier reports no proof-system change.

Hosted feedback on its recorded source

Full draft feedback 44148473988, attempt 1, passed all 22 selected jobs. All twenty product-job checkouts were exactly 8632aa485296254592993b01b1f3947dbd67e261, tree 32d211f329788bbc9902b05a91ae778c4db4e8f3. Admission first used workflow revision b23eace25682323b5680ed225f069d2c433654fc, then the requested source head; the aggregate used that workflow revision and validated all ten selected categories. Browser determinism and the supersede job were intentionally unselected. This remains feedback for its actual source, not candidate proof for the refreshed combined tree.

Downloaded native artifacts independently verify the new managed-source-native-blob case: actual maintenance-worker execution against the sealed acquisition, matching root/commit/tree/blob identity, regular mode, exact offset 9 / length 13 / total size 38, and the expected returned-range SHA-256. Kernel writes were refused with EROFS, private revocation refused, and owned pool cleanup completed. All four healthy native backend/UID cells and the separate expected index-failure/recovery control were verified. The blob receipt explicitly retains backendEquivalence: false and readTrustExemption: false.

Draft run 44148267571 additionally passed five repetitions each of both changed Bun test files under four CPU-load workers, without reduction, including the actual maintenance-worker suite. Its repetition and aggregate checked out merge 9664d964011f8c979da466d9bf521baebe160159, with parents b23eace25682323b5680ed225f069d2c433654fc and the reviewed source head, tree f4a078a331245f6001c0afdc1a00918bf04aeff0; API and local immutable objects agree.

Earlier local runtime attempts retain their actual failures: a missing Bubblewrap image and nested UID-mapping refusal. Their assertions did not qualify the worker/native path; the later hosted receipts above do. Exact refreshed candidate confirmation and automatic-main reconciliation remain required.

{"version":1,"kind":"brain-check-pr-receipt","head":"0f4362f15364e43257cef7dcfa44d3cfa085656b","base":"18da31bc64a03c8bafa5ea8043028e32df80f7d1","mode":"focused","startedAt":"2026-11-17T19:08:07.298Z","finishedAt":"2026-11-17T19:09:36.737Z","checks":[{"name":"all lint and leakage gates","categories":["changeset"],"outcome":"passed","elapsedMs":14545.232794000003},{"name":"environment documentation","categories":["changeset"],"outcome":"passed","elapsedMs":141.25656499999604},{"name":"pending changeset package names","categories":["changeset"],"outcome":"passed","elapsedMs":94.42645500000071},{"name":"contribution changeset","categories":["changeset"],"outcome":"passed","elapsedMs":22.48305000000255},{"name":"affected fast invariants","categories":["verify","unit"],"outcome":"passed","elapsedMs":74595.954131}]}

Guard scope

Invalid structure, unsupported entry types, identity/hash/byte mismatches, over-limit blobs and cancellation refuse that read. Partial bytes cannot prove the requested object, so no unverified result is returned. A new valid request retries normally without a service-wide latch or human recovery. Bounded typed transport errors reach the host caller. The unsupported-entry test rejects several paths and then reads another blob through the same service, proving one refusal leaves other source bytes usable.

Checklist

  • Focused failing-first, offline, restored mutation and native feedback receipts are recorded with their actual execution identities.
  • A recorded independent review returned no findings; the refresh is a clean base merge.
  • PR and advanced issue retain release milestone 0.45.0; registry version 0.44.0 was checked.
  • Minor changeset, authoritative contract component and relevant docs accompany the implementation.
  • No model-facing tool definition, prompt or earlier provider history changes in this host-only slice.
  • Complete selected confirmation of the refreshed candidate and automatic-main proof.

Anything left open

All five original #3613 acceptance criteria remain open. Actual backend/model delivery integration, durable delivery-bound read records and acquisition correlation, explicit-untrusted precedence and stable approved-owner/rename/transfer/name-reuse matching remain. #3622 stays draft pending the complete qualified resolver and independent Settings publication authority. This Refs slice claims no source-trust capability or downstream unblock. The final current-head collision scan is recorded before confirmation.

@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-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. labels Nov 17, 2026
@schlessera

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head 8632aa4 against base b23eace. Reviewer: agent. No findings.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4200,
  "head": "8632aa485296254592993b01b1f3947dbd67e261",
  "base": "b23eace25682323b5680ed225f069d2c433654fc",
  "reviewer": "agent",
  "outcome": "no-findings",
  "findings": []
}

@schlessera

schlessera commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner Author

@schlessera
schlessera marked this pull request as ready for review November 17, 2026 19:17
@schlessera
schlessera merged commit 0aeb62a into main Nov 17, 2026
60 of 62 checks passed
@schlessera

Copy link
Copy Markdown
Owner Author

#4200 is merged as 0aeb62a7acaef51deabe6a6bc84d3b7b1b72e286; its actual parent/tree match the confirmed candidate and it is an ancestor of remote main. PR #4200 and still-open #3613 retain milestone 0.45.0.

Automatic main CI 44160126690, attempt 1, finished with 15 successful jobs and two failures: browser (3) and its aggregate. All seventeen executed job logs independently identify this exact squash. Both determinism categories were intentionally unselected on main. The browser job reproduces the existing #4230 incident: ArtifactTheme Layout Phone/Desktop in both themes fails “Escape returns to the file link.” The active claimant owns fix PR #4231; this run's evidence is recorded on that incident. No unchanged retry or claim of complete main qualification is made.

The passing native artifact independently verifies the actual maintenance-worker immutable-object read on the sealed acquisition, matching native root/commit/tree/blob, regular mode, offset 9 / length 13 / total 38 and the exact SHA-256 range digest. Kernel writes fail with EROFS; revocation refuses and owned cleanup completes. All four healthy Claude/Pi × UID 0/1000 cells and complete worker-identity categories have no skips. The receipt explicitly retains backendEquivalence: false and readTrustExemption: false. Unit artifacts show all 35 installed-provider-history cases passing (19 Claude, 16 Pi), plus the current production real-Git test passing. The automatic website run also passed.

This qualifies the named passing categories only. Full post-merge qualification awaits the existing browser incident's recovery. All five original #3613 criteria remain open; model/backend read delivery, durable delivery-bound records and stable approved-owner matching remain. #3622 stays dependent on the complete resolver and its independent Settings publication authority. No source-trust exemption is enabled.

@schlessera

Copy link
Copy Markdown
Owner Author

The #4200 reader is now qualified on recovery main d226c76700e837f22c5b79d207f0c2d1fbe20ef2. Automatic push run 44164348779, attempt 1, passed all seventeen selected jobs; every actual job checkout independently identifies that exact commit. The two determinism categories were intentionally unselected on main. The fixed browser job passes, and main coordination has cleared #4230. The earlier failed run 44160126690 remains failed and retains its original identity.

Downloaded recovery artifacts independently verify the actual maintenance-worker regular-blob/range/digest and acquisition/root mapping, EROFS, revocation, four healthy Claude/Pi × UID 0/1000 cells with clean shutdown, the separately expected index-failure/recovery control, and complete separate-worker categories with no skips. All 35 installed-provider-history cases (19 Claude, 16 Pi) and the current production real-Git test pass. The reader, transport, acquisition and native fixture sources are byte-identical between the #4200 squash and this recovery commit. This qualifies the delivered primitive on corrected main; it does not prove new PR #4238 or enable source trust. PR #4200 and still-open #3613 retain milestone 0.45.0.

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. 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