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

Revert "Flake: llms-full 'guides are read once' fails when another file in the shard built /llms-full.txt first" #16192

opened this

Check · Review · Land · Live — Changes were asked on this head. Next: builder, changes were asked on this head.

A reviewer asked for changes Review

revert-15797 → main 1 commit 1 thread · 1 unresolved

Review

Sign in to review this change.
1 file changed +2 −3
test/llms-full.test.ts +2 −3
@@ -50,10 +50,9 @@ test("a second request is a 304 on the same ETag", async () => {
5050 });
5151
5252 test("the guides are read once however many requests come", async () => {
53 // Another file in the shard may have built it first: request once, then count. At most one
54 // read per guide, never one per request.
55 await (await fetch(`${servers.url}/llms-full.txt`)).text();
53 // Earlier tests in this file already requested it: one read per guide, never one per request.
5654 const reads = docText.mock.calls.length;
55 expect(reads).toBeGreaterThan(0);

toBeGreaterThan(0) assumes an earlier test in this file already built the document. That is the order and shard dependency the original fix removed. Request once here, then count.

5756 expect(reads).toBeLessThanOrEqual(GUIDE.length);
5857 for (let i = 0; i < 3; i++) await (await fetch(`${servers.url}/llms-full.txt`)).text();
5958 expect(docText.mock.calls.length).toBe(reads);

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs