fix(publish): auto-promote platform-agent runtime_image_pins (#162) #162
Reference in New Issue
Block a user
Delete Branch "fix/162-auto-promote-platform-agent-pin"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Root cause
The concierge (kind=platform) runs the
molecule-platform-agentimage, which CP resolves via theplatform-agentruntime_image_pinsrow.publish-image.ymlrebuilds + pushes that image on every runtime bump (publish-platform-agentjob) but never promotes theplatform-agentpin — onlyclaude-codeis auto-promoted (promote-pin), and the platform-agent pin was deliberately left operator-gated.Result: a runtime-level concierge fix ships into ECR but never reaches running concierges.
test1(org5c296465-...) fail-closed on the RCA#2970 gate (/opt/molecule-mcp-server missing) across 3 redeploys because:claude-codepin =sha-19f3175/ runtime v0.3.43 (the fix), promoted 2026-06-21T10:19:30Z ✅platform-agentpin =sha-201a5fa(pre-fix), still on 2026-06-18T02:52:59Z ❌The v0.3.43
platform_agent_identity.mcp_server_present()(recognizes the plugin-deliveredmolecule-platformMCP insettings.json, commitf27672dc1) was baked into the freshly-builtmolecule-platform-agentimage but the pin never moved, so every redeploy re-pulled the stale pre-fix concierge.Fix
Mirror
promote-pinfor the concierge image:publish-platform-agentpush digest as a job output (steps.pa_push.outputs.digest).promote-platform-agent-pin(prod + staging matrix,fail-fast: false, fail-loud on non-2xx) that POSTs/cp/admin/runtime-image/promotewithtemplate_name: platform-agentand the just-pushed digest.Keeps the concierge pin lock-step with the build, same as every workspace runtime. No new secrets (reuses
CP_ADMIN_API_TOKEN/CP_ADMIN_API_TOKEN_STAGING).Scope
.gitea/workflows/publish-image.yml.runtime-ssot-consumersgreen (that is propagation-lag across the 9 other templates; unrelated to this concierge-pin drift).🤖 Generated with Claude Code
APPROVED on current head
2d607746.5-axis review:
5-axis review for current head
2d6077461c:Correctness: APPROVE.
publish-platform-agentnow exposes the post-smoke push digest throughsteps.pa_push.outputs.digest, and the newpromote-platform-agent-pinjob consumesneeds.publish-platform-agent.outputs.digestwithtemplate_name: platform-agent. That promotes the molecule-platform-agent image digest CP actually resolves for concierge, not the claude-code base image. The job depends onpublish-platform-agent, so it cannot promote before the image is built and pushed.Robustness: APPROVE. The prod/staging matrix uses
fail-fast: false, checks for missing CP tokens and empty digest, and fails loud on non-200/non-201 promote responses. This closes the pin drift path without hiding partial target failures.Security: APPROVE. No new secrets are introduced; existing CP admin tokens are scoped to the existing admin promote endpoint and are not echoed.
Performance: APPROVE. Only two small post-push admin calls on main; no runtime cost to workspaces/concierge.
Readability/maintainability: APPROVE. The comments make the load-bearing concierge pin behavior explicit, and the job shape mirrors the existing runtime pin promotion flow closely enough to maintain.
CI/status: combined head status is success, CR2 already approved on this head, and I see no stale RCs in review readback.