Add Woodpecker validation and tag-release pipelines (ADR 0011) #153

Merged
svc-agent-writer merged 3 commits from feat/132-release-delivery into main 2026-11-03 00:38:04 +00:00

Summary

Adds CI to Mail Mind: a validation lane and a tag-release lane, ported from dev/people-mind-mcp#43 and #44 under the grill ruling on dev/people-mind-mcp#41. ADR 0011 records the decision.

.woodpecker/
├── validation.yaml        # make check on PRs and main, no secret
└── release.yaml           # refs/tags/v* only
      tag       scripts/release-tag-check.sh   annotated, vX.Y.Z[-rc.N], on main, tree carries the version
      assemble  scripts/release-assemble.sh    Containerfile stages, 6 layer tarballs
      image     scripts/release-image.sh       crane mutate onto the pinned base
      publish   scripts/release-publish.sh     refuse existing tag, push, check digest
tests/test_deploy.py       # base digest, uv pin, runtime config, one version in the tree
docs/adr/0011-release-and-delivery.md

One difference from People Mind ADR 0008: Mail Mind reads __version__ at run time (MCP server version, mail_status, --version), and the kustomize base names its own image. So the tag step also refuses a tag whose version differs from these at the tagged commit:

  • pyproject.toml
  • src/mail_mind_mcp/__init__.py
  • the image lines in deploy/k8s/base/deployment.yaml

The bump merges first, and the tag goes on that commit.

Evidence

  • Before: no .woodpecker/, images built and pushed by hand.
    After: make check: 999 passed, no audit findings. tests/test_deploy.py: 4 passed.
  • Tag check against the real tags (forge URL redirected to a local mirror):
    • v0.10.5 and v0.10.4 pass.
    • It refuses the following tags:
      • an annotated tag whose version is not in the tree: deployment.yaml says '0.10.5', the tag says 9.9.9
      • a lightweight tag
      • a moved tag
      • 0.10.5 without the v
  • Assemble and image steps run end to end in podman on the arm64 base. CI builds amd64; uv cannot run under emulation, so amd64 is first proven by the acceptance tag.
    • mailmind --version prints mail-mind-mcp 0.10.5.
    • Image config: user mailmind, entrypoint mailmind, command api, working directory /var/lib/mailmind, MAILMIND_CONFIG set.
    • The process runs as uid 1000.
    • Ownership: the venv and split packages are mailmind's, /app is root's, and the model is root's and read-only.
    • Imports pass: numpy, onnxruntime, PIL, lxml, embed and extract.
    • The largest compressed layer is the venv at 69 MB, under the 100 MB proxy limit.

Merge Danger

Door: two-way

Merging publishes nothing. Only a v* tag pushed by the operator reaches release.yaml and the token. The ADR's no-backfill rule stays in force: never re-push v0.10.5 or any earlier tag.

Blast Radius: CI-only

The validation lane runs on every PR from now on; nothing is required yet (runbook §9). This PR does not complete the acceptance criteria. Acceptance is the first release tag after merge (the v0.10.6 bump, then the tag): the image exists, podman pull …@<digest> matches the logged digest, and a re-run fails at the publish probe.

Operator acts:

  • allow_pr is done.
  • Store forgejo_package_token with events ["tag"].
  • Add the v* protected-tag rule for piers.

Refs #132

🤖 Generated with Claude Code

