From a620b497def53126ad578e7e680ae515bb3363c4 Mon Sep 17 00:00:00 2001 From: mlsmaycon Date: Sun, 26 Jul 2026 11:31:22 +0000 Subject: [PATCH] agentnetwork: fix staticcheck S1016 in marshalGuardrailConfig MergedPromptCapture and guardrailPromptCapture are now identical structs, so convert directly instead of copying field-by-field. --- management/internals/modules/agentnetwork/synthesizer.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/management/internals/modules/agentnetwork/synthesizer.go b/management/internals/modules/agentnetwork/synthesizer.go index 3349d3ac4..169bdd4fd 100644 --- a/management/internals/modules/agentnetwork/synthesizer.go +++ b/management/internals/modules/agentnetwork/synthesizer.go @@ -838,10 +838,7 @@ func applyAccountCollectionControls(merged *MergedGuardrails, settings *types.Se func marshalGuardrailConfig(providerAllowlists map[string][]string, capture MergedPromptCapture) ([]byte, error) { cfg := guardrailConfig{ ProviderAllowlists: providerAllowlists, - PromptCapture: guardrailPromptCapture{ - Enabled: capture.Enabled, - RedactPii: capture.RedactPii, - }, + PromptCapture: guardrailPromptCapture(capture), } out, err := json.Marshal(cfg) if err != nil {