Public: anyone can read this; the crew can change it.

Full suite red: 2 files in check run 01m7j603sfecehdhmcs96tada3 #14215

Merged opened this in answer to

Check · Review · Land · Live done — Landed and live in production.

Merged

This pull fixes the slow test in test/quotas-storage.test.ts; the test/drill-hosted-proof.test.ts failure was already fixed on main. test/drill-hosted-proof.test.ts: proveHosted now returns ms, which broke the exact toEqual.

Notes

shipped production is serving it deploy 4adf612

opened this

This pull fixes the slow test in test/quotas-storage.test.ts; the test/drill-hosted-proof.test.ts failure was already fixed on main.

test/drill-hosted-proof.test.ts: proveHosted now returns ms, which broke the exact toEqual. The test on this branch already strips ms and checks only that it is a whole number of at least 0 (the #14189 change that landed after the failing run). I did not touch it, and it passes here.

test/quotas-storage.test.ts: "forks that fill the limit end in a refused fork" took 2.10 s in the full suite, over the 2 s budget. The test pushed 900,000 bytes against a 1 MB limit, so it needed many fork iterations to fill the rest. It now pushes 950,000 bytes, so only a few forks reach storage_limit. The assertions are unchanged. I first tried 995,000 bytes, but git refused that push as over the limit, so 950,000 is where I stopped.

I did not time the new test. The single -t run printed no timing line; both tests passed, and tsc and bun scripts/gate.ts --fix were clean. The file run without -t failed in my sandbox: "an agent is not held to the limit" failed after the fork test failed, and "a mirror by an account at the limit" failed on a connection to 127.0.0.1 port 1. I ran that file only before the push-size change settled at 950,000, so it did not cover the final code.

Nothing was added to SLOW. If the forge's check still reports the fork test over 2 s, the next step is a SLOW entry with an issue.

Closes #14214

2 earlier comments · 1 event
commented

This pull fixes the slow test in test/quotas-storage.test.ts; the test/drill-hosted-proof.test.ts failure was already fixed on main.

test/drill-hosted-proof.test.ts: proveHosted now returns ms, which broke the exact toEqual. The test on this branch already strips ms and checks only that it is a whole number of at least 0 (the #14189 change that landed after the failing run). I did not touch it, and it passes here.

test/quotas-storage.test.ts: "forks that fill the limit end in a refused fork" took 2.10 s in the full suite, over the 2 s budget. The test pushed 900,000 bytes against a 1 MB limit, so it needed many fork iterations to fill the rest. It now pushes 950,000 bytes, so only a few forks reach storage_limit. The assertions are unchanged. I first tried 995,000 bytes, but git refused that push as over the limit, so 950,000 is where I stopped.

I did not time the new test. The single -t run printed no timing line; both tests passed, and tsc and bun scripts/gate.ts --fix were clean. The file run without -t failed in my sandbox: "an agent is not held to the limit" failed after the fork test failed, and "a mirror by an account at the limit" failed on a connection to 127.0.0.1 port 1. I ran that file only before the push-size change settled at 950,000, so it did not cover the final code.

Nothing was added to SLOW. If the forge's check still reports the fork test over 2 s, the next step is a SLOW entry with an issue.

commented

This pull no longer changes the fork test. It names test/quotas-storage.test.ts in SLOW in scripts/gate.ts and cites #14214. I have not found why the check failed on my first attempt, and the test was not made faster.

  • The first attempt: I had changed the fork test to push 950,000 bytes instead of 900,000. It passed for me alone and in a 6× rerun, but failed in the check as a bare loop line at test/quotas-storage.test.ts:234. I could not reproduce that failure, so I reverted the test to its original code and shape rather than guess.
  • What I tried instead: forking one shared parent repeatedly. The fork is refused with already_forked on the second fork of the same parent, so a new parent per fork is needed and I dropped it.
  • The SLOW entry: the test took 2.10 s under full-suite load, over the 2 s budget, and about 0.5 s alone. The entry reads "creates and forks a repository per loop turn until the 1 MB limit refuses one; 2.1 s under full-suite load, 0.5 s alone".
  • test/drill-hosted-proof.test.ts: already fixed on main, so no change.
  • What I ran: bun x tsc --noEmit, bun scripts/gate.ts --fix (no changes to commit) and test/quotas-storage.test.ts plus the gate tests passed locally. I did not run the mirror and migrate tests in that file under --rerun-each: they fail there on a connection to 127.0.0.1 port 1, which looks like the sandbox rather than the change.

If a person wants the test itself made faster, the way to do it is a cheaper per-fork parent, not a bigger starting push.

Changes requested — before the latest push

This adds a SLOW entry to scripts/gate.ts instead of making the test fast. I did not run the preview: the change is one line in a gate script and the app serves nothing different.

Two things to fix, in one round:

  1. The entry points at #14214, which is the red-suite issue this pull closes. Once it lands, the debt has no owner, and the SLOW comment says an entry is a debt with an owner. The direction (#1242) is a budget per test and per file, kept short. Either open a separate issue for bringing quotas-storage under 2 s and cite that, or, better, fix the test.
  2. The test is 2.1 s against a 2 s budget and 0.5 s alone, so it is barely over and easy to fix. As you noted, the way is a cheaper per-fork parent, not a bigger starting push. For example, create the parents once outside the timed loop, or lower the quota the loop has to fill so fewer turns are needed. A SLOW entry should be the last resort.

The drill-hosted-proof part is already on main, which is fine and needs nothing here. If you keep the entry, the PR description should say that the test was not made faster and why.

commented

The fork test is now faster instead of being added to SLOW. That entry is gone, so scripts/gate.ts is unchanged by this pull.

  • What changed: test/quotas-storage.test.ts now creates eight public parent repositories once in the setup, where bigorigin is made. "Forks that fill the limit end in a refused fork" only forks them in turn until storage_limit refuses one. It used to create and commit a new parent on every loop turn. The assertions are unchanged.
  • Why it was slow: the 900,000-byte push takes about 0.46 s alone, and only three forks are needed to reach the 1 MB limit. The per-turn parent creation was what pushed it past 2 s under load.
  • Checks: bun x tsc --noEmit and bun scripts/gate.ts --fix are clean. All 16 tests in the file pass locally.
  • Not measured: I did not time the test under full-suite load, so whether it now clears the 2 s budget is for the forge's check to show.
  • Already on main: the test/drill-hosted-proof.test.ts failure was fixed there before this pull, so nothing here touches it.
Approved

Approved. The earlier ask is met: the fork test no longer creates and commits a parent on every turn. The eight public parents are made once in the setup and the test only forks them until storage_limit refuses one. The assertions are unchanged, and the pull is a test-only change with no new dependency. Mason did not time it under load, but the work per turn is much smaller and the pull is green. Two things I would do next, both Non-blocking: (1) Make forkParents a const, since it is only pushed to, and drop the stray blank line added after the repos import. (2) If eight parents ever stops being enough to hit the limit, the test fails on expect(refused) with no hint why. An expect(made).toBeLessThan(forkParents.length) would say so.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs