Systems and subsystems
The frontend contract
The demo frontend is a separate application built by another team member. What it may rely on is written down as a contract over the explanation record, so the UI and the pipeline can move independently. This page documents the contract; the frontend itself is outside this site.
In plain words
The frontend shows a file's verdict, each detector's sentence and the routing log. Rather than reading the pipeline's internals, it reads one JSON object per file, the same one the runner writes and the API returns, and the contract says which fields mean what and what will not change under it.
What the UI may rely on
- Every detector's
scoreis in [0, 1] and higher means synthetic;evidenceis never empty;statusis ok, skipped or error, and an errored detector carries a neutral score and an error string. roleisfused,evidence(ENF, splice, speaker drift, compression),routing(container) orgate(speech gate).verdictis synthetic at or above 0.5source: docs/handoffs/2026-09-26_frontend-contract.md, real below, and undetermined when there is no speech or the decode failed.- For the test set,
probability_syntheticequals the logged TSV value. - Under the shipped rule,
fusion.weightsnames four inputs (Spectra at zero) andfusion.detail.finalnames the rule; the UI renders them from the JSON rather than hard-coding them.
Where it lives
The contract, with the example schema and the rewire note. The static dump the UI reads is the shipped rule's full-set run; the live path is the local API.
Boundaries
- No LLM or hosted service on the scoring path; the "copilot" may not present canned text as analysis.
- The frontend lives in its own directory and does not edit other lanes' files.
- A toy analyser that predates the pipeline must be moved out of the package and must never export a TSV.
Status
Contract v0 written about 06:30 on Saturday; a rewire note added at 09:50 pointing the UI at the real API and the shipped rule's dump.
Numbers
None; the UI displays the pipeline's.
Known limits
The contract's verdict rule reads the final probability while the code compares the pre-map value; they agree on every judged file but the wording differs. Its line reference into the gate module is stale.
Tests that pin it
The contract's guarantees are the pipeline's tests: the response shape, the role labels, the verdict rule and the map applied once in tests/test_pipeline.py; the API's behaviour in tests/test_api.py.