Conversation
When a MultiAgent response stream fails and Warp retries, resumes, or gives up, the log line identified the failed request only as original or resume. It did not say which model the request targeted or whether it carried user-provided API keys or custom model providers, so transport failures such as the TLS UnexpectedEof reports in warpdotdev#7247 could not be attributed to hosted versus bring-your-own-key requests from a user's log alone. Append model, user_api_keys, and custom_model_providers to both the recovering and not-recovering log lines. Only the presence of credentials is logged, never their values, and a test asserts a credential value does not appear in the label. Refs warpdotdev#7247
…t-context-on-recovery
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @meehol on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment |
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I reviewed this pull request and requested human review from: Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR adds model and credential-presence context to response-stream recovery warning logs, while keeping credential values out of the logged label. It also adds focused unit coverage for the hosted-request case and for avoiding leakage of an attached credential value.
Concerns
- No blocking concerns found. The added helper doc comment explains the diagnostic rationale rather than restating implementation, and the new tests cover the new deterministic label behavior.
- No approved spec context was provided for this PR.
Verdict
Found: 0 critical, 0 important, 0 suggestions
Approve
Comment /warp-agent-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
Description
When a MultiAgent response stream fails and Warp retries, resumes, or gives up, the log line identifies the failed request only as
originalorresume. It does not say which model the request targeted or whether it carried user-provided API keys or custom model providers.That makes transport failures like the TLS
UnexpectedEofreports in #7247 hard to attribute from a user's log alone. In particular, it is not possible to tell whether a failing request was a Warp-hosted model or one using the user's own provider credentials, so a report like "hosted models work but my own key fails" cannot be confirmed or ruled out.This change appends
model=,user_api_keys=, andcustom_model_providers=to both the "recovering" and "not recovering" log lines. Only the presence of credentials is logged (booleans), never their values.Example of the new log suffix:
failed_request=original model=<model-id> user_api_keys=true custom_model_providers=falseThis is diagnostic only and does not change retry, resume, or error-surfacing behavior, so it does not by itself fix #7247.
Additional evidence from the same machine on Warp stable
v0.2026.09.30.08.29.stable_01(2026-10-03, UTC), all withis_online=trueand the sameUnexpectedEof("peer closed connection without sending TLS close_notify"):recovery=none reason=budget_exhaustedThe log records model selection changes, but not which model a given failed request used. In this log, 5 of the last 6 failure chains happened with
auto-geniusas the last selected model, so the failures do not appear to be specific to requests using a user-provided key (another pane could have been using a different model). All of these arerecovery=resumefailures after client actions were received, and each resumed request fails about 60 to 65 seconds after the previous failure, which suggests a cut of roughly 60s somewhere on the connection (details and timestamps on #7247). Other requests with a different model selected returned no visible reply while the log shows no transport error, so more than one failure mode may be involved.Because the failing request's model and credential routing cannot be read from the existing log lines, those cases cannot be separated after the fact. Recording them on the failure line is what this PR adds.
Linked Issue
Refs #7247
ready-to-specorready-to-implement.Testing
Automated:
request_context_label_reports_a_hosted_request_without_user_credentialsandrequest_context_label_reports_attached_credentials_without_leaking_theminresponse_stream_tests.rs. The second asserts that a credential value attached to the request does not appear in the label.cargo test -p warp --lib ai::blocklist::controller::response_stream: 18 passed, 0 failed (includes the existing recovery tests).cargo clippy -p warp --all-targets --tests -- -D warnings: clean../script/format: no further changes.Manual:
./script/runI have not exercised this end to end in the running app, because reproducing the transport failure requires a network fault mid-stream. The format of the string is covered by the unit tests above. Happy to add a manual run if a maintainer wants one and can suggest a reliable way to trigger a mid-stream disconnect.
CHANGELOG-NONE