mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-10 03:51:54 +00:00
Remove raw signals from policy surface
This commit is contained in:
parent
18e998acae
commit
cfd6eb634f
7 changed files with 10 additions and 17 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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', () => {
|
||||
|
|
|
|||
|
|
@ -127,10 +127,6 @@ export const getResourcePolicyRoutingDecisionSummaries = (
|
|||
label: 'Cloud Summary',
|
||||
value: getResourcePolicyRoutingDecisionLabel(policy.routing.allowCloudSummary),
|
||||
},
|
||||
{
|
||||
label: 'Raw Signals',
|
||||
value: getResourcePolicyRoutingDecisionLabel(policy.routing.allowCloudRawSignals),
|
||||
},
|
||||
];
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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") {
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
),
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue