Harden Daily Ambient Context Optimizer issue publication against placeholder and oversize payload failures#40508
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
Hey One thing that would strengthen this further:
If you'd like a hand adding coverage, you can assign this prompt to your coding agent:
|
There was a problem hiding this comment.
Pull request overview
This PR hardens the Daily Ambient Context Optimizer workflow’s issue-publication path so that placeholder/invalid create_issue calls and oversize bodies don’t trap the run in a dead-end failure (while still producing exactly one real report).
Changes:
- Increased
safe-outputs.create-issue.maxfrom 1 → 3 to permit bounded retries after invalid issue-creation attempts. - Tightened prompt guardrails to forbid placeholder/probe
create_issuecalls and to require validating final body content + size (targeting < 9500 UTF-8 bytes) before submission. - Added explicit retry guidance for body-size validation failures (shorten and retry with a compact, section-preserving report).
Show a summary per file
| File | Description |
|---|---|
.github/workflows/daily-ambient-context-optimizer.md |
Updates safe-output allowance and strengthens prompt sequencing/size/retry guardrails for create_issue. |
.github/workflows/daily-ambient-context-optimizer.lock.yml |
Recompiled workflow output reflecting the updated safe-output constraints 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
| - Never call `create_issue` with placeholders, probes, or test strings (for example `"."` or `"test"`). Call it only with the final intended title/body. | ||
| - Call `create_issue` only after validating your final body length and content. |
Daily Ambient Context Optimizer could enter a dead-end failure path by calling
create_issuewith a placeholder body first, then attempting a payload above the safe-output 10KB limit. This change tightens prompt constraints and allows bounded retries so a single invalid call does not consume the workflow’s only issue-creation attempt.Failure-mode hardening
safe-outputs.create-issue.maxfrom1to3for this workflow so invalid first attempts do not block recovery.Prompt guardrails for issue creation
create_issuecalls (e.g.".","test").create_issueonly after validating final body content and length.Body-size control + retry behavior
< 9500UTF-8 bytes) before submission to stay below safe-output limits.