Skip to content

refactor(backend): remove the unused resource-name sanitizer - #13109

Merged
cv merged 1 commit into
v1from
refactor/backend-sanitized-detail
Oct 13, 2026
Merged

cv merged 1 commit into
v1from
refactor/backend-sanitized-detail

Conversation

@cv

@cv cv commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator

Removes ObservationError::sanitized_resource_detail, which nothing outside its own test called. The diagnostic patterns move to LazyLock statics.

Why

#13056 added sanitized_resource_detail(detail, resource_name) to keep one exact resource name that would otherwise be redacted as a token-like run. No backend calls it. Only resource_details_preserve_only_the_exact_known_name_outside_credentials in crates/nemoclaw-sdk/tests/error.rs does. It still made sanitize_detail take an optional exempt name, and every token match went through a closure.

Change

  • Remove sanitized_resource_detail and its test. sanitized_detail behaves as before.
  • Replace the three OnceLock<Regex> statics with module-level LazyLock<Regex> statics, as used elsewhere in the workspace.

If a backend later needs to keep a known name in a diagnostic, it can bring back the exemption with a caller.

Validation

  • cargo test -p nemoclaw-backend and cargo test -p nemoclaw-sdk --test integration error: all passed, including the redaction, bounding, and token tests for sanitized_detail.
  • cargo ci on linux_arm64: all steps passed.

ObservationError::sanitized_resource_detail had no caller outside its own
test, so sanitize_detail no longer needs the optional exempt name. The
diagnostic patterns become LazyLock statics, as elsewhere in the workspace.
@github-actions

Copy link
Copy Markdown
Contributor

@cv
cv merged commit 23831f6 into v1 Oct 13, 2026
@cv
cv deleted the refactor/backend-sanitized-detail branch October 13, 2026 18:45
@wscurran wscurran added area: observability Logging, metrics, tracing, diagnostics, or debug output area: security Security controls, permissions, secrets, or hardening refactor PR restructures code without intended behavior change labels Oct 13, 2026
@wscurran wscurran added the v1 NemoClaw v1 branch label Oct 28, 2026
@cv cv added this to the Roadmap: GTC DC 2026 milestone Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: observability Logging, metrics, tracing, diagnostics, or debug output area: security Security controls, permissions, secrets, or hardening refactor PR restructures code without intended behavior change v1 NemoClaw v1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants