agentleFS
kekzlkekzl/imp/tests/CLAUDE.md

imp / tests

CLAUDE.md44 starsChanged 57 days agoMITView on GitHub

Most GTest macros run in no CI lane: they need a GPU and CI has none. make check-test-lanes prints and pins the split (macros, not executions); guard_unit_skips fails the lane on any runtime skip. tests/refs/* without regenerating them deliberately. docs/audit/TEST_INVENTORY.md (2026-08-08 record; live counts: make check-test-lanes), docs/audit/MUTATION_BASELINE.md. Skill building-and-testing.

The file

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

1 rule. About 0 are common, 1 is distinctive, and 0 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.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Test-model env vars pointing at a wrong path skip whole batteries silently.

    line 36

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.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
CLAUDE.md
<!-- layer: L3 audience: agents verified: 2026-09-23 commit: 9b4a84e5 -->

tests - lanes, and which one gates

Most GTest macros run in no CI lane: they need a GPU and CI has none. make check-test-lanes prints and pins the split (macros, not executions); guard_unit_skips fails the lane on any runtime skip.

Invariants

  • The CI lane is ctest -L unit = make dev-test: test-core + test-text + the _unit_e2e_filter subset of test-e2e. make test-unit is not that lane.
  • New CPU tests go to test-core, into its explicit source list in CMakeLists.txt (imp_add_test_module).
  • The unit lane has no skips. A test that needs a GPU or a model file lives in a GPU binary: test-kv (test_kv_cache_gpu.cpp) or test-e2e outside _unit_e2e_filter (test_real_checkpoints.cpp, tokenizer parity). Bookkeeping tests use KVCache::for_accounting(); config-only tests read tests/fixtures/ (IMP_TEST_FIXTURES_DIR).
  • A green test counts only after mutation validation: break the covered code, confirm the test fails.

Entry points

  • tests/test_*.cpp: the CPU lane
  • tests/api/: HTTP battery, runs against the mock and the real server
  • tests/refs/: reference vectors; chat_template_goldens.h is generated by gen_chat_goldens.py (make chat-goldens), never hand-edited
  • tools/mutation/: mutation harness (run.py, catalogue.json)

Test

make test-gpu        # the GPU suite; started wrong it silently skips most

Pitfalls

  • --gtest_filter on a TEST_P/TYPED_TEST suite without wildcards matches 0 tests and reports PASSED: *DetEvalE2ETest*, not DetEvalE2ETest.* (a CPU-lane guard asserts this).
  • A timed-out mutation run leaves the mutation in the tree: back the file up to the scratchpad first, never git checkout to undo it.
  • Test-model env vars pointing at a wrong path skip whole batteries silently.
  • paged_attention_set_splitk_scratch is process-global: a test that sets it resets it to (nullptr, 0), or the next tests in the binary inherit a foreign buffer (2 reds, #2072).
  • A dispatch test proves the path ran, not only the output: QsaIndexer.SixteenRowGqaSplitKMatchesGqaKernel also asserts the two kernels are NOT bit-identical.
  • Chat-template tests compare the whole rendered prompt (goldens), not a grepped marker (#1572).
  • The template family comes from ChatTemplate::detect_family(), not the model name: Nemotron-3-Nano and Phi-4-reasoning both ship ChatML.

Do not touch

tests/refs/* without regenerating them deliberately.

See also

docs/audit/TEST_INVENTORY.md (2026-08-08 record; live counts: make check-test-lanes), docs/audit/MUTATION_BASELINE.md. Skill building-and-testing.

Download now (ZIP)

Does it work?

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

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

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.