Literate AI

Repository documentation

Coverage-gap detection

Worker-path contract

Worker-dispatched build/test never retain generated source on the coordinating host. The stub-marker scan therefore runs on the worker after the lifecycle rebuild and before the runtime tree is deleted, then rides the existing dispatch envelope:

  1. execute_remote_request scans runtime_root/sources with scan_runtime_coverage_gaps.
  2. The report is an optional coverage_gaps field on urn:literate-ai:schema:v2:execution-dispatch-result (schema literate-ai/coverage-gap-report@3). Older workers may omit the key; new hosts treat a missing field as null. New producers always emit the key (null or a report). Adding the field is a bounded protocol change: mixed old-host/new-worker pairs fail closed on additionalProperties until both sides are current.
  3. Command dispatchers return the full dispatch result on stdout, so the host reads coverage_gaps directly.
  4. SSH dispatchers return RemoteExecutionControlResult; that control document carries the same optional field, and bind_imported_manifest copies it onto the reconstructed ExecutionDispatchResult.
  5. litai build / litai test copy coverage_gaps into the component-build JSON for both local and worker paths.

Scan-side defects still yield null and never fail the lifecycle. High-confidence findings fail the coordinating litai build/test with build.unimplemented_surface before artifact export.

False-positive characterization

No live generation traffic was used. The corpus is checked-in fixture and sample trees plus labeled unit fixtures:

Corpus Role
tests/fixtures/source_to_specification/** Inverse-work source, treated as generated-like trees
tests/fixtures/spec_map_hello/source/ Small authored source fixture
samples/ Sample Component trees (specifications; little generated product source)
Unit fixtures in tests/smoke/test_coverage_gaps.py Labeled true positives and plausible false positives

tests/smoke/test_coverage_gaps.py (test_fixture_and_sample_trees_have_no_fail_closed_hits) requires that fail-closed markers fire on zero files in the fixture/sample corpus. That is a 0% fail-closed false-positive rate against available generated-like source. Advisory TODO/FIXME hits, if any, do not fail the build.

Labeled unit fixtures justified two pattern tightenings before promotion:

Fail-closed decision

Promoted:

Remain advisory:

litai build and litai test fail with build.unimplemented_surface when any fail-closed finding is present, on both the local rebuild path and the worker dispatch path, and they do not record an artifact export in that case.

Direction (B): adversarial second pass

Direction (B) in COVERAGE-GAP-001 is a second coding-CLI pass that reads the specification and the first pass's tests and reports uncovered behavior.

A bounded non-model check is cheaper, but it does not replace (B) for the remaining #64 example (a worker that never calls its upstream client):

This note therefore defers (B). The mechanical scan plus fail-closed promotion above is the cheaper honest slice. Revisit (B) only if fail-closed stub markers prove insufficient against later live generation evidence, and treat any second pass as an independent, non-authoritative reporter — never as a gate that can weaken build, test, or acceptance.

Read the Markdown sourceConference homePublished 1.3.0 · Patch 1.3.1 in progress · Development 1.4