From 73fde154879676fae591cfb62f53d01276d4b9bd Mon Sep 17 00:00:00 2001 From: Jinwoo-H Date: Wed, 23 Sep 2026 00:00:59 -0400 Subject: [PATCH] test(mobile): read the bomb inflation without depending on call order With the fetch's sibling stop removed, a read left over from the previous test inflated into the bomb test's record first, and indexOf(601) picked it. The test now asserts some inflation stopped at 601 and none exceeded its buffer, whatever else ran. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb --- .../src/transport/mobile-web-bundle-fetch-range.test.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mobile/src/transport/mobile-web-bundle-fetch-range.test.ts b/mobile/src/transport/mobile-web-bundle-fetch-range.test.ts index c9000a087f4..09849ab9b4d 100644 --- a/mobile/src/transport/mobile-web-bundle-fetch-range.test.ts +++ b/mobile/src/transport/mobile-web-bundle-fetch-range.test.ts @@ -270,9 +270,11 @@ describe('fetchMobileWebBundle from a host whose manifest names a range grid', ( }) expect(await refusalOf(fetchMobileWebBundle({ client: host.client }))).toBe('asset-overlong') - const bombAt = inflations.outLengths.indexOf(601) - expect(bombAt).toBeGreaterThanOrEqual(0) - expect(inflations.resultLengths[bombAt]).toBe(601) + // Order-free: a stray read from an earlier test may inflate into this test's record too. + expect(inflations.resultLengths).toContain(601) + for (const [call, resultLength] of inflations.resultLengths.entries()) { + expect(resultLength).toBeLessThanOrEqual(inflations.outLengths[call]!) + } }) it('refuses a range that inflates short of its window as short', async () => {