2026-05-24 01:02:47 +00:00
|
|
|
# Audita Internal Pipeline
|
|
|
|
|
|
2026-09-24 17:55:37 +00:00
|
|
|
The [input contract](../integrations/transcript-glossary-files.md) owns input
|
|
|
|
|
formats; [configuration](../config.md) owns settings; the
|
|
|
|
|
[output contract](../integrations/output-files.md) owns serialized results.
|
|
|
|
|
|
2026-11-10 17:52:14 +00:00
|
|
|
1. CLI loads resolved configuration and transcript input. Preflight checks all
|
|
|
|
|
selected glossary views and roles before the output session prepares resources.
|
|
|
|
|
Transcript segments then enter canonical normalization.
|
2026-11-16 03:59:44 +00:00
|
|
|
2. Normalization sorts segments by start time and preserves input order for
|
|
|
|
|
ties. It evaluates merge limits using the later end time and the same token
|
|
|
|
|
estimate as chunking, then reassigns IDs where needed.
|
2026-09-24 17:55:37 +00:00
|
|
|
3. The runner partitions the normalized transcript exactly once before its
|
|
|
|
|
module loop. Initial section identity, segment membership, and token
|
|
|
|
|
estimates stay fixed while text evolves.
|
2026-11-16 14:30:57 +00:00
|
|
|
4. Module instances execute in configured order. Each section hands its decoded
|
|
|
|
|
proposals and original local segment references to the runner along with
|
2026-11-16 14:53:14 +00:00
|
|
|
operation facts and any captured exchange. A bounded window admits sections
|
|
|
|
|
in order and lets validation and repair proceed as proposals become ready.
|
|
|
|
|
The runner assigns final proposal indices in section and response order
|
|
|
|
|
when it records completed work. It then writes diagnostics that use those
|
|
|
|
|
indices. PromptKit controls provider capacity across all three roles.
|
2026-09-24 17:55:37 +00:00
|
|
|
5. Deterministic validators precede LLM-backed validators. Every submitted
|
2026-09-24 21:48:18 +00:00
|
|
|
candidate receives one decision per validator on a normal return. Fatal returns
|
|
|
|
|
may preserve a checked subset of completed decisions as diagnostic evidence.
|
|
|
|
|
Recoverable failed batches mark their candidates unavailable; successful
|
|
|
|
|
survivors continue through all required validators.
|
2026-11-11 04:29:18 +00:00
|
|
|
6. Actionable rejections can enter independent section-local repair branches.
|
2026-11-15 01:25:55 +00:00
|
|
|
PromptKit coordinates each branch from the captured proposal exchange, owning
|
|
|
|
|
its history and additional-turn limit. Each revision, including the final
|
|
|
|
|
permitted response, is mapped to the original section and revalidated from the
|
2026-11-11 04:29:18 +00:00
|
|
|
start. Withdrawal, exhaustion, and recoverable failures finish the branch
|
|
|
|
|
without affecting independent approvals.
|
|
|
|
|
7. Only fully approved proposals reach application. Corrections apply in
|
2026-09-24 17:55:37 +00:00
|
|
|
proposal-index order within their owning section. Existing replacement
|
|
|
|
|
policies and apply-time safety checks resolve stale conflicts.
|
2026-11-11 04:29:18 +00:00
|
|
|
8. CLI encodes the final transcript and publishes active files through the
|
2026-09-24 17:55:37 +00:00
|
|
|
output session. `framework/processreport` builds one snapshot for YAML,
|
|
|
|
|
Markdown, and CLI totals. Debug evidence is captured separately when enabled.
|
|
|
|
|
|
|
|
|
|
`runner.Run` returns the final working transcript, initial section inventory,
|
|
|
|
|
explicit `not_started`/`interrupted`/`completed` work units, compact model
|
|
|
|
|
operation outcomes, and per-module results. Candidate payloads are retained
|
|
|
|
|
in the returned output only when debug capture is requested. A work unit can
|
|
|
|
|
complete with model errors and applied corrections. Recoverable model failures
|
2026-11-16 14:42:24 +00:00
|
|
|
never trigger shared cancellation. Fatal failures and parent cancellation stop
|
|
|
|
|
further dispatch and join active workers. The initiating error carries its
|
|
|
|
|
processing phase and available origin. Work-unit evidence preserves each peer's
|
2026-11-16 14:53:14 +00:00
|
|
|
interruption or error. The runner drains active outcomes and assigns indices
|
|
|
|
|
to usable proposals from later sections even when it could not validate them. The
|
2026-11-16 14:42:24 +00:00
|
|
|
working transcript advances only at the module's successful commit boundary.
|
|
|
|
|
Earlier committed text remains available to an interrupted run, and transcript
|
|
|
|
|
delivery requires successful processing.
|
2026-09-24 17:55:37 +00:00
|
|
|
|
|
|
|
|
Required transcript/report write failures are fatal. Optional debug writes
|
|
|
|
|
report safely to stderr without changing decisions or exit status. See
|
|
|
|
|
[operations](../operations.md) for file placement and failure handling, and
|
|
|
|
|
[architecture policy](../policy/architecture.md#correction-and-concurrency-invariants)
|
|
|
|
|
for invariants.
|
|
|
|
|
|
|
|
|
|
Key tests: `internal/framework/runner/*_test.go`,
|
|
|
|
|
`internal/framework/validators/*_test.go`, and
|
|
|
|
|
`cmd/audita/main_integration_test.go`.
|