1.6 KiB
1.6 KiB
Internal: Adapters
Purpose
Define external integration boundaries and default adapter wiring used by app/stage orchestration.
Adapter Boundaries
Narratio stage logic depends on adapter interfaces, not transport-specific details.
Primary adapters:
whisperx.Clientseriatim.Runneraudita.Runnerscriptorium.Runnerstorage.ObjectStorenotify.Sender
Ownership
Adapters own:
- HTTP/subprocess/SDK argument and transport details.
- Backend-specific request/response mapping.
Adapters do not own:
- stage ordering/skip/force logic;
- manifest transitions;
- canonical path policy.
Default Wiring
internal/app/runner.go initializes default adapters when not injected:
- WhisperX HTTP client from pipeline config.
- Seriatim subprocess runner.
- Audita subprocess runner.
- Scriptorium subprocess runner.
- Noop notifier (
notify.NoopSender). - Object store only when required by selected stages/config.
Object-store construction goes through newCommandObjectStore, which loads configured filesystem secrets before adapter initialization.
Failure Semantics
- Constructor errors fail stage execution setup early.
- Runtime adapter errors propagate to stage code and then manifest failure handling.
- Subprocess adapters persist stage logs/generated configs through stage-managed paths.
Test Surfaces
internal/adapters/whisperx/http_test.gointernal/adapters/seriatim/subprocess_test.gointernal/adapters/audita/subprocess_test.gointernal/adapters/scriptorium/subprocess_test.gointernal/adapters/storage/*_test.gointernal/app/runner_test.go