From 488bd60de7be54b071b671966140a0d24d067c66 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 23 Jul 2026 11:24:20 +0000 Subject: [PATCH 1/3] Initial plan From a9aa87d64efdc31232ed8f74f8a111c37f1e663a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 23 Jul 2026 11:41:31 +0000 Subject: [PATCH 2/3] fix: make set_issue_field non-fatal and fix smoke-codex field discovery - Add `set_issue_field` to REPORT_ONLY_FAILURE_TYPES so project-board field drift (e.g. Status renamed/removed) warns instead of failing the entire safe_outputs job - Update smoke-codex step 10 to explicitly discover available fields via `gh api graphql` before choosing one, preventing the agent from guessing field names like "Status" that no longer exist - Recompile smoke-codex.lock.yml - Add tests for the new report-only behavior Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/smoke-codex.lock.yml | 2 +- .github/workflows/smoke-codex.md | 12 ++++-- .../setup/js/safe_output_handler_manager.cjs | 12 +++++- .../js/safe_output_handler_manager.test.cjs | 37 +++++++++++++++++++ 4 files changed, 56 insertions(+), 7 deletions(-) diff --git a/.github/workflows/smoke-codex.lock.yml b/.github/workflows/smoke-codex.lock.yml index 0b7c8bfa0ef..72a31a63a28 100644 --- a/.github/workflows/smoke-codex.lock.yml +++ b/.github/workflows/smoke-codex.lock.yml @@ -1,4 +1,4 @@ -# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"6490f0055ab7144941c2953acc5b8184e6aa171d8b35a4846f74a317e88bb83a","body_hash":"0aab91539d6958fcb52ce9bd406485ac2d4c28a9ee69c4c4fcc364480d39ac75","strict":true,"agent_id":"codex","engine_versions":{"codex":"0.144.6"}} +# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"6490f0055ab7144941c2953acc5b8184e6aa171d8b35a4846f74a317e88bb83a","body_hash":"16c0156dc8c0f02c612041c0d8c260d6a93db184c1ee3cf750c1d3df93504916","strict":true,"agent_id":"codex","engine_versions":{"codex":"0.144.6"}} # gh-aw-manifest: {"version":1,"secrets":["CODEX_API_KEY","COPILOT_GITHUB_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GH_AW_OTEL_GRAFANA_AUTHORIZATION","GH_AW_OTEL_GRAFANA_ENDPOINT","GH_AW_OTEL_SENTRY_AUTHORIZATION","GH_AW_OTEL_SENTRY_ENDPOINT","GITHUB_TOKEN","OPENAI_API_KEY"],"actions":[{"repo":"actions-ecosystem/action-add-labels","sha":"c96b68fec76a0987cd93957189e9abd0b9a72ff1","version":"v1.1.3"},{"repo":"actions/cache/restore","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/cache/save","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/checkout","sha":"9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0","version":"v7.0.0"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-go","sha":"b7ad1dad31e06c5925ef5d2fc7ad053ef454303e","version":"v7.0.0"},{"repo":"actions/setup-node","sha":"820762786026740c76f36085b0efc47a31fe5020","version":"v7.0.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.27.38","digest":"sha256:cb928eb62d9139a013c2d278dab19af232d35a2d83dca71a3d98eb431f786243","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.27.38@sha256:cb928eb62d9139a013c2d278dab19af232d35a2d83dca71a3d98eb431f786243"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.38","digest":"sha256:cd6145620d96acee46e1ede25180a13aa36002467e663db0caa453a8bc8eb60c","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.38@sha256:cd6145620d96acee46e1ede25180a13aa36002467e663db0caa453a8bc8eb60c"},{"image":"ghcr.io/github/gh-aw-firewall/cli-proxy:0.27.38","digest":"sha256:c30c5319da37505d42f95cb3faa2cfa55e794ccb5cc805dbd9201410d1ac2a3e","pinned_image":"ghcr.io/github/gh-aw-firewall/cli-proxy:0.27.38@sha256:c30c5319da37505d42f95cb3faa2cfa55e794ccb5cc805dbd9201410d1ac2a3e"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.27.38","digest":"sha256:6c19094d95aad5f9f128ad5e583f0f2b894b158aa66c3b86dd9bcc90970a2917","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.27.38@sha256:6c19094d95aad5f9f128ad5e583f0f2b894b158aa66c3b86dd9bcc90970a2917"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.4.3","digest":"sha256:3c744710ea275cd5ee65db92a1099e0d980754bd9fafda9ce67704c67004dc83","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.4.3@sha256:3c744710ea275cd5ee65db92a1099e0d980754bd9fafda9ce67704c67004dc83"},{"image":"ghcr.io/github/gh-aw-node","digest":"sha256:529d02eb970b1161aa25c593a9c3df57fdfad5a8add328cb3b6eccef66f3183b","pinned_image":"ghcr.io/github/gh-aw-node@sha256:529d02eb970b1161aa25c593a9c3df57fdfad5a8add328cb3b6eccef66f3183b"},{"image":"ghcr.io/github/github-mcp-server:v1.6.0","digest":"sha256:2b0c48b070f61e9d3969269ead600f62d00fb237b60ac849ef3d166ee7de9ad3","pinned_image":"ghcr.io/github/github-mcp-server:v1.6.0@sha256:2b0c48b070f61e9d3969269ead600f62d00fb237b60ac849ef3d166ee7de9ad3"},{"image":"ghcr.io/github/serena-mcp-server:latest","digest":"sha256:bf343399e3725c45528f531a230f3a04521d4cdef29f9a5af6282ff0d3c393c5","pinned_image":"ghcr.io/github/serena-mcp-server:latest@sha256:bf343399e3725c45528f531a230f3a04521d4cdef29f9a5af6282ff0d3c393c5"}],"has_pull_request":true} # This file was automatically generated by gh-aw. DO NOT EDIT. To debug this workflow, load the skill at https://github.com/github/gh-aw/blob/main/debug.md # diff --git a/.github/workflows/smoke-codex.md b/.github/workflows/smoke-codex.md index 8a6b028ebe9..7373ed3dbb3 100644 --- a/.github/workflows/smoke-codex.md +++ b/.github/workflows/smoke-codex.md @@ -120,12 +120,16 @@ features: 10. **Set Issue Field Testing**: - After creating the smoke-test issue, use `set_issue_field` exactly once on that new issue - Reference the created issue using the `temporary_id` declared on the `create_issue` output: set `issue_number: '#aw_smoke_issue'` in the `set_issue_field` message - - Discover available issue fields and choose one compatible field/value pair: + - **Before choosing a field**, run this bash command to discover available fields (do NOT guess field names): + ``` + OWNER="${GITHUB_REPOSITORY%%/*}" && REPO="${GITHUB_REPOSITORY##*/}" && gh api graphql -f query='query($owner:String!,$repo:String!){repository(owner:$owner,name:$repo){issueFields(first:20){nodes{__typename ...on IssueFieldText{id name}...on IssueFieldNumber{id name}...on IssueFieldDate{id name}...on IssueFieldSingleSelect{id name options{id name}}}}}}' -f owner="$OWNER" -f repo="$REPO" + ``` + - From the returned list, choose ONE field/value pair: + - date field → today's date in `YYYY-MM-DD` format (prefer this type) - text field → short text value - number field → numeric value - - date field → `YYYY-MM-DD` - - single-select field → an existing option name - - If no editable issue fields are available, report this test as skipped with reason + - single-select field → an existing option name exactly as returned + - If the discovery command fails or returns no fields, report this test as skipped with reason ## Output diff --git a/actions/setup/js/safe_output_handler_manager.cjs b/actions/setup/js/safe_output_handler_manager.cjs index 3164ca7ab1f..c6b37038fbf 100644 --- a/actions/setup/js/safe_output_handler_manager.cjs +++ b/actions/setup/js/safe_output_handler_manager.cjs @@ -667,8 +667,14 @@ function isFailedProcessingResult(result) { return Boolean(result?.success === false && !result?.deferred && !result?.skipped && !result?.cancelled); } -/** Types whose failures are surfaced as warnings rather than failing the safe_outputs job. */ -const REPORT_ONLY_FAILURE_TYPES = new Set(["assign_to_agent", "upload_artifact"]); +/** + * Types whose failures are surfaced as warnings rather than failing the safe_outputs job. + * - assign_to_agent: agent assignment can fail after other safe outputs already succeeded. + * - upload_artifact: artifact uploads are best-effort and non-critical. + * - set_issue_field: project-board fields can drift (renamed/removed); a bad field write + * should not sink an otherwise-successful safe-outputs batch. + */ +const REPORT_ONLY_FAILURE_TYPES = new Set(["assign_to_agent", "upload_artifact", "set_issue_field"]); /** * Determine whether a failed result should be reported without failing the safe_outputs job. @@ -676,6 +682,8 @@ const REPORT_ONLY_FAILURE_TYPES = new Set(["assign_to_agent", "upload_artifact"] * are surfaced through dedicated outputs and summaries instead of failing the entire job. * Artifact uploads are best-effort and non-critical: a failed upload should not fail an * otherwise-successful run. + * Issue field writes target project-board fields that can drift over time; a single bad + * field write should not sink an otherwise-successful safe-outputs batch. * * @param {{type?: string, success?: boolean, deferred?: boolean, skipped?: boolean, cancelled?: boolean}|null|undefined} result * @returns {boolean} diff --git a/actions/setup/js/safe_output_handler_manager.test.cjs b/actions/setup/js/safe_output_handler_manager.test.cjs index 8fd1750adf9..0a6a94e95cb 100644 --- a/actions/setup/js/safe_output_handler_manager.test.cjs +++ b/actions/setup/js/safe_output_handler_manager.test.cjs @@ -186,6 +186,43 @@ describe("Safe Output Handler Manager", () => { expect(reportOnlyFailures).toEqual([{ type: "upload_artifact", success: false, error: "artifact twirp CreateArtifact failed (400)" }]); expect(fatalFailures).toEqual([{ type: "create_issue", success: false, error: "Validation failed" }]); }); + + it("treats failed set_issue_field results as report-only", () => { + expect( + isReportOnlyFailureResult({ + type: "set_issue_field", + success: false, + }) + ).toBe(true); + }); + + it("does not treat skipped or cancelled set_issue_field results as report-only", () => { + expect( + isReportOnlyFailureResult({ + type: "set_issue_field", + success: false, + skipped: true, + }) + ).toBe(false); + expect( + isReportOnlyFailureResult({ + type: "set_issue_field", + success: false, + cancelled: true, + }) + ).toBe(false); + }); + + it("partitions set_issue_field failures as report-only, not fatal", () => { + const { fatalFailures, reportOnlyFailures } = partitionFailureResults([ + { type: "set_issue_field", success: false, error: 'Issue field "Status" not found.' }, + { type: "create_issue", success: false, error: "Validation failed" }, + { type: "create_discussion", success: true }, + ]); + + expect(reportOnlyFailures).toEqual([{ type: "set_issue_field", success: false, error: 'Issue field "Status" not found.' }]); + expect(fatalFailures).toEqual([{ type: "create_issue", success: false, error: "Validation failed" }]); + }); }); describe("loadHandlers", () => { From 7a371f955929dcf9f39f93d32d000d9c5ad35cb1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 23 Jul 2026 12:08:37 +0000 Subject: [PATCH 3/3] fix: rename 'Reported assignment failures' to 'Non-fatal failures (reported only)' in summary Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com> --- actions/setup/js/safe_output_handler_manager.cjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/setup/js/safe_output_handler_manager.cjs b/actions/setup/js/safe_output_handler_manager.cjs index c6b37038fbf..a7d8a2cb466 100644 --- a/actions/setup/js/safe_output_handler_manager.cjs +++ b/actions/setup/js/safe_output_handler_manager.cjs @@ -1616,7 +1616,7 @@ async function main() { core.info(`Successful: ${successCount}`); core.info(`Failed: ${failureCount}`); if (reportOnlyFailureCount > 0) { - core.info(`Reported assignment failures: ${reportOnlyFailureCount}`); + core.info(`Non-fatal failures (reported only): ${reportOnlyFailureCount}`); } if (cancelledCount > 0) { core.info(`Cancelled (code push failed): ${cancelledCount}`);