Repository navigation
deviceid: stamp X-Device-UUID under /v2/harness-runtime as well as /v2/agents - #2071
Merged
Merged
Conversation
…2/agents The Harness Runtime API is moving from /v2/agents to /v2/harness-runtime. The device-id transport stamps X-Device-UUID only on requests under the hosted agents base path, so once the client's base path changes the header would silently stop being sent. Match either prefix, keeping the path-segment boundary so /v2/agentsfoo and /v2/harness-runtimefoo are not caught. Safe to ship ahead of the godo bump: today's requests still carry the header, and the new ones will too. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
SSharma-10
approved these changes
Oct 23, 2026
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.
Summary
internal/deviceidstampsX-Device-UUIDonly on requests under the hosted agents base path. That path is moving from/v2/agentsto/v2/harness-runtime, and without this change the header would silently stop being sent as soon as the client's base path changes, with no error anywhere.This matches either prefix, keeping the path-segment boundary:
/v2/agentsfooand/v2/harness-runtimefooare not caught, and neither is/v2/gen-ai/harness-runtime.Safe to merge ahead of the godo bump
Unlike the godo and pydo changes, this is backward compatible: requests under
/v2/agentsstill get the header, and requests under/v2/harness-runtimewill too once the client moves. It does not change which URL doctl calls.Follow-up (not in this PR)
Bumping godo to the release that uses
/v2/harness-runtimeis a separate change, after the API edge serves the new prefix.Test plan
go test ./internal/deviceid/: passes./v2/harness-runtimeand its sub-resources, and the out-of-scope table with/v2/harness-runtimefoo,/v2/harness-runtimefoo/and/v2/gen-ai/harness-runtime.🤖 Generated with Claude Code