The authoritative HTTP schema is generated into docs/openapi.json. frontend/src/api/schema.ts is generated by openapi-typescript; CI checks for drift. Frontend transport, state, configuration forms, charts and investigator rendering live in separate files.
| Contract | Owner | Key information |
|---|---|---|
| SourceRef / EvidenceChunk | Knowledge | immutable version and chunk IDs, title, page/section, source artifact, SHA-256, extraction warnings, embedding identity |
| RetrievalRequest / RetrievalResult | Retrieval | query, version filters, limit, ranked evidence, insufficiency, strategy/index versions, latency |
| ExperimentSpec v1 | Simulation | capability, channel, Eb/N0 in dB, bits, persisted seed, receiver/energy/noise conventions |
| SimulationResult v1 / Point | Simulation | implementation/runtime, assumptions, counts, BER/theory, exact uncertainty intervals, duration |
| Finding | Verification | rule/version, severity, explanation, affected Eb/N0 values |
| RunView | Experiments | status, progress, specification, result, findings, JSON/SVG artifacts, error, attempts, correlation ID |
| ToolRequest / ToolResponse / ToolRecord | Investigations | bounded tool name, validated per-tool arguments, structured output/error, elapsed time, recorded request |
| InvestigationView / Answer / Usage | Investigations | persisted plan/history, exact quotations, observed results, hypotheses, unresolved questions and model usage |
| ArtifactRef v1 | Artifacts | workspace, content hash, media type, size, immutable identity |
Tool arguments are validated at dispatch; a model-produced dictionary does not authorize an operation. Simulation submission is a privileged workflow step following the authenticated user's plan approval, not an unrestricted model tool.
Persisted experiment and simulation result formats currently accept literal schema version 1. Old v1 result JSON and artifacts remain immutable. Database migrations add nullable plot references without rewriting historical numeric results.
When v2 is introduced, retain a v1 decoder and make version dispatch explicit. Add migrations only for materialized database fields; do not silently relabel v1 JSON as v2. Unknown persisted versions should return a structured unsupported-version error and preserve the downloadable original artifact. This repository does not pretend to implement readers for future formats.
Changing scientific behavior requires a simulator implementation-version change, even if the JSON shape stays v1. A queued job whose implementation is no longer installed fails explicitly. Reproduction of a historical implementation requires its pinned environment or adapter; loading its configuration into the current simulator is not evidence of exact reproduction.
Embedding identity includes model and index version. The learned adapter also pins and verifies the server model digest. Dimension changes require a migration and a new index namespace. Search never mixes incompatible embeddings.
Errors have categories such as validation_error, access_denied, not_found, idempotency_conflict, embedding_incompatible, embedding_revision_changed, no_text, execution_timeout, transient_io and budget_exhausted. HTTP responses include a request correlation ID; persisted jobs and investigations retain their submission correlation ID.