Skip to content

Pin the MCP gateway Docker run image to its downloaded digest - #66672

Merged
pelikhan merged 4 commits into
mainfrom
copilot/fix-mcp-gateway-docker-command
Oct 7, 2026
Merged

pelikhan merged 4 commits into
mainfrom
copilot/fix-mcp-gateway-docker-command

Conversation

Copilot AI commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

The compiler downloads a digest-pinned MCP gateway image but emits a tag-only reference in MCP_GATEWAY_DOCKER_COMMAND. Docker can therefore run a different image from the one downloaded.

  • Image resolution: Resolve the gateway Docker run image through the same pinning path used by predownload, while preserving container mappings and custom images.
  • Regression coverage: Check default, mapped, and custom image references, and verify that the compiled lock uses the same digest in the Docker run and download commands.

Copilot AI changed the title [WIP] Fix MCP gateway docker run to use image digest Pin the MCP gateway Docker run image to its downloaded digest Oct 7, 2026
Copilot AI requested a review from pelikhan October 7, 2026 19:57
// targets the redirected registry (e.g. an internal mirror) rather than the
// default public registry.
containerImage = applyContainerPinMappingFromData(containerImage, workflowData)
containerImage = resolveContainerImage(containerImage, workflowData)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot make sure pin mapping is still applied

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.

The Docker run path still resolves ContainerPinMappings before digest lookup. I strengthened the mapped-case test to assert the exact replacement image and digest. Commit: 7f1e3a13.

Copilot AI requested a review from pelikhan October 7, 2026 20:30
@pelikhan
pelikhan marked this pull request as ready for review October 7, 2026 22:10
Copilot AI balanced review requested due to automatic review settings October 7, 2026 22:10
@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft.

No ADR enforcement needed for PR #66672: no implementation label (has_implementation_label=false) and 86 new lines in default business logic directories, below the 100-line threshold (requires_adr_by_default_volume=false, no custom .design-gate.yml).

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

No new inline review comments were posted. Manual review found no additional blocking issues in PR #66672, but submitting the overall PR review via safeoutputs was blocked by a permission error after two materially different attempts.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

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

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel skipped because pre-fetch PR data was unavailable: unable to fetch PR file list

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Lean already. Ship.

Generated by Ponytail Reviewer for #66672

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.

🟢 Approval recommended

The runtime and predownload paths now share image resolution, with focused regression coverage and consistent generated outputs.

0 open findings

What changed in this PR

Pins the MCP gateway runtime image to the same digest used during predownload, preventing tag drift.

Changes:

  • Resolves gateway runtime images through container pin mappings and digest lookup.
  • Adds unit and compiled-lock regression coverage.
  • Regenerates workflow locks with the pinned gateway digest.
File Description
pkg/​workflow/​mcp_setup_gateway.go Pins the runtime gateway image.
pkg/​workflow/​mcp_gateway_env_security_test.go Tests default, mapped, and custom images.
pkg/​workflow/​docker_predownload_test.go Verifies runtime and predownload images match.
.github/​workflows/​workflow-health-manager.lock.yml Adds the gateway digest.
.github/​workflows/​workflow-generator.lock.yml Adds the gateway digest.
.github/​workflows/​windows.lock.yml Adds the gateway digest.
.github/​workflows/​windows-grower.lock.yml Adds the gateway digest.
.github/​workflows/​update-astro.lock.yml Adds the gateway digest.
.github/​workflows/​ubuntu-image-analyzer.lock.yml Adds the gateway digest.
.github/​workflows/​tidy.lock.yml Adds the gateway digest.
.github/​workflows/​test-quality-sentinel.lock.yml Adds the gateway digest.
.github/​workflows/​technical-doc-writer.lock.yml Adds the gateway digest.
.github/​workflows/​stale-pr-cleanup.lock.yml Adds the gateway digest.
.github/​workflows/​squad.lock.yml Adds the gateway digest.
.github/​workflows/​squad-plan.lock.yml Adds the gateway digest.
.github/​workflows/​squad-implement-worker.lock.yml Adds the gateway digest.
.github/​workflows/​squad-game-planner.lock.yml Adds the gateway digest.
.github/​workflows/​spec-librarian.lock.yml Adds the gateway digest.
.github/​workflows/​spec-extractor.lock.yml Adds the gateway digest.
.github/​workflows/​smoke-service-ports.lock.yml Adds the gateway digest.
.github/​workflows/​smoke-issues.lock.yml Adds the gateway digest.
.github/​workflows/​skillet.lock.yml Adds the gateway digest.
.github/​workflows/​security-compliance.lock.yml Adds the gateway digest.
.github/​workflows/​schema-feature-coverage.lock.yml Adds the gateway digest.
.github/​workflows/​schema-consistency-checker.lock.yml Adds the gateway digest.
.github/​workflows/​release.lock.yml Adds the gateway digest.
.github/​workflows/​q.lock.yml Adds the gateway digest.
.github/​workflows/​python-data-charts.lock.yml Adds the gateway digest.
.github/​workflows/​pr-description-caveman.lock.yml Adds the gateway digest.
.github/​workflows/​pr-code-quality-reviewer.lock.yml Adds the gateway digest.
.github/​workflows/​pdf-summary.lock.yml Adds the gateway digest.
.github/​workflows/​org-health-report.lock.yml Adds the gateway digest.
.github/​workflows/​objective-impact-report.lock.yml Adds the gateway digest.
.github/​workflows/​notion-issue-summary.lock.yml Adds the gateway digest.
.github/​workflows/​metrics-collector.lock.yml Adds the gateway digest.
.github/​workflows/​mergefest.lock.yml Adds the gateway digest.
.github/​workflows/​linter-miner.lock.yml Adds the gateway digest.
.github/​workflows/​lint-monster.lock.yml Adds the gateway digest.
.github/​workflows/​layout-spec-maintainer.lock.yml Adds the gateway digest.
.github/​workflows/​jsweep.lock.yml Adds the gateway digest.
.github/​workflows/​glossary-maintainer.lock.yml Adds the gateway digest.
.github/​workflows/​front-page-copy-guard.lock.yml Adds the gateway digest.
.github/​workflows/​firewall.lock.yml Adds the gateway digest.
.github/​workflows/​firewall-escape.lock.yml Adds the gateway digest.
.github/​workflows/​feature-grower.lock.yml Adds the gateway digest.
.github/​workflows/​example-permissions-warning.lock.yml Adds the gateway digest.
.github/​workflows/​example-failure-category-filter.lock.yml Adds the gateway digest.
.github/​workflows/​eslint-miner.lock.yml Adds the gateway digest.
.github/​workflows/​draft-pr-cleanup.lock.yml Adds the gateway digest.
.github/​workflows/​dictation-prompt.lock.yml Adds the gateway digest.
.github/​workflows/​dev.lock.yml Adds the gateway digest.
.github/​workflows/​dev-hawk.lock.yml Adds the gateway digest.
.github/​workflows/​deployment-incident-monitor.lock.yml Adds the gateway digest.
.github/​workflows/​delight.lock.yml Adds the gateway digest.
.github/​workflows/​daily-model-resolution.lock.yml Adds the gateway digest.
.github/​workflows/​craft.lock.yml Adds the gateway digest.
.github/​workflows/​copilot-opt.lock.yml Adds the gateway digest.
.github/​workflows/​contribution-check.lock.yml Adds the gateway digest.
.github/​workflows/​code-simplifier.lock.yml Adds the gateway digest.
.github/​workflows/​ci-coach.lock.yml Adds the gateway digest.
.github/​workflows/​architecture-guardian.lock.yml Adds the gateway digest.
.github/​workflows/​archie.lock.yml Adds the gateway digest.

🧠 Review effort: Balanced


💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@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.

Impeccable review: PR #66672

Applied mode: harden (bug-fix style change — resolves a digest-pin mismatch between the MCP gateway's predownloaded image and the Docker run command).

Verification performed:

  • Confirmed resolveContainerImage (pkg/workflow/action_pins.go) still applies ContainerPinMappings via actionpins.ApplyContainerPinMapping before the digest lookup, so a previously-flagged concern ("make sure pin mapping is still applied") is addressed — both custom-registry redirects and digest pinning are preserved.
  • Ran the new/updated regression tests (TestMCPGatewayDockerCommandUsesPinnedImage, TestMCPGatewayDockerCommandMatchesPredownloadImage) — all pass, covering default, mapped, and unrecognized custom gateway images.
  • Remainder of the diff (330 .lock.yml files) is a mechanical digest bump from recompilation; nothing actionable there.

No blocking issues found. The fix correctly unifies the image-resolution path used by predownload and the Docker run command.

🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · copilot · sonnet50 · 28.4 AIC · ⌖ 13.1 AIC · ⊞ 8.1K

@github-actions github-actions Bot mentioned this pull request Oct 7, 2026

@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 🧠

A single-purpose fix, verified by both the new regression tests and a build/test run locally. No /codebase-design, /tdd, or /diagnosing-bugs findings remain outstanding.

📋 Analysis

Change type: bugfix (one-line production fix + regression tests).

/diagnosing-bugs check: the root cause (gateway Docker run line used applyContainerPinMappingFromData, which only applies the registry redirect, not the digest lookup) is addressed directly by switching to resolveContainerImage, the same function the predownload path (applyContainerPins in docker.go) already uses. This guarantees docker run and download_docker_images.sh always reference the identical pinned image.

Regression coverage: TestMCPGatewayDockerCommandUsesPinnedImage covers default, mapped (container_pins), and unrecognized custom images; TestMCPGatewayDockerCommandMatchesPredownloadImage verifies the compiled lock file's MCP_GATEWAY_DOCKER_COMMAND and predownload script share the same pinned reference end-to-end. I reran both locally (go test -tags integration ./pkg/workflow/ -run 'TestMCPGatewayDockerCommandMatchesPredownloadImage|TestMCPGatewayDockerCommandUsesPinnedImage' -v) — all pass.

Follow-up already resolved: the author's inline concern about ContainerPinMappings still being honored (line 436) was raised and fixed in a follow-up commit (7f1e3a13), with the "mapped gateway" test case now asserting the exact mirrored+digest image. I confirmed that test passes.

Positive highlights:

  • ✅ Reuses an existing, well-tested resolution path instead of introducing a new one — good /codebase-design fit.
  • ✅ Tests assert the actual compiled lock-file output, not just the helper function, closing the gap that caused the original bug.

No further action needed on this PR.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet50 · 84.3 AIC · ⌖ 14.4 AIC · ⊞ 10.1K
Comment /matt to run again

@pelikhan
pelikhan merged commit b57433e into main Oct 7, 2026
108 of 110 checks passed
@pelikhan
pelikhan deleted the copilot/fix-mcp-gateway-docker-command branch October 7, 2026 22:36
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.91.6

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.

v0.91.4 MCP gateway docker run drops the gh-aw-mcpg image digest

3 participants