Uh oh!
There was an error while loading. Please reload this page.
fix: relocate checkout manifest into safeoutputs/ so containerized safe-outputs MCP can read it - #40025
Conversation
…fe-outputs MCP can read it The safe-outputs MCP server now runs in a container that only bind-mounts $RUNNER_TEMP/gh-aw/safeoutputs (plus the workspace and /tmp/gh-aw). The checkout manifest was written as a sibling at $RUNNER_TEMP/gh-aw/checkout-manifest.json, so it was invisible inside the container. Manifest-first checkout resolution then fell back to an unreliable git scan and failed with 'Repository <owner>/<repo> not found in workspace', breaking create_pull_request and push_to_pull_request_branch. Write and read the manifest at $RUNNER_TEMP/gh-aw/safeoutputs/checkout-manifest.json so it lives inside the mounted directory. Fixes#40018
There was a problem hiding this comment.
Pull request overview
This PR fixes cross-repo safe-outputs handlers failing after the safe-outputs MCP server moved into a container by relocating the checkout manifest into the already bind-mounted safeoutputs/ directory under $RUNNER_TEMP/gh-aw/.
Changes:
- Write the checkout manifest to
$RUNNER_TEMP/gh-aw/safeoutputs/checkout-manifest.jsoninbuild_checkout_manifest.cjs. - Read the manifest from the same new default location in
checkout_manifest.cjs(while preservingGH_AW_CHECKOUT_MANIFESToverride behavior). - Update the Go-side comment, JS unit test expectation, and add a changeset documenting the behavioral fix.
Show a summary per file
| File | Description |
|---|---|
pkg/workflow/checkout_step_generator.go | Updates the documented manifest path to the new safeoutputs/ location. |
actions/setup/js/checkout_manifest.cjs | Changes the default manifest read path to .../safeoutputs/checkout-manifest.json and updates inline docs. |
actions/setup/js/build_checkout_manifest.test.cjs | Updates the test to assert the new manifest output path. |
actions/setup/js/build_checkout_manifest.cjs | Changes the manifest write directory to .../safeoutputs/ with rationale tied to container mounts. |
.changeset/patch-relocate-checkout-manifest-into-safeoutputs.md | Adds a patch changeset describing the fix and why it addresses the container visibility issue. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 5/5 changed files
- Comments generated: 0
✅ smoke-ci: safeoutputs CLI comment + comment-memory run (27752248931)
|
Comment MemoryNote This comment is managed by comment memory.It stores persistent context for this thread in the code block at the top of this comment.
|
fix: relocate checkout manifest into
safeoutputs/so containerized safe-outputs MCP can read itProblem
The safe-outputs MCP server runs in a container whose bind-mount covers only
$RUNNER_TEMP/gh-aw/safeoutputs/(plus the workspace and/tmp/gh-aw). The checkout manifest was written one level up at$RUNNER_TEMP/gh-aw/checkout-manifest.json, making it invisible inside the container. Manifest-first checkout resolution then fell back to an unreliable git scan and failed with:This broke
create_pull_requestandpush_to_pull_request_branch.Solution
Move the manifest write and read path from
$RUNNER_TEMP/gh-aw/checkout-manifest.jsonto
$RUNNER_TEMP/gh-aw/safeoutputs/checkout-manifest.jsonso the file lives inside the bind-mounted directory and is visible to the containerized safe-outputs MCP server.
Changes
actions/setup/js/build_checkout_manifest.cjscheckout-manifest.jsontosafeoutputs/subdirectory instead of the parentgh-aw/directory. Core fix.actions/setup/js/checkout_manifest.cjssafeoutputs/checkout-manifest.json; expands JSDoc to explain the bind-mount constraint. Core fix.actions/setup/js/build_checkout_manifest.test.cjsgh-aw/checkout-manifest.json→gh-aw/safeoutputs/checkout-manifest.jsonto match the new write location.pkg/workflow/checkout_step_generator.gosafeoutputs/..changeset/patch-relocate-checkout-manifest-into-safeoutputs.md5 files changed, 20 insertions(+), 8 deletions(-)
Risk
build_checkout_manifest.cjs,checkout_manifest.cjs(path change takes effect immediately on next setup run)checkout-manifest.jsonat the old path ($RUNNER_TEMP/gh-aw/) will be ignored; a fresh manifest will be written at the new path on nextsetupexecution. No migration needed.