Skip to content

Preserve user query attribution across native agent flows - #15947

Draft
Legoben wants to merge 1 commit into
masterfrom
bens/populate-user-query-attribution
Draft

Preserve user query attribution across native agent flows#15947
Legoben wants to merge 1 commit into
masterfrom
bens/populate-user-query-attribution

Conversation

@Legoben

@Legoben Legoben commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Description

Preserve each query's origin, author, and source context through native input conversion, conversation storage/restoration, and shared-session delivery. Fresh local input carries an explicit marker for the server to resolve against the authenticated submitter. Forwarded and historical metadata retain their original authors; missing metadata is not attributed to the desktop host.

Review the UserQueryAttribution wrapper first, then API conversion and shared-session handling. Ordinary input, canned-response input, CLI queries, and skill invocation retain the envelope. Malformed shared envelopes have an explicit unavailable origin, and debug output does not expose identities or provider content. Shared attachments also survive the new-conversation branch.

Pins the schema from warpdotdev/warp-proto-apis#381 and transport protocol from warpdotdev/session-sharing-protocol#86. The proto bump also moves charge types to their new namespace and widens wire token counts; conversion preserves existing persisted counter widths with saturation. Request-metadata records remain bookkeeping: they do not create transcript items, searchable conversation text, or first-token timestamps.

Companion server and relay changes: https://github.com/warpdotdev/warp-server/pull/17271 and https://github.com/warpdotdev/session-sharing-server/pull/525. Merge the schema and protocol foundations before this consumer; refresh dependency pins if their merged commit IDs change.

Linked Issue

Schema context: warpdotdev/warp-proto-apis#372.

  • The linked issue is labeled ready-to-spec or ready-to-implement — no separate issue was supplied.
  • Where appropriate, screenshots or a short video are included — no UI changes.

Testing

  • ./script/format --check and ./script/check_no_inline_test_modules passed.
  • All three required Clippy checks passed: workspace excluding warp_completer, GUI package warp, and warp_completer, each including all targets/tests with warnings denied.
  • Nine attribution helper tests passed against the published schema and protocol pins.
  • Four persistence tests passed, including wide-token saturation and legacy payload compatibility.

New app conversion/restoration/timing tests were typechecked by Clippy but were not executed through the desktop harness. Local validation used an unchanged writable workflows dependency copy, task-local Yarn, and cached unchanged Metal artifacts; shader compilation was not tested. No temporary dependency overrides or tooling changes are committed.

The repository intentionally skips full CI for draft PRs and fails the aggregate Check CI results until review is requested. The required local checks above passed; full remote CI still needs to run when this PR leaves draft.

  • I have manually tested my changes locally with ./script/run — full GUI execution was not performed; the local Metal compiler is unavailable.

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode — created with Codex.

CHANGELOG-NONE

Retain query origin, author, and provider context through shared-session delivery, conversion, persistence, and restoration. Pin the matching schema and protocol revisions.

Co-Authored-By: Warp Agent <agent@warp.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant