Skip to content

tests: attribute low-space failures in remaining running-turn fixtures #2551

Open

Description

@schlessera

Out of scope

No production free-space policy, scope-floor formula, Stop-only behavior, timeout, behavioral assertion, offline launcher or generic createFixtureApp change. Do not reject boot-only callers, fake runtime statfs, provision storage in the harness, or weaken the actual resource guard.

Context

The caller audit required by #2394 found five more running-turn fixture suites that fail on a filled 3 GiB tmpfs without an explicit capacity prerequisite. The selected A1 helper is implemented by #2394; this follow-up applies it only where a real running turn is required.

Source at 5942148decae04852c2a99e39e0aa00112e11ef2:

Suite Current source Filled-storage result
packages/ui-react/tests/draft-runtime.test.ts Brain creation at :73-75; original held-turn completion wait at :241 390px saved/restored/conflict/revision scenario: 15-second assistant-content timeout after release; 0/1.
packages/ui-react/tests/tracker-runtime.test.ts Brain creation at :44-46; original tracker wait at :166 320px left-running/unwatched/reload/seen scenario: 15-second tracker-state timeout; 0/1.
packages/ui-server/tests/subscription-login.test.ts sendTurn at :106; outcome assertion at :172 Rejected-token scenario observes cancelled instead of error; 0/1.
packages/ui-server/tests/subscription-status.test.ts boot at :222; turn at :253; retained proof assertion at :321 Successful subscription proof is null; 0/1.
packages/ui-server/tests/ws-scope-caps.test.ts Fixture/brain creation at :21-23; tool-cap assertion at :98 Claude dictation sees free_space_floor, cap 2147483648, instead of its tool-call cap; 0/1.

The audit used Bun 1.4.2 and real Chrome for Testing 153.0.8010.12 under the repository offline launcher, empty IPv4/IPv6 main route tables and zero setup capabilities. The filesystem held 3221225472 total bytes; the 1600 MiB fill initially left 1543503872 available bytes, below the unchanged 2147483648-byte floor.

Unfilled controls on the same 3 GiB filesystem initially had 3221225472 available bytes against the same 2147483648-byte floor. All five original selected cases passed unchanged: draft-runtime.test.ts: 1/1, 32 assertions; tracker-runtime.test.ts: 1/1, 10 assertions; subscription-login.test.ts: 1/1, 6 assertions; subscription-status.test.ts: 1/1, 3 assertions; ws-scope-caps.test.ts: 1/1, 16 assertions. Only the explicit fill differs between arms; these are focused controls, not whole-suite qualification.

The audit inventoried 43 factory-calling suites and ran focused filled-storage probes in 18 additional turn-admitting suites. Thirteen additional focused probes passed: answer-delivery, approval-recovery, association-signout, auth-expiry, chat-focus, local-work, share-draft, host-capability-note, integration/inbox-bridge-host, integration/real-socket-answers, ws-main-model, ws-revocation and ws-turn-budgets. The remaining 22 callers received source inspection, not a full runtime matrix. Passing short-turn probes do not establish every case in their suite.

Scope

  • Reuse packages/ui-server/tests/helpers/turn-free-space.ts from test(ui-react): attribute scope freeze refusal dropping queued recovery replies #2394.
  • Add explicit calls before the first real turn in the five failing suites, checking their actual brain paths.
  • Keep boot-only cases in subscription-status and other shared setup paths usable without a blanket check; put the prerequisite at the turn-running boundary.
  • Preserve the existing source, assertions, deadlines and real scope monitor.

Acceptance criteria

  • Each named filled-storage case refuses before its first turn with TurnFixtureFreeSpaceError containing brain path, available bytes, required bytes and a TMPDIR remedy.
  • Every original named scenario passes on a sufficiently provisioned filesystem, including the complete original browser cells and adapter variants affected by the call placement.
  • Removing each new explicit call reproduces its original low-space signature; restoring it gives the named precondition error.
  • Boot-only/shared-factory callers do not acquire a blanket prerequisite. Keep the production low-space guard covered.
  • Parent-relative preflight passes with actual filesystem capacity/free/floor and runtime/mutation receipts recorded in the PR.

Verification

Use docs/process/testing.md's caller-owned private tmpfs recipe and scripts/test-offline.sh. Compare size=3g without fill against fallocate -l 1600M before launch. Run real browser tests for drafts and trackers; no provider calls or network access.

Focused selectors from the audit:

bun run test packages/ui-react/tests/draft-runtime.test.ts -t '390.*saved on the host'
bun run test packages/ui-react/tests/tracker-runtime.test.ts -t '320.*left running'
bun run test packages/ui-server/tests/subscription-login.test.ts -t 'ends the turn with authentication_failed'
bun run test packages/ui-server/tests/subscription-status.test.ts -t 'the last proof is a successful subscription turn from the store'
bun run test packages/ui-server/tests/ws-scope-caps.test.ts -t 'claude: dictation'

Contract impact

None. Test-only opt-in calls to an existing helper; no production API or shipped behavior changes.

2026-11-10 triage at main d79eeed0a: #2394 is closed as completed through #2609 (squash aa8c8966b, on main), so its Blocked by line moved here as history. No active blocker.

