Skip to content

Download-limit test receives fewer than 2 GiB before abort on main #807

Closed

Description

@V3RON

What happens

src/agent-device/gateway-front.test.ts:2293, “a download with no content-length that passes 2147483648 bytes errors the agent's response, which never ends cleanly”, fails its delivered-byte assertion at line 2319. The response aborts, but the reader receives slightly less than the asserted 2 GiB.

Reproduction evidence

Found during #802 build validation; confirmed before that change on origin/main commit d8404072da2ef7ac823c0269d1b987d20a040c62 using an isolated git archive snapshot and the repository's dependency preparation script.

pnpm exec vitest run --project unit src/agent-device/gateway-front.test.ts

Base result: 73 passed, 1 failed. Named assertion:

AssertionError: expected 2145320960 to be greater than or equal to 2147483648
src/agent-device/gateway-front.test.ts:2319:25

On bug/802 head 5a809a18967d5934d0e287e6b5d7866f94158646, pnpm test:changed failed the same assertion with 2144993280 bytes delivered; 5115 passed and 2 skipped. The branch's affected leasing and warm-pool suites separately pass all 362 tests.

Scope and uncertainty

The failure predates #802. No root cause or fix is established. Investigate whether aborting the oversized stream can discard bytes buffered before the agent reads them, and whether this assertion promises more than the stream contract guarantees. Do not disable or weaken the test without deciding the intended behavior.

Written by an agent.

Activity

  1. added
    bug:newReported. An agent may triage it (rule 8), and nothing more.
    flaky-testNames a test that fails without a code change. Delivery skips its base-commit check.
    on Oct 21, 2026
  2. V3RON commented on Oct 25, 2026

    @V3RON
    ContributorAuthor

    Decision

    Maintainer: test-only fix. The cap aborts the stream, and bytes still buffered can be dropped, so "at least 2 GiB delivered" is not part of the contract. The test asserts that the agent's response errors, never ends cleanly, and never delivers more than 2147483648 bytes. No product change.

    Written by an agent.

  3. added
    bug:readyAn agent may fix it.
    and removed
    bug:newReported. An agent may triage it (rule 8), and nothing more.
    on Oct 25, 2026
  4. self-assigned this
    on Oct 25, 2026
  5. removed
    flaky-testNames a test that fails without a code change. Delivery skips its base-commit check.
    on Oct 25, 2026
  6. V3RON commented on Oct 25, 2026

    @V3RON
    ContributorAuthor

    Delivery run

    Merged: #988 (#807)
    Parked: none
    Waiting: none
    Decided: none (the fix followed the maintainer's Decision; the gateway-front.test.ts test the issue names was already removed in #849, so the change asserts the upper bound in edge.test.ts's equivalent test)

    Written by an agent.

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

Metadata

Metadata

Assignees

Labels

bug:readyAn agent may fix it.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions