Repository navigation
refactor(backend): remove the unused resource-name sanitizer - #13109
Merged
Merged
Conversation
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.
Contributor
|
v1 documentation preview: https://nvidia-preview-nemoclaw-v1-pr-13109.docs.buildwithfern.com/nemoclaw |
This was referenced Oct 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes
ObservationError::sanitized_resource_detail, which nothing outside its own test called. The diagnostic patterns move toLazyLockstatics.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. Onlyresource_details_preserve_only_the_exact_known_name_outside_credentialsincrates/nemoclaw-sdk/tests/error.rsdoes. It still madesanitize_detailtake an optional exempt name, and every token match went through a closure.Change
sanitized_resource_detailand its test.sanitized_detailbehaves as before.OnceLock<Regex>statics with module-levelLazyLock<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-backendandcargo test -p nemoclaw-sdk --test integration error: all passed, including the redaction, bounding, and token tests forsanitized_detail.cargo cion linux_arm64: all steps passed.