Skip to content

Allow shared workflow partials to define and merge sandbox.agent.mounts#44500

Merged
pelikhan merged 8 commits into
mainfrom
copilot/feat-support-sandbox-field
Jul 10, 2026
Merged

Allow shared workflow partials to define and merge sandbox.agent.mounts#44500
pelikhan merged 8 commits into
mainfrom
copilot/feat-support-sandbox-field

Conversation

Copilot AI commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Shared workflow partials could not declare sandbox, forcing every consuming main workflow to duplicate mount declarations. This change allows partials to carry sandbox.agent.mounts and merges mounts from imports + main workflow with deduped union semantics.

  • Shared-workflow schema/validation surface

    • Removed sandbox from shared-workflow forbidden frontmatter fields so partials can declare sandbox config directly.
  • Import aggregation

    • Extended import extraction to collect sandbox.agent.mounts from imported partials.
    • Added MergedSandboxAgentMounts to import-processing output.
  • Compiler merge semantics

    • Added sandbox merge step in engine/import setup:
      • union imported mounts with main workflow mounts
      • deduplicate entries
      • preserve sandbox.agent: false behavior (no mount injection when agent sandbox is disabled)
  • Resulting behavior

    • Partial-local tool setup + mount declarations now remain co-located and propagate automatically to consumers.
# shared/setup-my-cli.md
---
sandbox:
  agent:
    mounts:
      - ${MY_CLI_PATH}/my-cli:${MY_CLI_PATH}/my-cli:ro
steps:
  - name: Set up my-cli
    uses: my-org/setup-my-cli@v2
---

# main workflow
---
on: issues
imports:
  - ./setup-my-cli.md
sandbox:
  agent:
    mounts:
      - /custom/main-mount:/custom/main-mount:ro
---

Compiled AWF invocation now includes the deduped union of both mount lists.


Generated by 👨‍🍳 PR Sous Chef · 8.9 AIC · ⌖ 5.99 AIC · ⊞ 4.7K ·
Comment /souschef to run again


Generated by 👨‍🍳 PR Sous Chef · 6.57 AIC · ⌖ 6.74 AIC · ⊞ 7.1K ·
Comment /souschef to run again


Generated by 👨‍🍳 PR Sous Chef · 9.71 AIC · ⌖ 6.72 AIC · ⊞ 7.1K ·
Comment /souschef to run again

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for sandbox field in shared workflow partials Allow shared workflow partials to define and merge sandbox.agent.mounts Jul 9, 2026
Copilot AI requested a review from pelikhan July 9, 2026 06:07
@pelikhan pelikhan marked this pull request as ready for review July 9, 2026 10:55
Copilot AI review requested due to automatic review settings July 9, 2026 10:55

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 enables shared (imported) workflow partials to declare sandbox.agent.mounts and have those mounts merged into the consuming main workflow’s sandbox configuration with union + deduplication semantics, while preserving sandbox.agent: false behavior.

Changes:

  • Allowed sandbox in shared workflow frontmatter by removing it from SharedWorkflowForbiddenFields.
  • Extended import processing to extract and aggregate sandbox.agent.mounts across imports into MergedSandboxAgentMounts.
  • Added a compiler merge step that unions imported mounts with main-workflow mounts (deduped) and skips injection when the agent sandbox is explicitly disabled.
Show a summary per file
File Description
pkg/workflow/sandbox.go Adds merge helper to union imported mounts into the effective sandbox config.
pkg/workflow/sandbox_test.go Adds unit coverage for mount merge behavior (nil config, dedupe, disabled agent).
pkg/workflow/imports_test.go Adds integration-style compile test asserting mounts appear once in the lock output.
pkg/workflow/compiler_orchestrator_engine.go Wires imported mount merge into engine/import setup flow.
pkg/parser/import_processor.go Extends ImportsResult to carry merged sandbox agent mounts from imports.
pkg/parser/import_field_extractor.go Extracts/dedupes sandbox.agent.mounts from imported frontmatter into the accumulator/result.
pkg/constants/constants.go Removes sandbox from shared-workflow forbidden fields list (schema surface change).

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 7/7 changed files
  • Comments generated: 0
  • Review effort level: Low

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Test Quality Sentinel failed during test quality analysis.

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer is reviewing this pull request using Matt Pocock's engineering skills...

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Design Decision Gate 🏗️ failed during design decision gate check.

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

⚠️ PR Code Quality Reviewer failed during code quality review.

@pelikhan

pelikhan commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

@copilot run pr-finisher skill

Copilot AI commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

@copilot run pr-finisher skill

PR finisher complete. All three merge-ready conditions satisfied:

  • Reviews — no unresolved review threads; automated reviewer (copilot-pull-request-reviewer) left no action items.
  • Checks (local)make fmt, make lint (0 errors), make test-unit (all pass), make agent-report-progress (lock files in sync) all green.
  • Checks (CI) — stale after agent push; needs human re-trigger. No prior CI failures were open.
  • Mergeable — PR is open, not draft, no conflicts.

Hand-off: A maintainer needs to re-trigger CI (close/reopen, workflow_dispatch, or a push) before merging.

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

🤖 PR Triage — Run §29020837798

Field Value
Category feature
Risk 🟡 Medium
Score 68 / 100
Action 🔄 fast_track

Score breakdown: Impact 33 + Urgency 20 + Quality 15

Rationale: Clean ergonomic improvement — partials can now carry sandbox.agent.mounts, eliminating cross-workflow duplication. Small, focused diff (243 +/ 8 −) with clear description and dedup semantics. Removes friction for shared workflow authors. Review focus: merge semantics correctness.

Generated by 🔧 PR Triage Agent · 77.6 AIC · ⌖ 14.7 AIC · ⊞ 5.4K ·

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot please run the pr-finisher skill, make sure the branch is up to date, and rerun checks.

Generated by 👨‍🍳 PR Sous Chef · 12.1 AIC · ⌖ 6.75 AIC · ⊞ 4.7K ·
Comment /souschef to run again

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot please run the pr-finisher skill, address unresolved review comments, ensure the branch is up to date, and rerun checks.

Generated by 👨‍🍳 PR Sous Chef · 7.94 AIC · ⌖ 6.73 AIC · ⊞ 7.1K ·
Comment /souschef to run again

…sandbox-field

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

Copilot AI commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

@copilot please run the pr-finisher skill, address unresolved review comments, ensure the branch is up to date, and rerun checks.

...

PR finisher complete. All three merge-ready conditions satisfied:

  • Reviews — no unresolved review threads (0 inline comments from automated reviewer on 7/7 files).
  • Checks (local)make fmt, make lint (0 errors), make test-unit (all pass), make recompile (256/256 workflows compiled, 4 orphaned lock files removed after rename, lock files in sync), make agent-report-progress all green.
  • Checks (CI) — stale after agent push; needs human re-trigger. No prior product CI failures to fix.
  • Mergeable — PR is open, not draft, branch updated with 2 new main commits (merge commit 3e93a48), no conflicts.

Actions taken: Merged latest main (commits f2bff5d and 7833adf) into branch; recompiled 256 workflows (removed 4 orphaned lock files from test workflow renames).
Hand-off: A maintainer needs to re-trigger CI (close/reopen, workflow_dispatch, or push from a maintainer account) before merging.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

pr-sous-chef
@copilot please run the pr-finisher skill, address unresolved review comments, ensure the branch is up to date, and rerun checks.

Run: https://github.com/github/gh-aw/actions/runs/29065468296

Generated by 👨‍🍳 PR Sous Chef · 9.71 AIC · ⌖ 6.72 AIC · ⊞ 7.1K ·
Comment /souschef to run again

Copilot AI commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

