Skip to content

test: make the tree snapshot rate-limit test deterministic - #61

Merged
hyochan merged 3 commits into
mainfrom
test/flaky-tree-snapshot
Dec 1, 2026
Merged

hyochan merged 3 commits into
mainfrom
test/flaky-tree-snapshot

Conversation

@hyochan

@hyochan hyochan commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

Summary

The weekly flaky-test check failed on 2026-11-30 in resumes a rate-limited page at the exact file group without duplicate blob fetches (test/convex/repoIndexing/treeSnapshotContinuation.test.ts).

The test started indexing in the background and polled 20 fake-time steps for the first blob request. Run alone, the cold import of the backend modules outlasts those steps, so the assertion ran before indexing had made any request; it failed every time, also before #60. In the full suite the modules are warm, but a slow runner can hit the same race, which is what the weekly check caught.

A small runUntil helper now waits on real time (at most ten seconds) and moves fake time no further than the old loop did, so jobs scheduled further out still never run on their own. Both polling loops in the test use it. Production code is unchanged.

Also updates cross-spawn from 7.0.6 to 7.1.0 (pulled in by eslint, development only) for GHSA-ghv9-86vm-4v8m, published today, which made the required security check fail. The lockfile also records the CLI's 0.6.0 version.

Checks

  • The test alone: 20 of 20 runs pass (0 of 15 before).
  • The whole file: 30 of 30 runs pass.
  • bun run lint, bun run typecheck, bun run test.

🤖 Generated with Claude Code

… step count

The test polled a fixed number of fake-time steps for the first blob request. Run alone, the cold import of the backend modules outlasts those steps, so the assertion ran before indexing started; slow runners hit the same race inside the full suite. It now waits on real time, capped at ten seconds, while still moving fake time no further than before.

@gitdogai gitdogai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 potential issue in 0eb6ef2

Not a merge approval. Tests were not run. Gitdog

GHSA-ghv9-86vm-4v8m affects cross-spawn 7.0.x, which eslint pulls in for development only; 7.1.0 is the patched release in range. The lockfile also records the CLI's 0.6.0 version.
@github-actions

github-actions Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit 0fc9947):

https://codeyou-df251--pr61-test-flaky-tree-snap-g30iaxqo.web.app

(expires Tue, 08 Dec 2026 08:52:27 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 844dad9c62537d028cabc21008e4e2e4031ce4e5

@hyochan

hyochan commented Dec 1, 2026

Copy link
Copy Markdown
Member Author

@gitdogai review

@gitdogai gitdogai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found in 0fc9947

Reviewed the 2 files changed since 0eb6ef2.

Approved because no issues were found in fully reviewed changes. Tests were not run. Gitdog

@hyochan
hyochan merged commit e6e87b7 into main Dec 1, 2026
9 checks passed
@hyochan
hyochan deleted the test/flaky-tree-snapshot branch December 1, 2026 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant