From cfd6eb634f15e56a59a2c5e979e3672d760d28ad Mon Sep 17 00:00:00 2001 From: rcourtman Date: Thu, 19 Mar 2026 15:02:38 +0000 Subject: [PATCH] Remove raw signals from policy surface --- .../v6/internal/subsystems/unified-resources.md | 8 ++++---- .../utils/__tests__/resourcePolicyPresentation.test.ts | 5 +---- frontend-modern/src/utils/resourcePolicyPresentation.ts | 4 ---- internal/ai/chat/context_prefetch_additional_test.go | 2 +- internal/unifiedresources/code_standards_test.go | 1 + internal/unifiedresources/policy_metadata_test.go | 4 ++-- internal/unifiedresources/policy_presentation.go | 3 +-- 7 files changed, 10 insertions(+), 17 deletions(-) diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.md index 16182d649..7d8e793cd 100644 --- a/docs/release-control/v6/internal/subsystems/unified-resources.md +++ b/docs/release-control/v6/internal/subsystems/unified-resources.md @@ -132,12 +132,12 @@ The canonical policy-posture aggregate now also lives in context share the same sensitivity, routing, and redaction counts from the resource model instead of rebuilding governance posture in AI-local code. The same policy presenter now also owns the `Allowed`/`Blocked` routing -decision labels shown in the resource detail drawer, so routing-state wording +decision label shown in the resource detail drawer, so routing-state wording stays canonical with the rest of the policy surface instead of being rendered inline by the drawer. -That same helper also owns the drawer's `Cloud Summary` and `Raw Signals` -routing rows, so the detail view no longer reconstructs the row structure or -decision labels locally. +That same helper also owns the drawer's `Cloud Summary` routing row, so the +detail view no longer reconstructs the row structure or decision label +locally. The backend AI and Patrol correlation context renderers now derive their canonical relationship labels, direction, provenance, freshness, and metadata flags from `internal/unifiedresources/relationship_presentation.go`, so the correlation diff --git a/frontend-modern/src/utils/__tests__/resourcePolicyPresentation.test.ts b/frontend-modern/src/utils/__tests__/resourcePolicyPresentation.test.ts index e2bc354e9..c60e30687 100644 --- a/frontend-modern/src/utils/__tests__/resourcePolicyPresentation.test.ts +++ b/frontend-modern/src/utils/__tests__/resourcePolicyPresentation.test.ts @@ -49,10 +49,7 @@ describe('resourcePolicyPresentation utils', () => { redact: [], }, }), - ).toEqual([ - { label: 'Cloud Summary', value: 'Allowed' }, - { label: 'Raw Signals', value: 'Blocked' }, - ]); + ).toEqual([{ label: 'Cloud Summary', value: 'Allowed' }]); }); it('formats canonical policy count summaries', () => { diff --git a/frontend-modern/src/utils/resourcePolicyPresentation.ts b/frontend-modern/src/utils/resourcePolicyPresentation.ts index 13ed50fff..2ff5378e1 100644 --- a/frontend-modern/src/utils/resourcePolicyPresentation.ts +++ b/frontend-modern/src/utils/resourcePolicyPresentation.ts @@ -127,10 +127,6 @@ export const getResourcePolicyRoutingDecisionSummaries = ( label: 'Cloud Summary', value: getResourcePolicyRoutingDecisionLabel(policy.routing.allowCloudSummary), }, - { - label: 'Raw Signals', - value: getResourcePolicyRoutingDecisionLabel(policy.routing.allowCloudRawSignals), - }, ]; }; diff --git a/internal/ai/chat/context_prefetch_additional_test.go b/internal/ai/chat/context_prefetch_additional_test.go index c5405be5b..5d03c623e 100644 --- a/internal/ai/chat/context_prefetch_additional_test.go +++ b/internal/ai/chat/context_prefetch_additional_test.go @@ -451,7 +451,7 @@ func TestContextPrefetcher_FormatContextSummary_GovernedMention(t *testing.T) { if !strings.Contains(summary, "Governed resource") { t.Fatalf("expected governed heading, got %q", summary) } - if !strings.Contains(summary, "Policy: sensitivity=Restricted, routing=Local Only, cloud_summary=false, cloud_raw_signals=false") { + if !strings.Contains(summary, "Policy: sensitivity=Restricted, routing=Local Only, cloud_summary=false") { t.Fatalf("expected canonical policy line, got %q", summary) } if !strings.Contains(summary, "Redactions: Hostname, Alias, Path") { diff --git a/internal/unifiedresources/code_standards_test.go b/internal/unifiedresources/code_standards_test.go index 28b80da1b..cd0194496 100644 --- a/internal/unifiedresources/code_standards_test.go +++ b/internal/unifiedresources/code_standards_test.go @@ -441,6 +441,7 @@ func TestResourcePolicyLabelHelpersUsedByAIConsumers(t *testing.T) { "func ResourcePolicyLabel(name, aiSafeSummary string, policy *ResourcePolicy) string", "if ResourcePolicyRequiresGovernedSummary(policy) {", "return ResourcePolicyRedactedLabel", + "Policy: sensitivity=%s, routing=%s, cloud_summary=%t", "func ResourcePolicyRedactedValue(value string, policy *ResourcePolicy, hints ...ResourceRedactionHint) string", "const ResourcePolicyRedactedLabel = \"redacted by policy\"", "func ResourceRedactionLabelsFromHints(hints []ResourceRedactionHint) []string", diff --git a/internal/unifiedresources/policy_metadata_test.go b/internal/unifiedresources/policy_metadata_test.go index 8fc637b0a..84cf23864 100644 --- a/internal/unifiedresources/policy_metadata_test.go +++ b/internal/unifiedresources/policy_metadata_test.go @@ -272,7 +272,7 @@ func TestResourcePolicySummaryLines(t *testing.T) { got := ResourcePolicySummaryLines(policy) want := []string{ - "Policy: sensitivity=Restricted, routing=Local Only, cloud_summary=false, cloud_raw_signals=false", + "Policy: sensitivity=Restricted, routing=Local Only, cloud_summary=false", "Redactions: Hostname, Alias, Path", } if len(got) != len(want) { @@ -307,7 +307,7 @@ func TestFormatResourcePolicyGovernedSummary(t *testing.T) { } got := FormatResourcePolicyGovernedSummary("system container resource; status online; local-only context", policy) - want := "## Governed resource\nsystem container resource; status online; local-only context\nPolicy: sensitivity=Restricted, routing=Local Only, cloud_summary=false, cloud_raw_signals=false\nRedactions: Hostname, Alias\nRaw routing coordinates, bind mounts, hostnames, and discovery file paths withheld by canonical resource policy.\n\n" + want := "## Governed resource\nsystem container resource; status online; local-only context\nPolicy: sensitivity=Restricted, routing=Local Only, cloud_summary=false\nRedactions: Hostname, Alias\nRaw routing coordinates, bind mounts, hostnames, and discovery file paths withheld by canonical resource policy.\n\n" if got != want { t.Fatalf("FormatResourcePolicyGovernedSummary() = %q, want %q", got, want) } diff --git a/internal/unifiedresources/policy_presentation.go b/internal/unifiedresources/policy_presentation.go index 77aa804c3..5121f7704 100644 --- a/internal/unifiedresources/policy_presentation.go +++ b/internal/unifiedresources/policy_presentation.go @@ -187,11 +187,10 @@ func ResourcePolicySummaryLines(policy *ResourcePolicy) []string { } lines := []string{ - fmt.Sprintf("Policy: sensitivity=%s, routing=%s, cloud_summary=%t, cloud_raw_signals=%t", + fmt.Sprintf("Policy: sensitivity=%s, routing=%s, cloud_summary=%t", ResourceSensitivityLabel(policy.Sensitivity), ResourceRoutingScopeLabel(policy.Routing.Scope), policy.Routing.AllowCloudSummary, - policy.Routing.AllowCloudRawSignals, ), }