Skip to content

Correct upload_asset examples in shared chart prompts - #79899

Merged
pelikhan merged 5 commits into
mainfrom
copilot/fix-incorrect-safe-output-usage
Nov 22, 2026
Merged

pelikhan merged 5 commits into
mainfrom
copilot/fix-incorrect-safe-output-usage

Conversation

@gh-aw-bot

@gh-aw-bot gh-aw-bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

Two shared chart prompts included a type field in upload_asset arguments, which the tool rejects and can cause avoidable validation failures.

  • Prompt examples: Remove type from both examples and note that the tool rejects it.
  • Valid payload:
    { "path": "/tmp/gh-aw/python/charts/trend.png" }

gh-aw-bot and others added 2 commits November 21, 2026 21:53
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
@gh-aw-bot gh-aw-bot changed the title [WIP] Fix incorrect safe output usage in shared chart prompts Correct upload_asset examples in shared chart prompts Nov 21, 2026
@pelikhan
pelikhan marked this pull request as ready for review November 21, 2026 22:14
Copilot AI adaptive review requested due to automatic review settings November 21, 2026 22:14
@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

🧪 Test quality analysis by Test Quality Sentinel · copilot · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ⊞ 7.2K · ◷

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Specification Reviewer completed successfully!

PR Specification Reviewer

Outcome: reported_action

The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated by PR Specification Reviewer for #79899 · copilot · gpt56 · ~3 AIC · ⌖ ~2 AIC · ⊞ 1.7K · ◷

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

PR Code Quality Reviewer

Outcome: reported_action

The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt56 · ~3 AIC · ⌖ ~2 AIC · ⊞ 1.6K · ◷

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated by Ponytail Reviewer for #79899 · codex · routed: gpt61 medium · ~3 AIC · ⌖ ~1 AIC · ⊞ 185 · ◷

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~6 AIC · ⌖ ~2 AIC · ⊞ 6.6K · ◷

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (pr-code-quality-reviewer)
reviewed_at: 2026-11-21T22:18:06Z
review_event: COMMENT
top_themes:
  - documentation/runtime behavior mismatch
files_reviewed:
  - .github/workflows/shared/python-dataviz.md
  - .github/workflows/shared/trending-charts-simple.md
comment_count: 1
History

Note

This comment is managed by comment memory.

Expand the saved memory block to view or edit the persistent context for this thread.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~2 AIC · ⊞ 1.6K · ◷
Comment /review to run again

@github-actions github-actions Bot 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.

Found one documentation correctness issue: the new note describes rejection, while gh-aw sanitizes unknown arguments by stripping them. See the inline comment; please align wording with runtime behavior.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~2 AIC · ⊞ 1.6K
Comment /review to run again

**Upload**:
1. `plt.savefig('/tmp/gh-aw/python/charts/my_chart.png', dpi=300, bbox_inches='tight')`
2. `{ "type": "upload_asset", "path": "/tmp/gh-aw/python/charts/my_chart.png" }`
2. `{ "path": "/tmp/gh-aw/python/charts/my_chart.png" }` — do not include a `type` field; the tool rejects it.

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.

The new note says upload_asset rejects a type field, but gh-aw's strict-argument sanitizer strips unknown keys before invocation; this inaccurate claim can mislead workflow authors about what failure to expect.

💡 Make the guidance match runtime behavior

Please say that type must be omitted (or that unknown keys are stripped), unless this prompt is specifically documenting a downstream direct-tool validation path. Apply the same wording correction in trending-charts-simple.md.

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.

