CI: Woodpecker validation and tag-release pipelines; images built from the vX.Y.Z tag #132

Closed
opened 2026-11-02 05:43:44 +00:00 by piers · 2 comments
Owner

Decision record (grill on dev/people-mind-mcp#41, 2026-11-02 09:40Z, operator accepted)

The #41 grill ruled this issue's open questions as well. This record supersedes the body below wherever they disagree. Full record: dev/people-mind-mcp#41 and its ADR 0008 (docs/adr/0008-release-and-delivery.md).

  1. Trigger. event: tag on refs/tags/v*, as this body proposes. Item 5 is ruled: no publish-on-main.
  2. Tags. Keep the existing v prefix on git tags. The image tag is the version without the v.
  3. Version source. The tag only.
  4. Immutable publish. Publish probes crane digest <image>:<tag> and refuses an existing tag.
  5. Credential. forgejo_package_token (svc-oci-writer) with events: ["tag"], behind a Forgejo protected-tag rule that limits v* to piers.
  6. Guards in make check. A base-digest drift test (pipelines against the Makefile) and a Containerfile parity test (user, entrypoint, command).
  7. Record. A Mail Mind ADR for release and delivery that points to people-mind ADR 0008.
  8. Route. Architect-direct, one PR. Not SVD.
  9. No backfill and no rebuild of existing releases. The first tag pushed after activation is the acceptance run. Old v* tags must not be re-pushed: publish refuses them, but the run would still fail noisily.
  10. Out of scope. The starbase pin (starbase/iac#297) and the infra/iac runbook update.

Human act (CONV-40): activate on ci.groupthink.asia and PATCH {"allow_pr": true}; store forgejo_package_token with events: ["tag"]; add the v* protected-tag rule for piers.


Problem

The repo has release tags (v0.10.2 is the latest) but no CI and no release automation. Every image in the Forgejo registry was built and pushed by hand (make image-amd64, podman push), and the starbase overlays pin the image by hand in JSON patches (mail-mind-mcp:0.10.1@sha256:…). No pipeline runs make check before a merge; the architect runs it on a scratch worktree.

Woodpecker exists for this forge at https://ci.groupthink.asia (estate meridian, lane linux, docker backend; dev/stables and infra/iac carry .woodpecker/ pipelines). This repo is not enabled on it and has no pipeline files. One lane in the estate already builds and publishes an image: dev/ops-gateway .woodpecker/bake.yaml, a daemonless crane bake to the Forgejo registry (dev/ops-gateway ADR-0008 Amendment 2026-10-04, ruled on infra/iac#652). It runs with no container daemon, no Kaniko, no buildx and no trusted flag, because a Woodpecker step on the meridian lane has none of those, and the runner validator refuses privileged, volumes, devices and network_mode by key name. A new bake here copies that shape; it does not need a new builder decision.

Decision to record

  1. The annotated git tag stays the release unit, keeping the vX.Y.Z form already in use. CI builds the image from the tag with the image tag X.Y.Z (the v stripped, matching the images already pushed). The starbase pin references the release three times: kustomize base ?ref=vX.Y.Z, images[].newTag: X.Y.Z, images[].digest. Record this as an ADR amendment in docs/adr/ and in the README deploy section.
  2. Validation pipeline .woodpecker/validation.yaml: event: push on main and event: pull_request; labels platform: linux/amd64, backend: docker, estate: meridian, lane: linux (mirror dev/stables/.woodpecker/validation.yaml); CONV-36 trigger-posture header at the top of the file (runbook §2); clone plugin pinned by digest; one step on the Containerfile's digest-pinned Python image that installs uv and runs make check. Integration tests that need podman stay host-only.
  3. Release pipeline .woodpecker/release.yaml: event: tag, ref: refs/tags/v*; reproduces the Containerfile the way dev/ops-gateway does: an assemble step runs the dependency stage on the pinned Python image and writes one layer tarball (the venv), an image step appends it to the pinned base with crane and sets the Containerfile's config, and a publish step pushes with crane, reads back the registry digest, tags git.groupthink.asia/dev/mail-mind-mcp:X.Y.Z and prints the digest as the last log line. The Containerfile stays the readable definition of the image; a change to it changes the bake scripts in the same commit. The push credential is the existing dev org token svc-oci-writer (write:package, instance-wide package scope; the branch-pusher reach is an accepted residual, infra/iac#652 and #833), stored as the repository secret forgejo_package_token with events limited to the publish event. Stored secrets sit in plaintext in the Woodpecker database (infra/iac docs/runbooks/woodpecker-pipeline-authoring.md §8), so the validation lane holds no secret and a PR run publishes nothing (ci-runner trust posture, lane-build).
  4. Operator steps (not in the repo): activate the repo on ci.groupthink.asia (POST /api/repos?forge_remote_id=<id> with op://Infra/woodpecker-api/token, then PATCH {"allow_pr": true}, without which every PR run is dropped silently; runbook §1), and store the forgejo_package_token secret on the repo (the same svc-oci-writer token dev/ops-gateway and dev/people-mind-mcp#41 use). Both are credential acts reserved to the operator.
  5. Open question for triage: event: tag or publish on every push to main. No estate lane uses event: tag yet (runbook §3). dev/ops-gateway publishes on every push to main and the digest pin in starbase is the deploy boundary. This repo already tags releases and starbase already pins its base by tag (?ref=v0.10.1), so the tag lane matches current practice; the alternative is publish-on-main with a floating image tag. The tag lane is the cheaper one to reverse.

Acceptance criteria

  • A PR run on validation.yaml goes green on make check.
  • Pushing tag v0.10.3 runs release.yaml, the image 0.10.3 exists in the Forgejo registry, and podman pull git.groupthink.asia/dev/mail-mind-mcp@<digest> returns the logged digest.
  • The ADR amendment and README state the tag and image-tag convention.

Dispatch note

codex-svd dispatch forbids edits under .woodpecker/* (forbiddenMutationCheck; dev/stables ADR 0021 has the rider remedy). This unit either goes architect-direct on a branch or through the ADR 0021 rider. Triage decides.

Human act

credential: the operator activates the repo on ci.groupthink.asia and stores forgejo_package_token (CONV-40)

Primary files

  • .woodpecker/validation.yaml (new)
  • .woodpecker/release.yaml (new)
  • docs/adr/ amendment, README.md deploy section

Blocked by

None.

Filed under: operator word "Cut issues to close the CI/CD gap as you proposed." sha256:41b61dc477f6

## Decision record (grill on dev/people-mind-mcp#41, 2026-11-02 09:40Z, operator accepted) The #41 grill ruled this issue's open questions as well. This record supersedes the body below wherever they disagree. Full record: dev/people-mind-mcp#41 and its ADR 0008 (`docs/adr/0008-release-and-delivery.md`). 1. **Trigger.** `event: tag` on `refs/tags/v*`, as this body proposes. Item 5 is ruled: no publish-on-main. 2. **Tags.** Keep the existing `v` prefix on git tags. The image tag is the version without the `v`. 3. **Version source.** The tag only. 4. **Immutable publish.** Publish probes `crane digest <image>:<tag>` and refuses an existing tag. 5. **Credential.** `forgejo_package_token` (`svc-oci-writer`) with `events: ["tag"]`, behind a Forgejo protected-tag rule that limits `v*` to `piers`. 6. **Guards in `make check`.** A base-digest drift test (pipelines against the Makefile) and a Containerfile parity test (user, entrypoint, command). 7. **Record.** A Mail Mind ADR for release and delivery that points to people-mind ADR 0008. 8. **Route.** Architect-direct, one PR. Not SVD. 9. **No backfill and no rebuild of existing releases.** The first tag pushed after activation is the acceptance run. Old `v*` tags must not be re-pushed: publish refuses them, but the run would still fail noisily. 10. **Out of scope.** The starbase pin (starbase/iac#297) and the infra/iac runbook update. **Human act (CONV-40):** activate on `ci.groupthink.asia` and `PATCH {"allow_pr": true}`; store `forgejo_package_token` with `events: ["tag"]`; add the `v*` protected-tag rule for `piers`. --- ## Problem The repo has release tags (`v0.10.2` is the latest) but no CI and no release automation. Every image in the Forgejo registry was built and pushed by hand (`make image-amd64`, `podman push`), and the starbase overlays pin the image by hand in JSON patches (`mail-mind-mcp:0.10.1@sha256:…`). No pipeline runs `make check` before a merge; the architect runs it on a scratch worktree. Woodpecker exists for this forge at `https://ci.groupthink.asia` (estate `meridian`, lane `linux`, docker backend; `dev/stables` and `infra/iac` carry `.woodpecker/` pipelines). This repo is not enabled on it and has no pipeline files. One lane in the estate already builds and publishes an image: dev/ops-gateway `.woodpecker/bake.yaml`, a daemonless crane bake to the Forgejo registry (dev/ops-gateway ADR-0008 Amendment 2026-10-04, ruled on infra/iac#652). It runs with no container daemon, no Kaniko, no buildx and no `trusted` flag, because a Woodpecker step on the meridian lane has none of those, and the runner validator refuses `privileged`, volumes, devices and `network_mode` by key name. A new bake here copies that shape; it does not need a new builder decision. ## Decision to record 1. **The annotated git tag stays the release unit**, keeping the `vX.Y.Z` form already in use. CI builds the image from the tag with the image tag `X.Y.Z` (the `v` stripped, matching the images already pushed). The starbase pin references the release three times: kustomize base `?ref=vX.Y.Z`, `images[].newTag: X.Y.Z`, `images[].digest`. Record this as an ADR amendment in `docs/adr/` and in the README deploy section. 2. **Validation pipeline** `.woodpecker/validation.yaml`: `event: push` on `main` and `event: pull_request`; labels `platform: linux/amd64`, `backend: docker`, `estate: meridian`, `lane: linux` (mirror `dev/stables/.woodpecker/validation.yaml`); CONV-36 trigger-posture header at the top of the file (runbook §2); clone plugin pinned by digest; one step on the Containerfile's digest-pinned Python image that installs `uv` and runs `make check`. Integration tests that need podman stay host-only. 3. **Release pipeline** `.woodpecker/release.yaml`: `event: tag`, `ref: refs/tags/v*`; reproduces the `Containerfile` the way dev/ops-gateway does: an `assemble` step runs the dependency stage on the pinned Python image and writes one layer tarball (the venv), an `image` step appends it to the pinned base with crane and sets the Containerfile's config, and a `publish` step pushes with crane, reads back the registry digest, tags `git.groupthink.asia/dev/mail-mind-mcp:X.Y.Z` and prints the digest as the last log line. The Containerfile stays the readable definition of the image; a change to it changes the bake scripts in the same commit. The push credential is the existing `dev` org token `svc-oci-writer` (`write:package`, instance-wide package scope; the branch-pusher reach is an accepted residual, infra/iac#652 and #833), stored as the repository secret `forgejo_package_token` with `events` limited to the publish event. Stored secrets sit in plaintext in the Woodpecker database (infra/iac `docs/runbooks/woodpecker-pipeline-authoring.md` §8), so the validation lane holds no secret and a PR run publishes nothing (ci-runner trust posture, lane-build). 4. **Operator steps** (not in the repo): activate the repo on `ci.groupthink.asia` (`POST /api/repos?forge_remote_id=<id>` with `op://Infra/woodpecker-api/token`, then `PATCH` `{"allow_pr": true}`, without which every PR run is dropped silently; runbook §1), and store the `forgejo_package_token` secret on the repo (the same `svc-oci-writer` token dev/ops-gateway and dev/people-mind-mcp#41 use). Both are credential acts reserved to the operator. 5. **Open question for triage: `event: tag` or publish on every push to `main`.** No estate lane uses `event: tag` yet (runbook §3). dev/ops-gateway publishes on every push to `main` and the digest pin in starbase is the deploy boundary. This repo already tags releases and starbase already pins its base by tag (`?ref=v0.10.1`), so the tag lane matches current practice; the alternative is publish-on-main with a floating image tag. The tag lane is the cheaper one to reverse. ## Acceptance criteria - A PR run on `validation.yaml` goes green on `make check`. - Pushing tag `v0.10.3` runs `release.yaml`, the image `0.10.3` exists in the Forgejo registry, and `podman pull git.groupthink.asia/dev/mail-mind-mcp@<digest>` returns the logged digest. - The ADR amendment and README state the tag and image-tag convention. ## Dispatch note `codex-svd` dispatch forbids edits under `.woodpecker/*` (`forbiddenMutationCheck`; dev/stables ADR 0021 has the rider remedy). This unit either goes architect-direct on a branch or through the ADR 0021 rider. Triage decides. ## Human act credential: the operator activates the repo on ci.groupthink.asia and stores forgejo_package_token (CONV-40) ## Primary files - `.woodpecker/validation.yaml` (new) - `.woodpecker/release.yaml` (new) - `docs/adr/` amendment, `README.md` deploy section ## Related - dev/people-mind-mcp#41: the same pipeline shape for the sibling repo. - starbase/iac#297: Renovate opens the pin PRs from the tags. ## Blocked by None. Filed under: operator word "Cut issues to close the CI/CD gap as you proposed." sha256:41b61dc477f6

This was generated by AI during triage.

Triaged 2026-11-03 (backlog wave 5, batch T-B1). Labels confirmed (enhancement, ready-for-human); the ## Human act, ## Blocked by and Filed under: lines already satisfy CONV-40 rules 5 and 6, and the decision record at the top points at dev/people-mind-mcp ADR 0008 (docs/adr/0008-release-and-delivery.md, present at origin/main). Body hygiene only: the acceptance heading now reads ## Acceptance criteria so flow sees the anchor. Operator act outside the stages: the .woodpecker/* architect-direct PR (decision 8).

Filed under: operator word "ready-for-human, architect-direct (Recommended)" sha256:39567474da36

> *This was generated by AI during triage.* Triaged 2026-11-03 (backlog wave 5, batch T-B1). Labels confirmed (`enhancement`, `ready-for-human`); the `## Human act`, `## Blocked by` and `Filed under:` lines already satisfy CONV-40 rules 5 and 6, and the decision record at the top points at dev/people-mind-mcp ADR 0008 (`docs/adr/0008-release-and-delivery.md`, present at origin/main). Body hygiene only: the acceptance heading now reads `## Acceptance criteria` so `flow` sees the anchor. Operator act outside the stages: the `.woodpecker/*` architect-direct PR (decision 8). Filed under: operator word "ready-for-human, architect-direct (Recommended)" sha256:39567474da36

Acceptance run: tag v0.10.6, the first release tag after activation (decision record item 9).

  • PR lane: validation.yaml is green on every PR since #153 (pipelines 3–14).
  • Release lane: pipeline 17 published git.groupthink.asia/dev/mail-mind-mcp:0.10.6, digest sha256:beace95e3099d2b91a3abbef3c4d65a4eb8878c3929bed401465982dcc757a74. The digest is the last log line.
  • Pull by digest: podman pull git.groupthink.asia/dev/mail-mind-mcp@sha256:beace95e…a74 returns that digest. Labels: version 0.10.6, revision 2b1c67320e0e01464fdd104b3ec5fb873eddfe4b.
  • Kustomize: kubectl kustomize …//deploy/k8s/base?ref=v0.10.6 renders all three mail-mind containers at :0.10.6.

Two failures before the green run:

  1. Pipeline 11 failed at compile time. The secret forgejo_package_token had an image filter, which makes a secret plugin-only, and publish is a command step. The operator cleared the filter (events: ["tag"], images: []). PR #157 corrected the comment in release.yaml.
  2. Pipeline 16 failed in publish with Cloudflare 524 on a blob PATCH, after 8 layers had uploaded. No manifest was pushed, so the tag did not exist. The restart (pipeline 17) skipped the uploaded layers and succeeded.

Residual: a large layer pushed through Cloudflare can exceed its ~100 s origin timeout. The next release whose venv or model layer changes can hit 524 again. A restart is safe, because the manifest goes last and the probe refuses only an existing tag. A lasting fix routes registry pushes around Cloudflare. That is an infra decision; it is not filed yet.

Out of scope here: the starbase pin (starbase/iac#297) can now take newTag: 0.10.6 plus the digest above.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

Acceptance run: tag `v0.10.6`, the first release tag after activation (decision record item 9). - **PR lane:** `validation.yaml` is green on every PR since #153 (pipelines 3–14). - **Release lane:** pipeline 17 published `git.groupthink.asia/dev/mail-mind-mcp:0.10.6`, digest `sha256:beace95e3099d2b91a3abbef3c4d65a4eb8878c3929bed401465982dcc757a74`. The digest is the last log line. - **Pull by digest:** `podman pull git.groupthink.asia/dev/mail-mind-mcp@sha256:beace95e…a74` returns that digest. Labels: version `0.10.6`, revision `2b1c67320e0e01464fdd104b3ec5fb873eddfe4b`. - **Kustomize:** `kubectl kustomize …//deploy/k8s/base?ref=v0.10.6` renders all three mail-mind containers at `:0.10.6`. Two failures before the green run: 1. **Pipeline 11** failed at compile time. The secret `forgejo_package_token` had an image filter, which makes a secret plugin-only, and `publish` is a command step. The operator cleared the filter (`events: ["tag"]`, `images: []`). PR #157 corrected the comment in `release.yaml`. 2. **Pipeline 16** failed in `publish` with Cloudflare 524 on a blob `PATCH`, after 8 layers had uploaded. No manifest was pushed, so the tag did not exist. The restart (pipeline 17) skipped the uploaded layers and succeeded. **Residual:** a large layer pushed through Cloudflare can exceed its ~100 s origin timeout. The next release whose venv or model layer changes can hit 524 again. A restart is safe, because the manifest goes last and the probe refuses only an existing tag. A lasting fix routes registry pushes around Cloudflare. That is an infra decision; it is not filed yet. Out of scope here: the starbase pin (starbase/iac#297) can now take `newTag: 0.10.6` plus the digest above. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dev/mail-mind-mcp#132
No description provided.