Skip to content

fix(smoke): tag builds via the request body so colon-bearing tags work - #1801

Merged
jamesadevine merged 1 commit into
mainfrom
fix/smoke-build-tag-colon
Aug 3, 2026
Merged

fix(smoke): tag builds via the request body so colon-bearing tags work#1801
jamesadevine merged 1 commit into
mainfrom
fix/smoke-build-tag-colon

Conversation

@jamesadevine

Copy link
Copy Markdown
Collaborator

Every child build in the first live candidate run (629522) logged:

WARNING: could not tag build #629524: ADO PUT .../tags/smoke-case%3Anoop-target
-> HTTP 400: A potentially dangerous Request.Path value was detected from the client (:).

addBuildTags used the per-tag path form (PUT .../tags/{tag}). ADO's
ASP.NET front end validates the decoded path, so : is rejected even when
correctly percent-encoded as %3A. Both tags this harness writes —
smoke-case:<id> and smoke-candidate:<buildId> — carry one, so tagging
failed for every case, every run.

Fix

Use the body form (POST .../tags with a JSON array). This sidesteps path
validation entirely, keeps the readable prefixed tag format, and tags all of
them in one request instead of N.

Verified live against build 629523:

form result
PUT .../tags/smoke-case%3Acanary HTTP 400
POST .../tags with body ["smoke-case:canary", ...] 200, tags present

Why it degraded silently

Tagging is deliberately non-fatal. Every case in a lane shares one definition,
so tags are how a run is identified in that shared history — losing them makes
the lane history unnavigable without breaking anything loudly.

Validation

  • New regression test asserting tags go in the body and never the path
  • Mutation-checked: restoring the PUT form fails it
  • npx vitest run src/compiler-smoke-e2e green

Every child build in the first live candidate run logged:

  WARNING: could not tag build #629524: ADO PUT .../tags/smoke-case%3Anoop-target
  -> HTTP 400: A potentially dangerous Request.Path value was detected
     from the client (:).

addBuildTags used the per-tag path form, PUT .../tags/{tag}. ADO's
ASP.NET front end validates the DECODED request path, so a ':' is
rejected even when correctly percent-encoded as %3A. Both tags this
harness writes - smoke-case:<id> and smoke-candidate:<buildId> - carry
one, so tagging failed for every case, every run.

Switches to the body form, POST .../tags with a JSON array. That
sidesteps path validation entirely, keeps the readable prefixed tag
format, and tags all of them in one request instead of N.

Verified live against build 629523: the PUT form returns 400, the POST
form succeeds and the tags appear.

Tagging is deliberately non-fatal, so this degraded silently into a
warning: every case in a lane shares one definition, and tags are how a
run is identified in that shared history, so losing them makes the lane
history unnavigable without breaking anything loudly.

Mutation-checked: restoring the PUT form fails the new test.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 323b70ff-d193-4c6e-b4c7-9ec6c3dc6ebd
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
2 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@jamesadevine
jamesadevine merged commit 97b46ec into main Aug 3, 2026
5 checks passed
@jamesadevine
jamesadevine deleted the fix/smoke-build-tag-colon branch August 3, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant