Repository navigation
Pin the MCP gateway Docker run image to its downloaded digest - #66672
Conversation
Co-authored-by: pelikhan <[email protected]>
| // targets the redirected registry (e.g. an internal mirror) rather than the | ||
| // default public registry. | ||
| containerImage = applyContainerPinMappingFromData(containerImage, workflowData) | ||
| containerImage = resolveContainerImage(containerImage, workflowData) |
There was a problem hiding this comment.
@copilot make sure pin mapping is still applied
There was a problem hiding this comment.
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.
Co-authored-by: pelikhan <[email protected]>
Co-authored-by: pelikhan <[email protected]>
|
✅ 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).
|
|
✅ 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.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality Sentinel skipped because pre-fetch PR data was unavailable: unable to fetch PR file list
|
|
✅ Ponytail Reviewer completed successfully! Lean already. Ship.
|
There was a problem hiding this comment.
🟢 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.
There was a problem hiding this comment.
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 appliesContainerPinMappingsviaactionpins.ApplyContainerPinMappingbefore 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.ymlfiles) 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
There was a problem hiding this comment.
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-designfit. - ✅ 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
|
🎉 This pull request is included in a new release. Release: |
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.