Lab B — Publish an API without hallucinating
Fictional scenario: an agent writes an SDK page from a fictional library.
- Pin commit and extract public exports with rustdoc/API tooling.
- Classify each interface:
public-stable,public-experimental,internal. - Generate a draft guide with an isolated local LLM.
- Compile minimal code in
examples/and verify used symbols. - Link each claim to a fitting E1/E2/other evidence record.
- Produce FR and EN with reciprocal links and release notes.
Success criteria
No invented symbols, no implicit cloud egress, examples compile, classification/limits are public, and human review is recorded.Reproducible trial
From repository root, without installation or a model:
python3 examples/api_lab.py --symbol Queue.morph_to
# expected exit 1
python3 examples/api_lab.py
# expected exit 0
python3 scripts/test_labs.py
Observation and exercise
The negative case asks for Queue.morph_to, absent from the AST inventory; the positive case uses Queue.enqueue and checks its output. Add a fictional export and example, then an unknown signature. The Python fixture lowers prerequisites; transfer to Rust needs separate pinned-toolchain evidence. A model is optional: write the guide from the inventory if no authorized model is available.
Evidence and limits
Retain commands, output, exit codes and HEAD. RED must fail on the duplicate or unknown symbol, never a broken environment. Fixtures execute no system action or graphics engine and certify no external API.