Skip to content

ui-server: test-health batch e3855-ui-server-03 #3900

Closed

Description

@schlessera

Context

Shard e3855-ui-server-03 of the #3855 test-health push: 115 packages/ui-server test files, audited in 61 clusters through all eight lenses (run th-20261110163713-e0434b, batch branch test-health/e3855-ui-server-03). 28 files change, all test files; no test is removed (328 tests before and after).

Fixed findings, one line each:

  • provider-mask-bridge.test.ts (opaque-failure): direct.every(...) reported only true/false; the assertion now compares each direct call's outcome, so a failure shows which call was refused and why, and pins three calls.
  • provider-continuation-state.test.ts (opaque-failure): Four Buffer.equals(...).toBe(true) byte-identity checks printed only a boolean; they now compare the file text with the saved text, so a failure shows the diff.
  • provider-allowed-route.test.ts (opaque-failure): A boolean name === "anthropic" check now compares the recipient name itself, so a failure prints which recipient was proven.
  • private-index-cache.test.ts (opaque-failure): reports.some(...) became toContainEqual(stringContaining), so a failure prints the reports.
  • saved-transcription.test.ts (settling-sleep): A 20 ms sleep stood in for the first PUT holding the claim, and under load a pending PUT could win it and block on the provider gate; the test now waits for the provider call and asserts the 409s before counting calls, without the 50 ms sleep.
  • saved-transcription.test.ts (settling-sleep): A 20 ms sleep guessed that the route had started reading the body before revocation; the body stream's pull now signals the read, and a mutation removing the claim-time authority check is killed by that ordering.
  • reference-worktree-journal.test.ts (opaque-failure): every()/has() checks printed only a boolean; they now compare the rows' class and actor, the stopped error and the un-unrefed timer handles, so a failure shows the values.
  • reference-writes-offloop.test.ts (opaque-failure): Two pool-event some() checks now assert the operation list with toContain, so a failure prints the events.
  • reference-worktree-hygiene.test.ts (opaque-failure): Four includes()/some() secret and CLI-call checks now use not.toContain and an empty-list comparison, so a failure prints the leaked text or the offending call.
  • reference-tools.test.ts (opaque-failure): Two path.startsWith(...).toBe(true) checks became toStartWith, so a failure prints the reported path.
  • safety-history.test.ts (test-fault): ui-server: safety-history WS replay test races a poll against an unsettled write and is closed with gap under load #3723: a poll read B's row while B's local pending latch was set, the next poll at the same revision saw pendingCount 0, and the changed projection closed the subscription with gap; each write now runs under the fixture's hold so every read waits until the write and its latch have settled.
  • safety-history-review.test.ts (load-sensitive): The same write/poll race as ui-server: safety-history WS replay test races a poll against an unsettled write and is closed with gap under load #3723 at two more add-then-poll sites (the new-anchor subscription and the Apify delta); both writes now run under the hold.
  • operational-state-layout.test.ts (opaque-failure): logs.records().some(...) became toContainEqual on [body, refusal], so a failure prints the recorded logs.
  • session-taint.test.ts (opaque-failure): The clean-session check printed only curl's exit code (the 22 in ui-server: session-taint G6 clean-session egress counted 22 curl calls in a hosted unit shard #3763 is curl's --fail exit for an HTTP status of 400 or more, not a call count); the worker curl now reports its HTTP status and error, and the message carries them.
  • notify-offloop.test.ts (weak-matcher): pruneAcknowledged(0) was asserted >= 0, which no result can fail; the prune now uses a future cutoff and the test asserts the table is empty, killing a mutation that deletes nothing.
  • storage-notify.test.ts (opaque-failure): Two every() checks over receipts and child output now compare the values, pinning four accepted receipts and printing the children's output.
  • storage-history-store.test.ts (opaque-failure): Three samples.every(...) checks became empty-list comparisons of the offending samples.
  • runtime-boot.test.ts (opaque-failure): logs.some(...) became toContainEqual(stringContaining), so a failure prints the logged warnings.
  • schedule-cli.test.ts (order-dependent): The list check expected exactly one task, but the file shares one host and other cases' tasks are listed when they run first (3 of 5 shuffled runs failed); it now asserts this task is listed exactly once, equal to its receipt.
  • storage-history-model.test.ts (opaque-failure): Five samples.every(...) checks became empty-list comparisons of the offending samples.
  • principals.test.ts (opaque-failure): values.every(length 16) now compares every id's width.
  • share-routes.test.ts (opaque-failure): Seven startsWith/endsWith/includes/some boolean checks became toStartWith, toEndWith, not.toContain and an empty-list comparison.
  • storage-collection.test.ts (opaque-failure): Two some()/every() checks now compare entry names and capacity identities.
  • storage-metadata.test.ts (opaque-failure): entries.some(...) became not.toContain on the entry paths.
  • session-start-reliability.test.ts (opaque-failure): Three sent.some(...) frame checks became toContainEqual(objectContaining), so a failure prints the frames.
  • native-journal-steering.test.ts (opaque-failure): entries.every(hash undefined) became an empty-list comparison of entries carrying a hash.
  • provider-relay-taint.test.ts (opaque-failure): Two every() record checks became empty-list comparisons of the offending records.
  • shrink.test.ts (opaque-failure): startsWith/every boolean checks became toStartWith and an empty-list comparison.
  • session-cost-persistence.test.ts (fixed-resource): Every test shared /tmp/brain-ui-cost-test-.db, deleted and recreated around each case; each test now opens a database in its own mkdtemp directory.

Scope

Land the batch's recorded, proven test changes into epic/3855-test-health.

Out of scope

Product code; timeouts or deadlines; the deferred findings (#3485 signing isolation, #3010 and #3763 reproductions, a load-sensitive real-time bound in policy-observation-pause.test.ts).

Acceptance criteria

  • bun scripts/test-health.ts batch verify --base origin/epic/3855-test-health --head <head> prints "ok": true.
  • The batch pull request's hosted proof passes on its head.

Verification

bun scripts/test-health.ts batch verify --base origin/epic/3855-test-health --head HEAD
bun run check:pr --base origin/epic/3855-test-health

Contract impact

None: test code only.

Activity

  1. added this to the 0.45.0 milestone on Nov 10, 2026
  2. added
    type: test
    area: ui-server
    on Nov 10, 2026
  3. added
    priority: p1
    on Nov 10, 2026
  4. schlessera commented on Nov 11, 2026

    @schlessera
    OwnerAuthor

    Delivered by #3902, which passed its proof on its own head and merged into epic/3855-test-health as 3181152a7 (the push in #3855). GitHub does not apply Closes for a pull request into a non-default branch, so I'm closing this by hand. The change reaches main with the epic's single landing pull request.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: ui-serverpriority: p1type: test

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions