Skip to content

fix: relocate checkout manifest into safeoutputs/ so containerized safe-outputs MCP can read it#40025

Merged
dsyme merged 1 commit into
mainfrom
fix/relocate-checkout-manifest-into-safeoutputs
Jun 18, 2026
Merged

fix: relocate checkout manifest into safeoutputs/ so containerized safe-outputs MCP can read it#40025
dsyme merged 1 commit into
mainfrom
fix/relocate-checkout-manifest-into-safeoutputs

Conversation

@dsyme

@dsyme dsyme commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

fix: relocate checkout manifest into safeoutputs/ so containerized safe-outputs MCP can read it

Problem

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:

Repository <owner>/<repo> not found in workspace

This broke create_pull_request and push_to_pull_request_branch.


Solution

Move the manifest write and read path from
$RUNNER_TEMP/gh-aw/checkout-manifest.json
to
$RUNNER_TEMP/gh-aw/safeoutputs/checkout-manifest.json

so the file lives inside the bind-mounted directory and is visible to the containerized safe-outputs MCP server.


Changes

File Type Description
actions/setup/js/build_checkout_manifest.cjs modified Writes checkout-manifest.json to safeoutputs/ subdirectory instead of the parent gh-aw/ directory. Core fix.
actions/setup/js/checkout_manifest.cjs modified Updates the default resolved manifest path constant to safeoutputs/checkout-manifest.json; expands JSDoc to explain the bind-mount constraint. Core fix.
actions/setup/js/build_checkout_manifest.test.cjs modified Updates path assertion in tests from gh-aw/checkout-manifest.jsongh-aw/safeoutputs/checkout-manifest.json to match the new write location.
pkg/workflow/checkout_step_generator.go modified Updates a Go comment to reflect the new canonical path and documents why it must live under safeoutputs/.
.changeset/patch-relocate-checkout-manifest-into-safeoutputs.md added Patch-level changeset entry recording this fix for release notes.

5 files changed, 20 insertions(+), 8 deletions(-)


Risk

  • Breaking change: No
  • Highest-impact files: build_checkout_manifest.cjs, checkout_manifest.cjs (path change takes effect immediately on next setup run)
  • Rollout note: Any existing checkout-manifest.json at the old path ($RUNNER_TEMP/gh-aw/) will be ignored; a fresh manifest will be written at the new path on next setup execution. No migration needed.

Generated by PR Description Updater for issue #40025 ·

…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
Copilot AI review requested due to automatic review settings June 18, 2026 10:08

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.

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.json in build_checkout_manifest.cjs.
  • Read the manifest from the same new default location in checkout_manifest.cjs (while preserving GH_AW_CHECKOUT_MANIFEST override 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

@github-actions

Copy link
Copy Markdown
Contributor

✅ smoke-ci: safeoutputs CLI comment + comment-memory run (27752248931)

Generated by 🧪 Smoke CI for issue #40025 ·

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

CI lights the path
Green checks bloom at dawn
Quiet bots still sing

Note

This comment is managed by comment memory.

It stores persistent context for this thread in the code block at the top of this comment.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

Generated by 🧪 Smoke CI for issue #40025 ·

@dsyme dsyme merged commit d47a037 into main Jun 18, 2026
52 checks passed
@dsyme dsyme deleted the fix/relocate-checkout-manifest-into-safeoutputs branch June 18, 2026 10:23
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.

2 participants