Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Derive cloud summary routing from scope

rcourtman8927ca7b7890
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.md
index 241b138f7a..7f2595547c 100644
--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md
+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md
@@ -171,8 +171,9 @@ surfaces read unified resources, so those pages see the same control-plane
timeline facets and recent-change totals as the dedicated resource drawer
instead of flattening them away locally.
That shared policy payload now remains intentionally minimal as well: storage
-and recovery consumers should expect only routing scope, `allowCloudSummary`,
-and redaction hints, not a raw-signals routing flag.
+and recovery consumers should expect only routing scope and redaction hints;
+the cloud-summary decision is derived from scope rather than stored as a
+separate boolean flag.
The same storage-facing runtime paths now also normalize org scope through
`frontend-modern/src/utils/orgScope.ts` before building cache keys or
multi-tenant fetch state, so Dashboard, StorageSummary, and other storage
diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.md
index 20f48a940c..fb496f6f32 100644
--- a/docs/release-control/v6/internal/subsystems/unified-resources.md
+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md
@@ -139,9 +139,10 @@ 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 shared routing policy itself now stays intentionally minimal: it carries
-only the routing scope, `allowCloudSummary`, and the redaction hints derived
-from canonical sensitivity, so the old raw-signals flag no longer appears in
-the owned resource-policy contract.
+only the routing scope and the redaction hints derived from canonical
+sensitivity, and the cloud-summary decision is derived from that scope
+instead of being stored as a second boolean in the owned resource-policy
+contract.
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/components/Infrastructure/__tests__/ResourceDetailDrawer.identity-runtime.test.tsx b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.identity-runtime.test.tsx
index 4eafa26f11..894eea322b 100644
--- a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.identity-runtime.test.tsx
+++ b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.identity-runtime.test.tsx
@@ -295,7 +295,6 @@ describe('ResourceDetailDrawer runtime and identity cards', () => {
sensitivity: 'restricted',
routing: {
scope: 'local-only',
- allowCloudSummary: false,
redact: ['hostname', 'ip-address', 'alias'],
},
},
diff --git a/frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.performance.contract.test.tsx b/frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.performance.contract.test.tsx
index d9df82eef8..0e87a593c8 100644
--- a/frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.performance.contract.test.tsx
+++ b/frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.performance.contract.test.tsx
@@ -339,7 +339,6 @@ describe('UnifiedResourceTable performance contract', () => {
sensitivity: i % 2 === 0 ? 'restricted' : 'internal',
routing: {
scope: i % 3 === 0 ? 'local-only' : 'local-first',
- allowCloudSummary: i % 3 !== 0,
redact: ['hostname', 'alias'],
},
},
diff --git a/frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.policy-governance.test.tsx b/frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.policy-governance.test.tsx
index 71055f4b8e..440ff1174b 100644
--- a/frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.policy-governance.test.tsx
+++ b/frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.policy-governance.test.tsx
@@ -41,7 +41,6 @@ const resource: Resource = {
sensitivity: 'restricted',
routing: {
scope: 'local-only',
- allowCloudSummary: false,
redact: ['hostname', 'alias'],
},
},
diff --git a/frontend-modern/src/hooks/__tests__/useUnifiedResources.test.ts b/frontend-modern/src/hooks/__tests__/useUnifiedResources.test.ts
index cf748bfa04..c433220b56 100644
--- a/frontend-modern/src/hooks/__tests__/useUnifiedResources.test.ts
+++ b/frontend-modern/src/hooks/__tests__/useUnifiedResources.test.ts
@@ -283,7 +283,6 @@ describe('useUnifiedResources', () => {
sensitivity: 'restricted',
routing: {
scope: 'local-only',
- allowCloudSummary: false,
redact: ['hostname', 'ip-address', 'platform-id', 'alias'],
},
},
@@ -303,12 +302,11 @@ describe('useUnifiedResources', () => {
await result!.refetch();
expect(result!.resources()[0].policy).toEqual({
sensitivity: 'restricted',
- routing: {
- scope: 'local-only',
- allowCloudSummary: false,
- redact: ['hostname', 'ip-address', 'platform-id', 'alias'],
- },
- });
+ routing: {
+ scope: 'local-only',
+ redact: ['hostname', 'ip-address', 'platform-id', 'alias'],
+ },
+ });
expect(result!.resources()[0].aiSafeSummary).toBe('resource summary safe for remote AI use');
dispose();
diff --git a/frontend-modern/src/hooks/useUnifiedResources.ts b/frontend-modern/src/hooks/useUnifiedResources.ts
index 303173105b..e2c397da07 100644
--- a/frontend-modern/src/hooks/useUnifiedResources.ts
+++ b/frontend-modern/src/hooks/useUnifiedResources.ts
@@ -372,7 +372,6 @@ type APIResource = {
sensitivity?: string;
routing?: {
scope?: string;
- allowCloudSummary?: boolean;
redact?: string[];
};
};
diff --git a/frontend-modern/src/types/__tests__/resource.test.ts b/frontend-modern/src/types/__tests__/resource.test.ts
index cbeb1f9790..ea945a1bf2 100644
--- a/frontend-modern/src/types/__tests__/resource.test.ts
+++ b/frontend-modern/src/types/__tests__/resource.test.ts
@@ -283,7 +283,6 @@ describe('Resource Interface', () => {
sensitivity: 'restricted',
routing: {
scope: 'local-only',
- allowCloudSummary: false,
redact: ['hostname', 'ip-address', 'platform-id', 'alias'],
},
},
diff --git a/frontend-modern/src/types/resource.ts b/frontend-modern/src/types/resource.ts
index 7584285bdc..d4747eae34 100644
--- a/frontend-modern/src/types/resource.ts
+++ b/frontend-modern/src/types/resource.ts
@@ -128,7 +128,6 @@ export type ResourceRedactionHint = 'hostname' | 'ip-address' | 'platform-id' |
export interface ResourceRoutingPolicy {
scope: ResourceRoutingScope;
- allowCloudSummary: boolean;
redact?: ResourceRedactionHint[];
}
diff --git a/frontend-modern/src/utils/__tests__/resourcePolicyPresentation.test.ts b/frontend-modern/src/utils/__tests__/resourcePolicyPresentation.test.ts
index 724a38142f..985d9d2037 100644
--- a/frontend-modern/src/utils/__tests__/resourcePolicyPresentation.test.ts
+++ b/frontend-modern/src/utils/__tests__/resourcePolicyPresentation.test.ts
@@ -30,7 +30,6 @@ describe('resourcePolicyPresentation utils', () => {
sensitivity: 'sensitive',
routing: {
scope: 'local-first',
- allowCloudSummary: true,
redact: ['hostname', 'ip-address'],
},
}),
@@ -43,7 +42,6 @@ describe('resourcePolicyPresentation utils', () => {
sensitivity: 'sensitive',
routing: {
scope: 'local-first',
- allowCloudSummary: true,
redact: [],
},
}),
diff --git a/frontend-modern/src/utils/resourcePolicyPresentation.ts b/frontend-modern/src/utils/resourcePolicyPresentation.ts
index 2ff5378e1a..ed49f332fe 100644
--- a/frontend-modern/src/utils/resourcePolicyPresentation.ts
+++ b/frontend-modern/src/utils/resourcePolicyPresentation.ts
@@ -125,7 +125,9 @@ export const getResourcePolicyRoutingDecisionSummaries = (
return [
{
label: 'Cloud Summary',
- value: getResourcePolicyRoutingDecisionLabel(policy.routing.allowCloudSummary),
+ value: getResourcePolicyRoutingDecisionLabel(
+ policy.routing.scope !== 'local-only',
+ ),
},
];
};
diff --git a/internal/ai/chat/context_prefetch_additional_test.go b/internal/ai/chat/context_prefetch_additional_test.go
index 497e4ac46c..4e592f6f64 100644
--- a/internal/ai/chat/context_prefetch_additional_test.go
+++ b/internal/ai/chat/context_prefetch_additional_test.go
@@ -436,8 +436,7 @@ func TestContextPrefetcher_FormatContextSummary_GovernedMention(t *testing.T) {
Policy: &unifiedresources.ResourcePolicy{
Sensitivity: unifiedresources.ResourceSensitivityRestricted,
Routing: unifiedresources.ResourceRoutingPolicy{
- Scope: unifiedresources.ResourceRoutingScopeLocalOnly,
- AllowCloudSummary: false,
+ Scope: unifiedresources.ResourceRoutingScopeLocalOnly,
Redact: []unifiedresources.ResourceRedactionHint{
unifiedresources.ResourceRedactionAlias,
unifiedresources.ResourceRedactionHostname,
@@ -479,8 +478,7 @@ func TestContextPrefetcher_FormatContextSummary_UsesSharedGovernedBlockFormatter
Policy: &unifiedresources.ResourcePolicy{
Sensitivity: unifiedresources.ResourceSensitivityRestricted,
Routing: unifiedresources.ResourceRoutingPolicy{
- Scope: unifiedresources.ResourceRoutingScopeLocalOnly,
- AllowCloudSummary: false,
+ Scope: unifiedresources.ResourceRoutingScopeLocalOnly,
Redact: []unifiedresources.ResourceRedactionHint{
unifiedresources.ResourceRedactionAlias,
unifiedresources.ResourceRedactionHostname,
@@ -494,8 +492,7 @@ func TestContextPrefetcher_FormatContextSummary_UsesSharedGovernedBlockFormatter
&unifiedresources.ResourcePolicy{
Sensitivity: unifiedresources.ResourceSensitivityRestricted,
Routing: unifiedresources.ResourceRoutingPolicy{
- Scope: unifiedresources.ResourceRoutingScopeLocalOnly,
- AllowCloudSummary: false,
+ Scope: unifiedresources.ResourceRoutingScopeLocalOnly,
Redact: []unifiedresources.ResourceRedactionHint{
unifiedresources.ResourceRedactionAlias,
unifiedresources.ResourceRedactionHostname,
diff --git a/internal/ai/chat/knowledge_extractor_test.go b/internal/ai/chat/knowledge_extractor_test.go
index 9b9210dec1..fd68cf4e84 100644
--- a/internal/ai/chat/knowledge_extractor_test.go
+++ b/internal/ai/chat/knowledge_extractor_test.go
@@ -104,7 +104,7 @@ func TestExtractFacts_QueryGet_NoCPU(t *testing.T) {
func TestExtractFacts_QueryGet_UsesGovernedSummary(t *testing.T) {
input := map[string]interface{}{"action": "get", "resource_type": "vm", "resource_id": "100"}
- result := `{"type":"vm","name":"finance-vm","status":"running","node":"node1.internal","id":"qemu/pve1/node1/100","vmid":100,"policy":{"sensitivity":"sensitive","routing":{"scope":"local-first","allowCloudSummary":true,"redact":["hostname","platform-id","alias"]}},"ai_safe_summary":"virtual machine resource; status running; redacted for cloud summary","cpu":{"percent":2.5,"cores":4},"memory":{"percent":45.0,"used_gb":1.2,"total_gb":4.0}}`
+ result := `{"type":"vm","name":"finance-vm","status":"running","node":"node1.internal","id":"qemu/pve1/node1/100","vmid":100,"policy":{"sensitivity":"sensitive","routing":{"scope":"local-first","redact":["hostname","platform-id","alias"]}},"ai_safe_summary":"virtual machine resource; status running; redacted for cloud summary","cpu":{"percent":2.5,"cores":4},"memory":{"percent":45.0,"used_gb":1.2,"total_gb":4.0}}`
facts := ExtractFacts("pulse_query", input, result)
require.Len(t, facts, 2)
@@ -137,7 +137,7 @@ func TestExtractFacts_QuerySearch_Empty(t *testing.T) {
func TestExtractFacts_QuerySearch_UsesGovernedSummary(t *testing.T) {
input := map[string]interface{}{"action": "search", "query": "finance"}
- result := `{"query":"finance","matches":[{"name":"finance-vm","status":"running","type":"vm","policy":{"sensitivity":"sensitive","routing":{"scope":"local-first","allowCloudSummary":true,"redact":["hostname","platform-id","alias"]}},"ai_safe_summary":"virtual machine resource; status running; redacted for cloud summary"}],"total":1}`
+ result := `{"query":"finance","matches":[{"name":"finance-vm","status":"running","type":"vm","policy":{"sensitivity":"sensitive","routing":{"scope":"local-first","redact":["hostname","platform-id","alias"]}},"ai_safe_summary":"virtual machine resource; status running; redacted for cloud summary"}],"total":1}`
facts := ExtractFacts("pulse_query", input, result)
require.Len(t, facts, 1)
@@ -468,7 +468,7 @@ func TestExtractFacts_QueryTopology(t *testing.T) {
func TestExtractFacts_QueryTopology_UsesGovernedSummary(t *testing.T) {
input := map[string]interface{}{"action": "topology"}
- result := `{"summary":{"total_nodes":1,"total_vms":1,"running_vms":1,"total_system_containers":0,"running_containers":0,"total_docker_hosts":0},"proxmox":{"nodes":[{"name":"finance-node.internal","status":"online","policy":{"sensitivity":"sensitive","routing":{"scope":"local-first","allowCloudSummary":true,"redact":["hostname","platform-id","alias"]}},"ai_safe_summary":"agent resource; status online; redacted for cloud summary"}]}}`
+ result := `{"summary":{"total_nodes":1,"total_vms":1,"running_vms":1,"total_system_containers":0,"running_containers":0,"total_docker_hosts":0},"proxmox":{"nodes":[{"name":"finance-node.internal","status":"online","policy":{"sensitivity":"sensitive","routing":{"scope":"local-first","redact":["hostname","platform-id","alias"]}},"ai_safe_summary":"agent resource; status online; redacted for cloud summary"}]}}`
facts := ExtractFacts("pulse_query", input, result)
require.Len(t, facts, 1)
@@ -967,7 +967,7 @@ func TestExtractFacts_QueryConfig_VM(t *testing.T) {
func TestExtractFacts_QueryConfig_UsesGovernedSummary(t *testing.T) {
input := map[string]interface{}{"action": "config", "resource_id": "106", "node": "pve-node"}
- result := `{"guest_type":"lxc","vmid":106,"name":"postfix-server","node":"pve-node","hostname":"postfix.internal","os_type":"ubuntu","policy":{"sensitivity":"sensitive","routing":{"scope":"local-first","allowCloudSummary":true,"redact":["hostname","platform-id","alias"]}},"ai_safe_summary":"system container resource; status online; linked to parent resource; redacted for cloud summary","onboot":true,"mounts":[{"key":"mp0","mountpoint":"/data"}]}`
+ result := `{"guest_type":"lxc","vmid":106,"name":"postfix-server","node":"pve-node","hostname":"postfix.internal","os_type":"ubuntu","policy":{"sensitivity":"sensitive","routing":{"scope":"local-first","redact":["hostname","platform-id","alias"]}},"ai_safe_summary":"system container resource; status online; linked to parent resource; redacted for cloud summary","onboot":true,"mounts":[{"key":"mp0","mountpoint":"/data"}]}`
facts := ExtractFacts("pulse_query", input, result)
require.Len(t, facts, 2)
diff --git a/internal/ai/resource_context_test.go b/internal/ai/resource_context_test.go
index 4466f699bc..d17135e3bd 100644
--- a/internal/ai/resource_context_test.go
+++ b/internal/ai/resource_context_test.go
@@ -377,8 +377,7 @@ func TestResourcePolicyHelpersShareAISafeSummaryDecision(t *testing.T) {
policy := &unifiedresources.ResourcePolicy{
Sensitivity: unifiedresources.ResourceSensitivitySensitive,
Routing: unifiedresources.ResourceRoutingPolicy{
- Scope: unifiedresources.ResourceRoutingScopeLocalFirst,
- AllowCloudSummary: true,
+ Scope: unifiedresources.ResourceRoutingScopeLocalFirst,
Redact: []unifiedresources.ResourceRedactionHint{
unifiedresources.ResourceRedactionHostname,
unifiedresources.ResourceRedactionIPAddress,
diff --git a/internal/api/contract_test.go b/internal/api/contract_test.go
index d510ac3392..805d638bf8 100644
--- a/internal/api/contract_test.go
+++ b/internal/api/contract_test.go
@@ -3728,9 +3728,6 @@ func TestContract_ResourceListPolicyMetadata(t *testing.T) {
if got := resource.Policy.Routing.Scope; got != unifiedresources.ResourceRoutingScopeLocalOnly {
t.Fatalf("routing scope = %q, want %q", got, unifiedresources.ResourceRoutingScopeLocalOnly)
}
- if resource.Policy.Routing.AllowCloudSummary {
- t.Fatal("expected restricted resource to block cloud summary")
- }
wantRedactions := []unifiedresources.ResourceRedactionHint{
unifiedresources.ResourceRedactionHostname,
unifiedresources.ResourceRedactionIPAddress,
diff --git a/internal/unifiedresources/code_standards_test.go b/internal/unifiedresources/code_standards_test.go
index bdb32044df..fc9617107d 100644
--- a/internal/unifiedresources/code_standards_test.go
+++ b/internal/unifiedresources/code_standards_test.go
@@ -263,8 +263,7 @@ func TestResourcePolicySummaryContractOmitsRawSignals(t *testing.T) {
policy := ResourcePolicy{
Sensitivity: ResourceSensitivityRestricted,
Routing: ResourceRoutingPolicy{
- Scope: ResourceRoutingScopeLocalOnly,
- AllowCloudSummary: false,
+ Scope: ResourceRoutingScopeLocalOnly,
Redact: []ResourceRedactionHint{
ResourceRedactionHostname,
},
diff --git a/internal/unifiedresources/policy_metadata.go b/internal/unifiedresources/policy_metadata.go
index 547550b617..adabe20764 100644
--- a/internal/unifiedresources/policy_metadata.go
+++ b/internal/unifiedresources/policy_metadata.go
@@ -44,9 +44,8 @@ type ResourcePolicy struct {
// ResourceRoutingPolicy captures the current routing posture for AI-safe handling.
type ResourceRoutingPolicy struct {
- Scope ResourceRoutingScope `json:"scope"`
- AllowCloudSummary bool `json:"allowCloudSummary"`
- Redact []ResourceRedactionHint `json:"redact,omitempty"`
+ Scope ResourceRoutingScope `json:"scope"`
+ Redact []ResourceRedactionHint `json:"redact,omitempty"`
}
// CloneResourcePolicy returns a deep copy of the canonical resource policy.
@@ -148,13 +147,10 @@ func buildResourceRoutingPolicy(resource Resource, sensitivity ResourceSensitivi
switch sensitivity {
case ResourceSensitivityPublic, ResourceSensitivityInternal:
policy.Scope = ResourceRoutingScopeCloudSummary
- policy.AllowCloudSummary = true
case ResourceSensitivitySensitive:
policy.Scope = ResourceRoutingScopeLocalFirst
- policy.AllowCloudSummary = true
case ResourceSensitivityRestricted:
policy.Scope = ResourceRoutingScopeLocalOnly
- policy.AllowCloudSummary = false
default:
policy.Scope = ResourceRoutingScopeLocalFirst
}
diff --git a/internal/unifiedresources/policy_metadata_test.go b/internal/unifiedresources/policy_metadata_test.go
index 1164c9a652..168cae005f 100644
--- a/internal/unifiedresources/policy_metadata_test.go
+++ b/internal/unifiedresources/policy_metadata_test.go
@@ -34,9 +34,6 @@ func TestRefreshPolicyMetadata_ClassifiesRestrictedResources(t *testing.T) {
if got := resource.Policy.Routing.Scope; got != ResourceRoutingScopeLocalOnly {
t.Fatalf("routing scope = %q, want %q", got, ResourceRoutingScopeLocalOnly)
}
- if resource.Policy.Routing.AllowCloudSummary {
- t.Fatal("expected local-only resource to block cloud summary")
- }
if !containsRedactionHint(resource.Policy.Routing.Redact, ResourceRedactionHostname) {
t.Fatalf("expected hostname redaction hint, got %#v", resource.Policy.Routing.Redact)
}
@@ -74,9 +71,6 @@ func TestRefreshPolicyMetadata_ClassifiesInfrastructureAsInternal(t *testing.T)
if got := resource.Policy.Routing.Scope; got != ResourceRoutingScopeCloudSummary {
t.Fatalf("routing scope = %q, want %q", got, ResourceRoutingScopeCloudSummary)
}
- if !resource.Policy.Routing.AllowCloudSummary {
- t.Fatal("expected internal resource to allow cloud summary")
- }
}
func TestRefreshCanonicalMetadata(t *testing.T) {
@@ -259,8 +253,7 @@ func TestResourcePolicySummaryLines(t *testing.T) {
policy := &ResourcePolicy{
Sensitivity: ResourceSensitivityRestricted,
Routing: ResourceRoutingPolicy{
- Scope: ResourceRoutingScopeLocalOnly,
- AllowCloudSummary: false,
+ Scope: ResourceRoutingScopeLocalOnly,
Redact: []ResourceRedactionHint{
ResourceRedactionAlias,
ResourceRedactionHostname,
@@ -316,8 +309,7 @@ func TestResourcePolicyRedactsAndUsesAISafeSummary(t *testing.T) {
policy := &ResourcePolicy{
Sensitivity: ResourceSensitivitySensitive,
Routing: ResourceRoutingPolicy{
- Scope: ResourceRoutingScopeLocalFirst,
- AllowCloudSummary: true,
+ Scope: ResourceRoutingScopeLocalFirst,
Redact: []ResourceRedactionHint{
ResourceRedactionHostname,
ResourceRedactionIPAddress,
@@ -455,8 +447,7 @@ func TestCloneResourcePolicy(t *testing.T) {
original := &ResourcePolicy{
Sensitivity: ResourceSensitivityRestricted,
Routing: ResourceRoutingPolicy{
- Scope: ResourceRoutingScopeLocalOnly,
- AllowCloudSummary: false,
+ Scope: ResourceRoutingScopeLocalOnly,
Redact: []ResourceRedactionHint{
ResourceRedactionHostname,
ResourceRedactionIPAddress,
@@ -490,8 +481,7 @@ func TestResourcePolicySummaryLinesOmitRawSignals(t *testing.T) {
got := ResourcePolicySummaryLines(&ResourcePolicy{
Sensitivity: ResourceSensitivityInternal,
Routing: ResourceRoutingPolicy{
- Scope: ResourceRoutingScopeCloudSummary,
- AllowCloudSummary: true,
+ Scope: ResourceRoutingScopeCloudSummary,
},
})
diff --git a/internal/unifiedresources/policy_presentation.go b/internal/unifiedresources/policy_presentation.go
index 5121f77048..fe4c005217 100644
--- a/internal/unifiedresources/policy_presentation.go
+++ b/internal/unifiedresources/policy_presentation.go
@@ -67,6 +67,15 @@ func ResourceRoutingScopeLabel(scope ResourceRoutingScope) string {
}
}
+func resourcePolicyAllowsCloudSummary(scope ResourceRoutingScope) bool {
+ switch scope {
+ case ResourceRoutingScopeCloudSummary, ResourceRoutingScopeLocalFirst:
+ return true
+ default:
+ return false
+ }
+}
+
// ResourceRedactionHintLabel returns the canonical human-readable redaction label.
func ResourceRedactionHintLabel(hint ResourceRedactionHint) string {
switch hint {
@@ -190,7 +199,7 @@ func ResourcePolicySummaryLines(policy *ResourcePolicy) []string {
fmt.Sprintf("Policy: sensitivity=%s, routing=%s, cloud_summary=%t",
ResourceSensitivityLabel(policy.Sensitivity),
ResourceRoutingScopeLabel(policy.Routing.Scope),
- policy.Routing.AllowCloudSummary,
+ resourcePolicyAllowsCloudSummary(policy.Routing.Scope),
),
}