Skip to content

[safeoutputs] Clarify depends-on and upload_artifact source-path descriptions - #78148

Merged
pelikhan merged 3 commits into
mainfrom
fix/safe-output-tool-descriptions-depends-on-upload-artifact-af29b7b09c0138b7
Nov 16, 2026
Merged

pelikhan merged 3 commits into
mainfrom
fix/safe-output-tool-descriptions-depends-on-upload-artifact-af29b7b09c0138b7

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Summary

Analysis of agent sessions from the last 24 hours (460 aw_session.jsonl files) found two safe-output usage errors that the tool descriptions invite. No workflow prompt was at fault, so this PR changes tool descriptions only. No behavior changes.

Evidence

1. depends-on sent to tools that reject it (3 calls)

The shared depends-on schema is injected into every tool, including noop, report_*, upload_asset, call_workflow and push_repo_memory. Those tools reject it at runtime, and the injected description did not say so.

  • noop with {"depends-on":"so_vi61vCJFTnOw",...} returned depends-on is not supported for outputs that execute outside the safe-output handler manager (run 43658851341). The agent then reported noop as missing.
  • report_incomplete with depends-on returned the same error (run 43682323744).
  • report_incomplete with "depends-on":"" returned depends-on must be an output_id or a nonempty array... (run 43680790325).

2. upload_artifact path outside allowed roots (3 calls in 2 runs)

The description told agents that any absolute path would be auto-copied and used /tmp/gh-aw/charts/chart.png as the example. The handler only accepts files under GITHUB_WORKSPACE or the staging directory.

  • /tmp/gh-aw/agent/tlc-test-expert/evidence returned path is outside allowed source roots (run 43695584418).
  • /tmp/gh-aw/agent/rai-spec-review.md returned the same error. The agent then tried a relative path (file not found) and the staging path (rejected again) (run 43673655993).

Changes

  • actions/setup/js/safe_output_submission.cjs: the shared depends-on description now lists the tools that do not support it and says to omit it for them.
  • pkg/workflow/js/safe_outputs_tools.json and actions/setup/js/safe_outputs_tools.json (kept identical): the upload_artifact and path descriptions now state the allowed source roots, replace the misleading /tmp/gh-aw/... example, and say to copy files into the workspace first.
  • actions/setup/js/safe_output_submission.test.cjs: asserts the new depends-on wording.

Validation

  • Both JSON files parse and are byte-identical (diff).
  • node --check passes on safe_output_submission.cjs. A direct addDependencySchema call produced the expected description, and calling it twice was idempotent.
  • Not run: vitest and go test ./pkg/workflow. The sandbox has no node_modules and the package/Go module proxies fail TLS verification, so dependencies could not be installed. Please let CI run safe_output_submission.test.cjs, generate_safe_outputs_tools.test.cjs and the pkg/workflow tools-JSON parity test. The latter fixtures use expect.any(String) for the depends-on description, so a description-only change is not expected to break them.
  • make recompile was not run for the same reason. Lock files may embed these descriptions and may need regeneration by a maintainer.

Not addressed

  • add_comment failing on schedule triggers (5 calls): workflow configuration (target), not a schema issue.
  • safeoutputs invoked as an MCP tool with a command arg, push_to_pull_request_branch missing repo (1 call each): too few occurrences to act on.

🤖 Generated with [Claude Code]((claude.com/redacted)

Generated by ⚡ Daily Safe Output Tool Optimizer · claude · routed: sonnet55 high · ~67 AIC · ⌖ ~2 AIC · ⊞ 10K · ◷

  • expires on Nov 17, 2026, 1:10 PM UTC-08:00

@github-actions github-actions Bot added automated-analysis bug Something isn't working cookie Issue Monster Loves Cookies! safe-outputs tool-improvement labels Nov 15, 2026
@pelikhan
pelikhan marked this pull request as ready for review November 15, 2026 21:24
Copilot AI adaptive review requested due to automatic review settings November 15, 2026 21:24

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.

🟡 Changes recommended

The new test assertion covers only the first four names, leaving several newly specified unsupported-tool entries unverified and allowing regressions to pass.

1 open issue
What changed in this PR

This pull request clarifies safe-output tool descriptions so agents avoid unsupported depends-on arguments and invalid upload_artifact source paths. The changes update schema metadata and related tests without changing handler behavior.

Changes:

  • Documents safe-output types that reject depends-on.
  • Clarifies workspace and staging-directory restrictions for upload_artifact.
  • Keeps compiler and runtime tool-definition copies synchronized.
  • Updates dependency-description test coverage; review notes recommend covering the complete exclusion list and using RUNNER_TEMP rather than a hardcoded staging path.
File Description
pkg/​workflow/​js/​safe_outputs_tools.json Updates compiler-embedded upload_artifact and source-path descriptions with allowed-root guidance.
actions/​setup/​js/​safe_outputs_tools.json Mirrors the safe-output tool descriptions for runtime use, including artifact source-path guidance.
actions/​setup/​js/​safe_output_submission.test.cjs Adds assertions for the updated unsupported-depends-on description.
actions/​setup/​js/​safe_output_submission.cjs Updates the shared dependency schema description to identify tools that do not support depends-on.

Review effort: Lite (dynamic)

addDependencySchema(tool);
expect(tool.inputSchema.properties["depends-on"]).toEqual(dependencySchema);
expect(dependencySchema.description).toContain("Do not use ledger output IDs as prerequisites");
expect(dependencySchema.description).toMatch(/Not supported by noop, report_incomplete, report_missing_tool, report_missing_data/);

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 the assertion to cover the full unsupported-tool wording and merged the latest main. Commit: af2f76c.

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.

This thread has already been addressed in commit af2f76c.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@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 (actions/setup/js/safe_output_submission.test.cjs:21): 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": "fec8e4fc549802f3e9255fcf23d96a7a96c94562",
  "kind": "requested",
  "schema_version": "1",
  "state": "6b0efb6ca930e90f24d036f13393e160ece0cfd9595ef647f2ddf4740a87b302",
  "work": [
    "7bf3f547d112f25dd03cb232237dc96d967a71bfb24044cc4f51dae28626ce51"
  ],
  "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 15, 2026 21:57
…descriptions-depends-on-upload-artifact-af29b7b09c0138b7

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Copilot AI requested a review from gh-aw-bot November 15, 2026 22:14
@pelikhan
pelikhan merged commit 379ec73 into main Nov 16, 2026
84 checks passed
@pelikhan
pelikhan deleted the fix/safe-output-tool-descriptions-depends-on-upload-artifact-af29b7b09c0138b7 branch November 16, 2026 00:27
@github-actions

Copy link
Copy Markdown
Contributor Author

🎉 This pull request is included in a new release.

Release: v1.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated-analysis bug Something isn't working cookie Issue Monster Loves Cookies! safe-outputs tool-improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants