Repository navigation
fix(pii): preserve bounded trajectory status metadata - #1339
Merged
willkill07 merged 2 commits intoOct 14, 2026
Merged
Conversation
Contributor
Member
|
@j-nolan thank you for this PR. Two questions:
Thank you for your contribution! In the future, we like to have issues filed for bugs so we can keep track of them in our system. There is no need to create a corresponding issue now. |
Signed-off-by: James Nolan <[email protected]>
j-nolan
force-pushed
the
fix/trajectory-error-status
branch
from
October 14, 2026 14:57
ca1cad0 to
4b9c09c
Compare
j-nolan
marked this pull request as ready for review
October 14, 2026 14:59
Contributor
Author
|
Hi @willkill07 ! I retargetted to |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Member
|
/ok to test 92a1da5 |
willkill07
approved these changes
Oct 14, 2026
License DiffCompared against Lockfile license changesLockfile License ChangesRustAdded
Removed
Updated/Changed
NodeAdded
Removed
Updated/Changed
PythonAdded
Removed
Updated/Changed
Status output |
This branch was previously deployed
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.
Overview
Relay's
trajectory_contextpreset removes sensitive content from telemetry before it is exported. It currently also removes the fields that say whether a model or tool call succeeded or failed. Both successful and failed calls therefore appear withUNSETstatus.This PR preserves status and error classifications so that redacted telemetry still reports success and failure. For example, a timeout remains an error with the category
timeout, while the detailed error message is removed because it may contain sensitive content.Details
OK,ERROR, andUNSET. For errors, also keep Relay's predefined error categories, such astimeoutandauthentication, and the_OTHERfallback. Check the values as well as the field names, so arbitrary text cannot be exported through these fields.full,gen_ai, andopeninference. Also check that sample private content is absent from exported records and that the application still receives the original results and errors.Validation on
release/0.10(base commit005eb5bc):git range-diffconfirms that the patch is unchanged.just test-rust: all 5,874 tests passed, with no skipped tests. The run usedumask 077so temporary test directories have private permissions.just test-python: 83 Rust binding tests, 996 Python tests, and 24 example tests passed using Python 3.11.just test-node: 5 Rust binding tests, 453 Node tests, and 26 example tests passed.just docs: passed; the authenticated redirects check was skipped because no Fern token was configured.cargo deny. It reports four advisories forrustls 0.23.45(RUSTSEC-2026-0346 through RUSTSEC-2026-0349). The upstream release branch uses that same dependency version; this patch does not change it. Workspace Clippy/check, link checking, Python/npm audits, and attribution generation passed.Where should the reviewer start?
Start with
sanitize_scope_status_metadataincrates/pii-redaction/src/trajectory.rs. It keeps only the status values and error categories described above. Then readcrates/pii-redaction/tests/unit/trajectory_status_tests.rs, which checks both status reporting and removal of sensitive content.Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)
Summary by CodeRabbit
OK,ERROR, andUNSET. ForERRORstatuses, recognized error classifications are retained; unrecognized classifications are discarded or represented as_OTHERin supported projections.