feat: add build-tools to SHA digest pinning infrastructure#5986
Conversation
- Add 'build-tools' to IMAGE_DIGEST_KEYS in src/image-tag.ts so that build-tools=sha256:<digest> is accepted as a valid key in --image-tag - Export ParsedImageTag interface from src/image-tag.ts - Refactor buildSysrootStageService() in src/services/sysroot-service.ts to accept ParsedImageTag instead of a raw imageTag string, and use buildRuntimeImageRef() so the @sha256:... suffix is appended when a digest is present - Update resolveSysrootImage() to parse imageTag via parseImageTag() and use buildRuntimeImageRef() so diagnostics also reflect the digest - Update assembleSysrootService() in optional-services.ts to pass the full parsedTag object instead of parsedTag.tag - Update tests in image-tag.test.ts and sysroot-service.test.ts to cover the new key and digest-pinning behaviour Closes #5985
build-tools to SHA digest pinning infrastructure
There was a problem hiding this comment.
Pull request overview
This PR integrates the build-tools image (used by the ARC/DinD sysroot-stage init container) into the existing --image-tag digest pinning infrastructure, so build-tools=sha256:... is accepted and the generated image reference correctly appends @sha256:... when provided.
Changes:
- Extend
--image-tagparsing/validation to recognizebuild-toolsas a supported digest key and export the parsed tag type. - Route sysroot-stage image resolution through
buildRuntimeImageRef(...)so digest suffixes are applied consistently (and diagnostics reflect the pinned digest). - Update optional service assembly and unit tests to pass and validate the full parsed tag object (including digests).
Show a summary per file
| File | Description |
|---|---|
| src/image-tag.ts | Adds build-tools to supported digest keys and exports ParsedImageTag for downstream typing. |
| src/image-tag.test.ts | Adds coverage for build-tools digest/no-digest image ref construction. |
| src/services/sysroot-service.ts | Switches sysroot-stage image resolution to buildRuntimeImageRef(...) and updates diagnostics to include digests. |
| src/services/sysroot-service.test.ts | Adds/updates tests to verify sysroot image refs include @sha256:... when configured. |
| src/services/optional-services.ts | Passes the full parsed image tag object into sysroot service assembly. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 5/5 changed files
- Comments generated: 0
- Review effort level: Low
|
✅ Copilot review passed with no inline comments. @copilot Add the |
|
✅ Smoke Copilot BYOK AOAI (api-key) completed. Copilot AOAI BYOK (api-key) mode operational. 🔓 |
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓 |
|
✅ Smoke Claude passed |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
🚀 Security Guard has started processing this pull request |
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded. |
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅ |
|
✅ Build Test Suite completed successfully! |
|
🔑 Smoke Copilot PAT PAT auth validated. All systems operational. ✅ |
|
✅ Smoke Copilot BYOK AOAI (Entra) completed. Copilot AOAI BYOK (Entra) mode operational. 🔓 |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
✅ Smoke Gemini completed. All facets verified. 💎 Smoke test complete. Results: PR Review ✅, Connectivity ✅, File Writing ✅, Bash Tools ✅. Overall: PASS. |
|
🔌 Smoke Services — All services reachable! ✅ |
|
| Metric | Base | PR | Delta |
|---|---|---|---|
| Lines | 99.00% | 99.00% | ➡️ +0.00% |
| Statements | 98.95% | 98.95% | ➡️ +0.00% |
| Functions | 99.72% | 99.72% | ➡️ +0.00% |
| Branches | 95.44% | 95.41% | 📉 -0.03% |
Coverage comparison generated by scripts/ci/compare-coverage.ts
Smoke Test: Claude Engine Validation
Overall Result: PASS Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
|
Smoke Test: Copilot BYOK Direct Mode ✅ PASS
All smoke tests passed. Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
🔥 Smoke Test: Copilot PAT Auth
Overall: PASS | Auth mode: PAT (COPILOT_GITHUB_TOKEN) cc Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
Smoke Test: Services Connectivity
Overall: FAIL — Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
|
Smoke test passed Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "localhost"See Network Configuration for more information.
|
|
Smoke test summary:\n- 5982 chore: upgrade gh-aw to v0.82.3 pre-release and recompile workflows ✅\n- 5971 Update Runner Doctor A15 status to reflect merged ARC/DinD permission-repair fix ✅\n- GitHub reads ✅\n- Playwright title ✅\n- File write ✅\n- Build ✅\nOverall status: PASS Warning Firewall blocked 2 domainsThe following domains were blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"
- "registry.npmjs.org"See Network Configuration for more information.
|
🔬 Smoke Test Results
Overall: CC Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
Chroot Version Comparison Results
Overall: ❌ Not all tests passed — Python and Node.js versions differ between host and chroot. Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
Smoke Test: API Proxy OpenTelemetry Tracing
All scenarios passed. OTEL tracing integration is functioning correctly. Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
|
Running direct BYOK mode (COPILOT_PROVIDER_API_KEY + COPILOT_PROVIDER_BASE_URL) via api-proxy → Azure OpenAI (Foundry, o4-mini-aw) Overall: PASS Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
|
Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
build-tools(the sysroot-stage init container for ARC/DinD) was excluded from digest pinning:--image-tagrejectedbuild-tools=sha256:...as an invalid key, andbuildSysrootStageService()constructed its image ref directly as a template string, bypassing the pinning helpers entirely.Changes
src/image-tag.ts— add'build-tools'toIMAGE_DIGEST_KEYS; exportParsedImageTaginterfacesrc/services/sysroot-service.ts— replaceimageTag: stringparam withparsedTag: ParsedImageTaginSysrootServiceParams; usebuildRuntimeImageRef(registry, 'build-tools', parsedTag)so the@sha256:...suffix is appended when a digest is present; updateresolveSysrootImage()similarly so diagnostics reflect the digestsrc/services/optional-services.ts— passimageConfig.parsedTag(full object) instead ofimageConfig.parsedTag.tagtoassembleSysrootService()After this change, passing
--image-tag 0.28.0,build-tools=sha256:<digest>produces: