From c98f38a0382b80211213c631530bdf2a5928b35c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 27 Apr 2026 23:30:01 +0000 Subject: [PATCH 1/3] Initial plan From fc3f097603dbb14ca0eeb35300a6acf9fcfe9496 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 27 Apr 2026 23:35:08 +0000 Subject: [PATCH 2/3] Initial plan for bash-over-MCP validation fix Agent-Logs-Url: https://github.com/github/gh-aw/sessions/4cb03645-8073-4867-aee9-3d829de3a9c5 Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com> --- pkg/actionpins/data/action_pins.json | 6 +++--- pkg/workflow/data/action_pins.json | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/actionpins/data/action_pins.json b/pkg/actionpins/data/action_pins.json index d58af0d9de..b3fc349a03 100644 --- a/pkg/actionpins/data/action_pins.json +++ b/pkg/actionpins/data/action_pins.json @@ -168,10 +168,10 @@ "version": "v2.2.0", "sha": "0c5077e51419868618aeaa5fe8019c62421857d6" }, - "ruby/setup-ruby@v1.305.0": { + "ruby/setup-ruby@v1.306.0": { "repo": "ruby/setup-ruby", - "version": "v1.305.0", - "sha": "0cb964fd540e0a24c900370abf38a33466142735" + "version": "v1.306.0", + "sha": "c4e5b1316158f92e3d49443a9d58b31d25ac0f8f" }, "super-linter/super-linter@v8.6.0": { "repo": "super-linter/super-linter", diff --git a/pkg/workflow/data/action_pins.json b/pkg/workflow/data/action_pins.json index d58af0d9de..b3fc349a03 100644 --- a/pkg/workflow/data/action_pins.json +++ b/pkg/workflow/data/action_pins.json @@ -168,10 +168,10 @@ "version": "v2.2.0", "sha": "0c5077e51419868618aeaa5fe8019c62421857d6" }, - "ruby/setup-ruby@v1.305.0": { + "ruby/setup-ruby@v1.306.0": { "repo": "ruby/setup-ruby", - "version": "v1.305.0", - "sha": "0cb964fd540e0a24c900370abf38a33466142735" + "version": "v1.306.0", + "sha": "c4e5b1316158f92e3d49443a9d58b31d25ac0f8f" }, "super-linter/super-linter@v8.6.0": { "repo": "super-linter/super-linter", From 44a19321c9502c53ae7604344ab6be075576d7e8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 27 Apr 2026 23:42:51 +0000 Subject: [PATCH 3/3] Replace end-of-session MCP validation with bash calls to prevent inactivity timeouts - go-logger.md: replace mcpscripts-make/go validation with bash, add early validation checkpoint - shared/go-make.md: update guidance to prefer bash for end-of-session validation - daily-cli-performance.md: replace mcpscripts bench-performance with make bash call - AGENTS.md: document bash-over-MCP rule for validation steps - Recompile all workflow lock files" Agent-Logs-Url: https://github.com/github/gh-aw/sessions/4cb03645-8073-4867-aee9-3d829de3a9c5 Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com> --- .github/workflows/daily-cli-performance.md | 12 +++--- .github/workflows/go-logger.md | 49 ++++++++++++++-------- .github/workflows/shared/go-make.md | 17 ++++++-- .github/workflows/smoke-claude.lock.yml | 17 ++++++-- AGENTS.md | 36 ++++++++++++++++ 5 files changed, 101 insertions(+), 30 deletions(-) diff --git a/.github/workflows/daily-cli-performance.md b/.github/workflows/daily-cli-performance.md index bbef64451f..549a099408 100644 --- a/.github/workflows/daily-cli-performance.md +++ b/.github/workflows/daily-cli-performance.md @@ -87,13 +87,13 @@ This workflow imports `shared/go-make.md` which provides: - **mcpscripts-go** - Execute Go commands (e.g., args: "test ./...", "build ./cmd/gh-aw") - **mcpscripts-make** - Execute Make targets (e.g., args: "build", "test-unit", "bench") -**IMPORTANT**: Always use these mcp-script tools for Go and Make commands instead of running them directly via bash. +**IMPORTANT**: Use **bash** for all benchmark and validation commands in this workflow. MCP connections time out after ~5 minutes of inactivity; the analysis phases in this workflow may exceed that threshold, causing end-of-phase MCP calls to fail with `MCP error -32003: context canceled`. Always prefer `make ` or `go ` in bash over `mcpscripts-*` tools in this workflow. ## Phase 1: Run Performance Benchmarks ### 1.1 Run Compilation Benchmarks -Run the benchmark suite and capture results using the **mcpscripts-make** tool: +Run the benchmark suite and capture results using **bash** (not mcpscripts — the MCP connection may time out during the analysis phases that follow): **Step 1**: Create directory for results @@ -101,11 +101,13 @@ Run the benchmark suite and capture results using the **mcpscripts-make** tool: mkdir -p /tmp/gh-aw/benchmarks ``` -**Step 2**: Run benchmarks using mcpscripts-make +**Step 2**: Run benchmarks using bash -Use the **mcpscripts-make** tool with args: "bench-performance" to run the critical performance benchmark suite. +```bash +make bench-performance +``` -This will execute `make bench-performance` which runs targeted performance benchmarks and saves results to `bench_performance.txt`. +This runs targeted performance benchmarks and saves results to `bench_performance.txt`. The targeted benchmarks include: - **Workflow compilation**: CompileSimpleWorkflow, CompileComplexWorkflow, CompileMCPWorkflow, CompileMemoryUsage diff --git a/.github/workflows/go-logger.md b/.github/workflows/go-logger.md index 0522d7a389..1004adee76 100644 --- a/.github/workflows/go-logger.md +++ b/.github/workflows/go-logger.md @@ -65,13 +65,16 @@ features: You are an AI agent that improves Go code by adding debug logging statements to help with troubleshooting and development. -## Available Safe-Input Tools +## Validation Commands -This workflow imports `shared/go-make.md` which provides: -- **mcpscripts-go** - Execute Go commands (e.g., args: "test ./...", "build ./cmd/gh-aw") -- **mcpscripts-make** - Execute Make targets (e.g., args: "build", "test-unit", "lint", "recompile") +Use **bash** for all build, test, and validation commands in this workflow. Do **not** use `mcpscripts-make` or `mcpscripts-go` for validation — MCP connections can time out after ~5 minutes of inactivity during long file-exploration phases, causing end-of-session validation to fail with `MCP error -32003: context canceled`. -Use these tools for consistent execution instead of running commands directly via bash. +```bash +make build # Build the project +make test-unit # Run unit tests +make recompile # Recompile workflows +DEBUG=* ./gh-aw compile dev # Test workflow compilation with debug logging +``` ## Efficiency First: Check Cache @@ -219,24 +222,33 @@ For each file: - Don't over-log - focus on the most useful information - Ensure messages are meaningful and helpful for debugging -### 5. Validate Changes +### 5. Early Validation (After First File) + +After editing your **first file**, run a quick build to catch compilation errors early — before spending time on more files: + +```bash +make build +``` + +This surfaces syntax errors or import issues immediately, saving time if the first edit has a problem. -After adding logging to the selected files, **validate your changes** before creating a PR: +### 6. Complete Validation (After All Files) + +After adding logging to **all selected files**, validate your changes before creating a PR: 1. **Build the project to ensure no compilation errors:** - Use the mcpscripts-make tool with args: "build" - - This will compile the Go code and catch any syntax errors or import issues. + ```bash + make build + ``` + This compiles the Go code and catches any syntax errors or import issues. 2. **Run unit tests to ensure nothing broke:** - Use the mcpscripts-make tool with args: "test-unit" - + ```bash + make test-unit + ``` This validates that your changes don't break existing functionality. 3. **Test the workflow compilation with debug logging enabled:** - Use the mcpscripts-go tool with args: "run ./cmd/gh-aw compile dev" - - Or you can run it directly with bash if needed: ```bash DEBUG=* ./gh-aw compile dev ``` @@ -246,9 +258,11 @@ After adding logging to the selected files, **validate your changes** before cre - Debug logging from your changes appears in the output 4. **If needed, recompile workflows:** - Use the mcpscripts-make tool with args: "recompile" + ```bash + make recompile + ``` -### 6. Create Pull Request +### 7. Create Pull Request After validating your changes: @@ -322,6 +336,7 @@ Before creating the PR, verify: - [ ] No duplicate logging with existing logs - [ ] Import statements are properly formatted - [ ] Changes validated with `make build` (no compilation errors) +- [ ] Changes validated with `make test-unit` (tests pass) - [ ] Workflow compilation tested with `DEBUG=* ./gh-aw compile dev` ## Important Notes diff --git a/.github/workflows/shared/go-make.md b/.github/workflows/shared/go-make.md index 0418aebffa..8781df409d 100644 --- a/.github/workflows/shared/go-make.md +++ b/.github/workflows/shared/go-make.md @@ -26,9 +26,19 @@ mcp-scripts: make $INPUT_ARGS --- -**IMPORTANT**: Always use the `mcpscripts-go` and `mcpscripts-make` tools for Go and Make commands instead of running them directly via bash. These mcp-script tools provide consistent execution and proper logging. +**IMPORTANT — bash vs. MCP for validation:** -**Correct**: +- **Use `mcpscripts-go` / `mcpscripts-make` early in a session** (within the first few minutes) for consistent, logged execution of Go and Make commands. +- **Use direct bash commands for end-of-session validation** (i.e., after any file-exploration or analysis phase that may have taken more than ~5 minutes). MCP connections time out after ~5 minutes of inactivity; calling `mcpscripts-*` at the end of a long session fails with `MCP error -32003: context canceled`. + +**Validation via bash (preferred at end of session or after long exploration):** +```bash +make build +make test-unit +make recompile +``` + +**MCP tools (use early in session, before long exploration phases):** ``` Use the mcpscripts-go tool with args: "test ./..." Use the mcpscripts-make tool with args: "build" @@ -39,8 +49,7 @@ Use the mcpscripts-make tool with args: "test-unit" **Incorrect**: ``` Use the go mcp-script tool with args: "test ./..." ❌ (Wrong tool name - use mcpscripts-go) -Run: go test ./... ❌ (Use mcpscripts-go instead) -Execute bash: make build ❌ (Use mcpscripts-make instead) +Use the mcpscripts-make tool with args: "build" ❌ (after a long exploration phase — use bash instead) ```