Receipts

Receipts or It Didn't Happen

The local API is only as believable as its verification artifacts. Conveniently, it brought receipts.

Cyberpunk QA evidence board with a compact edge AI server and green check lights.
Green lights are nice. The command transcript is better.

The evidence drawer

The QA package points to retained artifacts under /home/jetson/ComfyUI/qa/local-ai-api/. The important files include a standalone QA harness result, a fixed-port live verification result, a pytest transcript, and captured rendered docs pages for API routes, history, playground, and reference-image docs.

results.json

Standalone harness output from a temporary local API server.

live-verification.json

Fixed-port verification against the live API.

pytest-local-ai-api.txt

Full local API pytest transcript.

site-*.html

Captured docs pages proving the human docs rendered.

Latest known good state

The handoff package records the latest successful checks as:

pytest -q tests/local_ai_api
34 passed

python3 qa/local-ai-api/run_qa.py
passed

python3 -m py_compile local_ai_api/*.py \
  qa/local-ai-api/run_qa.py \
  tests/local_ai_api/test_server.py \
  tests/local_ai_api/test_core.py
passed

The live verification result is also recorded as passed, with the private LAN API base URL intentionally omitted from the public article, docs URL /site/, reference image mode img2img, reference image engine comfyui, and model id cyberrealistic_v9_fp16_img2img.

Minimum proof before saying "it works"

The docs give a clear evidence requirement. Before an agent claims the API is working, it should verify:

  • GET /health returns status: ok.
  • /health reports ComfyUI reachable.
  • GET /openapi.json contains /jobs/image and /assets/{filename}.
  • POST /jobs/image with mode: "img2img" completes.
  • GET /assets/{filename} returns an image response for the generated asset.

Why this matters: local systems are brutally easy to half-fix. A process can be up while ComfyUI is down. A model can be installed while the route is broken. A docs page can render while a job path fails. Receipts are how the system stops flattering itself.

Useful live checks

API=http://127.0.0.1:8899

curl -sS "$API/health"
curl -sS "$API/openapi.json"
curl -sS "$API/site/reference-images"
curl -sS "$API/capabilities"
curl -sS "$API/history?limit=20&offset=0"

Use these before and after changing routes, models, workflow templates, or job behavior. If a change touches reference images, run a real img2img job. If a change touches docs, capture the docs. If a change touches queue behavior, make the queue prove it. Software is less mysterious when it is forced to leave fingerprints.

The small-machine principle

On a cloud service, you can sometimes hide sloppy behavior behind scale. On a Jetson, sloppy behavior arrives wearing a memory error and a warm heatsink. That is useful. The constraints make the API more honest: queue limits, cooldowns, route metadata, terminal statuses, and capability evidence all exist because the box cannot afford vibes.

This is also why the API belongs beside the other local-hardware writing: Jetson Nano learning loops and robot work with a Jetson-class driver plan. The recurring theme is simple: put the system near the work, then make it prove what it can do.