Add internal debug bundle collaborators
This commit is contained in:
@@ -6,11 +6,11 @@ func (c Config) Redacted() Config {
|
||||
return cloneConfig(c)
|
||||
}
|
||||
|
||||
func (c Config) RedactedDiagnosticsPayload() any {
|
||||
func (c Config) RedactedSummaryPayload() any {
|
||||
return c.Redacted()
|
||||
}
|
||||
|
||||
func (e EffectiveConfig) RedactedDiagnosticsPayload() any {
|
||||
func (e EffectiveConfig) RedactedSummaryPayload() any {
|
||||
return EffectiveConfig{
|
||||
Config: e.Config.Redacted(),
|
||||
PipelineID: e.PipelineID,
|
||||
|
||||
@@ -36,20 +36,20 @@ func TestRedactedConfigCopiesScriptoriumConfig(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestConfigRedactedDiagnosticsPayloadCopiesConfig(t *testing.T) {
|
||||
func TestConfigRedactedSummaryPayloadCopiesConfig(t *testing.T) {
|
||||
cfg := Default()
|
||||
cfg.Scriptorium.ProfileFile = "./profiles.yml"
|
||||
|
||||
payload, ok := cfg.RedactedDiagnosticsPayload().(Config)
|
||||
payload, ok := cfg.RedactedSummaryPayload().(Config)
|
||||
if !ok {
|
||||
t.Fatalf("expected Config payload, got %T", cfg.RedactedDiagnosticsPayload())
|
||||
t.Fatalf("expected Config payload, got %T", cfg.RedactedSummaryPayload())
|
||||
}
|
||||
if payload.Scriptorium.ProfileFile != "./profiles.yml" {
|
||||
t.Fatalf("expected Scriptorium profile file preserved, got %+v", payload.Scriptorium)
|
||||
}
|
||||
}
|
||||
|
||||
func TestEffectiveConfigRedactedDiagnosticsPayloadCopies(t *testing.T) {
|
||||
func TestEffectiveConfigRedactedSummaryPayloadCopies(t *testing.T) {
|
||||
cfg := validConfig()
|
||||
cfg.Concurrency.TotalLLM = 4
|
||||
cfg.Concurrency.StageWorkers["extract"] = 2
|
||||
@@ -101,9 +101,9 @@ func TestEffectiveConfigRedactedDiagnosticsPayloadCopies(t *testing.T) {
|
||||
t.Fatalf("Resolve: %v", err)
|
||||
}
|
||||
|
||||
payload, ok := effective.RedactedDiagnosticsPayload().(EffectiveConfig)
|
||||
payload, ok := effective.RedactedSummaryPayload().(EffectiveConfig)
|
||||
if !ok {
|
||||
t.Fatalf("expected EffectiveConfig payload, got %T", effective.RedactedDiagnosticsPayload())
|
||||
t.Fatalf("expected EffectiveConfig payload, got %T", effective.RedactedSummaryPayload())
|
||||
}
|
||||
if payload.PipelineID != effective.PipelineID || payload.ResolvedPipeline.Digest != effective.ResolvedPipeline.Digest {
|
||||
t.Fatalf("expected pipeline metadata preserved, got %+v", payload)
|
||||
@@ -151,9 +151,9 @@ func TestEffectiveConfigRedactedDiagnosticsPayloadCopies(t *testing.T) {
|
||||
},
|
||||
},
|
||||
}
|
||||
payload, ok = effective.RedactedDiagnosticsPayload().(EffectiveConfig)
|
||||
payload, ok = effective.RedactedSummaryPayload().(EffectiveConfig)
|
||||
if !ok {
|
||||
t.Fatalf("expected EffectiveConfig payload, got %T", effective.RedactedDiagnosticsPayload())
|
||||
t.Fatalf("expected EffectiveConfig payload, got %T", effective.RedactedSummaryPayload())
|
||||
}
|
||||
payload.ResolvedPipeline.ArtifactLanes[0].ExtractReferences.ReferenceSet.Slots["roster"].Items[0].Content[0] = 'X'
|
||||
got := effective.ResolvedPipeline.ArtifactLanes[0].ExtractReferences.ReferenceSet.Slots["roster"].Items[0].Content
|
||||
|
||||
Reference in New Issue
Block a user