test-harness
Skill1 starsChanged 6 months agoMITView on GitHub
How to write integration tests against a real local Llama-3-8B (or skip cleanly when GPU absent).
5 other projects use a version of this.
Adopted by
Most recently taken up by
- Mathews-Tom/armorytheir own version, first seen Nov 1, 2026
- Asno-dev/apextheir own version, first seen Oct 15, 2026
- NaveenGumaste/keyskillstheir own version, first seen Oct 13, 2026
- zernie/vigilestheir own version, first seen Jun 25, 2026
- semihkayan/codeweave-mcptheir own version, first seen May 25, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- Mathews-Tom/armory★ 340same name
- zernie/vigiles★ 15same name
- semihkayan/codeweave-mcp★ 4same name
- NaveenGumaste/keyskills★ 2same name
- Asno-dev/apex★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository5 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- kvcache-formatSkill
- napi-bindingSkill
- pyo3-bindingSkill
- rust-patternSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
1
Distinctive
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
- Distinctive: line 31
Document required env vars in the test's doc-comment.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Test-harness patterns
Three test tiers
- Unit —
crates/<crate>/src/**/tests: pure logic, no FS, no network. - Crate-integration —
crates/<crate>/tests/: hits real FS viatempfile, can invoke other crates, no external services. - End-to-end —
tests/e2e/andexamples/<N>/: runs the actualpfbinary, may require GPU/network. Gated.
GPU gate
For tests that require a CUDA host:
#[test]
fn vllm_round_trip() {
if std::env::var("PF_HAS_GPU").as_deref() != Ok("1") {
eprintln!("skipping: needs PF_HAS_GPU=1 + vLLM ≥0.10");
return; // intentional skip, NOT a pass
}
// … real test …
}Document required env vars in the test's doc-comment.
Llama-3-8B local
For Python adapter tests we boot vLLM as a subprocess:
import subprocess, time, requests, pytest
@pytest.fixture(scope="session")
def vllm_8b():
if not os.environ.get("PF_HAS_GPU"):
pytest.skip("needs PF_HAS_GPU=1")
proc = subprocess.Popen(
["vllm", "serve", "meta-llama/Llama-3-8B",
"--enforce-deterministic", "--port", "18001"],
)
for _ in range(120):
try:
requests.get("http://localhost:18001/health", timeout=1)
break
except requests.RequestException:
time.sleep(1)
else:
proc.kill()
pytest.fail("vllm did not start in 120 s")
yield "http://localhost:18001"
proc.kill()Synthetic fixture
For host-portable performance tests we use a synthetic 4-layer fixture in
crates/pf-core/tests/fixtures/synthetic_4layer.rs that builds a 1.2 GB
manifest with realistic-shaped blobs. Used by Phase-1 acceptance.
Determinism
Pin every randomness source: proptest! uses an explicit seed, rand::SeedableRng::seed_from_u64(PF_TEST_SEED), summarizer calls in merge tests stub with a fixture model.
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
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.

