Repository navigation
[safeoutputs] Clarify depends-on and upload_artifact source-path descriptions - #78148
Conversation
There was a problem hiding this comment.
🟡 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_TEMPrather 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/); |
There was a problem hiding this comment.
Updated the assertion to cover the full unsupported-tool wording and merged the latest main. Commit: af2f76c.
There was a problem hiding this comment.
This thread has already been addressed in commit af2f76c.
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
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"
}
|
…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>
|
🎉 This pull request is included in a new release. Release: |

Summary
Analysis of agent sessions from the last 24 hours (460
aw_session.jsonlfiles) 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-onsent to tools that reject it (3 calls)The shared
depends-onschema is injected into every tool, includingnoop,report_*,upload_asset,call_workflowandpush_repo_memory. Those tools reject it at runtime, and the injected description did not say so.noopwith{"depends-on":"so_vi61vCJFTnOw",...}returneddepends-on is not supported for outputs that execute outside the safe-output handler manager(run 43658851341). The agent then reportednoopas missing.report_incompletewithdepends-onreturned the same error (run 43682323744).report_incompletewith"depends-on":""returneddepends-on must be an output_id or a nonempty array...(run 43680790325).2.
upload_artifactpath 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.pngas the example. The handler only accepts files underGITHUB_WORKSPACEor the staging directory./tmp/gh-aw/agent/tlc-test-expert/evidencereturnedpath is outside allowed source roots(run 43695584418)./tmp/gh-aw/agent/rai-spec-review.mdreturned 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 shareddepends-ondescription now lists the tools that do not support it and says to omit it for them.pkg/workflow/js/safe_outputs_tools.jsonandactions/setup/js/safe_outputs_tools.json(kept identical): theupload_artifactandpathdescriptions 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 newdepends-onwording.Validation
diff).node --checkpasses onsafe_output_submission.cjs. A directaddDependencySchemacall produced the expected description, and calling it twice was idempotent.vitestandgo test ./pkg/workflow. The sandbox has nonode_modulesand the package/Go module proxies fail TLS verification, so dependencies could not be installed. Please let CI runsafe_output_submission.test.cjs,generate_safe_outputs_tools.test.cjsand thepkg/workflowtools-JSON parity test. The latter fixtures useexpect.any(String)for thedepends-ondescription, so a description-only change is not expected to break them.make recompilewas not run for the same reason. Lock files may embed these descriptions and may need regeneration by a maintainer.Not addressed
add_commentfailing onscheduletriggers (5 calls): workflow configuration (target), not a schema issue.safeoutputsinvoked as an MCP tool with acommandarg,push_to_pull_request_branchmissingrepo(1 call each): too few occurrences to act on.🤖 Generated with [Claude Code]((claude.com/redacted)