Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@Sicheng-Pan
Copy link
Contributor

@Sicheng-Pan Sicheng-Pan commented Dec 23, 2025

Description of changes

Summarize the changes made by this PR.

  • Improvements & Bug fixes
    • N/A
  • New functionality
    • Implements SearchPayload::masked, which allows us to log the structure of user query with masked values

Test plan

How are these changes tested?

  • Tests pass locally with pytest for python, yarn test for js, cargo test for rust

Migration plan

Are there any migrations, or any forwards/backwards compatibility changes needed in order to make sure this change deploys reliably?

Observability plan

What is the plan to instrument and monitor this change?

Documentation Changes

Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs section?

@github-actions
Copy link

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Sicheng-Pan Sicheng-Pan force-pushed the 12-23-_enh_log_masked_search_queries branch from c23ec5b to d66234c Compare December 23, 2025 19:42
@Sicheng-Pan Sicheng-Pan marked this pull request as ready for review December 23, 2025 19:49
@propel-code-bot
Copy link
Contributor

propel-code-bot bot commented Dec 23, 2025

Add masked logging for collection search payloads

Introduces masking utilities across the search planning types so that request data can be logged without exposing user content. Server-side tracing for collection_search now records only masked payloads, and a unit test asserts that sensitive strings are fully removed while structural hints remain.

Key Changes

• Adds SearchPayload::masked and delegates to new masked helpers on Filter, Rank, RankExpr, QueryVector, Where, and MetadataComparison to anonymize values while retaining shape metadata.
• Extends MetadataComparison::masked to preserve the original comparison variant, converting boolean sets to integer-length placeholders and replacing other value types with neutral stand-ins.
• Updates collection_search tracing to emit masked payloads instead of raw queries and introduces test_search_payload_masked_hides_sensitive_info to verify behavior.

Affected Areas

rust/types/src/execution/plan.rs
rust/types/src/execution/operator.rs
rust/types/src/metadata.rs
rust/frontend/src/server.rs

This summary was automatically generated by @propel-code-bot

rust/types/src/metadata.rs Show resolved Hide resolved
@Sicheng-Pan Sicheng-Pan force-pushed the 12-23-_enh_log_masked_search_queries branch from d66234c to ab0b739 Compare December 23, 2025 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.