Skip to content

Route Agent of the Day chart PNGs through upload-asset and enforce text-only PR patches#32403

Merged
pelikhan merged 2 commits into
mainfrom
copilot/agentrx-optimizer-daily-workflow-optimization-again
May 15, 2026
Merged

Route Agent of the Day chart PNGs through upload-asset and enforce text-only PR patches#32403
pelikhan merged 2 commits into
mainfrom
copilot/agentrx-optimizer-daily-workflow-optimization-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 15, 2026

✨ Enhancement

The Daily Agent of the Day workflow was failing downstream in safe_outputs because the prompt directed the agent to commit a PNG into the PR patch, creating a binary-heavy diff. This change aligns prompt instructions and safe-output policy so chart images are uploaded via upload-asset and PR patches remain text-only.

  • What does this improve?

    • Prevents create_pull_request patches from carrying binary image diffs.
    • Moves optional chart handling to the existing upload-asset safe-output path.
    • Enforces text-only PR scope for blog content changes.
  • Why is this valuable?

    • Fixes the structural prompt/policy mismatch that caused the workflow’s safe_outputs failure.
    • Adds an explicit guardrail so future runs fail early on invalid file scope rather than during push-side processing.
  • Implementation approach:

    • Updated .github/workflows/daily-agent-of-the-day-blog-writer.md:
      • safe-outputs.create-pull-request.allowed-files: docs/**docs/src/content/docs/**
      • Added hard requirement: create_pull_request must contain only text changes under docs/src/content/docs/**; binary assets must use upload-asset.
      • Rewrote Process §3 to emit chart PNG via a single upload-asset safe-output and use returned URL in markdown (no git add for PNGs).
    • Recompiled .github/workflows/daily-agent-of-the-day-blog-writer.lock.yml to apply the updated prompt and safe-output constraints.
safe-outputs:
  create-pull-request:
    allowed-files:
      - "docs/src/content/docs/**"
  upload-asset:
    max: 3
    allowed-exts: [.png, .jpg, .jpeg, .svg]

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix daily workflow optimization for blog writer Route Agent of the Day chart PNGs through upload-asset and enforce text-only PR patches May 15, 2026
Copilot AI requested a review from pelikhan May 15, 2026 14:42
@pelikhan pelikhan marked this pull request as ready for review May 15, 2026 14:43
Copilot AI review requested due to automatic review settings May 15, 2026 14:43
@pelikhan pelikhan merged commit c074bcc into main May 15, 2026
@pelikhan pelikhan deleted the copilot/agentrx-optimizer-daily-workflow-optimization-again branch May 15, 2026 14:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 Agent of the Day” blog-writer workflow instructions and compiled lockfile to prevent binary (PNG) files from being included in create_pull_request patches, routing images through the asset-upload safe-output instead.

Changes:

  • Narrow create-pull-request allowed-files from docs/** to docs/src/content/docs/**.
  • Update the workflow prompt to require text-only PR patches and direct chart PNG handling through the asset upload path.
  • Regenerate the compiled .lock.yml to apply updated prompt/safe-output constraints.
Show a summary per file
File Description
.github/workflows/daily-agent-of-the-day-blog-writer.md Tightens PR patch scope and updates instructions to avoid committing PNGs to PRs.
.github/workflows/daily-agent-of-the-day-blog-writer.lock.yml Recompiled workflow lockfile reflecting the updated safe-output config and prompt content.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 1

- one to optimize SEO metadata (`seoDescription`, `linkedPostText`).
- Use `agentic-workflows` `logs` and `audit` results as live evidence and include links to referenced issues/PRs.
- If a chart image is available, include it in the post.
- The `create_pull_request` patch must contain only text changes under `docs/src/content/docs/**`; never include binary assets in the PR patch — use `upload-asset` for those.
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.

[agentrx-optimizer] Daily Workflow Optimization - 2026-05-15

3 participants