Repository navigation
fix(ui-server): isolate mutable state per application - #2377
Merged
Merged
Conversation
This was referenced Oct 18, 2026
schlessera
marked this pull request as ready for review
October 22, 2026 09:42
7 of 8 tasks
schlessera
added a commit
that referenced
this pull request
Oct 22, 2026
Includes #2377. Reconciles moved app.ts citations. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #1364
What changed
Each
createAppowns its login failure buckets, pending passkey challenges and sync admission set. Each WebSocket host owns message receipt ordering, so independent apps no longer share these stores or counters. Password and passkey CPU verification reservations remain process-wide.Why this shape
This follows #1364 and epic #1343: construct state at the app boundary and pass it to the existing routes. Receipt order is compared only within one host's session queues. Rate thresholds, challenge expiry, repository writer coordination and the ten-second shutdown grace from #2475 retain their existing behavior. The patch changeset names
@schlessera/brain-ui-server; no supported machine surface changes and noCONTRACT:commit is needed.Proof
Current published head:
26fc4d9e8895b05ba7b773858b363773edb3f443. Merged base:7b8a755ea329bd48a11b790e916c417b6f608eee. A normal merge preserves the original published headd54b10667a91d799289f16560731d669fdf943b0. Eight citation-only conflicts were reconciled against the merged source, including all eight HTTP coverage citations and their range endpoints. The contribution contains 23 files.bun run typecheck(tsc --noEmit): pass.bunx --no-install changeset status: pass; all 19 packages resolve to the existing minor release plan, with no major bump.bun run check:pr --base origin/main: PASS, exit 0, one unchanged attempt on the head/base above. Lint/leakage, environment docs and changeset gates passed. Fast batch: 562 pass / 0 fail / 3,760 assertions across 25 files. Affected feedback: 2,177 pass / 0 fail / 19,442 assertions across 166 files, 3,255.50 seconds. Mount count at entry: 91.Four current-head whole-file mutation/restoration controls, with unchanged assertions and deadlines:
createApp isolates login and passkey option buckets (#1364)fails app B expected 200, received 429 (0 pass / 1 fail / 7 assertions). Restored: 1 pass / 19 assertions.another app cannot consume a pending challengefails app B expected 401, received 200 (32 pass / 1 fail / 180 assertions). Restored: 33 pass / 182 assertions, including the original app's single-use checks.independent apps do not share sync admission (#1364)fails app B expected 200, received 409 (2 pass / 1 fail / 13 assertions). Restored: 3 pass / 15 assertions.sendOrder:a refused follow-up still runs ahead of messages queued after itfails the prompt-order assertion (13 pass / 3 fail / 49 assertions, including two related order/recovery failures). Restored: 16 pass / 50 assertions.All four mutated files were restored byte for byte before focused proof and publication. One restored passkey control's unnecessary native-slot waiter was cancelled before Bun launched; the separately recorded ordinary control supplied the 33 passing tests. These copied fixtures do not qualify Btrfs or loop storage.
The missing unpublished
11dc5224candidate and its raw local artifacts were unavailable. This continuation reconstructed from the published contribution and fresh main; it does not reuse the old candidate's proof. The 2026-10-22 handoff and failed historical preflight / instrumented non-reproduction remain historical evidence. The maintainer's removal of #2403 as a blocker remains in force and does not erase those failures.Checklist
0.44.0milestone.Anything left open
This remains draft under the implementation-worker brief. The coordinator owns ready-candidate confirmation, complete selected hosted proof, final review and merge. Local preflight passed; the default command does not replace hosted proof. No readiness, merge, closure, or historical-failure waiver is claimed.