2026-08-10 00:42:44 +00:00
|
|
|
# Internal: Extract Stage
|
|
|
|
|
|
|
|
|
|
## Responsibility
|
|
|
|
|
|
2026-11-30 02:40:17 +00:00
|
|
|
The extract stage invokes the configured Notarius pipeline on the verified
|
|
|
|
|
final trimmed transcript and prepared references, promotes configured lane
|
|
|
|
|
products, and records Narratio-owned content evidence. Notarius owns its
|
|
|
|
|
pipeline, cache, validation and completion protocol; see the
|
|
|
|
|
[integration contract](../integrations/notarius.md).
|
2026-08-10 00:42:44 +00:00
|
|
|
|
|
|
|
|
## Lifecycle
|
|
|
|
|
|
2026-11-30 02:40:17 +00:00
|
|
|
Disabled extraction records a skip. An execution resolves manifest-backed input
|
|
|
|
|
identities, creates immutable content-addressed reference snapshots, and invokes
|
|
|
|
|
Notarius with run-local output, log and debug destinations. The adapter accepts a
|
|
|
|
|
successful native completion report for the expected pipeline and confined output
|
|
|
|
|
directory. The stage reads each configured lane JSON, validates its safe path and
|
|
|
|
|
content, then promotes all required products to flat artifact paths before
|
|
|
|
|
recording success. The original bundle and optional domain auxiliaries stay in
|
|
|
|
|
the producing run. Positive native fallback counts are recorded and reported.
|
2026-08-10 02:10:37 +00:00
|
|
|
|
2026-08-10 00:42:44 +00:00
|
|
|
## Resume Validation
|
|
|
|
|
|
2026-11-30 02:40:17 +00:00
|
|
|
Resume checks the direct transcript identity, configured pipeline and lane
|
|
|
|
|
selection, reference identities, and manifest-backed output checksums and sizes.
|
|
|
|
|
Cache and debug selection, executable version and private downstream config are
|
|
|
|
|
not blanket invalidators. Force invokes extraction with cache refresh. A failed
|
|
|
|
|
replacement is not represented as a current successful extraction.
|
2026-08-10 00:42:44 +00:00
|
|
|
|
|
|
|
|
## Failure Behavior
|
|
|
|
|
|
2026-11-30 02:40:17 +00:00
|
|
|
Native errors, malformed completion, missing required lanes, unsafe paths, or
|
|
|
|
|
invalid JSON fail the attempt while preserving available diagnostics. A partial
|
|
|
|
|
report or incidental output is not success. See [operations](../operations.md#extraction-workflow).
|
2026-08-10 03:04:20 +00:00
|
|
|
|
2026-08-10 00:42:44 +00:00
|
|
|
## Implementation And Focused Tests
|
|
|
|
|
|
2026-11-30 02:40:17 +00:00
|
|
|
`internal/stage/extract.go`, `extract_preflight.go`, `extract_native_test.go`,
|
|
|
|
|
`internal/artifacts/extraction_evidence.go`, and `internal/adapters/notarius/`
|
|
|
|
|
own the stage, readiness, evidence and subprocess boundaries. The opt-in
|
|
|
|
|
`notarius_cache_integration_test.go` exercises a real executable.
|