Repository navigation
feat(dist): OCI container with multi-arch + healthcheck + compose (#1236) - #1319
Conversation
Daemon-first OCI image with healthcheck, declared volume contract, and multi-arch publication. Adds a distroless variant and a sample compose file that documents the operator surface. - Containerfile: daemon-first ENTRYPOINT/CMD (polylogued run --enable-api), UID/GID 10001 (build-arg overridable), POLYLOGUE_ARCHIVE_ROOT=/data/archive and POLYLOGUE_CONFIG_DIR=/etc/polylogue with matching VOLUME declarations, EXPOSE 8766, HEALTHCHECK via curl to /api/health, OCI image labels. - Distroless stage (gcr.io/distroless/python3-debian12:nonroot) for security-conscious deployments. Reuses the runtime stage's installed site-packages so both variants stay in lockstep. - .dockerignore: lean build context (no .git, .cache, .venv, tests, docs). - .github/workflows/container.yml: dedicated workflow building both variants for linux/amd64 + linux/arm64 via buildx + QEMU, pushing to ghcr.io/sinity/polylogue on master and on v*.*.* tags with semver + master-<sha> tagging via docker/metadata-action. PR builds smoke amd64 only and do not push. - release.yml: drop the duplicate publish-container job (now owned by container.yml). - docs/docker-compose.yaml: full sample with healthcheck, named volumes, user 10001, read_only root, cap_drop ALL, no-new-privileges. - docs/installation.md: variant matrix, volume contract, compose pointer, distroless notes, backup expectations. Closes #1236 Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7d19acc0d2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
## Summary Gate `provenance` and `sbom` on `steps.decide.outputs.push == 'true'` in `.github/workflows/container.yml` so attestations are emitted only on push paths (master, tag, opt-in workflow_dispatch) where the image is published to GHCR. PR smoke builds, which set `load: true` to import into the local docker daemon, no longer request attestations and therefore no longer produce a manifest list that the classic docker image store cannot import. ## Problem The `Container` workflow has been failing on every push to `master` since #1319 merged (2026-05-18), and on every PR that triggers it (dependabot #1357 / #1358 / #1359, etc.). Both matrix jobs (`build (runtime)` and `build (distroless)`) fail with: ``` ERROR: failed to build: docker exporter does not currently support exporting manifest lists ``` Root cause (see #1373): `docker/build-push-action@v6` is configured with `provenance: true` + `sbom: true` + `load: ${{ steps.decide.outputs.push != 'true' }}`. Buildx emits attestations as a manifest list even on a single-platform build, and the classic docker image store cannot import manifest lists via `--load`. The combination has never been compatible (docker/buildx#1533, docker/build-push-action#820). The previous inlined publish-container job in `release.yml` pushed directly to ghcr.io and never hit `--load`, which is why the latent conflict only surfaced after #1319 introduced PR smoke builds. ## Solution `.github/workflows/container.yml`: ```yaml provenance: ${{ steps.decide.outputs.push == 'true' }} sbom: ${{ steps.decide.outputs.push == 'true' }} ``` This is option 1 from the issue's recommended fixes — the minimal coherent change. - Push paths (master, tag, `workflow_dispatch` with `push=true`) still produce signed provenance + SBOM attestations on the published image, exactly as before. - PR / `workflow_dispatch` smoke paths skip attestations. The single-platform image loads cleanly into the local docker daemon and the existing `docker run --rm --entrypoint ... --version` smoke test runs unchanged. - No code paths touched; no other workflows touched; behavior on published images is preserved. Alternatives rejected: containerd image store (needs runner-level daemon config, infeasible on hosted runners); OCI tarball + skopeo (more moving parts than the symptom warrants). ## Verification - Reviewed the failing workflow definition and confirmed the only call sites for `provenance`/`sbom`/`load` are the four lines edited in this PR. - Confirmed `steps.decide` already gates the push/load decision symmetrically (`push=false`/`load=true` on `pull_request`, `push=true`/no `--load` on master/tag), so reusing that boolean for attestations preserves the published-artifact surface. - The actual smoke is the Container workflow run on this PR; expectation: both `build (runtime)` and `build (distroless)` go green, and master/tag pushes continue to publish provenance- and SBOM-attested images. Closes #1373
|
Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.
Only the rows listed above are dispositioned. Held findings remain open. |
|
Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.
Only the rows listed above are dispositioned. Held findings remain open. |
Summary
Daemon-first OCI image for
polyloguedwith a healthcheck against the daemon HTTP API, a declared volume contract for archive + config, multi-arch publication (linux/amd64+linux/arm64), a distroless variant, and a sampledocker-compose.yaml. Image lands onghcr.io/sinity/polyloguevia a dedicatedcontainer.ymlworkflow.Closes #1236
Ref #953
Problem
The only daemon distribution path was a one-stage
Containerfilebuilt and pushed inline fromrelease.yml. That job:linux/amd64).HEALTHCHECKand no declaredVOLUMEcontract — operators had to guess the data + config layout.polylogue --helpinstead of starting the daemon, so the image did nothing useful when run without overrides.Solution
Containerfilerewritten:ENTRYPOINT(tini) +CMD(polylogued run --enable-api --api-host 0.0.0.0 --api-port 8766). CLI (polylogue,polylogue-mcp) remains onPATHfordocker execdebug per the issue's decision.polylogueat UID/GID 10001 (build-arg overridable).ENV POLYLOGUE_ARCHIVE_ROOT=/data/archive,ENV POLYLOGUE_CONFIG_DIR=/etc/polylogue, matchingVOLUME ["/data/archive", "/etc/polylogue"].EXPOSE 8766;HEALTHCHECKcallshttp://127.0.0.1:8766/api/health(route confirmed inpolylogue/daemon/http.py:626-629, default--api-port 8766fromdaemon/cli.py:799).title,description,source,licenses,vendor); the workflow overrides these fromdocker/metadata-action.gcr.io/distroless/python3-debian12:nonroot) reusing the runtime stage's installed site-packages so both variants stay in lockstep..dockerignoreadded: trims build context (no.git,.cache,.venv, tests, docs except README)..github/workflows/container.yml: dedicated workflow with a[runtime, distroless]matrix. Builds both forlinux/amd64+linux/arm64viadocker/setup-qemu-action+docker/setup-buildx-action. Publishes toghcr.io/sinity/polylogueon master and onv*.*.*tags with semver +master-<sha>tagging viadocker/metadata-action(-distrolesssuffix on the distroless variant). PR builds smoke amd64-only and do not push. Provenance + SBOM attestations enabled.release.yml: dropped the inlinepublish-containerjob (now owned bycontainer.yml); updated the header comment.docs/docker-compose.yaml: full sample exercising the volume contract, healthcheck, named volumes,user: "10001:10001",read_only: true,cap_drop: [ALL],no-new-privileges:true. Includes commented-out lines for read-only bind-mounts of provider export roots.docs/installation.md: variant matrix (slim vs distroless), volume contract, quick-start, compose pointer, distroless notes (nocurl→ orchestrator-level probes), backup expectations.Alternatives rejected:
publish-containerstep inrelease.yml: rejected — keeps container iteration coupled to wheel/sdist gates and forces every container change to walk the full release matrix.docker-compose.yamlat repo root: kept underdocs/to avoid implying it is the project's canonical deployment manifest.Verification
verify-ci-workflowscovers the new.github/workflows/container.yml. Docker is not available on the build host, so the image itself is exercised by the newcontainer.ymlworkflow (PR builds smoke--version/--helpon amd64; tag/master builds publish multi-arch).Follow-ups
HEALTHCHECK(nocurlin distroless); compose/Kubernetes probes against/api/healthare documented indocs/installation.md. A pure-Python healthcheck binary baked into the image would let us restoreHEALTHCHECKon the distroless variant — out of scope here.