fix(cu): redact an observation id on the same terms as the fields beside it - #2044
Merged
Merged
Conversation
…ide it computerUseModelCallArgs put observation_id through stableIdentifier and stopped there, so a secret-shaped value under that key reached the persisted tool_call, the tool_start event and the model's replayed history verbatim, while the same string under app or element_id was redacted. The sibling projection computerUseApprovalSummary already redacted it; the two disagreed. Redacting it looked unsafe because the model quotes the id back on its next call, so rewriting it could break the observe-then-act loop. It cannot: the executor mints these with randomUUID, and a UUID carries no run of 40-plus hex characters, so redactSecrets leaves it alone. Measured: the minted shape passes through unchanged, an API-key shape does not. Anything rewritten here was never an id this host handed out. Closes apache#2042.
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.
computerUseModelCallArgsputobservation_idthroughstableIdentifierandstopped there. Every identifier beside it goes on through
redactSecrets, andso does
observation_idin the sibling projectioncomputerUseApprovalSummary— the two disagreed, and the model-facing one was the permissive side.
The consequence, measured through the real
ToolRuntimeseam before the fix:element_idsk-ant-api03-…[redacted]appsk-ant-api03-…[redacted]observation_idsk-ant-api03-…sk-ant-api03-AbCdEfGh…That value lands in the persisted
tool_call, on thetool_startevent, and inthe model's own replayed history. Arguments are not validated before this
projection runs, so a model can put anything under that key.
Why this was left alone when it was found: the model quotes the observation id
back on its next call, so rewriting it could break the observe-then-act loop,
and
redactSecretsmatches runs of 40-plus hex among other shapes. That turnsout not to apply. The executor mints these with
randomUUID, and a UUID has nosuch run, so it passes through untouched:
Anything this rewrites was never an id the host handed out, so nothing the model
needs is lost.
The test pins both directions, and I checked it can fail: reverting the one-line
change reddens it alone.
Restored:
@maka/core754 pass / 0 fail.Closes #2042.