Preflight and publish required outputs through an output session
This commit is contained in:
@@ -1,11 +1,5 @@
|
||||
package diagnostics
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
|
||||
"gitea.maximumdirect.net/eric/audita/internal/core/reporting"
|
||||
)
|
||||
|
||||
const (
|
||||
ArtifactSourceTranscript = "source-transcript.json"
|
||||
ArtifactParsedSourceTranscript = "source-transcript-parsed.json"
|
||||
@@ -19,29 +13,5 @@ const (
|
||||
ArtifactCorrectionLedger = "correction-ledger.json"
|
||||
ArtifactInvocationMetadata = "invocation.json"
|
||||
ArtifactEffectiveConfig = "effective-config.redacted.yaml"
|
||||
ArtifactReport = "report.json"
|
||||
ArtifactErrorLog = "error.log"
|
||||
)
|
||||
|
||||
func BuildDiagnosticsMetadata(runDirectoryPath string, runSucceeded bool) reporting.DiagnosticsMetadata {
|
||||
metadata := reporting.DiagnosticsMetadata{
|
||||
DirectoryPath: runDirectoryPath,
|
||||
SourceTranscriptPath: filepath.Join(runDirectoryPath, ArtifactSourceTranscript),
|
||||
ParsedSourceTranscriptPath: filepath.Join(runDirectoryPath, ArtifactParsedSourceTranscript),
|
||||
NormalizedTranscriptPath: filepath.Join(runDirectoryPath, ArtifactNormalizedTranscript),
|
||||
NormalizationSummaryPath: filepath.Join(runDirectoryPath, ArtifactNormalizationSummary),
|
||||
ChunkingSummaryPath: filepath.Join(runDirectoryPath, ArtifactChunkingSummary),
|
||||
UtilizationSummaryPath: filepath.Join(runDirectoryPath, ArtifactUtilizationSummary),
|
||||
LLMExecutionPath: filepath.Join(runDirectoryPath, ArtifactLLMExecution),
|
||||
SelectedProfilesPath: filepath.Join(runDirectoryPath, ArtifactSelectedProfiles),
|
||||
CorrectionLedgerPath: filepath.Join(runDirectoryPath, ArtifactCorrectionLedger),
|
||||
InvocationMetadataPath: filepath.Join(runDirectoryPath, ArtifactInvocationMetadata),
|
||||
RedactedEffectiveConfigPath: filepath.Join(runDirectoryPath, ArtifactEffectiveConfig),
|
||||
}
|
||||
|
||||
if !runSucceeded {
|
||||
metadata.ErrorLogPath = filepath.Join(runDirectoryPath, ArtifactErrorLog)
|
||||
}
|
||||
|
||||
return metadata
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user