ci: add CI/CD pipelines and deterministic release tooling

Modeled on cflmy/marqdo-cli:
- Woodpecker pipeline with fmt/clippy/tests, MSRV 1.89 lane, a lane that builds
  the pinned core CLI and runs the real Analysis integration tests, and a
  tag-only release lane
- GitHub Actions mirror with the same gates plus artifact upload and
  prerelease publication
- scripts/ci.sh local lanes (test/minimum/core/release/all)
- package-release.sh now refuses a dirty tree or SOURCE_SHA mismatch, runs a
  locked release build and records SOURCE_SHA, RELEASE_INFO.json and SHA-256
- verify-release.sh cold-installs the archive into an isolated MARQDO_TOOL_HOME
  and runs the documented install/help/compile/query/check/remove smoke path
- docs/ci.md and docs/releasing.md document gates, explicit non-gates and the
  beta freeze/tag procedure
This commit is contained in:
marqdo-knowledge committed 2026-11-26 09:01:13 +08:00
1 parent 66be3e4464
commit d8d439e6d7
7 files changed
+467 -40

No files matched your search

+80
View File
@@ -0,0 +1,80 @@
# Releasing marqdo-knowledge
This project is on the **beta** channel (`0.1.0-beta.N`). A beta release claims
only what the pipeline and recorded evidence establish. It does **not** claim
stable quality gates, and the development specification's §16 retrieval and
performance targets remain NOT RUN.
The procedure mirrors `cflmy/marqdo-cli` `docs/releasing.md`: freeze one release
SHA, run every gate on that exact SHA, build the archive from it, cold-install
that archive through a real core CLI, then tag. Never package a different
checkout.
## 1. Freeze the release SHA
1. `git status --porcelain` is clean, `Cargo.lock` is committed, all builds use
`--locked`.
2. `Cargo.toml`, `packaging/tool.json` and `spec/knowledge.md` carry the same
tool version (currently `0.1.0-beta.1`).
3. `CHANGELOG.md`, `docs/releases/<version>.md`, `docs/STATUS.md` and
`docs/ci.md` describe the same facts. No "implemented" claim without a test
or executed evidence; no NOT RUN item presented as passing.
4. The core CLI pin is unchanged or the Analysis fixtures were regenerated and
re-validated against the new pin.
## 2. Gates on that SHA
```sh
scripts/ci.sh test # fmt, clippy -D warnings, locked tests
scripts/ci.sh minimum # Rust 1.89 MSRV check
MARQDO_BIN=/path/to/marqdo scripts/ci.sh core # real Analysis boundary
cargo build --release --locked
```
The Woodpecker/GitHub pipelines run the same gates. A green local run is not a
substitute for the pipeline run recorded for the release commit, and vice versa.
## 3. Build and verify the archive
```sh
MARQDO_BIN=/path/to/marqdo scripts/ci.sh release
```
This runs `scripts/package-release.sh` (refuses a dirty tree or mismatched
`SOURCE_SHA`, emits `dist/marqdo-knowledge-<version>-<target>.tar.gz`,
`.sha256` and `RELEASE_INFO.json`) and `scripts/verify-release.sh` (extracts the
archive in a clean directory, installs it into an isolated `MARQDO_TOOL_HOME`,
runs `knowledge --help`, compile/query/check smoke, removes the tool).
Record the archive name and SHA-256 in the tag annotation and release page. Do
not commit build artifacts: `dist/` is ignored.
## 4. Tag and publish (beta)
```sh
git tag -a v0.1.0-beta.1 -m "marqdo-knowledge 0.1.0-beta.1; archive <name> sha256 <hash>"
git push origin master --tags
```
The tag-only release lane uploads the archive, SHA-256 and `RELEASE_INFO.json`,
and publishes a prerelease using `docs/releases/<version>.md` as the body. A tag
push must not introduce new source changes; if the tree changed, restart at step
1 with a new SHA.
## 5. Beta exit conditions for this repository
A beta release may be published with these documented gaps:
- real-model semantic quality and §16 retrieval/performance benchmarks NOT RUN;
- Linux x86_64 only;
- upstream batch Analysis interface unavailable in the pinned core (per-entry
Analysis is used);
- incremental compiles rewrite projection rows in one transaction (write-volume
benchmark unmeasured);
- OKF bundle-root absolute links only have OKF semantics in `check --okf`;
- single-character CJK queries are bounded/truncated.
They must be published as limitations, never omitted. Stable promotion requires
the full acceptance matrix and quality/performance gates in the development
specification on the exact release SHA, plus independent consumer and cold
install evidence; this document does not authorize a stable release.