pr-sous-chef
@copilot please run the pr-finisher skill, address unresolved review comments, ensure the branch is up to date, and rerun checks.
...

PR finisher complete. All three merge-ready conditions satisfied:

  • Reviews — no unresolved review threads (0 inline comments from automated reviewer on 7/7 files).
  • Checks (local)make fmt, make lint (0 errors), make test-unit (all pass), make agent-report-progress (256/256 workflows in sync) all green.
  • Checks (CI) — stale after agent push; needs human re-trigger. No prior product CI failures to fix.
  • Mergeable — PR is open, not draft, branch is up to date with main (head 3e93a48), no conflicts.

Actions taken: No code changes needed — branch was already up to date and all local validations pass.
Hand-off: A maintainer needs to re-trigger CI (close/reopen, workflow_dispatch, or push from a maintainer account) before merging.

@pelikhan

Copy link
Copy Markdown
Collaborator

@lpcox ang concern?

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot please run the pr-finisher skill, address unresolved review comments, and rerun checks once the branch is up to date.

Generated by 👨‍🍳 PR Sous Chef · 6.82 AIC · ⌖ 5.64 AIC · ⊞ 7.1K ·
Comment /souschef to run again

…sandbox-field

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

Copilot AI commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

@copilot please run the pr-finisher skill, address unresolved review comments, and rerun checks once the branch is up to date.

...

PR finisher complete. All three merge-ready conditions satisfied:

  • Reviews — no unresolved review threads (0 inline comments from automated reviewer on 7/7 files).
  • Checks (local)make fmt, make lint (0 errors), make test-unit (all pass), make agent-report-progress (256/256 workflows in sync) all green.
  • Checks (CI) — stale after agent push; needs human re-trigger. No prior product CI failures to fix.
  • Mergeable — PR is open, not draft, branch updated with 5 new main commits (merge commit f91c76b), no conflicts.

Actions taken: Merged latest main (5 commits including GHE SSH URL fix, dispatch-repository test fixture fix, docs updates) into branch.
Hand-off: A maintainer needs to re-trigger CI (close/reopen, workflow_dispatch, or push from a maintainer account) before merging.

@pelikhan pelikhan requested a review from lpcox July 10, 2026 04:43
@gh-aw-bot

Copy link
Copy Markdown
Collaborator

pr-sous-chef
@copilot please run the pr-finisher skill, confirm the branch is current, and rerun checks so this PR is ready for maintainer review.

Run: https://github.com/github/gh-aw/actions/runs/29072075004

Generated by 👨‍🍳 PR Sous Chef · 10.3 AIC · ⌖ 7.41 AIC · ⊞ 7.1K ·
Comment /souschef to run again

…sandbox-field

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

Copilot AI commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

pr-sous-chef
@copilot please run the pr-finisher skill, confirm the branch is current, and rerun checks so this PR is ready for maintainer review.
...

PR finisher complete. All three merge-ready conditions satisfied:

  • Reviews — no unresolved review threads (0 inline comments from automated reviewer on 7/7 files).
  • Checks (local)make fmt, make lint (0 errors), make test-unit (all pass), make agent-report-progress (256/256 workflows in sync) all green.
  • Checks (CI) — stale after agent push; needs human re-trigger. No prior product CI failures to fix.
  • Mergeable — PR is open, not draft, branch updated with 10 new main commits (merge commit d5b5514), no conflicts.

Actions taken: Merged latest main (10 commits including permissions consolidation, security architecture tests, yamllint fixes, model inventory updates) into branch; all local validations pass.
Hand-off: A maintainer needs to re-trigger CI (close/reopen, workflow_dispatch, or push from a maintainer account) before merging.

@pelikhan pelikhan merged commit 9eabba4 into main Jul 10, 2026
25 checks passed
@pelikhan pelikhan deleted the copilot/feat-support-sandbox-field branch July 10, 2026 06:44
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.82.8

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(shared-workflows): support sandbox field in shared workflow partials with merge semantics

4 participants