Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/blog-auditor.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .github/workflows/cloclo.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .github/workflows/daily-model-inventory.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .github/workflows/daily-multi-device-docs-tester.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .github/workflows/docs-noob-tester.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .github/workflows/slide-deck-maintainer.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .github/workflows/smoke-claude.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .github/workflows/smoke-codex.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .github/workflows/smoke-copilot-aoai-apikey.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .github/workflows/smoke-copilot-aoai-entra.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .github/workflows/smoke-copilot-arm.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .github/workflows/smoke-copilot.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .github/workflows/visual-regression-checker.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .github/workflows/weekly-editors-health-check.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 14 additions & 1 deletion pkg/workflow/compiler_main_job_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,22 @@ func (c *Compiler) buildMainJobOutputs(data *WorkflowData) map[string]string {
func (c *Compiler) buildMainJobEnv(data *WorkflowData) map[string]string {
var env map[string]string

// Disable the Chromium process sandbox for playwright CLI mode.
// GitHub Actions runners are containerised environments where kernel namespace
// sandboxing is unavailable, which causes playwright-cli to abort with
// "Playwright can't run in this sandbox environment".
if isPlaywrightCLIMode(data.Tools) {
if env == nil {
env = make(map[string]string)
}
env["PLAYWRIGHT_MCP_SANDBOX"] = "false"
}

if data.SafeOutputs != nil {
compilerMainJobLog.Printf("Configuring safe-outputs job env for main job (uploadAssets=%v)", data.SafeOutputs.UploadAssets != nil)
env = make(map[string]string)
if env == nil {
env = make(map[string]string)
}

// Set GH_AW_MCP_LOG_DIR for safe outputs MCP server logging
// Store in mcp-logs directory so it's included in mcp-logs artifact
Expand Down
34 changes: 34 additions & 0 deletions pkg/workflow/compiler_main_job_helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,40 @@ func TestBuildMainJobEnv(t *testing.T) {
require.NotNil(t, env)
assert.Contains(t, env["GH_AW_PROJECT_UTC"], "+05:30")
})

t.Run("playwright CLI mode sets PLAYWRIGHT_MCP_SANDBOX=false", func(t *testing.T) {
c := NewCompiler()
c.repoConfigLoaded = true
c.repoConfig = &RepoConfig{}
data := &WorkflowData{
Tools: map[string]any{
"playwright": map[string]any{
"mode": "cli",
},
},
}
env := c.buildMainJobEnv(data)
require.NotNil(t, env)
assert.Equal(t, "false", env["PLAYWRIGHT_MCP_SANDBOX"])
})

t.Run("safe-outputs with playwright CLI preserves PLAYWRIGHT_MCP_SANDBOX", func(t *testing.T) {
c := NewCompiler()
c.repoConfigLoaded = true
c.repoConfig = &RepoConfig{}
data := &WorkflowData{
Tools: map[string]any{
"playwright": map[string]any{
"mode": "cli",
},
},
SafeOutputs: &SafeOutputsConfig{},
}
env := c.buildMainJobEnv(data)
require.NotNil(t, env)
assert.Equal(t, "false", env["PLAYWRIGHT_MCP_SANDBOX"])
assert.Equal(t, "${{ github.event.repository.default_branch }}", env["DEFAULT_BRANCH"])
})
}

// TestBuildMainJobPermissions tests that permissions are built correctly.
Expand Down
2 changes: 1 addition & 1 deletion pkg/workflow/playwright_cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func TestGeneratePlaywrightCLIInstallSteps_DefaultVersionUsesCooldown(t *testing
},
})

require.Len(t, steps, 2, "expected npm install step plus skills install step")
require.Len(t, steps, 2, "expected npm install step and skills install step")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 0074767. The implementation intentionally uses job-level env (not an install step), and the stale mismatch concern is resolved by keeping tests aligned with that approach plus adding combined-mode regression coverage.


installStep := strings.Join(steps[0], "\n")
assert.Contains(t, installStep, "npm install -g @playwright/cli@"+string(constants.DefaultPlaywrightCLIVersion))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ jobs:
env:
GH_AW_RUNTIME_FEATURES: ${{ vars.GH_AW_RUNTIME_FEATURES }}
GH_AW_WORKFLOW_ID_SANITIZED: playwrightclimode
PLAYWRIGHT_MCP_SANDBOX: false
outputs:
agentic_engine_timeout: ${{ steps.detect-agent-errors.outputs.agentic_engine_timeout || 'false' }}
ai_credits_rate_limit_error: ${{ steps.parse-mcp-gateway.outputs.ai_credits_rate_limit_error || 'false' }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ jobs:
env:
GH_AW_RUNTIME_FEATURES: ${{ vars.GH_AW_RUNTIME_FEATURES }}
GH_AW_WORKFLOW_ID_SANITIZED: playwrightclimode
PLAYWRIGHT_MCP_SANDBOX: false
outputs:
agentic_engine_timeout: ${{ steps.detect-agent-errors.outputs.agentic_engine_timeout || 'false' }}
ai_credits_rate_limit_error: ${{ steps.parse-mcp-gateway.outputs.ai_credits_rate_limit_error || 'false' }}
Expand Down
Loading