Syntropy.Receipts
(syntropy v0.3.0)
Copy Markdown
The receipts runner: executes a repository's own checks against a review
diff and records rc-* receipts in the run envelope.
This is the deterministic layer of a code review — the runtime runs the
project's tools; no model is involved. Given a code_review request
(repo_path, base, head, optional checks allowlist), the runner:
- resolves the refs and computes the
diff_shabinding (Syntropy.Receipts.Git), - detects the project's checks or loads
.syntropy/review.toml(Syntropy.Receipts.Detect), - executes available checks sequentially as supervised OS processes
(
Syntropy.Receipts.Execution) — deterministic order, no resource contention between suites, simple cancellation — and - emits a
receipt_recordedevent per check and returns the receipts plus the resolvedcode_reviewblock for the envelope.
Checks whose tools are missing produce skipped receipts rather than
disappearing; a run whose per-check budgets are exhausted marks the
remaining checks skipped. Cancellation goes through
Syntropy.Receipts.Tracker — see abort/1.
Summary
Functions
Aborts the running checks of run_id (tombstone + kill; see the tracker).
Safe to call for runs without receipts — it is a no-op then.
Clears cancellation state for run_id once its runner task is fully down.
Executes the receipts pipeline for run_id.
Functions
@spec abort(String.t()) :: :ok
Aborts the running checks of run_id (tombstone + kill; see the tracker).
Safe to call for runs without receipts — it is a no-op then.
@spec release(String.t()) :: :ok
Clears cancellation state for run_id once its runner task is fully down.
Executes the receipts pipeline for run_id.
Returns {:ok, %{receipts, code_review, synthesis, structured_answer, output_quality}} — everything the runner clause needs for the result map —
or {:error, reason_map} when the repository, refs, or review config are
unusable.