Updated both prompt notes: omit type; the schema accepts path plus optional secrecy and integrity. Commit: 7c7f32c7.

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (spec-review-history)
{"id":"ldg-15f789df-986d-4125-a5ca-94ad1586bc01","parents":[],"payload":{"id":"ldg-edc2dcc3-7b23-4046-a58f-93ed8d2014f4","operation":"append","value":{"finding_count":0,"head_sha":"810af263e3488310f680ff955a0f68b6907ad8f1","outcome":"aligned"}},"sha":"sha256:39a3f00e42bf210b71ced28fe2031d5c5c229e4704588c627fa08e299ab69c57","timestamp":"2026-11-21T22:21:37.849Z","type":"ledger_append","version":1}
History

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (review-history)
{"id":"ldg-733174de-8b2b-4221-b23e-d83b39895045","parents":[],"payload":{"id":"ldg-4da63cc3-6a19-4fa4-88ff-73811efe736b","operation":"append","value":{"finding_count":1,"head_sha":"810af263e3488310f680ff955a0f68b6907ad8f1","outcome":"findings"}},"sha":"sha256:0e2066af74b748816e980bad0aa559eff28e692a99f6ac28242ad419e176c0c8","timestamp":"2026-11-21T22:23:12.319Z","type":"ledger_append","version":1}
History

@github-actions github-actions Bot 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.

Skills-Based Review 🧠

Applied /diagnosing-bugs to the prompt changes. The payload fix is correct, but the stated reason is wrong, so requesting changes to the wording.

📋 Key Findings

Issues

  • Incorrect rationale (both files): The new notes say the tool "rejects" a type field. It does not. The strict-schema wrapper in safe_outputs_tools_loader.cjs (sanitizeArgsBySchema) silently strips unknown keys, and a probe confirmed the handler receives only path. The PR body repeats the claim ("can cause avoidable validation failures"). Agents reading this prompt will believe a call with type fails when it actually succeeds.

Positive Highlights

  • ✅ Removing type from the examples matches the schema (required: ["path"]).
  • ✅ Both stale examples are updated; no other "type": "upload_asset" examples remain in prompts.

Uncertainties

  • The pre-fetched file list includes several .lock.yml changes unrelated to upload_asset. I could not verify them because the local git fetch failed.

Update the wording in both prompt files and in the PR body to say the field is ignored, or simply omit the note. @copilot please address the review comments above.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~6 AIC · ⌖ ~2 AIC · ⊞ 6.6K
Comment /matt to run again

**Upload**:
1. `plt.savefig('/tmp/gh-aw/python/charts/my_chart.png', dpi=300, bbox_inches='tight')`
2. `{ "type": "upload_asset", "path": "/tmp/gh-aw/python/charts/my_chart.png" }`
2. `{ "path": "/tmp/gh-aw/python/charts/my_chart.png" }` — do not include a `type` field; the tool rejects it.

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.

[/diagnosing-bugs] The stated reason is wrong: upload_asset silently drops a stray type (see sanitizeArgsBySchema in safe_outputs_tools_loader.cjs) rather than rejecting it.

💡 Suggested wording

Replace the note with: Omit type; the schema accepts only path, plus optional secrecy and integrity.

I confirmed with a probe that the handler receives only path. The payload fix is correct; only the explanation needs correcting here and in the PR body.

@copilot please address this.

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.

Updated both prompt notes to explain that type should be omitted and the schema accepts path plus optional secrecy and integrity. Commit: 7c7f32c7. I couldn’t edit the PR description with the available tools.

