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:
1 parent
66be3e4464
commit
d8d439e6d7
7 files changed
+467
-40
No files matched your search
+71
@@ -0,0 +1,71 @@
|
||||
# CI/CD for marqdo-knowledge
|
||||
|
||||
The pipeline mirrors the upstream `marqdo-cli` approach: one fast Rust contract
|
||||
lane, one minimum-Rust lane, one lane that builds the pinned core CLI and runs
|
||||
the real-Analysis integration tests, and a tag-only release lane that builds a
|
||||
deterministic archive, cold-installs it through a real `marqdo` binary and
|
||||
publishes the checksum.
|
||||
|
||||
Configurations:
|
||||
|
||||
- `.woodpecker/main.yml` — self-hosted Woodpecker (push, pull_request, tag).
|
||||
- `.github/workflows/ci.yml` — GitHub Actions mirror (push, pull_request, tag).
|
||||
- `scripts/ci.sh` — the same lanes locally (`test`, `minimum`, `core`,
|
||||
`release`, `all`).
|
||||
- `scripts/package-release.sh` — locked release build, archive,
|
||||
`SOURCE_SHA`/`RELEASE_INFO.json`, SHA-256 checksum.
|
||||
- `scripts/verify-release.sh` — cold install in an isolated
|
||||
`MARQDO_TOOL_HOME`, dispatch, compile/query/check smoke, remove.
|
||||
|
||||
## Pinned core boundary
|
||||
|
||||
The core CLI is an external contract. CI does not use an already-installed
|
||||
`marqdo`: it builds `cflmy/marqdo-cli` at
|
||||
`4bbefc92449ee480c8a2c89b0308feb4cda8d0e7` (`3.0.0-rc.4`, Analysis revision 3)
|
||||
and exports `MARQDO_TEST_BIN` for `tests/core_cli.rs` and
|
||||
`tests/compile.rs`. Changing the pin requires re-running the tamper fixtures and
|
||||
recording a new Analysis fixture artifact.
|
||||
|
||||
## Gates executed by CI
|
||||
|
||||
| Gate | Command |
|
||||
|---|---|
|
||||
| formatting | `cargo fmt --all -- --check` |
|
||||
| lints | `cargo clippy --workspace --all-targets --locked -- -D warnings` |
|
||||
| unit + integration tests | `cargo test --workspace --locked` |
|
||||
| real core CLI boundary | `MARQDO_TEST_BIN=<pinned core> cargo test --workspace --locked` |
|
||||
| minimum Rust | `cargo +1.89 check --locked --workspace --all-targets` |
|
||||
| release build | `cargo build --release --locked` |
|
||||
| package + cold install | `scripts/package-release.sh && scripts/verify-release.sh` |
|
||||
|
||||
## Not gated by CI (explicit non-claims)
|
||||
|
||||
- Real-model semantic quality benchmark (§8.3/§16) — needs a pinned model and
|
||||
weights, not available to this repository's CI.
|
||||
- Retrieval/performance benchmarks (§16) — need a frozen multi-domain dataset
|
||||
and reference hardware.
|
||||
- Windows/macOS native builds — the beta platform claim is Linux x86_64 only.
|
||||
- Upstream batch `--documents` Analysis interface (U01) — the pinned core
|
||||
exposes per-entry `check --emit`; this beta invokes it per entry.
|
||||
- Incremental write-volume benchmark.
|
||||
|
||||
These are recorded as NOT RUN in [`STATUS.md`](STATUS.md). A green pipeline is
|
||||
evidence for the executed gates only; it is not evidence for those items.
|
||||
|
||||
## Local reproduction
|
||||
|
||||
```sh
|
||||
# Fast lane
|
||||
scripts/ci.sh test
|
||||
# MSRV lane (installs 1.89 through rustup when absent)
|
||||
scripts/ci.sh minimum
|
||||
# Real Analysis lane: use an existing built core, or clone/build the pin
|
||||
MARQDO_BIN=/path/to/marqdo scripts/ci.sh core
|
||||
# Full release lane (build, package, cold-install smoke)
|
||||
MARQDO_BIN=/path/to/marqdo scripts/ci.sh release
|
||||
```
|
||||
|
||||
The release archive records `SOURCE_SHA`, `RELEASE_INFO.json` (version,
|
||||
channel, target, API/Analysis/schema revisions, core baseline, rustc/cargo) and
|
||||
the archive SHA-256. Checksums are integrity evidence, not publisher
|
||||
authentication.
|
||||
@@ -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.
|
||||
Reference in new issue
Block a user