mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-23 20:25:56 +00:00
38740f1dc4
While investigating a "bazarr → Unknown Service" discovery report, found that increment 2 only wired the dial into the interactive chat seam. The shared helper (*Service).requestSanitizerForModel — used by discovery analysis, the report and fleet narrators, quick analysis, and the ExecuteAgentic paths — always installed a FULL-redaction sanitizer regardless of the dial. So at the "full" dial those paths silently over-redacted governed resources: e.g. discovery could not identify a governed service even though the operator chose full. (Note: bazarr itself is classified Internal/cloud-summary, so it is NOT redacted — its "Unknown Service" is a discovery service-identification matter, not redaction. This fix addresses the governed-resource case the same gap would break.) Fix: requestSanitizerForModel now resolves the dial from the config snapshot (fail-closed to redacted when absent) and passes RedactLocalOnlyResourcesOnly() at "full", exactly like the chat seam. Local (Ollama) still gets no sanitizer. The local-only hard floor still protects must-not-leave resources at full. Proof: TestRequestSanitizerForModel_HonorsCloudPrivacyDial — at full a Sensitive (local-first) identifier flows while a Restricted (local-only) one stays redacted and the bearer token is always stripped; at redacted both identifiers are redacted; local model gets a nil sanitizer. Contract: ai-runtime universal backstop rule now states the shared helper must honor the dial too (functional parity), not just install the sanitizer. Full internal/ai/... suite green (23 packages).