Skip to content

ui-server: session-taint G6 clean-session egress counted 22 curl calls in a hosted unit shard #3763

Open

Description

@schlessera

Context

packages/ui-server/tests/session-taint.test.ts:97 asserts that a clean session makes no curl calls (G6_CLEAN_SESSION_EGRESS_UNCHANGED). It failed in hosted CI on a candidate that cannot reach it.

Observed:

Why the candidate cannot reach it: #3758 changes no ui-server code. This test uses its own host and backend fixture. It passed locally on the same branch, 1 of 1 runs.

Lead, not established: 22 calls in a "clean" session suggest that the curl counter is shared with, or not reset from, other work in the same unit (4) process.

Scope

Attribute the failure from the job log, and from the test's control and fixture setup. Fix the cause.

Out of scope

  • Retrying.
  • Raising counts.
  • Skipping the case.
  • Weakening the zero-egress assertion.

Acceptance criteria

  • The source of the 22 calls is named from evidence.
  • A failing-first receipt reproduces it, for example by running the file in the same process order as unit (4).
  • The fix keeps the assertion at 0. A mutation that reintroduces the cause fails it.

Verification

bun run test packages/ui-server/tests/session-taint.test.ts
bun run check:pr --base origin/main

These checks are offline and keyless.

Contract impact

None.

Activity

  1. added this to the 0.45.0 milestone on Nov 9, 2026
  2. added
    type: testCoverage, harness or proof work with no behaviour change.
    area: ui-serverHono app factory: turn coordinator, auth, session catalog, routes, cron.
    priority: p2Wanted, not scheduled. Pulled in when a milestone has room.
    agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.
    on Nov 9, 2026
  3. removed this from the 0.45.0 milestone on Nov 9, 2026
  4. schlessera commented on Nov 9, 2026

    @schlessera
    OwnerAuthor

    Moved off 0.45.0 (maintainer ruling, 2026-11-09). A hosted-only flake in a test the failing candidate could not reach does not block 0.45.0 work. It stays open as a test-reliability issue.

  5. schlessera commented on Nov 10, 2026

    @schlessera
    OwnerAuthor

    Test-health audit (batch e3855-ui-server-03, epic #3855) — attribution correction, not a fix.

    The 22 is not a call count. control.curl is the worker curl's exit code (const curl = await child.exited, packages/ui-server/tests/session-taint.test.ts:64 at 0129244ad). The command runs curl --silent --fail, and curl exits 22 when --fail sees an HTTP response status of 400 or more. So in run 42584405311 / job 129051370994 the clean session's single curl did reach the turn proxy, and something answered it with an HTTP error: the proxy refusing the connection, or an upstream failure it reported (for example a 5xx/504 while the loopback origin was slow on a loaded shard). The "shared or unreset counter" lead does not apply.

    What the batch changes: the worker curl now runs with --show-error --write-out " http_status=%{http_code}", its stdout and stderr are captured, and G6_CLEAN_SESSION_EGRESS_UNCHANGED prints them in its message. The assertion stays toBe(0). The next hosted failure will therefore name the HTTP status and curl's own error, which is what is needed to pick between a proxy refusal and an upstream timeout.

    Not reproduced here: the local 10-run shuffled baseline of this file at 0129244ad passed every run. This issue stays open (Refs, not Closes): the acceptance criteria still need the source named from a failing run.

  6. schlessera commented on Nov 22, 2026

    @schlessera
    OwnerAuthor

    Fresh complete unit selection for #4314 at a7240d48711c8fed4ddd88d44bb19061e43b0ae2 reproduced the clean-session assertion: G6_CLEAN_SESSION_EGRESS_UNCHANGED http_status=403 curl: (22) The requested URL returned error: 403, expected curl exit 0, received 22. The test is byte-identical to origin/main. This is curl’s exit status, not a count of calls.

    Comparison: unchanged main 7e861bdb3 passed three isolated repetitions and ten more under four CPU burners. Therefore the isolated comparison does not reproduce the complete-category ordering. Exact cause remains open; no assertion or production behavior was changed. Full-category JUnit retains this as one failure, not green proof.

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-readyContext and acceptance criteria are complete enough for an agent to take this unattended.area: ui-serverHono app factory: turn coordinator, auth, session catalog, routes, cron.priority: p2Wanted, not scheduled. Pulled in when a milestone has room.type: testCoverage, harness or proof work with no behaviour change.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions