Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

18. Close the platform-promise gap without cargo-dist

Date: 2026-10-23

Status

Accepted

Relates to 12. Cut releases with git tags and forge releases, not release-plz

Context

Cerebro ships three binaries, cerebro, cerebro-mcp, and cerebro-tui, and ADR-0012 cut the release flow to git-cliff plus a Codeberg forge release made by the API. The rust-standard (docs/standard/ci-and-release.md) pairs binary shipping with cargo-dist (dist-workspace.toml), a platform-promise target list agreed with deny.toml [graph].targets, and a CI cross-check step. The gap analysis flagged no dist config, no declared target list, and no cross-check, and proposed adopting cargo-dist.

Checking the current dist docs before recording that decision contradicts the easy version of it. Two claims matter. First, dist’s generated CI supports only github as a backend, and its host/announce steps create a GitHub Release and derive installer artifact URLs from a Source Host that is “currently … only … github.com”, a check that explicitly “does not respect publish=false or dist=false”. The Codeberg/Forgejo work is open upstream (axodotdev/cargo-dist#1781, no timeline), and the only path today is the manual workaround the issue itself describes: point the repository URL at a fabricated GitHub link, run dist init, rename .github, and strip the fabrication before publishing. That re-couples the release flow to a fake GitHub identity, which is precisely what ADR-0012 removed.

Second, the release-plz blocker that ADR-0012 recorded does not by itself rule dist in or out: cargo dist build uses cargo build and packaging, not cargo package, so a publish = false path-dependency workspace builds fine. The blocker is the hosting and installers, not the compilation.

So the three gaps split. A declared platform promise and a cross-check CI step are forge-neutral and can land without dist. Reproducible multi-target tarballs with generated curl | sh installers cannot be honestly wired to a Codeberg release page until dist supports the forge.

Decision

Adopt the forge-neutral half of the standard’s release layer now, and defer the part that depends on cargo-dist’s forge support.

Close the platform-promise and cross-check gaps directly, with no dist dependency: declare the target list once in deny.toml [graph].targets, mirroring the standard’s cross-check split. A new .woodpecker/ci.yml cross-check step builds the Linux gnu targets in a container; the darwin targets stay checked on the local development Mac. These are the two gaps the standard’s cross-check actually enforces, and neither needs dist.

Do not adopt cargo-dist as the release host or CI generator. Its announce and installer pipeline is GitHub-only and would require the fabricated-source-host workaround that ADR-0012 explicitly removed. Keep git-cliff and the Codeberg forge release (ADR-0012) as the release path; ship source via the existing tags, and point users at the documented cargo install --path crates/cerebro flow rather than a generated curl | sh installer that cannot resolve against Codeberg.

Revisit cargo-dist only when upstream #1781 (Gitea/Forgejo hosting) merges. If at that point dist’s build layer still adds value, adopt it as a local artifact-packing job feeding the existing forge upload, never as a self-hosting CI generator. Until then record this deferral in the wayfinding map as an open, blocked ticket rather than a silent omission.

Consequences

The two gaps that do not need cargo-dist, a declared platform promise and a cross-target check, close immediately and stay forge-neutral. The target list lives once in deny.toml [graph].targets and is read by the CI cross-check step, matching the standard’s single-source rule without importing dist.

The third gap, reproducible tarballs and installers, stays open by decision rather than oversight. It is blocked on cargo-dist gaining Codeberg/Forgejo hosting (upstream #1781), and a curl | sh installer cannot be generated honestly until installers resolve against Codeberg’s real release-asset URLs.

Recorded cost of the status quo: cerebro’s release page links source tarballs the forge makes (git tags exist) but no per-platform prebuilt binaries or installers, so users follow the documented cargo install --path flow. That is acceptable for three internal binaries and matches ADR-0012’s cargo install install story.

This ADR does not amend or supersede ADR-0012. The tag-and-forge-release model and the git-cliff changelog both stand unchanged; the only thing this record changes from the gap analysis is rejecting the earlier assumption that cargo-dist slots into release.yml, which the docs contradict.