Stamp deployed-commit annotation on paperclip-api (BLO-22032) - #1050
Stamp deployed-commit annotation on paperclip-api (BLO-22032)#1050allyblockcast[bot] wants to merge 2 commits into
Conversation
The production Deployment carries no build stamp today (no BUILD_INFO, no /version endpoint, no commit SHA in server/dist/index.js), so the only way to learn what commit is live is docker buildx imagetools inspect mapping the pinned image digest back to a Harbor tag by hand. Stamp paperclip.blockcast.net/deployed-commit onto the paperclip-api pod template, alongside the existing approval-plan-sha256 marker, so drift monitoring can read it with a single kubectl get. Opt-in via api.deployedCommit, same invariant as the approval marker: unset by default, and setting it changes nothing else in the render. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 similar comment
|
Hey @allyblockcast[bot]! Before this PR can be reviewed, a few things need attention: Missing or incomplete:
Once updated, push a new commit and these checks will re-run automatically. — commitperclip |
Ally — Consolidated PR ReviewLenses: pr-review-toolkit (code, tests, comments, errors, types) + gstack/review + native-codex. Critical Issues (0)Important Issues (2)
Suggestions (0)Strengths
Recommended Action
The PR is authored by |
kkroo
left a comment
There was a problem hiding this comment.
Reviewed the deploy annotation change and the follow-up test coverage. api.deployedCommit is opt-in, validated as a 40-char lowercase commit SHA, reserved against pod.annotations injection, and stamped only on the API pod template. Local Helm chart tests pass: node --test deploy/helm/paperclip/tests/*.test.mjs (42/42). No active review threads remain; GitHub general CI is queued.
Ally — Consolidated PR ReviewLenses: pr-review-toolkit (code, tests, comments, errors, types) + gstack/review + native-codex. Prior Findings Dispositioned (2)
Critical Issues (0)Important Issues (1)
Suggestions (0)Strengths
Recommended Action
The PR is authored by |
|
Dispositioning the still-open important finding ( Confirmed real by reading the workflow: the deploy job checks out the chart at the operator-selected I'm deliberately not fixing this in this PR: the fix means extending trusted release-approval tooling ( Filed as BLO-22202 with the concrete fix shape (mirror the marker's post-renderer pattern) and acceptance criteria, assigned to me. Not merging blind on this — it's tracked and owned. CI still has 4 "Verify serialized server suites" checks queued; auto-merge is already enabled from the existing approval, so this will merge once those complete. No new commit needed on this PR. |
Thinking Path
Linked Issues or Issue Description
Refs: BLO-22032 — "Alarm on paperclip-api production drift — manual deploy is the ratified policy, but drift is currently undetectable"
What Changed
deploy/helm/paperclip/templates/deployment-api.yaml: add an opt-inapi.deployedCommitvalue that, when set, stampspaperclip.blockcast.net/deployed-commitonto the pod template annotations (mirrors the existingapi.approvalPlanSha256guard: reserved-key check onpod.annotations, 40-hex validation, no-op when unset)..github/workflows/docker.yml: pass--set-string api.deployedCommit="${COMMIT}"(the resolved full target SHA) at all three points that already render/upgradedeployment-api.yamlfor a production release — the unstamped render used to compute the approval marker, the stamped render that becomes the deploy plan, and the finalhelm upgrade.Deliberately unchanged: the
workflow_dispatch-only trigger, thepaperclip-productionenvironment approval gate, and the approval-plan-sha256 two-pass marker scheme itself.Verification
Ran the existing marker-invariant suite locally (
node --test deploy/helm/paperclip/tests/approval-plan-marker.test.mjs): all 8 tests that don't require a localrubybinary pass unchanged, including the load-bearing "stamping the marker changes nothing else in the rendered Deployment" test. The 3 tests that exercisescripts/stamp-paperclip-api-approval-plan.shitself couldn't run in this sandbox (noruby) — that script is untouched by this PR, so CI (which has ruby) should confirm those still pass.Risks
build-and-pushis untouched, and a master push never runs thedeployjob (stillworkflow_dispatch-only + environment-gated), so merging this alone deploys nothing.with .Values.api.deployedCommit), so any render that doesn't set it — including every existing test and any non-Blockcast chart consumer — is byte-for-byte unchanged.image.tag/image.digest/replicas/anything else the approval script's canonical-projection orROLLOUT_COMPLETE_JQchecks — those still key offapproval-plan-sha256and the image digest, unaffected by this field. Worst case is a stale/wrong label, not a bad rollout.Model Used
Claude Sonnet 5 (
claude-sonnet-5[1m]), 1M context window, extended thinking, agentic tool use (Bash, Read/Edit, localhelm/node --testverification against a shallow clone) — Anthropic.Checklist
Fixes: #/Closes #/Refs #OR (b) described the issue in-PR following the relevant issue templatedeployedCommittest could be added if reviewers want one