agentleFS
vllm-projectvllm-project/vllm/tests/AGENTS.md

vllm / tests

AGENTS.md95k starsChanged 11 days agoApache-2.0View on GitHub

- Test real objects on the lightest real path. Construct vLLM objects with their real constructors; do not stand them in with SimpleNamespace or MagicMock, set private attributes, or patch methods to reach a state. Mock only external services. Pick the cheapest setup that exercises the change: a layer or kernel test does not need vllmrunner, and single-rank parallel state is enough when parallelism is irrelevant. A fix to user-visible behavior needs at least one regression test through LLM (vllmrunner)…

We split this AGENTS.md into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Show the failure before the fix: When the bug is reproducible, run the new test on the base commit (rebuild if the fix touches csrc/) and …

    line 12
  2. Very specific:

    Never buy a green CI: Do not add flaky/reruns, retry loops, skip, xfail, lowered thresholds, wider atol/rtol, or deletions to make a test …

    line 17
  3. Distinctive:

    Deterministic and exact by construction: Use greedy or seeded sampling.

    line 23

≈ “Common” is an estimate: at least 1 in 5 of the 36,368 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

tests

  • Test real objects on the lightest real path. Construct vLLM objects with their real constructors; do not stand them in with SimpleNamespace or MagicMock, set private attributes, or patch methods to reach a state. Mock only external services. Pick the cheapest setup that exercises the change: a layer or kernel test does not need vllm_runner, and single-rank parallel state is enough when parallelism is irrelevant. A fix to user-visible behavior needs at least one regression test through LLM (vllm_runner) or RemoteOpenAIServer, with real weights when loading is involved. A test that only asserts assert_called* or "no exception" guards nothing.
  • Show the failure before the fix. When the bug is reproducible, run the new test on the base commit (rebuild if the fix touches csrc/) and confirm it fails for the reported reason, then passes with the fix. Paste both commands and the relevant output in the PR; "fails before" without output is not evidence.
  • Never buy a green CI. Do not add flaky/reruns, retry loops, skip, xfail, lowered thresholds, wider atol/rtol, or deletions to make a test pass. Find out whether the failure is caused by your change or also happens on main (.buildkite/scripts/rerun-test.sh, docs/contributing/ci/failures.md); the only exception is xfail(strict=True) linking an open issue for a bug on main.
  • Deterministic and exact by construction. Use greedy or seeded sampling. Assert equality where the result is exact (a change that must not alter output is compared against the code it replaces, not another reference), and keep tolerances as tight as the math allows. vLLM is not batch invariant by default: batch size, chunked prefill, prefix caching, backend, and TP size can flip greedy tokens, so compare against a reference with check_logprobs_close / check_embeddings_close, or require VLLM_BATCH_INVARIANT=1 for exact equality. Never synchronize with a fixed sleep; poll an explicit condition with a timeout, and force race orderings with events.
  • Make sure CI runs it. A test no step in .buildkite/test_areas/*.yaml selects never runs, which looks like passing. Check that the step's commands and pytest markers (core_model, slow_test, distributed) select the test and its source_file_dependencies cover the changed files; update the step if not.

Download now (ZIP)

Trending

More talk lately.about the whole repository

Dec 2025: 2 mentionsJan 2026: 4 mentionsFeb 2026: 3 mentionsMar 2026: 4 mentionsApr 2026: 5 mentionsMay 2026: 4 mentionsJun 2026: 2 mentionsJul 2026: 1 mentionAug 2026: 4 mentionsSep 2026: 7 mentionsOct 2026: 4 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the vllm-project/vllm repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about vllm-project/vllm

The biggest 5 of 97 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 97

Talked about on GitHub, YouTube, Hacker News, Bluesky, the web and Stack Overflow (97 times).

On GitHub · 28

23 more on GitHub

On YouTube · 20

15 more on YouTube

On Hacker News · 15

10 more on Hacker News

On Bluesky · 15

10 more on Bluesky

On the web · 10

5 more on the web

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.