mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-03 04:38:48 +00:00
Return persisted planning acceptance or refusal inside the investigation turn. Keep model judgment separate from action authority and preserve accepted action identity across provider failures. Enforce actor/request idempotency atomically and retain complete approval and independent verification context. Preserve unknown disk evidence, stream whitespace and historical resolution timestamps. Keep conversation scrolling inside its own panel. Record real-model, disposable-lab and browser qualification with explicit population limits. Refs #1782
19 lines
737 B
Go
19 lines
737 B
Go
package unifiedresources
|
|
|
|
import "testing"
|
|
|
|
func TestResourcePolicyRedactedTextPreservesWhitespace(t *testing.T) {
|
|
resource := Resource{Name: "private-host", Policy: &ResourcePolicy{Routing: ResourceRoutingPolicy{Redact: []ResourceRedactionHint{ResourceRedactionHostname}}}}
|
|
for _, value := range []string{" ", "\n\n", " Summary ", "\n private-host \n"} {
|
|
want := value
|
|
if value == "\n private-host \n" {
|
|
want = "\n " + ResourcePolicyRedactedLabel + " \n"
|
|
}
|
|
if got := ResourcePolicyRedactedText(value, resource); got != want {
|
|
t.Errorf("redact(%q) = %q, want %q", value, got, want)
|
|
}
|
|
if got := ResourcePolicyRedactedText(value, Resource{}); got != value {
|
|
t.Errorf("without policy: %q != %q", got, value)
|
|
}
|
|
}
|
|
}
|