{ "path": "/tmp/gh-aw/python/charts/trend.png" }
```

Do not include a `type` field; the `upload_asset` tool rejects it.

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.

[/diagnosing-bugs] Same incorrect claim as in python-dataviz.md: the tool drops type rather than rejecting it. Use the same corrected wording in both files.

💡 Suggested wording

Replace the sentence with: Omit type; the schema accepts only path, plus optional secrecy and integrity.

@copilot please address this.

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.

Updated both prompt notes: omit type; the schema accepts path plus optional secrecy and integrity. Commit: 7c7f32c7.

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.

🔵 Needs a closer look

Human review is needed because protected shared workflow prompts and generated locks affect multiple scheduled workflows, with a missing transitive lock and incomplete validation due to unavailable scanners and unrelated compilation failures.

No open issues 🎉

What changed in this PR

This pull request corrects shared upload_asset examples so agents provide only the supported path argument, preventing avoidable tool-validation failures. It also updates generated workflow locks for affected consumers.

Changes:

  • Removed the invalid type field from both shared chart prompt examples.
  • Added guidance that upload_asset rejects the type field.
  • Refreshed dependent workflow lock metadata; two locks also include PageIndex dependency and cache changes.
File Description
.github/​workflows/​spec-librarian.lock.yml Updates generated PageIndex dependency-installation and cache-invalidation data alongside workflow lock metadata.
.github/​workflows/​shared/​trending-charts-simple.md Corrects the chart upload example to use a path-only payload and documents the rejected type field.
.github/​workflows/​shared/​python-dataviz.md Corrects the shared upload_asset example to use the supported path-only payload and adds explanatory guidance.
.github/​workflows/​org-health-report.lock.yml Refreshes generated workflow metadata for the updated shared chart prompts.
.github/​workflows/​github-mcp-structural-analysis.lock.yml Refreshes generated workflow metadata for the updated shared chart prompts.
.github/​workflows/​daily-spending-forecast.lock.yml Refreshes generated workflow metadata for the updated shared chart prompts.
.github/​workflows/​daily-security-observability.lock.yml Refreshes generated workflow metadata for the updated shared chart prompt imports.
.github/​workflows/​daily-experiment-report.lock.yml Refreshes generated workflow metadata for the updated shared chart prompts.
.github/​workflows/​daily-doc-updater.lock.yml Updates generated PageIndex dependency-installation and cache-invalidation data alongside workflow lock metadata.
.github/​workflows/​copilot-pr-nlp-analysis.lock.yml Refreshes generated workflow metadata for the updated shared chart prompts.

Review effort: Lite (adaptive)

@gh-aw-bot

Copy link
Copy Markdown
Collaborator Author

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Review (.github/workflows/shared/python-dataviz.md:93): address unresolved feedback - Review comment
  3. Review (.github/workflows/shared/python-dataviz.md:93): address unresolved feedback - Review comment
  4. Review (.github/workflows/shared/trending-charts-simple.md:115): address unresolved feedback - Review comment

Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering.

Structured data
{
  "completed_task": 0,
  "head": "810af263e3488310f680ff955a0f68b6907ad8f1",
  "kind": "requested",
  "schema_version": "1",
  "state": "f4be16d2ff64da6265130e13c5bc927abeb9b6ed221db8f00397d36684f9beb2",
  "work": [
    "090f8b49139c68f62513737d54cf8f37622f75085d715bc26d7f0a24015d038e",
    "3ffc2d9f52f59e31a5765888764c2530099d2d11a8fcfa999f96a1294ef6b892",
    "ccfe662b3345669978b0ed39ad8d85036e441c7202fa66a161fd9574942ea8c1"
  ],
  "workflow": "pr-sous-chef"
}

Generated by 👨🍳 PR Sous Chef · pi · routed: haiku55 xhigh · ~2 AIC · ⌖ ~2 AIC · ⊞ 7K · ◷
Comment /souschef to run again

gh-aw-bot and others added 2 commits November 21, 2026 23:10
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…-safe-output-usage

# Conflicts:
#	.github/workflows/daily-spending-forecast.lock.yml

Co-authored-by: copilot-swe-agent[bot] <[email protected]>

Copilot AI commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:...

Merged the latest main and resolved the generated-lock conflict. Updated both shared prompt notes and recompiled all 370 workflows successfully; commit 7c7f32c7 is pushed. The PR description still has the old wording because the available tools do not expose PR-body editing.

@pelikhan
pelikhan merged commit bbda8c1 into main Nov 22, 2026
55 checks passed
@pelikhan
pelikhan deleted the copilot/fix-incorrect-safe-output-usage branch November 22, 2026 01:54
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.

[safeoutputs] Fix incorrect safe output usage in shared chart prompts (upload_asset)

4 participants