Skip to content

feat: shellcheck Docker fallback for systems without native binary; re-enable in MCP - #49826

Merged
pelikhan merged 7 commits into
mainfrom
copilot/reenable-shellcheck-in-mcp
Aug 2, 2026
Merged

feat: shellcheck Docker fallback for systems without native binary; re-enable in MCP#49826
pelikhan merged 7 commits into
mainfrom
copilot/reenable-shellcheck-in-mcp

Conversation

Copilot AI commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

shellcheck was silently skipped on systems without the native binary (Windows) and was explicitly disabled in MCP compilation. This adds a lazy Docker container fallback and re-enables shellcheck in MCP.

Changes

  • docker_images.go — SHA-pinned ShellcheckImage (koalaman/shellcheck:v0.10.0) alongside all other container pins
  • shellcheck.gorunShellcheckOnScriptViaDocker() pipes scripts to the container via stdin; runShellcheckOnLockFiles() uses Docker only when the binary is absent and Docker is available (lazy — no pull until there are bash/sh steps to lint)
  • compile_orchestrator.go — Pre-gate strict/validate warning now fires only when both binary and Docker are unavailable
  • mcp_tools_readonly.go — Removed --no-shellcheck; shellcheck now runs during MCP compilation via binary or Docker fallback
  • docker_images_test.go — Added ShellcheckImage to the constants test

Fallback precedence

shellcheck binary in PATH  →  use binary (existing)
binary absent + Docker up  →  docker run --rm -i koalaman/shellcheck:v0.10.0@sha256:... - (new)
neither available          →  skip silently (existing)

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 13.2 AIC · ⌖ 8.74 AIC · ⊞ 8.3K ·
Comment /souschef to run again


Generated by 👨‍🍳 PR Sous Chef · gpt54 · 11.1 AIC · ⌖ 8 AIC · ⊞ 8.3K ·
Comment /souschef to run again

…n MCP

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title feat: shellcheck Docker fallback for systems without native binary (e.g. Windows), re-enable in MCP feat: shellcheck Docker fallback for systems without native binary; re-enable in MCP Aug 2, 2026
Copilot AI requested a review from pelikhan August 2, 2026 18:25
@pelikhan
pelikhan marked this pull request as ready for review August 2, 2026 18:39
Copilot AI review requested due to automatic review settings August 2, 2026 18:39

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

Adds a Docker-based ShellCheck fallback and enables ShellCheck during MCP compilation.

Changes:

  • Runs SHA-pinned ShellCheck through Docker when unavailable locally.
  • Updates availability checks and MCP compilation flags.
  • Extends image constant tests.
Show a summary per file
File Description
pkg/cli/shellcheck.go Implements Docker fallback execution.
pkg/cli/shellcheck_test.go Updates unavailable-tool test.
pkg/cli/mcp_tools_readonly.go Enables ShellCheck for MCP compilation.
pkg/cli/docker_images.go Adds the pinned ShellCheck image.
pkg/cli/docker_images_test.go Validates the new image constant.
pkg/cli/compile_orchestrator.go Accounts for Docker availability.

Review details

Tip

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

  • Files reviewed: 6/6 changed files
  • Comments generated: 4
  • Review effort level: Balanced

Comment thread pkg/cli/shellcheck.go Outdated
Comment on lines +341 to +360
output := strings.ReplaceAll(stdout.String(), "-:", "script:")
if stderr.Len() > 0 {
output += strings.ReplaceAll(stderr.String(), "-:", "script:")
}

if output != "" {
fmt.Fprintf(os.Stderr, "%s\n", console.FormatWarningMessage("shellcheck findings in "+stepLabel(info)+":"))
fmt.Fprint(os.Stderr, output)
}

if err != nil {
var exitErr *exec.ExitError
if errors.As(err, &exitErr) {
if exitErr.ExitCode() == 1 {
// Exit code 1 means shellcheck found issues; already printed above.
return fmt.Errorf("shellcheck found issues in %s", stepLabel(info))
}
}
return fmt.Errorf("shellcheck (docker) failed: %w", err)
}
// Shellcheck output goes to stderr (captured in subprocess error buffer only) and
// therefore never reaches the LLM via the JSON response — always disable it.
cmdArgs := []string{"compile", "--validate", "--json", "--no-shellcheck"}
cmdArgs := []string{"compile", "--validate", "--json"}
Comment thread pkg/cli/shellcheck.go
// This is the fallback path when the shellcheck binary is not installed locally
// (e.g. on Windows). It mirrors the behaviour of runShellcheckOnScript: findings are
// printed to stderr and an error is returned when shellcheck reports issues.
func runShellcheckOnScriptViaDocker(ctx context.Context, info runStepInfo, ignoreCodes []string, verbose bool) error {
Comment thread pkg/cli/shellcheck.go Outdated

// Silently skip when shellcheck is not installed. The orchestrator is responsible
// for warning the user in --validate mode.
ctx := context.Background()
@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot Please continue triage on this PR.

Remaining visible blockers (newest first):

Failed checks:

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

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 7.26 AIC · ⌖ 9.36 AIC · ⊞ 8.3K ·
Comment /souschef to run again

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Design Decision Gate 🏗️ completed the design decision gate check.

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

PR Code Quality Reviewer completed the code quality review.

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Test Quality Sentinel completed test quality analysis.

@github-actions github-actions Bot 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.

Skills-Based Review 🧠

Applied /diagnosing-bugs and /tdd — requesting changes on three correctness and coverage issues.

📋 Key Themes & Highlights

Issues Found

  1. stderr mixing (correctness) — Docker pull/daemon output unconditionally appended to shellcheck findings, causing false positive warnings on first run (line 358–361, shellcheck.go)
  2. context propagation (correctness)context.Background() used inside runShellcheckOnLockFiles, breaking cancellation and timeout propagation through Docker operations (line 383, shellcheck.go)
  3. Missing test coverage (test quality)runShellcheckOnScriptViaDocker has no tests; the only new test covers the double-unavailable skip path, leaving all Docker execution paths untested (shellcheck_test.go)

Positive Highlights

  • ✅ SHA-pinned image constant with comment explaining fallback purpose
  • ✅ Lazy fallback — Docker only invoked when scripts exist and binary is absent
  • #nosec G204 with accurate justification
  • ✅ stdin-based piping avoids temporary files and volume mounts
  • ✅ Re-enabling shellcheck in MCP is a clean one-liner removal of --no-shellcheck

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · sonnet46 · 28.1 AIC · ⌖ 18.8 AIC · ⊞ 7.1K
Comment /matt to run again

Comments that could not be inline-anchored

pkg/cli/shellcheck.go:360

[/diagnosing-bugs] Docker stderr is unconditionally appended to the findings output (line 358–361), so a clean first-pull run will print misleading "shellcheck findings" warnings containing image-pull progress or daemon diagnostics—even when shellcheck found nothing.

<details>
<summary>💡 Suggestion</summary>

Only include stderr when the command actually failed, or strip it from the success path:

if err != nil &amp;&amp; stderr.Len() &gt; 0 {
    output += strings.ReplaceAll(stderr.String(), …

</details>

<details><summary>pkg/cli/shellcheck.go:383</summary>

**[/diagnosing-bugs]** `context.Background()` is used for both `IsDockerAvailable` and `runShellcheckOnScriptViaDocker`, disconnecting these operations from the compilation context. If the caller cancels (timeout, Ctrl-C), Docker containers can be left running and the pipeline won&#39;t respect cancellation.

&lt;details&gt;
&lt;summary&gt;💡 Suggestion&lt;/summary&gt;

Thread the caller&#39;s context through `runShellcheckOnLockFiles`:

```go
func runShellcheckOnLockFiles(ctx context.Context, lockFiles []string, verbos…

</details>

<details><summary>pkg/cli/shellcheck_test.go:305</summary>

**[/tdd]** The Docker execution path has no test coverage. The updated test only verifies the &quot;neither available&quot; skip path. The new `runShellcheckOnScriptViaDocker` function has no tests for: stdin/args correctness, shellcheck exit 1 (findings), Docker failure, or context cancellation.

&lt;details&gt;
&lt;summary&gt;💡 Suggested test scaffolding&lt;/summary&gt;

Add a fake `docker` wrapper on `PATH` (similar to how other tools are tested with stubs) covering:

- **Success**: fake docker exits 0 → function retu…

</details>

@github-actions github-actions Bot 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.

Review: shellcheck Docker fallback

The approach (SHA-pinned image, lazy fallback, re-enabled in MCP) is solid. Five blocking/notable issues need to be resolved:

# Location Issue
1 shellcheck.go:360 Docker stderr (pull output, daemon diagnostics) is concatenated into output, causing false "shellcheck findings" banners
2 mcp_tools_readonly.go:196 Shellcheck findings go to stderr which MCP consumers never see; needs to surface in JSON or be explicitly documented as intentional
3 shellcheck.go:305 runShellcheckOnScriptViaDocker has zero test coverage
4 shellcheck.go:383 context.Background() disconnects Docker calls from compilation cancellation
5 shellcheck.go:337 No user-visible progress during Docker image pull — silent hang risk on first use

Issues 1–4 were flagged in prior inline comments; issue 5 is new.

🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · sonnet46 · 24.8 AIC · ⌖ 10.3 AIC · ⊞ 5.4K

Comment thread pkg/cli/shellcheck.go
cmd.Stderr = &stderr

err := cmd.Run()

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.

When Docker is available but koalaman/shellcheck has never been pulled, the first compile will silently block for potentially several minutes while the image downloads. The log line added above (shellcheck binary not found in PATH; using Docker container fallback) fires before any scripts are checked, but there is no user-visible progress indicator during the pull. Consider printing a one-time FormatInfoMessage to stderr such as "Pulling shellcheck Docker image (first use)..." before the first docker run call, or using the existing pullDockerImageIfNotPresent helper used by other tools. Without this, users on slow connections may believe the tool has hung.

@copilot please address this.

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

🧪 Test Quality Sentinel Report

⚠️ Test Quality Score: 66/100 — Acceptable

Analyzed 37 test(s): 28 design, 9 implementation, 0 violation(s).

📊 Metrics (37 tests)
Metric Value
Analyzed 37 (Go: 37, JS: 0)
✅ Design 28 (76%)
⚠️ Implementation 9 (24%)
Edge/error coverage 20 (54%)
Duplicate clusters 0
Inflation YES (docker_images_test.go ratio 2.07:1)
🚨 Violations 0
Test File Classification Issues
TestCheckAndPrepareDockerImages_NoToolsRequested docker_images_test.go design_test none
TestCheckAndPrepareDockerImages_ImageAlreadyDownloading docker_images_test.go design_test none
TestDockerImageDownloadState docker_images_test.go design_test none
TestResetDockerPullState docker_images_test.go design_test none
TestDockerImageConstants docker_images_test.go implementation_test verifies constants only
TestCheckAndPrepareDockerImages_MultipleImages docker_images_test.go design_test none
TestCheckAndPrepareDockerImages_RetryMessageFormat docker_images_test.go design_test none
TestCheckAndPrepareDockerImages_StartedDownloadingMessage docker_images_test.go design_test none
TestCheckAndPrepareDockerImages_ImageAlreadyAvailable docker_images_test.go design_test none
TestIsDockerImageAvailable_WithMockedState docker_images_test.go design_test none
TestMockImageAvailability docker_images_test.go implementation_test tests mock helpers, not production behavior
TestNormalizeDockerContext_NilContextReturnsTODO docker_images_test.go design_test none
TestNormalizeDockerContext_PreservesNonNilContext docker_images_test.go design_test none
TestIsDockerAvailable_NilContext docker_images_test.go design_test none
TestIsDockerImageAvailable_NilContext docker_images_test.go design_test none
TestStartDockerImageDownload_ConcurrentCalls docker_images_test.go design_test strong concurrency invariant
TestStartDockerImageDownload_ConcurrentCallsWithAvailableImage docker_images_test.go design_test none
TestStartDockerImageDownload_RaceWithExternalDownload docker_images_test.go design_test none
TestStartDockerImageDownload_ContextCancellation docker_images_test.go design_test edge case
TestStartDockerImageDownload_JoinPointForExistingDownload docker_images_test.go design_test none
TestStartDockerImageDownload_JoinPointNoopWhenImageAvailable docker_images_test.go design_test none
TestStartDockerImageDownload_NilContext docker_images_test.go design_test none
TestCheckAndPrepareDockerImages_DockerUnavailable docker_images_test.go design_test error path
TestCheckAndPrepareDockerImages_DockerUnavailable_MultipleTools docker_images_test.go design_test error path
TestCheckAndPrepareDockerImages_DockerUnavailable_NoTools docker_images_test.go design_test none
TestIsDockerAvailable_MockTrue docker_images_test.go implementation_test tests mock wiring
TestIsDockerAvailable_MockFalse docker_images_test.go implementation_test tests mock wiring
TestCheckAndPrepareDockerImages_DockerUnavailable_ReturnsTypedError docker_images_test.go design_test error type contract
TestCheckAndPrepareDockerImages_RunnerGuardImageDownloading docker_images_test.go design_test none
TestIsShellcheckableShell shellcheck_test.go design_test table-driven
TestShellcheckShell shellcheck_test.go implementation_test tests internal arg selection
TestExtractRunStepsFromLockFile shellcheck_test.go design_test table-driven, edge cases
TestSanitizeGHAExpressions shellcheck_test.go design_test table-driven
TestStepLabel shellcheck_test.go implementation_test internal label helper
TestDefaultIgnoreCodes shellcheck_test.go implementation_test verifies constant values
TestRunShellcheckOnLockFilesSkipsWhenUnavailable shellcheck_test.go design_test key behavioral contract for Docker fallback
TestRunShellcheckOnLockFilesEmpty shellcheck_test.go design_test none
⚠️ Flagged Tests (2)

TestMockImageAvailability (docker_images_test.go) — implementation_test. Exercises the test-helper mock setters (SetMockImageAvailable, IsDockerImageAvailable) rather than production behavior. Acceptable as infrastructure validation but contributes to the implementation-test count.

docker_images_test.go inflation — 805 test lines vs 388 production lines (ratio 2.07:1, threshold 2:1). The excess is largely justified by rich concurrency scenarios and goroutine-lifecycle management (join/cancel patterns), which are genuinely valuable. No tests should be removed, but future additions should be reviewed for redundancy.

Verdict

passed. 24% implementation tests (threshold: 30%). No build-tag or mock-library violations. Test suite includes strong concurrency invariants for the Docker fallback feature. Minor inflation on docker_images_test.go (ratio 2.07:1); the overhead is justified by concurrent-download scenario coverage.

🧪 Test quality analysis by Test Quality Sentinel · sonnet46 · 59.4 AIC · ⌖ 7.48 AIC · ⊞ 8.5K ·
Comment /review to run again

@github-actions github-actions Bot 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.

Test Quality Sentinel: 66/100 - Acceptable. 24% implementation tests (threshold: 30%). No build-tag or mock-library violations. See comment for full report.

@github-actions github-actions Bot 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.

Verdict: Request changes

The Docker fallback mechanics are reasonable, but the MCP re-enable is functionally a no-op and the new Docker code path is untested.

💡 Themes
  • Blocking: mcp_tools_readonly.go drops --no-shellcheck but the MCP subprocess wrapper (runMCPExecOutput) only captures stdout via cmd.Output(). Shellcheck findings are written to stderr and are therefore still invisible to MCP callers on success — the exact problem the removed comment warned about. This needs an actual fix (merge stderr into the JSON response, or switch to combined output + parse), not just a flag removal.
  • Non-blocking but real: no test coverage exists for runShellcheckOnScriptViaDocker or the new fallback branch in runShellcheckOnLockFiles (arg construction, stdin piping, output parsing, exit-code handling, Docker failure) — only the "neither available" skip path is tested.
  • Minor: context.Background() in runShellcheckOnLockFiles breaks cancellation propagation for the new Docker calls; the gcc-output -:script: string rewrite is unanchored and can corrupt finding text containing that substring.

The SHA-pinned image constant, lazy Docker fallback design, and orchestrator pre-gate logic are solid.

🔎 Code quality review by PR Code Quality Reviewer · auto · 62.4 AIC · ⌖ 5.61 AIC · ⊞ 7.9K
Comment /review to run again

// Shellcheck output goes to stderr (captured in subprocess error buffer only) and
// therefore never reaches the LLM via the JSON response — always disable it.
cmdArgs := []string{"compile", "--validate", "--json", "--no-shellcheck"}
cmdArgs := []string{"compile", "--validate", "--json"}

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.

Removing --no-shellcheck does not make shellcheck findings reach MCP callers — this re-enable is a no-op for its stated goal.

💡 Details

runMCPExecOutput (line 249) calls cmd.Output(), which returns stdout only and discards stderr entirely. But runShellcheckOnScript/runShellcheckOnScriptViaDocker write all findings to os.Stderr (shellcheck.go ~268, ~342), never to stdout. On a successful compile invocation (exit 0, non-strict mode), cmd.Output() returns stdout JSON with no error and the stderr shellcheck warnings are silently discarded.

So removing --no-shellcheck re-enables the linter to run, but its findings still never surface to the LLM/MCP caller — the exact problem the removed comment described. Fix by merging shellcheck stderr into the JSON payload or switching to combined output and parsing warnings out separately.

Comment thread pkg/cli/shellcheck.go Outdated

// Silently skip when shellcheck is not installed. The orchestrator is responsible
// for warning the user in --validate mode.
ctx := context.Background()

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.

context.Background() here severs cancellation for the new Docker path from the caller's context — a slow/hung docker run or availability check can't be cancelled.

💡 Details

runShellcheckOnLockFiles creates its own root context instead of accepting one from the caller. Both IsDockerAvailable(ctx) and each runShellcheckOnScriptViaDocker(ctx, ...) invocation use exec.CommandContext, which is specifically designed to be cancelled — but with context.Background() that mechanism is dead code for this call path. In the MCP tool flow (mcp_tools_readonly.go), the outer request context is already checked for cancellation elsewhere (ctx.Done() after Docker image prep), so this inconsistency means a hung shellcheck-in-Docker invocation cannot be aborted even though the surrounding request infrastructure supports it.

// current
func runShellcheckOnLockFiles(lockFiles []string, verbose bool, strict bool) error {
    ...
    ctx := context.Background()

// suggested
func runShellcheckOnLockFiles(ctx context.Context, lockFiles []string, verbose bool, strict bool) error {
    ...

Comment thread pkg/cli/shellcheck.go
"--rm",
"-i",
ShellcheckImage,
"--shell=" + shellcheckShell(info.Shell),

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.

The new Docker execution path (runShellcheckOnScriptViaDocker) has zero test coverage — only the "neither binary nor Docker available" skip branch is exercised.

💡 Details

shellcheck_test.go was updated only to widen the existing skip test (PATH="" now also hides Docker). Nothing exercises: correct docker run argument construction (image, --shell=, --exclude= codes, stdin -), the stdin piping of the sanitized script, gcc-format output parsing/-:script: rewriting, ShellCheck exit code 1 vs. other failures, or Docker invocation failure (e.g., daemon disappearing mid-run). A fake docker executable on PATH (similar to how other Docker-dependent tests in this repo mock docker) would let these branches be verified without a real container runtime.

Comment thread pkg/cli/shellcheck.go Outdated
// In gcc format with stdin, shellcheck prefixes findings with "-:LINE:COL: ...".
// Replace the leading "-:" (stdin indicator) with "script:" so that reported
// positions are clearly relative to the run: script snippet.
output := strings.ReplaceAll(stdout.String(), "-:", "script:")

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.

Naive strings.ReplaceAll(stdout, "-:", "script:") can corrupt finding text, not just the stdin path prefix.

💡 Details

This blindly rewrites every occurrence of the literal substring "-:" anywhere in shellcheck's gcc-format output, not just the leading stdin-indicator prefix at the start of each finding line. If a shellcheck message or the quoted offending code fragment happens to contain -: (e.g. note: -: unexpected token style text, or a flag like curl -: something echoed in context), it will also be rewritten to script:, producing garbled/misleading output. A safer approach anchors the replacement to line starts, e.g. a regex like ^-: per line or strings.Replace bounded to the known prefix pattern ("-:" + lineNum + ":").

Note: the pre-existing binary path (runShellcheckOnScript) has an analogous issue with tmpFile.Name() replacement, but that's out of scope for this PR — flagging only the newly introduced Docker variant here since it's part of the diff.

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

🏗️ Design Decision Gate — ADR Required

This PR makes significant changes to core business logic (112 new lines in pkg/ directories) but does not have a linked Architecture Decision Record (ADR).

📄 Draft ADR committed: docs/adr/49826-shellcheck-docker-fallback-and-mcp-reenable.md — review and complete it before merging.

🔒 This PR cannot merge until an ADR is linked in the PR body.

📋 What to do next
  1. Review the draft ADR committed to your branch at docs/adr/49826-shellcheck-docker-fallback-and-mcp-reenable.md — it was generated from the PR diff
  2. Complete the missing sections — verify the decision rationale, confirm or revise the alternatives, and add any context the draft could not infer (e.g., performance benchmarks, security review, Windows testing results)
  3. Commit the finalized ADR to docs/adr/ on your branch
  4. Reference the ADR in this PR body by adding a line such as:

    ADR: ADR-49826: Shellcheck Docker Fallback and MCP Re-enable

Once an ADR is linked in the PR body, this gate will re-run and verify the implementation matches the decision.

❓ Why ADRs Matter

"AI made me procrastinate on key design decisions. Because refactoring was cheap, I could always say 'I'll deal with this later.' Deferring decisions corroded my ability to think clearly."

ADRs create a searchable, permanent record of why the codebase looks the way it does. Future contributors (and your future self) will thank you.

📋 Michael Nygard ADR Format Reference

An ADR must contain these four sections to be considered complete:

  • Context — What is the problem? What forces are at play?
  • Decision — What did you decide? Why?
  • Alternatives Considered — What else could have been done?
  • Consequences — What are the trade-offs (positive and negative)?

All ADRs are stored in docs/adr/ as Markdown files numbered by PR number (e.g., 49826-shellcheck-docker-fallback-and-mcp-reenable.md for PR #49826).

🏗️ ADR gate enforced by Design Decision Gate 🏗️ · sonnet46 · 65.2 AIC · ⌖ 35.2 AIC · ⊞ 9.6K ·
Comment /review to run again

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

Copilot AI commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Please continue triage on this PR.

Remaining visible blockers (newest first):...

Addressed in bab9ed9.

I triaged the Windows Integration failure and reviewer blockers, then pushed fixes for:

  • shellcheck Docker stderr handling (no longer reported as lint findings)
  • MCP compile JSON output now includes shellcheck-related warnings/diagnostics
  • shellcheck fallback cancellation/context threading
  • Docker fallback test coverage (args/stdin, exit 1 findings, docker failure, fallback selection)
  • MCP compile fallback when both shellcheck binary and Docker are unavailable (structured warning instead of hard failure)

Local validation passed via make agent-report-progress.

Maintainer handoff: CI on this new head is stale in cloud-agent runs and must be re-triggered by a maintainer (close/reopen PR, workflow_dispatch, or maintainer push) before merge.

@pelikhan

pelikhan commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot Please continue triage on this PR.

Remaining visible blockers (newest first):

Failed checks:

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

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 13.2 AIC · ⌖ 8.74 AIC · ⊞ 8.3K ·
Comment /souschef to run again

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

Copilot AI commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

@copilot fix https://github.com/github/gh-aw/actions/runs/30764608297/job/91541227392?pr=49826

Fixed in 37f53d2.

I triaged run 30764608297 / job 91541227392 and addressed the Windows compile-tool failure path: MCP compile now returns structured JSON validation results instead of a protocol error when the compile subprocess exits without JSON output. Added targeted tests for the new compile error result helper and workflow-name normalization.

Local validation run:

  • go test ./pkg/cli -run 'TestInjectDockerUnavailableWarning|TestInjectShellcheckDiagnostics|TestBuildCompileErrorResults'
  • go test -tags integration -run '^TestMCPServer_WindowsSmokeCommands$' ./pkg/cli

@pelikhan

pelikhan commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

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

pelikhan commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

@copilot resolve the merge conflicts on this branch.

Copilot AI commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Please continue triage on this PR.

Remaining visible blockers (newest first):...

Addressed in 822e073 (plus prior 37f53d2).

I continued triage and inspected both failed jobs at log level:

  • Windows Integration (91541227392): failure was the MCP compile protocol-error path already fixed in 37f53d2.
  • Unit tests S-Z (91541209911): root cause was TestSafeOutputsToolsJSONInSync mismatch between /home/runner/work/gh-aw/gh-aw/pkg/workflow/js/safe_outputs_tools.json and /home/runner/work/gh-aw/gh-aw/actions/setup/js/safe_outputs_tools.json; fixed by syncing copies in 822e073.

Local validation completed:

  • make fmt
  • make lint
  • TEST_UNIT_RUN_FULL=1 make test-unit
  • make test
  • make recompile
  • make agent-report-progress

Maintainer handoff: CI must be re-triggered by a maintainer (close/reopen PR, workflow_dispatch, or maintainer push) to verify the new head in GitHub Actions.

@pelikhan

pelikhan commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

@copilot resolve the merge conflicts on this branch.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot Please continue triage on this PR.

Remaining visible blockers (newest first):

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

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 11.1 AIC · ⌖ 8 AIC · ⊞ 8.3K ·
Comment /souschef to run again

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

Copilot AI commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts on this branch.

Resolved in 64e788f. I completed the merge and resolved the conflict in pkg/workflow/js/safe_outputs_tools.json.

@copilot merge main and fix https://github.com/github/gh-aw/actions/runs/30765569404/job/91544697896

Done in 64e788f: merged main into this branch and verified the failing job path (TestSafeOutputsToolsJSONInSync) now passes locally.

Copilot AI commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts on this branch.

Resolved. The merge conflicts on this branch were fixed in 64e788f, and the branch is currently conflict-free (mergeable_state: clean).

@copilot Please continue triage on this PR.

Remaining visible blockers (newest first):...

Triage complete: the branch is no longer in merge-conflict state (resolved in 64e788f) and PR metadata now reports mergeable_state: clean. No additional code changes were required in this pass.

@pelikhan
pelikhan merged commit b36978c into main Aug 2, 2026
30 checks passed
@pelikhan
pelikhan deleted the copilot/reenable-shellcheck-in-mcp branch August 2, 2026 21:42
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.84.3

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.

4 participants