Skip to content

ci(release): pin the compose evaluation stack automatically after each release (gated remainder of #4732; scripts in #4905) - #4910

Open
yomgui wants to merge 10 commits into
devfrom
fix/compose-pins-release-automation
Open

yomgui wants to merge 10 commits into
devfrom
fix/compose-pins-release-automation

Conversation

@yomgui

@yomgui yomgui commented Sep 11, 2026 •

Copy link
Copy Markdown
Member

Remainder to review (head 5bf19414e, +296/−20 in 4 files): three workflows — publish-ee-images.yml (+239: digest artifacts + the pin-eval-compose bot-PR job), compose-pins-drift.yml (+50, new), one line in e2e-test-failure-alerts.yml — plus the docs/RELEASING.md paragraph replacing the manual pin sequence with the bot; the scripts and tests already landed on dev via #4905 (229c11564), and the branch was resynced with one signed --no-ff merge of origin/dev so the diff is now exactly this.

Reduced on 2026-09-11 to the approval-gated part and resynced with dev. The scripts (pin-compose-images.mjs, check-compose-pins.mjs), their tests and the manual post-release step in docs/RELEASING.md were split out to #4905, which Warden can self-clear; this PR is now stacked on that branch and merged with origin/dev (merge commits only, nothing rewritten). The original description is preserved below.

What is left here (needs one human approving review)

Three workflow files (+ the RELEASING.md paragraph switching from "run this by hand" to "the bot does this"):

File What it adds
publish-ee-images.yml (+239) The den-api/den-web legs record build-push-action's digest as an artifact on tag pushes. New job pin-eval-compose (environment: warden-clearance, tag pushes only): checks out dev, refuses unless the tag is the highest stable tag, verifies the recorded digest equals what the registry serves for :<version>, runs pin, commits, runs docs --commit, commits, runs the drift check, opens a PR to dev, approves it with the diff-warden App token (guard: changed files must be exactly the compose file + the two docs), enables --auto --squash. Same pattern as update-models.yml.
compose-pins-drift.yml (+50, new) Unit tests + drift check on PRs to dev touching the guarded files, daily at 09:23 UTC, and on dispatch.
e2e-test-failure-alerts.yml (1 line) Wires the daily drift run into Test alerts so a bot PR that fails to land shows up in Slack.

Is it still wanted?

Yes — and the two events since this PR opened are the argument for it, not against it:

A script + doc step (#4905) cannot achieve the purpose on its own: the purpose is that the pin never lags a release, and only a tag-triggered job can guarantee that. The drift check in compose-pins-drift.yml is the safety net for when the bot PR fails to land. The workflow is the value here; it is legitimately gated.

Mergeability

Resynced: origin/dev @ fde910387 merged into both #4905's branch and this one (merge commits, signed and signed off). node --test scripts/release/*.test.mjs → 35/35 on the resynced tree; node scripts/release/check-compose-pins.mjs → ok: true (dev pins 0.18.46 = highest tag). Merge order: #4905 first, then this (GitHub retargets it to dev when #4905's branch is deleted).

Head after the split: 27528e2a1.


Original description (pre-split, evidence refers to heads c08635a / eddfe7a)

Problem

packaging/docker/docker-compose.eval.yml (the documented pull-only evaluation stack) pins openwork-den-api / openwork-den-web by <version>@<digest>, and the docs download it by commit sha + sha256. Nothing in the release pipeline owned that file: versions live only in git tags and CI stamps them at build time (scripts/release/stamp-version.mjs), so the compose pins sat at 0.18.37 through eight releases until #4729. It is already stale again: v0.18.46 was tagged minutes after #4729 merged.

Change

Scripts (thin workflow callers, unit-tested):

  • scripts/release/pin-compose-images.mjs
    • pin --version X.Y.Z --digest openwork-den-api=sha256:… --digest openwork-den-web=sha256:… rewrites every ghcr.io/different-ai/openwork-* image line (incl. den-migrate); refuses partial digests, malformed versions/digests, or a file without both pinned images.
    • docs --commit <sha> recomputes the compose sha256 and rewrites the raw.githubusercontent commit URL + checksum in packages/docs/self-host/evaluate-with-docker-compose.mdx and packaging/docker/README.md.
  • scripts/release/check-compose-pins.mjs (drift check, runnable locally): fails when a pinned den-api/den-web tag ≠ the released version, when a doc checksum ≠ sha256 of the compose file in the same tree, or when the two docs point at different commits. Source of truth: the highest stable v* tag via scripts/release/versions.mjs latest — that is what Release App uses to compute versions (package.json is a permanent 0.0.0-dev placeholder; constants.json holds only the opencode pin). --expected X.Y.Z overrides it for local dry runs.
  • scripts/release/pin-compose-images.test.mjs — 6 node --test cases; picked up by the existing node --test scripts/release/*.test.mjs step.

Workflows:

  • publish-ee-images.yml: the ee-images den-api/den-web legs record build-push-action's digest output as an artifact on tag pushes. New job pin-eval-compose (needs: [artifact-version, ee-images], tag pushes only, environment: warden-clearance) checks out dev, refuses to run unless the tag is the highest stable tag (no backwards pins on a re-pushed old tag), verifies the recorded digest equals what the registry currently serves for :<version> (refuses on mismatch), runs pin, commits, runs docs --commit <that sha>, commits, runs the drift check, opens a PR to dev, approves it with the diff-warden App token (guard: changed files must be exactly the compose file + the two docs, head unchanged), and enables --auto --squash. This is the update-models.yml pattern verbatim (signed commits as benjaminshafii, App approval, openwork-tests-required still gates merge). Two commits because the docs reference the pin commit's sha; after squash that sha stays fetchable via refs/pull/<n>/head — same convention as the existing 9f8645eb/50932fa7 pins.
  • compose-pins-drift.yml (new): runs the unit tests + drift check on PRs to dev that touch the guarded files, daily at 09:23 UTC, and on dispatch. Path-filtered on PRs so unrelated PRs are not red during the ~1h tag → bot-PR-merge window; the daily run is wired into Test alerts (one-line addition to e2e-test-failure-alerts.yml) so a bot PR that fails to land shows up in Slack.
  • docs/RELEASING.md: one paragraph documenting the exception to "zero commits".

Proof

Config/CI change; runtime proof is the script tests and the drift check against real trees (local lane, no Daytona needed — no product surface).

$ node --test scripts/release/pin-compose-images.test.mjs      → tests 6, pass 6, fail 0
$ node --test scripts/release/*.test.mjs                        → tests 35, pass 35, fail 0

Drift check on dev before #4729 (c744e2d7b, files checked out from that commit) — fails:

"problems": [
  "packaging/docker/docker-compose.eval.yml: openwork-den-api is pinned to 0.18.37 but the released version is 0.18.45",
  "packaging/docker/docker-compose.eval.yml: openwork-den-api is pinned to 0.18.37 but the released version is 0.18.45",
  "packaging/docker/docker-compose.eval.yml: openwork-den-web is pinned to 0.18.37 but the released version is 0.18.45"
]  exit=1

After #4729 (daa7c6e9a, highest tag then v0.18.45) — passes: {"ok":true,"releasedVersion":"0.18.45","problems":[]} exit=0.

End-to-end dry run of the bot sequence in a scratch worktree (pin 0.18.46 with placeholder digests → commit → docs --commit HEAD → check --expected 0.18.46 → {"ok":true}; plain check correctly failed because 0.18.46 was not yet tagged at that moment).

docker buildx imagetools inspect --format '{{.Manifest.Digest}}' reproduces the exact digest kind already pinned: openwork-den-api:0.18.37 → sha256:5ae1fab9… (the old pin), :0.18.45 → sha256:973cb75d… (#4729), matching containerimage.digest in the publish run logs.

actionlint (1.7.12, shellcheck-backed) on the three workflows: exit 0. Local Warden pnpm warden:check on c08635acb vs origin/dev a0d6bd1de: 2/2 skills (diff-security-review, confidentiality-review), No findings, exit 0 — after fixing two earlier findings (DGK-HPK mutable action tags → SHA-pinned; 5U5-SE8 digest from mutable tag → digest from the build artifact, registry only cross-checked).

Live demonstration on this PR: the first Compose pins drift run here failed because v0.18.46 had just been tagged while dev still pinned 0.18.45 (the exact gap this PR closes). #4756 pinned 0.18.46 (manually, using this PR's script); after merging dev into this branch the check passes: {"ok":true,"releasedVersion":"0.18.46","problems":[]}.

Also observed during #4756: the v0.18.46 den-api push failed once (error writing layer blob: not_found) and the re-run produced a different digest (cdb69e1e… → e254a384…). The bot job takes its digest from the build artifact and refuses to pin when the registry disagrees, so a re-run pins the image that actually shipped.

How the next release exercises this

The next stable tag after this merges (v0.18.47) triggers Publish EE Artifacts; its Pin evaluation compose stack job should:

  1. log openwork-den-api:<v> -> sha256:… and openwork-den-web:<v> -> sha256:…,
  2. open fix(packaging): pin the compose evaluation stack to the <v> images from automation/compose-pins-v<v>-<run>-1, approved by diff-warden, auto-merge enabled,
  3. after it merges: node scripts/release/check-compose-pins.mjs on dev → ok: true, and the doc's curl … | shasum -a 256 --check → OK.

Verify with gh run view <run-id> --job "Pin evaluation compose stack" and gh pr list --search "pin the compose evaluation stack".

Review note

Touches .github/, so Warden Clearance will not self-clear it — needs a human approval.


Recreated from #4732, which GitHub auto-closed when its stacked base branch was deleted after the base PR merged. Same head branch (fix/compose-pins-release-automation), same commits; base is now dev. Reviewers: see the original thread on #4732 for context and Warden discussion.

…h release

packaging/docker/docker-compose.eval.yml pinned den-api/den-web by hand and
nothing in the release pipeline owned it, so evaluators ran 0.18.37 while
0.18.45 was released (#4729). After a stable tag publishes the EE images,
publish-ee-images.yml now resolves the pushed OCI index digests and opens
an auto-approved, auto-merging PR to dev that rewrites the pins and the
docs' download commit + checksum (scripts/release/pin-compose-images.mjs).
A Compose pins drift workflow (scripts/release/check-compose-pins.mjs)
fails when the pins are not the highest stable v* tag, the version source
the Release App workflow itself uses.
Split of #4732: lands scripts/release/pin-compose-images.mjs (pin + docs
rewrites, refuses partial or malformed input), check-compose-pins.mjs (drift
check against the highest stable tag) and their node --test cases, which the
existing `node --test scripts/release/*.test.mjs` step already picks up.
docs/RELEASING.md documents the manual pin sequence #4756 used. The three
workflow files that automate this after each release stay in #4732, stacked
on this branch, for a human review.

Signed-off-by: Guillaume Loret <[email protected]>
The scripts, tests and manual release step now live in #4905 (self-clearable
by Warden). This branch keeps only the three .github/workflows files; the
tree is unchanged.

Signed-off-by: Guillaume Loret <[email protected]>
…ation

Single merge base so the PR diff shows only the workflow files.

Signed-off-by: Guillaume Loret <[email protected]>
@vercel

vercel Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openwork-app Ready Ready Preview Sep 11, 2026 8:06pm UTC
openwork-den Ready Ready Preview Sep 11, 2026 8:06pm UTC
openwork-diagnostics Ready Ready Preview Sep 11, 2026 8:06pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
openwork-landing Ignored Ignored Preview Sep 11, 2026 8:06pm UTC

Comment on lines +617 to +618
git config --local user.email "[email protected]"
git config --local user.name "benjaminshafii"

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.

Workflow exposes a personal commit identity

The workflow hard-codes an individual’s name and email into commits that it pushes to a public branch and pull request; use a non-personal automation identity and retain any required individual mapping only in restricted repository configuration.

Evidence
  • The changed lines configure Git’s author identity before creating signed commits.
  • The subsequent workflow steps push those commits to the repository and open a pull request.
  • The same personal identity is already present in other public workflows, so this addition extends an existing disclosure rather than reversing it.
  • Clear when: generated commits use only a non-personal automation identity and no individual identity appears in the public workflow.

Identified by Warden · confidentiality-review · UBM-RN8

@github-actions

Copy link
Copy Markdown
Contributor

Warden review summary — Blocked

Native findings: 1. Blocking policy matches before consolidation: 1. Full finding text remains in Warden's native checks and review threads. This comment retains only native IDs, severity, skill attribution, and safe locations. Analysis run

Reported trigger coverage (not proof of complete repository or context coverage): diff-security-review (51235 ms), confidentiality-review (54979 ms).

Blockers

  • UBM-RN8 · high · confidentiality-review

Advisories

  • None.

Needs recheck

  • None.

Observed review-thread metrics

  • Unique observed run attempts in retained window: 1
  • Distinct heads in retained window: 1
  • Current unresolved Warden threads: 1 of 1 observed
  • Observed resolved/unresolved transitions in retained snapshots: 0 / 0
  • First observed resolved/unresolved (state at first collection, not event time): 0 / 1
  • Precision: unavailable (no adjudications; no TP/FP values are inferred)
  • Observation window: 1/20 run attempts retained; truncated: false
  • Transition snapshot: 1/1 current attributed threads retained (limit 500); truncated: false

Thread states are read-only collection snapshots. These metrics are neither lifetime totals nor exact resolution times, and this summary is not clearance authority.

@github-actions

Copy link
Copy Markdown
Contributor

Passed · 12/12 tests · 18/18 assertions · 8 images

Commit 5bf19414e03352c582bd72022cb08e665affeb06 · selected evidence

Open review report

This branch was successfully deployed

3 active deployments
Preview – openwork-app — 5bf19414 Deployed Sep 11, 2026 by vercel[bot]
Preview – openwork-den — 5bf19414 Deployed Sep 11, 2026 by vercel[bot]
Preview – openwork-diagnostics — 5bf19414 Deployed Sep 11, 2026 by vercel[bot]
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.

1 participant