114 lines
5.2 KiB
Markdown
114 lines
5.2 KiB
Markdown
# CI/CD for marqdo-knowledge
|
|
|
|
Ordinary Woodpecker checks use the existing shared image and its released CLI.
|
|
Pull requests, default-branch pushes and manual runs share one workflow. Rust
|
|
source, manifest and CI changes also check the minimum supported Rust. Release
|
|
tags check the pinned historical core and produce the package evidence.
|
|
|
|
Configurations:
|
|
|
|
- `.woodpecker/ci.yml` runs ordinary component checks. `.woodpecker/main.yml`
|
|
runs release-tag compatibility checks, packaging and cold installation.
|
|
- `.github/workflows/ci.yml` — GitHub Actions mirror (push, pull_request, tag).
|
|
- `scripts/ci.sh` — the same lanes locally (`test`, `minimum`, `core`,
|
|
`release`, `all`).
|
|
- `tools/release/package.py` — deterministic archive, `SOURCE_SHA`,
|
|
`FILES.sha256`, `RELEASE_INFO.json`, SHA-256 sidecar.
|
|
- `tools/release/smoke.py` — checksum/manifest/version verification and cold
|
|
install in an isolated `MARQDO_TOOL_HOME` (install, help, compile/query/check,
|
|
remove; writes `dist/smoke-evidence.json`).
|
|
- `tools/ci/test_release_metadata.py` — version/fact consistency gate.
|
|
- `scripts/package-release.sh` / `scripts/verify-release.sh` — thin wrappers for
|
|
the Python tooling.
|
|
|
|
## Pinned core boundary
|
|
|
|
Ordinary CI uses the official `3.0.0-rc.5` CLI from the shared image. The tag
|
|
compatibility step also builds the existing `3.0.0-rc.4` core pin
|
|
`4bbefc92449ee480c8a2c89b0308feb4cda8d0e7` and runs the real-Analysis tests.
|
|
Changing the historical pin requires rerunning the tamper fixtures and
|
|
recording the new Analysis fixture evidence.
|
|
|
|
For a verified upstream task, run the consumer gate from the clean Knowledge
|
|
candidate using the tag, source SHA and Linux archive digest from the task.
|
|
|
|
```sh
|
|
python3 tools/ci/verify-upstream.py --tag "$cli_tag" \
|
|
--source-sha "$cli_source_sha" --archive-sha256 "$cli_archive_sha256"
|
|
```
|
|
|
|
Pass `--archive` to reuse locally staged bytes. The gate checks the Gitea tag,
|
|
artifact digest and installed Bundle before running the existing `core` lane.
|
|
Its output records the actual consumer commit and CLI identities for review.
|
|
|
|
The `upstream` Woodpecker workflow accepts `MARQDO_UPSTREAM_ISSUE` as the
|
|
Knowledge issue number and uses the protected root baseline, recorded input
|
|
digests and authorized forge account to resolve the candidate. This workflow
|
|
needs read access to public issues and release assets.
|
|
|
|
## Gates executed by CI
|
|
|
|
| Gate | Command |
|
|
|---|---|
|
|
| release metadata consistency | `python3 tools/ci/test_release_metadata.py` |
|
|
| 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` |
|
|
| deterministic package + cold install | `python3 tools/release/package.py ... && python3 tools/release/smoke.py --archive ...` |
|
|
|
|
## Reviewed forge publication
|
|
|
|
The tag lane prepares assets without credentials. From the clean reviewed tag,
|
|
select the successful default-branch `ci` pipeline for that exact commit. Keep
|
|
the archive, its checksum, `RELEASE_INFO.json`, `FILES.sha256`, and
|
|
`smoke-evidence.json` together. The smoke test verifies and records the released
|
|
CLI identity used for the cold installation.
|
|
|
|
```sh
|
|
python3 tools/release/publish-gitea.py --prepare \
|
|
--tag "$release_tag" --pipeline "$component_pipeline" --archive "$archive"
|
|
```
|
|
|
|
The maintainer verifies Gitea tag protection as part of release approval. The
|
|
approved publisher runs the same command with `--body-file` in place of
|
|
`--prepare` and a `GITEA_TOKEN` from the dedicated publisher account. The tool
|
|
checks the protected default branch and exact tag, resumes matching drafts,
|
|
verifies the bytes on the forge and publishes only a complete inventory. A
|
|
matching public release is idempotent. A changed asset blocks the operation and
|
|
needs a new release decision.
|
|
|
|
## 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.
|