Skip to content

Fix investigation comments failing due to extra-quoted item_number - #66298

Merged
wtgodbe merged 3 commits into
mainfrom
wtgodbe/quotesgent
Apr 13, 2026
Merged

wtgodbe merged 3 commits into
mainfrom
wtgodbe/quotesgent

Conversation

@wtgodbe

@wtgodbe wtgodbe commented Apr 13, 2026 •

Copy link
Copy Markdown
Member

Summary

In workflow run 24338805833, investigation comments on #66292 and #66293 failed because the agent passed item_number with embedded quote characters ("aw_blazwasm" instead of aw_blazwasm), causing the safe_outputs handler to reject the value.

This is agent non-determinism — a defensive fix in gh-aw is also being requested upstream (github/gh-aw#26057), but in the meantime we can mitigate by being explicit in the prompt.

Changes

  1. Step 3.1 — Clarified how to pass item_number when calling add_comment for investigation comments (use the same temporary_id from create_issue, as a plain string)
  2. Turn budget awareness — Added general rule: pass string parameters to safe-output tools as plain strings without extra quoting

The agent sometimes wraps string parameters in extra quote
characters (e.g., '"aw_blazwasm"' instead of 'aw_blazwasm'),
which causes the safe_outputs handler to reject the value.

Add explicit guidance to pass item_number and temporary_id as
plain strings without extra quoting, and clarify how to use
temporary IDs with add_comment.

Co-authored-by: Copilot <[email protected]>
@wtgodbe
wtgodbe requested a review from a team as a code owner April 13, 2026 15:37
Copilot AI review requested due to automatic review settings April 13, 2026 15:37
@github-actions github-actions Bot added the needs-area-label Used by the dotnet-issue-labeler to label those issues which couldn't be triaged automatically label Apr 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the agentic workflow instructions for the daily test quarantine automation to prevent add_comment failures caused by passing item_number values that contain embedded quote characters (which the safe-outputs handler rejects).

Changes:

  • Add a general rule to pass safe-output string parameters as plain strings without embedded quotes.
  • Clarify Step 3.1 investigation comment instructions to reuse the temporary_id from create_issue for add_comment.item_number.

Comment thread .github/workflows/test-quarantine.md Resolved
…ew one

The prompt told the agent to 'reopen' the original issue for
re-quarantines, but there is no reopen_issue safe output tool.
The agent was creating new issues instead (e.g., #66292 instead
of reusing #66035).

Split Step 3.1 into Case A (new quarantine) and Case B
(re-quarantine) with distinct flows:
- Case A: create_issue with temporary_id, then add_comment with
  that temporary_id, then create_pull_request
- Case B: add_comment on existing issue with numeric issue number,
  then create_pull_request referencing existing issue directly

Also update budget planning and atomicity rules to reflect that
Case B consumes 1 PR + 1 comment (no new issue).

Co-authored-by: Copilot <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Daily Test Quarantine Management agentic workflow instructions to prevent investigation comment failures caused by passing item_number with embedded quote characters, and clarifies handling of re-quarantine vs new-quarantine actions.

Changes:

  • Clarifies that item_number/temporary_id string parameters to safe-output tools must be passed as plain strings (no embedded quote characters).
  • Splits Step 3.1 instructions into Case A (new quarantine) vs Case B (re-quarantine) and updates budget/atomicity guidance accordingly.
  • Adjusts Case B guidance to reuse the original quarantine issue rather than creating a new one.

Comment on lines 318 to +324
### Step 3.1 — Quarantine and re-quarantine (highest priority)

For each quarantine/re-quarantine candidate, in priority order:

1. **Create a test-failure issue** (or **reopen** the original issue for Case B re-quarantines) with this exact structure:
#### Case A — New quarantine

1. **Create a test-failure issue** via `create_issue` with a `temporary_id` (e.g., `aw_http2ign`). Use this exact structure:
Comment thread .github/workflows/test-quarantine.md Outdated
2. **Create a PR** that:
- Adds `[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/{EXISTING_ISSUE_NUMBER}")]` to the test method (or class), using the **existing issue's numeric URL** directly — not a temporary ID.
- Adds `using Microsoft.AspNetCore.InternalTesting;` if not already present in the file
- References the existing issue in the PR body with `Associated issue: #{EXISTING_ISSUE_NUMBER}`.
- Move Case B before Case A in Step 3.1 to match the priority order
  (re-quarantines first, then new quarantines)
- Replace ambiguous #{EXISTING_ISSUE_NUMBER} placeholders with
  concrete examples (e.g., #66035) to avoid confusion with the
  temporary ID syntax

Co-authored-by: Copilot <[email protected]>
@wtgodbe
wtgodbe merged commit 062d180 into main Apr 13, 2026
10 checks passed
@wtgodbe
wtgodbe deleted the wtgodbe/quotesgent branch April 13, 2026 16:10
@dotnet-policy-service dotnet-policy-service Bot added this to the 11.0-preview4 milestone Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-area-label Used by the dotnet-issue-labeler to label those issues which couldn't be triaged automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants