2.4 KiB
2.4 KiB
Audita Internal Pipeline
Scope
This document describes the implemented audita process pipeline.
Inputs
Pipeline inputs are:
- effective config (
internal/core/config); - transcript JSON (
internal/core/schema); - glossary YAML (
internal/core/schema).
Pipeline Phases
- Input loading and schema validation
- transcript and glossary files are read and parsed.
- schema failures stop the run with
transcript_schemaorglossary_schema.
- Normalization
- canonical transcript segments are normalized by configured gap/duration/token settings.
- normalization summary artifacts are written.
- Chunking
- normalized transcript is chunked with configured max/min tokens and target sections.
- Module proposal generation
- runner executes configured module instances in sequence.
- each module proposes corrections per section.
- per-section proposal generation can run concurrently.
- Validator filtering
- validators run on candidate proposals before apply.
- deterministic validators run before LLM-backed validators.
- LLM validator inputs are batched by max prompt token limit.
- Deterministic apply
- approved proposals are applied via replacement policy.
- applied/skipped/rejected outcomes are recorded.
- Output and reporting
- final transcript is serialized with selected output schema.
- report, utilization diagnostics, and correction ledger are written.
- retention policy is applied to run directory.
Runner Outputs
runner.Run returns:
- final transcript;
- per-module results;
- utilization diagnostics.
CLI/reporting then map this into process report and diagnostics artifacts.
Failure Behavior
Representative failure phases include:
run_dir_creationtranscript_read,glossary_readtranscript_schema,glossary_schemachunkingrunner_setup,runner_executionoutput_schema,serialization,output_write,stdout_write
When diagnostics are available, failure stderr includes diagnostics path.
Invariants
- module execution order follows configured module sequence;
- proposal/validator nondeterminism is isolated before deterministic apply;
- proposal indices are assigned deterministically by section order;
- output/report artifacts are generated from run results, not speculative state.
Key Tests
internal/framework/runner/runner_test.gointernal/framework/proposal_generation/*_test.gointernal/cli/run_test.gocmd/audita/main_integration_test.go