Add version two LLM reports and safe execution diagnostics
This commit is contained in:
@@ -13,9 +13,12 @@ const (
|
||||
ArtifactNormalizationSummary = "normalization-summary.json"
|
||||
ArtifactChunkingSummary = "chunking-summary.json"
|
||||
ArtifactUtilizationSummary = "utilization-diagnostics.json"
|
||||
ArtifactLLMExecution = "llm-execution.json"
|
||||
ArtifactSelectedProfiles = "selected-profiles.yaml"
|
||||
ArtifactConfigOrigins = "config-origins.yaml"
|
||||
ArtifactCorrectionLedger = "correction-ledger.json"
|
||||
ArtifactInvocationMetadata = "invocation.json"
|
||||
ArtifactEffectiveConfig = "effective-config.yaml"
|
||||
ArtifactEffectiveConfig = "effective-config.redacted.yaml"
|
||||
ArtifactReport = "report.json"
|
||||
ArtifactErrorLog = "error.log"
|
||||
)
|
||||
@@ -29,6 +32,8 @@ func BuildDiagnosticsMetadata(runDirectoryPath string, runSucceeded bool) report
|
||||
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),
|
||||
|
||||
@@ -54,6 +54,7 @@ type InvocationMetadata struct {
|
||||
ReportJSONPath string `json:"report_json_path,omitempty"`
|
||||
ConfigPath string `json:"config_path,omitempty"`
|
||||
ConfigSource string `json:"config_source,omitempty"`
|
||||
Overlay string `json:"overlay,omitempty"`
|
||||
ConfigVersion *int `json:"config_version,omitempty"`
|
||||
TranscriptDescription string `json:"transcript_description,omitempty"`
|
||||
Modules []string `json:"modules"`
|
||||
@@ -222,6 +223,13 @@ func (r *RunDirectory) WriteJSONArtifact(name string, payload any) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r *RunDirectory) WriteArtifact(name string, payload []byte) error {
|
||||
if err := os.WriteFile(filepath.Join(r.path, name), payload, 0o644); err != nil {
|
||||
return fmt.Errorf("failed to write %s: %w", name, err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r *RunDirectory) ApplyRetention(input RetentionDecisionInput) error {
|
||||
decision := input
|
||||
if decision.RetentionMode == "" {
|
||||
|
||||
Reference in New Issue
Block a user