Implement real Audita polish stage

This commit is contained in:
2026-05-04 08:05:27 -05:00
parent 28c7ab3287
commit de11651528
8 changed files with 677 additions and 22 deletions

View File

@@ -6,7 +6,6 @@ import (
"path/filepath"
"gitea.maximumdirect.net/eric/narratio/internal/adapters/analyzer"
"gitea.maximumdirect.net/eric/narratio/internal/adapters/audita"
"gitea.maximumdirect.net/eric/narratio/internal/adapters/notify"
"gitea.maximumdirect.net/eric/narratio/internal/adapters/storage"
"gitea.maximumdirect.net/eric/narratio/internal/artifacts"
@@ -52,23 +51,6 @@ func (s placeholderStage) Run(ctx context.Context, env *Env, m *manifest.Manifes
paths := env.ArtifactStore.SessionPaths(sessionID)
switch s.name {
case "polish":
if env.Audita != nil {
req := audita.PolishRequest{
GeneratedConfigPath: filepath.Join(paths.ConfigDir, "audita.generated.yml"),
MergedTranscriptPath: filepath.Join(paths.TranscriptsDir, "merged.json"),
OutputProcessedPath: filepath.Join(paths.TranscriptsDir, "processed.json"),
StdoutLogPath: filepath.Join(paths.LogsDir, "audita.stdout.log"),
StderrLogPath: filepath.Join(paths.LogsDir, "audita.stderr.log"),
}
resp, err := env.Audita.Run(ctx, req)
if err != nil {
return nil, fmt.Errorf("placeholder polish adapter call failed: %w", err)
}
result.Outputs = append(result.Outputs, artifacts.Ref{Kind: "transcript_processed", Category: "transcripts", SessionID: sessionID, AbsolutePath: resp.ProcessedTranscriptPath})
result.Logs = append(result.Logs, req.StdoutLogPath, req.StderrLogPath)
result.GeneratedConfigs = append(result.GeneratedConfigs, req.GeneratedConfigPath)
}
case "analyze":
if env.Analyzer != nil {
req := analyzer.AnalyzeRequest{
@@ -130,7 +112,7 @@ func All() []Stage {
transcribeStage{},
placeholderStage{name: "normalize"},
mergeStage{},
placeholderStage{name: "polish"},
polishStage{},
placeholderStage{name: "analyze"},
placeholderStage{name: "archive"},
placeholderStage{name: "notify"},