## Summary Adds CI to Mail Mind: a validation lane and a tag-release lane, ported from dev/people-mind-mcp#43 and #44 under the grill ruling on dev/people-mind-mcp#41. ADR 0011 records the decision. ```text .woodpecker/ ├── validation.yaml # make check on PRs and main, no secret └── release.yaml # refs/tags/v* only tag scripts/release-tag-check.sh annotated, vX.Y.Z[-rc.N], on main, tree carries the version assemble scripts/release-assemble.sh Containerfile stages, 6 layer tarballs image scripts/release-image.sh crane mutate onto the pinned base publish scripts/release-publish.sh refuse existing tag, push, check digest tests/test_deploy.py # base digest, uv pin, runtime config, one version in the tree docs/adr/0011-release-and-delivery.md ``` One difference from People Mind ADR 0008: Mail Mind reads `__version__` at run time (MCP server version, `mail_status`, `--version`), and the kustomize base names its own image. So the `tag` step also refuses a tag whose version differs from these at the tagged commit: - `pyproject.toml` - `src/mail_mind_mcp/__init__.py` - the image lines in `deploy/k8s/base/deployment.yaml` The bump merges first, and the tag goes on that commit. ## Evidence - **Before:** no `.woodpecker/`, images built and pushed by hand. **After:** `make check`: 999 passed, no audit findings. `tests/test_deploy.py`: 4 passed. - Tag check against the real tags (forge URL redirected to a local mirror): - `v0.10.5` and `v0.10.4` pass. - It refuses the following tags: - an annotated tag whose version is not in the tree: `deployment.yaml says '0.10.5', the tag says 9.9.9` - a lightweight tag - a moved tag - `0.10.5` without the `v` - Assemble and image steps run end to end in podman on the **arm64** base. CI builds amd64; uv cannot run under emulation, so amd64 is first proven by the acceptance tag. - `mailmind --version` prints `mail-mind-mcp 0.10.5`. - Image config: user `mailmind`, entrypoint `mailmind`, command `api`, working directory `/var/lib/mailmind`, `MAILMIND_CONFIG` set. - The process runs as uid 1000. - Ownership: the venv and split packages are `mailmind`'s, `/app` is `root`'s, and the model is `root`'s and read-only. - Imports pass: numpy, onnxruntime, PIL, lxml, `embed` and `extract`. - The largest compressed layer is the venv at 69 MB, under the 100 MB proxy limit. ## Merge Danger **Door:** two-way Merging publishes nothing. Only a `v*` tag pushed by the operator reaches `release.yaml` and the token. The ADR's no-backfill rule stays in force: never re-push `v0.10.5` or any earlier tag. **Blast Radius:** CI-only The validation lane runs on every PR from now on; nothing is required yet (runbook §9). This PR does not complete the acceptance criteria. Acceptance is the first release tag after merge (the `v0.10.6` bump, then the tag): the image exists, `podman pull …@<digest>` matches the logged digest, and a re-run fails at the publish probe. Operator acts: - `allow_pr` is done. - Store `forgejo_package_token` with events `["tag"]`. - Add the `v*` protected-tag rule for `piers`. Refs #132 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Add Woodpecker validation and tag-release pipelines (ADR 0011)
Some checks failed
ci/woodpecker/pr/validation Pipeline was canceled
6aea0828cd
validation.yaml runs make check on every pull request and push to main,
with no secret. release.yaml runs on v* tags: it checks the tag is
annotated, on main and carries the tree's version, bakes the image
without a daemon in the Containerfile's six layers, refuses an existing
image tag, and publishes with the svc-oci-writer token.

Mail Mind reads its version at run time, so unlike People Mind ADR 0008
the tag step also refuses a tag whose version differs from pyproject.toml,
__init__.py or the kustomize base image lines. tests/test_deploy.py holds
the bake to the Containerfile and the three version sources together.

Refs #132

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Name the credential field in the svc-oci-writer op reference
Some checks failed
ci/woodpecker/pr/validation Pipeline failed
5bf0f4b24a
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Accept the received-index plan of bookworm's SQLite in the embed scan test
All checks were successful
ci/woodpecker/pr/validation Pipeline was successful
873e646242
SQLite 3.40.1, the version in the image and in CI, uses messages_received
for the lookup without counting the expression index as covering. The
index-ordered scan with no temp B-tree sort still holds; only the word
COVERING differs from newer SQLite.

Refs #132

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign in to join this conversation.
No description provided.