Skip to content

fix(ui-server): settle announced session binding before relay admission - #3726

Merged
schlessera merged 20 commits into
mainfrom
fix/3725-relay-session-binding-20261108
Nov 11, 2026
Merged

schlessera merged 20 commits into
mainfrom
fix/3725-relay-session-binding-20261108

Conversation

@schlessera

@schlessera schlessera commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

Refs #3725
Refs #3605

What changed

Host inference and provider relays join their own announced session binding before taking a fresh admission snapshot. A healthy FULL SQLite commit no longer changes scope underneath the first snapshot and falsely refuses the request. Settlement is bounded and abortable; the host verifies the durable collection/session binding because a drained catalog queue can include failed writes. Initial and final safety, authority and recording fences stay in place, with no new worker capability or automatic retry.

The shared provider-history host fixture now creates a real password-mode owner principal, binds coordinator/client identity to it, and checks the durable row on every authority read. The previous confirmation at 3b23172381e11c23847d4a1f388f66f3b5f927ae failed before prefix assertions in both Pi, unit (3) and Claude, unit (2) because that fixture omitted principal authority and met production default denial. The proof gate correctly rejected the failed suite. Production defaults and guards are unchanged.

Delivery checkpoint — 2026-11-11

Merged as 40dbae0a2f332eb20c52c2a967611894ca30d289, with exact parent 4a8c43f383ffd9806e5bedd1e4e00d2400f03149 and tree 4d4b56c3da6ddac03c1a4b264b2b9e963a5d618a. The squash is on main and its tree matches the confirmed candidate.

Ready-candidate run 42991638294, attempt 1, passed changeset, verify, pack, all four unit shards and proof. Every successful selected job's actual checkout is 52e3f26729c64f6519fbc2ea3bebc08fd0a63b1a, whose immutable parents/tree match this head/base. The separate contract job checked out head 397a602cd5d7ffdee0aeff4d8ae58e903c167c18 and passed. Both actual installed-backend provider-history suites and their Apify suites pass all 35 declared tests; no test name from those suites is skipped or failed. Their source titles and actual pass lines were matched individually because concurrent CI log groups interleave.

The squash's own main run 42995520839 is still being qualified. Its initial inspection found runtime, runtime_host, browser/layout, captures, endurance and remaining main jobs in progress. This is a verified merge and passing candidate proof, not yet complete delivery. Keep #3725 open until every selected own-main/native requirement passes; #3662 remains draft meanwhile.

Proof

Current head 397a602cd5d7ffdee0aeff4d8ae58e903c167c18, tested main base 4a8c43f383ffd9806e5bedd1e4e00d2400f03149, tree 4d4b56c3da6ddac03c1a4b264b2b9e963a5d618a. Main now includes live-provider service selection (#3956), static SVG support (#3969) and the Start card (#3970). Shared conversation-host construction, hello fields and service lifecycle changed. All eight relay/binding/authority contribution source/fixture/test inputs remain byte-identical to a0bec40385e72a6b244a3c05483effcd095dd0a5.

  • Fresh exact-head verification passes 459 tests / 2,582 assertions / 22 files, combining relay/binding/authority, publication, history, containment, account and worker-cleanup controls with current provider-selection and WebSocket conversation lifecycle tests.
  • Fresh strict typecheck passes on this exact head with the repository CI 6,144 MiB heap setting.
  • Fresh exact-head preflight passes 997 tests / 6,578 assertions / 42 files, with all five gates passing.
  • Existing meaningful settlement, durable-binding, peer-isolation and fixture-authority/revocation mutations retain their original execution identities and restored bytes. The final SDK-fence mutation reaches two provider-relay expected-403/actual-200 assertions for own-chat and brain-wide loss; inference keeps its independent fence. The read-count-only attempt remains excluded from behavioral proof. No safety or authority guard, refusal assertion or provider-prefix boundary is weakened.
  • Under the hybrid ruling, complete fast candidate proof precedes merge and every selected heavy category must pass on the squash's own main run before successful delivery. Both actual provider-history suites and supported-host native qualification remain required. All five original criteria remain unchanged; draft checks do not qualify delivery.
{"version":1,"kind":"brain-check-pr-receipt","head":"397a602cd5d7ffdee0aeff4d8ae58e903c167c18","base":"origin/main","mode":"focused","startedAt":"2026-11-11T08:54:32.009Z","finishedAt":"2026-11-11T08:56:34.663Z","checks":[{"name":"all lint and leakage gates","categories":["changeset"],"outcome":"passed","elapsedMs":15055.857119},{"name":"environment documentation","categories":["changeset"],"outcome":"passed","elapsedMs":129.3968390000009},{"name":"pending changeset package names","categories":["changeset"],"outcome":"passed","elapsedMs":114.07729199999449},{"name":"contribution changeset","categories":["changeset"],"outcome":"passed","elapsedMs":31.356894999997166},{"name":"affected fast invariants","categories":["verify","unit"],"outcome":"passed","elapsedMs":107305.73837400001}]}

Current-head collision scan at 397a602cd5d7ffdee0aeff4d8ae58e903c167c18: closure: #3054, #3056, #3059, #3069, #3116, #3437, #3581, #3622, #3662, #3806, #3968, #3971, #3972; textual: #3393, #3464. Full classifications and original source/runtime receipts are retained.

Guard containment

The guard triggers only when this bridge's announced binding has not settled within its bound, is cancelled/revoked, fails, or lacks a durable collection/session match. It restricts that inference/provider operation. A restricted profile cannot supply the missing attribution, so this operation refuses before dispatch; other healthy turns remain usable. Settlement clears mechanically when the binding becomes durable, and a later admission can succeed without owner recovery or replaying the refused provider request. When recording is available, the existing egress event records session_binding_unavailable; recorder-failure fences remain independent and never permit dispatch after a failed write. The two own-binding-deadline/healthy-peer cases establish isolation, while the canonical other occurrence controls retain unrelated pending approval authority.

Checklist

  • Current exact-head fast candidate proof passes.
  • Every selected category on the squash's own main run passes before successful delivery.
  • All original issue criteria and required qualification are complete.
  • PR and advanced issues carry the verified release milestone.
  • The consumer-visible fix changeset is retained.
  • Leakage gates pass; bounded diagnostics contain no provider conversation content.
  • Existing external contracts are preserved.
  • The session-safety decision documents corrected host ordering.
  • Both actual provider-history guards pass on the selected candidate.

Anything left open

Request fresh exact-candidate confirmation through integrate.ts once the integration slot is verified available. Verify the actual squash and every selected main job, including supported-host native and both actual provider-history guards. A merge with pending main proof is not successful delivery. This PR uses Refs #3725 so the issue stays open until every criterion is qualified; the parent retains its claim through that verification. #3662 has been reopened and refreshed at e21f23b620d9829e0a1228644302506036dba5db over this same main base. It remains draft pending this fix's successful delivery. #3605 retains all seven criteria; the relay fix remains independently scoped to #3725.

The original uninstrumented #3662 native failure cannot retrospectively be assigned a unique cause. This change corrects the independently reproduced binding defect and the separately reproduced test-fixture authority omission. Intentional post-merge exclusions are distinguished from missing, cancelled or unexpectedly skipped selected jobs.

@schlessera
schlessera marked this pull request as ready for review November 10, 2026 10:13
@schlessera
schlessera marked this pull request as draft November 10, 2026 10:45
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. 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