Activity

  1. added
    type: test
    area: ui-server
    area: ui-react
    agent-ready
    blocked
    on Oct 22, 2026
  2. schlessera commented on Oct 22, 2026

    @schlessera
    OwnerAuthor

    Unblocked: #2394 is closed, so scripts/sync-project.ts is removing the blocked label.

  3. removed
    blocked
    on Oct 22, 2026
  4. schlessera commented on Nov 2, 2026

    @schlessera
    OwnerAuthor

    2026-11-02, another hosted instance: run 41477145795, unit (4), on a candidate whose ci.yml change selects the full unit suite (#3279).

    • TurnFixtureFreeSpaceError: the fixture brain filesystem had 2,618,241,024 bytes available and required 3,844,357,734.4 bytes, which is 5% of the total. Four claude-cancellation cases failed this way.
    • In the same shard and window, these also failed: a rejected subscription token > ends the turn with authentication_failed, with Expected: "error"; claude/pi dictation pauses, grants once…; and claude: true voice stops without a grant. None of the four carries a low-space attribution.

    The same full selection passed on #3278's candidate earlier the same day, so this tracks how full the runner is rather than the code.

  5. added
    priority: p2
    on Nov 10, 2026
  6. schlessera commented on Nov 10, 2026

    @schlessera
    OwnerAuthor

    2026-11-10 triage at main d79eeed0a: priority: p2. Wanted: the unattributed low-space failures recurred on hosted CI on 2026-11-02, but there is no milestone or ruling, and nothing is blocked by it. #2394 is closed and its helper is the one this issue reuses. agent-ready stays.

    The closed blocker named in the body is delivered (merged PR on main), so I moved its Blocked by line into a dated historical note.

  7. schlessera commented on Nov 10, 2026

    @schlessera
    OwnerAuthor

    Test-health run (batch e3855-ui-react-06, commit 4b1ac8c4e on test-health/e3855-ui-react-06-a, not yet merged) covers tracker-runtime.test.ts only: requireTurnFreeSpace(brain) now runs right after createFixtureBrain(repo, brain), as in connection-continuity-runtime.test.ts.

    Receipts, Bun 1.4.x, real Chrome, caller-owned private tmpfs (unshare --user --map-current-user --keep-caps --mount, size=3g) under scripts/test-offline.sh --mount, selector -t '320.*left running':

    • Filled (fallocate -l 1600M; total 3,221,225,472, available 1,543,503,872), before the call: 0 pass / 1 fail, TimeoutError: waitForFunction: Timeout 15000ms exceeded from until. This is the original signature.
    • Filled, after: 0 pass / 1 fail with TurnFixtureFreeSpaceError: the brain path, 1,542,115,328 available bytes, 2,147,483,648 required, and the TMPDIR remedy.
    • Unfilled 3 GiB, after: 1 pass / 0 fail, 10 expect() calls.
    • The whole file on the host filesystem after the change: 2 runs, 12/12 cases each, stable.

    Still open for this issue: draft-runtime, subscription-login, subscription-status and ws-scope-caps. The batch PR will say Refs #2551.

  8. schlessera commented on Nov 10, 2026

    @schlessera
    OwnerAuthor

    Test-health push (epic #3855), batch e3855-ui-server-04 (run th-20261110174252-07efe9, clusters 6 and 41): the three ui-server suites in this issue now call requireTurnFreeSpace from packages/ui-server/tests/helpers/turn-free-space.ts at their turn-running boundary. The two ui-react suites are not part of this batch, so the batch PR says Refs #2551.

    Suite Call placement Boot-only callers
    subscription-login.test.ts first line of sendTurn (app.config.brainPath) none; both cases send a turn
    subscription-status.test.ts first line of turn (app.config.brainPath) unchanged: monitor-only and boot-only cases never call turn
    ws-scope-caps.test.ts first line of the case's try, so a refusal still restores every stand-in —

    Receipts, at the epic base 0129244ad0781c426f7d3f2363c92d8993aefaee plus these commits, Linux 6.18 WSL2. The filled-storage arm runs each named case under bwrap --unshare-user --bind / / --size 1073741824 --tmpfs <dir> --proc /proc --dev /dev env TMPDIR=<dir> bun run test <file> -t '<case>' (a 1 GiB tmpfs, about 1.07 GB available against the unchanged 2147483648-byte floor):

    Case With the call Without it (unchanged HEAD, same tmpfs)
    a rejected subscription token > ends the turn with authentication_failed 0/1, TurnFixtureFreeSpaceError naming the brain path, 1071665152 available bytes, at least 2147483648 bytes, and the TMPDIR remedy 0/1, Expected: "error" / Received: "cancelled"
    the last proof is a successful subscription turn from the store 0/1, TurnFixtureFreeSpaceError (1071661056 available bytes) 0/1, expect(received).not.toBeNull() / Received: null
    claude: dictation pauses, grants once, … 0/1, TurnFixtureFreeSpaceError (1073721344 available bytes) 0/1, receipt free_space_floor, cap: 2147483648 instead of the tool-call cap

    On the ordinary filesystem every case passes: bun scripts/test-health.ts measure <file> --runs 5 --shuffle gives 10/10 runs without failure for each of subscription-login.test.ts, subscription-status.test.ts and ws-scope-caps.test.ts. The production free-space guard, assertions and deadlines are unchanged.

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

    agent-readyarea: ui-reactarea: ui-serverpriority: p2type: test

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions