agentleFS
kekzlkekzl/imp/tests/CLAUDE.md

imp / tests

CLAUDE.md77 starsChanged 5 days agoMITView on GitHub

Most GTest macros run in no CI lane (GPU needed, CI has none). make check-test-lanes pins the split; guard_unit_skips fails the lane on any runtime skip. tests/refs/* without deliberate regeneration. docs/audit/TEST_INVENTORY.md (2026-08-08; live: make check-test-lanes), docs/audit/MUTATION_BASELINE.md. Skill building-and-testing.

The file

Files
CLAUDE.md
<!-- layer: L3 audience: agents verified: 2026-10-24 commit: 28185525 -->

tests - lanes, and which one gates

Most GTest macros run in no CI lane (GPU needed, CI has none). make check-test-lanes pins the split; guard_unit_skips fails the lane on any runtime skip.

Invariants

  • CI lane = ctest -L unit = make dev-test: test-core + test-text + _unit_e2e_filter subset of test-e2e. Not make test-unit.
  • New CPU tests: test-core, explicit source list in CMakeLists.txt (imp_add_test_module).
  • Unit lane has no skips. GPU or model-file tests go to test-kv (test_kv_cache_gpu.cpp) or test-e2e outside _unit_e2e_filter (test_real_checkpoints.cpp, tokenizer parity). Bookkeeping: KVCache::for_accounting(); config-only: tests/fixtures/ (IMP_TEST_FIXTURES_DIR).
  • A green test counts only after mutation validation: break the code, see it fail.

Entry points

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

Test

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

Pitfalls

  • --gtest_filter on TEST_P/TYPED_TEST without wildcards matches 0 tests and reports PASSED: *DetEvalE2ETest*, not DetEvalE2ETest.* (CPU-lane guard).
  • A timed-out mutation run leaves the mutation in the tree: back the file up to scratchpad first, never git checkout to undo.
  • Wrong test-model env paths skip whole batteries silently.
  • paged_attention_set_splitk_scratch is process-global: reset to (nullptr, 0) after use (#2072).
  • Dispatch tests prove the path ran: QsaIndexer.SixteenRowGqaSplitKMatchesGqaKernel asserts the two kernels are NOT bit-identical.
  • Chat-template tests compare the whole rendered prompt (goldens), not a marker (#1572).
  • Template family = ChatTemplate::detect_family(), not model name: Nemotron-3-Nano and Phi-4-reasoning ship ChatML.

Do not touch

tests/refs/* without deliberate regeneration.

See also

docs/audit/TEST_INVENTORY.md (2026-08-08; live: 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.