Skip to content

fix: non-fatal create_issue + verbatim image URL enforcement for agentic-optimization-kit#28021

Closed
Copilot wants to merge 2 commits into
mainfrom
copilot/investigate-missing-images-issue-creation
Closed

fix: non-fatal create_issue + verbatim image URL enforcement for agentic-optimization-kit#28021
Copilot wants to merge 2 commits into
mainfrom
copilot/investigate-missing-images-issue-creation

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 23, 2026

Run 24824838890 surfaced two bugs: one chart image in discussion #28014 had a broken URL (agent reconstructed the URL from the SHA instead of copying the returned url field, introducing a single hex digit error), and the escalation create_issue failed with a rate-limit 403 — causing the entire safe_outputs job to fail even though the main discussion was successfully created.

Image URL enforcement

  • shared/trending-charts-simple.md: Shows the exact upload_asset response shape and requires copying the url field verbatim. Explicit warning against reconstructing from sha or file path.
  • agentic-optimization-kit.md Phase 4: Same instruction inline — capture the returned url immediately after each upload before building the report body.
// upload_asset response — copy `url` exactly, never derive it from `sha`
{ "type": "upload_asset", "url": "https://github.com/.../abc123.png?raw=true", "sha": "abc123...", "size": 140936 }

non-fatal create_issue mode

Adds a non-fatal: true option to create-issue safe-outputs so transient API failures (rate limits, 5xx) degrade to a warning rather than failing the job.

  • CreateIssuesConfig (create_issue.go): new NonFatal bool field (non-fatal: in YAML).
  • Handler registry (compiler_safe_outputs_handlers.go): wires non_fatal into the serialized GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG JSON.
  • Schema (main_workflow_schema.json): adds non-fatal property to create-issue (schema has additionalProperties: false).
  • create_issue.cjs: returns { success: false, nonFatal: true } and logs core.warning instead of core.error when config.non_fatal is set.
  • safe_output_handler_manager.cjs: extracts isCriticalFailure() predicate; excludes nonFatal results from failureCount and core.setFailed(). Logs a nonFatalCount warning line in the processing summary.
  • agentic-optimization-kit.md: adds non-fatal: true to its create-issue config — escalation issues are best-effort and shouldn't block the run.

Copilot AI and others added 2 commits April 23, 2026 10:25
…tim image URL guidance

- trending-charts-simple.md: show upload_asset response format; require copying
  the `url` field verbatim — never reconstruct from sha or file path
- agentic-optimization-kit.md Phase 4: reinforce using only returned URLs;
  add `non-fatal: true` to create-issue so rate-limit 403 doesn't fail the job
- create_issue.go: add NonFatal bool field to CreateIssuesConfig
- compiler_safe_outputs_handlers.go: wire non_fatal into create_issue handler JSON
- main_workflow_schema.json: add non-fatal property to create-issue schema
- create_issue.cjs: return {nonFatal: true} on catch when non_fatal configured
- safe_output_handler_manager.cjs: exclude nonFatal results from failureCount,
  log as warning instead of error, add nonFatalCount to summary"

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/5898d83f-2723-4a71-a5ba-cf522948158f

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
…rn in create_issue.cjs

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/5898d83f-2723-4a71-a5ba-cf522948158f

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
@mnkiefer
Copy link
Copy Markdown
Collaborator

  • Not needed

@mnkiefer mnkiefer closed this Apr 23, 2026
@github-actions github-actions Bot deleted the copilot/investigate-missing-images-issue-creation branch May 4, 2026 03:00
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.

2 participants