From 2316af66f4ceccc2f60afdbbef18fe328ffc1f21 Mon Sep 17 00:00:00 2001 From: marqdo-knowledge Date: Thu, 26 Nov 2026 09:05:29 +0800 Subject: [PATCH] release: 0.1.0-beta.2 (release engineering) - bump the tool to 0.1.0-beta.2; contracts and SQLite schema are unchanged from beta.1 (api_revision 1, analysis 3, schema 1, OKF 0.3) - add detailed beta.2 release notes and CHANGELOG entry: deterministic archive and manifest, smoke evidence, metadata gate, CI/CD alignment; tool behaviour is unchanged and beta.1 remains a valid pre-release tag - keep the complete / explicitly NOT complete inventory, compatibility, security and evidence sections; document that remote publication and the benchmark/real-model/platform gaps are still NOT RUN - update README, STATUS and the public contract to the beta.2 release line --- CHANGELOG.md | 22 +++++ Cargo.lock | 2 +- Cargo.toml | 2 +- README.md | 4 +- docs/STATUS.md | 15 ++-- docs/releases/0.1.0-beta.2.md | 158 ++++++++++++++++++++++++++++++++++ packaging/tool.json | 2 +- spec/knowledge.md | 4 +- 8 files changed, 196 insertions(+), 13 deletions(-) create mode 100644 docs/releases/0.1.0-beta.2.md diff --git a/CHANGELOG.md b/CHANGELOG.md index b551e60..6b82c69 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,28 @@ All notable changes to `marqdo-knowledge`. The project follows SemVer for the tool version; schema and protocol revisions are independent numbers. This beta line makes no stable-version claim. +## 0.1.0-beta.2 — 2026-11-26 + +Release-engineering beta; no tool-behaviour changes from beta.1. Supersedes +beta.1 for the release archive/pipeline. + +### Added + +- Deterministic Python packager (`tools/release/package.py`) with sorted entries, + commit-timestamp mtimes, fixed uid/gid/modes, gzip without timestamp, and + dirty-tree / SOURCE_SHA / version refusal. +- Per-file `FILES.sha256` manifest and expanded `RELEASE_INFO.json`. +- Cold-install smoke verifier (`tools/release/smoke.py`) with checksum, manifest, + source-SHA and version checks plus install/help/compile/query/check/remove. +- `tools/ci/test_release_metadata.py` metadata-consistency CI gate. + +### Changed + +- Woodpecker and GitHub release lanes use the deterministic packager and smoke + verifier; `scripts/package-release.sh` and `scripts/verify-release.sh` are thin + wrappers. Release gates and the frozen-SHA procedure are documented in + `docs/ci.md` and `docs/releasing.md`. + ## 0.1.0-beta.1 — 2026-11-26 First beta. One derived SQLite artifact, three business commands, current public diff --git a/Cargo.lock b/Cargo.lock index dca0236..31b8549 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -620,7 +620,7 @@ checksum = "5d15f86d12da44cd8d4ec3c73984537eb7f4cadcb9776a575a0a8a05ca11005c" [[package]] name = "marqdo-knowledge" -version = "0.1.0-beta.1" +version = "0.1.0-beta.2" dependencies = [ "clap", "comrak", diff --git a/Cargo.toml b/Cargo.toml index bcf6d5b..3de59ec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "marqdo-knowledge" -version = "0.1.0-beta.1" +version = "0.1.0-beta.2" edition = "2021" rust-version = "1.89" license = "Apache-2.0" diff --git a/README.md b/README.md index 5b76d18..a16171a 100644 --- a/README.md +++ b/README.md @@ -25,9 +25,9 @@ and no separate knowledge IR file. ## Release -Current release: **`0.1.0-beta.1`** (beta channel, Linux x86_64). See +Current release: **`0.1.0-beta.2`** (beta channel, Linux x86_64). See [`CHANGELOG.md`](CHANGELOG.md) and -[`docs/releases/0.1.0-beta.1.md`](docs/releases/0.1.0-beta.1.md) for what is +[`docs/releases/0.1.0-beta.2.md`](docs/releases/0.1.0-beta.2.md) for what is included and what is explicitly NOT done. CI/CD configuration is described in [`docs/ci.md`](docs/ci.md); the release procedure is in [`docs/releasing.md`](docs/releasing.md). diff --git a/docs/STATUS.md b/docs/STATUS.md index 20b76b7..d5f7a3e 100644 --- a/docs/STATUS.md +++ b/docs/STATUS.md @@ -1,20 +1,23 @@ # Status -Last updated: 2026-11-26 (release `0.1.0-beta.1`). Evidence-based: this file lists what the code does and +Last updated: 2026-11-26 (release `0.1.0-beta.2`). Evidence-based: this file lists what the code does and what was actually executed. Anything not listed as verified is **NOT RUN** and must not be claimed as passing. ## Release state -- Channel: **beta** (`0.1.0-beta.1`), Linux x86_64. Not a stable claim. -- Release notes: [`releases/0.1.0-beta.1.md`](releases/0.1.0-beta.1.md). +- Channel: **beta** (`0.1.0-beta.2`), Linux x86_64. Not a stable claim. +- Release notes: [`releases/0.1.0-beta.2.md`](releases/0.1.0-beta.2.md). - CI/CD: [`.woodpecker/main.yml`](../.woodpecker/main.yml), [`.github/workflows/ci.yml`](../.github/workflows/ci.yml) and [`scripts/ci.sh`](../scripts/ci.sh); procedure in [`ci.md`](ci.md) and [`releasing.md`](releasing.md). -- Archive: built by the release lane from the frozen source SHA with - `SOURCE_SHA`, `RELEASE_INFO.json` and SHA-256; the tag annotation records the - exact archive hash. +- Archive: built by the deterministic release lane from the frozen source SHA + with `SOURCE_SHA`, `FILES.sha256`, `RELEASE_INFO.json`, a SHA-256 sidecar and + `dist/smoke-evidence.json`; the tag annotation records the exact archive hash. +- beta.2 contains release-engineering changes only (deterministic packaging, + manifest, smoke evidence, metadata CI gate); tool behaviour and schema are + unchanged from beta.1. ## Baselines diff --git a/docs/releases/0.1.0-beta.2.md b/docs/releases/0.1.0-beta.2.md new file mode 100644 index 0000000..ef4c933 --- /dev/null +++ b/docs/releases/0.1.0-beta.2.md @@ -0,0 +1,158 @@ +# marqdo-knowledge 0.1.0-beta.2 + +Release date: 2026-11-26 +Release channel: **beta** (not a stable-version claim) +Platform: Linux x86_64 (glibc) +Supersedes: `0.1.0-beta.1` for the release archive/pipeline only. No tool +behaviour changed in this release; beta.1 remains a valid pre-release tag. + +Core CLI integration baseline: `cflmy/marqdo-cli` `3.0.0-rc.4` +(`4bbefc92449ee480c8a2c89b0308feb4cda8d0e7`) + +Contract versions (unchanged from beta.1): + +| Boundary | Version | +|---|---| +| `marqdo.cli-tool` | revision 1 | +| tool API revision | 1 | +| consumed `marqdo.analysis` | revision 3 (current closed shape) | +| SQLite schema | revision 1 | +| result/error envelope | schema_version 1 | +| OKF | 0.3 | + +## Changes since beta.1 (release engineering only) + +- Deterministic Python packager `tools/release/package.py`: sorted archive + entries, commit timestamp for mtimes, uid/gid 0, normalised modes, gzip + without a timestamp, dirty-tree and `SOURCE_SHA`/version refusal. +- Per-file `FILES.sha256` manifest and a `RELEASE_INFO.json` carrying product + version, source SHA, commit time, target, binaries, protocol revisions, core + baseline and manifest digest. +- `tools/release/smoke.py`: verifies the checksum, manifest, source SHA and + version, cold-installs the archive through a real core CLI in an isolated + `MARQDO_TOOL_HOME`, runs help/compile/query/check/remove and writes smoke + evidence. +- `tools/ci/test_release_metadata.py`: CI gate that keeps `Cargo.toml`, + `Cargo.lock`, `tool.json`, `spec/knowledge.md`, `CHANGELOG.md`, release notes, + README and CI configuration on one version/fact baseline. +- Woodpecker and GitHub release lanes now use the deterministic packager and + smoke test; the shell scripts are thin wrappers. + +No query, compile, storage, Analysis, OKF, embedding or CLI semantic change is +included in beta.2. + +## What is complete in this beta + +- `compile`, `check`, `query` exactly as documented in + [`0.1.0-beta.1.md`](0.1.0-beta.1.md): deterministic discovery and snapshot, + plain Markdown projection, the current public Analysis v3 adapter, unified + graph, a single rebuildable SQLite projection, atomic rebuild and + transactional incremental update, stale-snapshot refusal, OKF v0.3 metadata + recognition and `check --okf`, exact/lexical/fuzzy/graph/semantic channels, + weighted RRF, bounded graph expansion, document/execution/hybrid slices. +- Explicit OpenAI-compatible semantic indexing/query with strict response + validation, content/model-digest reuse and all-or-nothing publication. +- Packaging with a deterministic archive, file manifest, release metadata, + cold-install smoke evidence and CI gates for formatting, lints, tests, MSRV, + real core-CLI Analysis integration and release metadata consistency. +- Security defaults unchanged: no execution, root-confined filesystem access, + offline by default, credentials only from the environment, atomic + publication, no schema migration or foreign-database overwrite. + +## What is NOT complete in this beta + +These are explicit non-claims; see [`docs/STATUS.md`](../STATUS.md). + +1. **Real-model semantic quality benchmark**: only protocol, validation, + storage, reuse and fusion are exercised (local mock). No pinned model was + run; no semantic Recall@10 claim is made. +2. **Specification §16 retrieval and performance gates**: frozen multi-domain + dataset, held-out queries, Recall/MRR/nDCG, latency/RSS/build-time and + incremental write-volume benchmarks are NOT RUN. +3. **Platforms**: Linux x86_64 only. Windows/macOS are untested and not claimed. +4. **Upstream batch Analysis interface (U01)**: the pinned core exposes + per-entry `check --emit`; this beta invokes it per `.mq.md` entry and merges + contexts conservatively. +5. **Incremental write granularity**: facts reuse avoids re-analysis for + plain-only edits, but projection rows are rewritten in one transaction; the + write-volume benchmark is unmeasured. +6. **OKF compile-time absolute links**: root-absolute links receive OKF + semantics only in `check --okf`; `compile` keeps Native semantics. +7. **Single-character CJK queries**: bounded probe with truncation reporting, + not an exhaustive scan. +8. **No migration**: schema revision changes require `compile --rebuild`. +9. **Remote publication**: the pipeline is committed and runs locally on the + release SHA; no external Woodpecker/GitHub run URL or independent artifact + attestation is recorded for this beta. +10. **Archive determinism scope**: the archive is reproducible from the same + commit, binary and toolchain; byte-identical reproduction across different + Rust toolchains is not claimed. + +## Verification recorded for this release + +- Metadata gate: `python3 tools/ci/test_release_metadata.py` PASS. +- `cargo fmt --all -- --check`: clean. +- `cargo clippy --workspace --all-targets --locked -- -D warnings`: clean. +- `cargo test --workspace --locked` with the real rc.4 core binary: + 139 passed / 0 failed (104 unit; compile 6; core_cli 3; embedding 4; OKF 7; + query 11; storage 4). +- `cargo build --release --locked`: clean. +- Deterministic package produced twice from the same commit: identical archive + SHA-256. +- `tools/release/smoke.py` cold-installed the archive through the real core CLI: + checksum/manifest/version verified, install → help → compile packaged example + → query → check (current, 0 errors) → remove. + +## Install and first run + +```sh +# Build the tool and the release bundle (from a clean checkout): +cargo build --release --locked +python3 tools/release/package.py \ + --source-sha "$(git rev-parse HEAD)" \ + --version "$(sed -n 's/^version = \"\(.*\)\"/\1/p' Cargo.toml | head -1)" + +# Install through the core CLI: +marqdo tool install ./dist/marqdo-knowledge-0.1.0-beta.2-x86_64-unknown-linux-gnu +marqdo knowledge --help +marqdo knowledge compile ./examples/mixed --json +marqdo knowledge query '归一化' --root ./examples/mixed +marqdo knowledge check ./examples/mixed --json +marqdo tool remove knowledge +``` + +The tool requires a compatible core `marqdo` (`MARQDO_API_REVISION=1`, +Analysis revision 3) when dispatched. Direct development invocation accepts +`--marqdo-bin PATH`. + +## Compatibility and upgrade notes + +- Beta.2 is a drop-in replacement for beta.1: same CLI surface, contracts and + SQLite schema revision. +- Existing beta.1 databases remain readable (schema revision 1 unchanged); a + rebuild is not required. +- Any future schema revision change requires `compile --rebuild`; there is no + automatic migration. +- A database not created by this tool is never overwritten. +- The archive and `SOURCE_SHA` identify the exact source commit; `FILES.sha256` + and the sidecar checksum prove content integrity only, not publisher + authentication. + +## Security notes + +Default operation is offline. The only network path is an explicitly configured +embedding endpoint (compile-time embedding options or `--semantic`). Remote +endpoints require HTTPS and explicit `--allow-remote-embedding`; loopback HTTP is +allowed for local compatible services. The API key is read from +`MARQDO_KNOWLEDGE_EMBEDDING_API_KEY` and is never stored, logged or printed. +Diagnostics never include source text, credentials or absolute paths. + +## Evidence + +- `docs/evidence/2026-11-26-implementation.md` — test counts, real Analysis + integration, tool install/dispatch and the earlier archive cold install. +- `docs/STATUS.md` — capability matrix with implemented/tested vs NOT RUN. +- `docs/ci.md`, `docs/releasing.md` — gates, non-gates and the frozen-SHA + release procedure. +- `FILES.sha256`, `RELEASE_INFO.json`, sidecar archive checksum and + `dist/smoke-evidence.json` — produced by the release pipeline for the archive. diff --git a/packaging/tool.json b/packaging/tool.json index c8facbf..2ecce41 100644 --- a/packaging/tool.json +++ b/packaging/tool.json @@ -2,7 +2,7 @@ "schema": "marqdo.cli-tool", "schema_version": 1, "name": "marqdo-knowledge", - "version": "0.1.0-beta.1", + "version": "0.1.0-beta.2", "command": "knowledge", "entrypoint": "bin/marqdo-knowledge", "requires": { diff --git a/spec/knowledge.md b/spec/knowledge.md index 74741de..787aa39 100644 --- a/spec/knowledge.md +++ b/spec/knowledge.md @@ -1,6 +1,6 @@ # marqdo-knowledge public contract -Status: current contract for `0.1.0-beta.1` (first beta; no stable-version claim). The normative +Status: current contract for the `0.1.0-beta` line (no stable-version claim). The normative development specification is `marqdo-knowledge-development.md`; this file records the exact contract this repository implements. Where the two differ, the development specification wins and this file must be corrected in place — @@ -13,7 +13,7 @@ there is never a second active contract. "schema": "marqdo.cli-tool", "schema_version": 1, "name": "marqdo-knowledge", - "version": "0.1.0-beta.1", + "version": "0.1.0-beta.2", "command": "knowledge", "entrypoint": "bin/marqdo-knowledge", "requires": {"api_revision": 1, "analysis": 3}