diff --git a/.github/workflows/feature-matrix.yml b/.github/workflows/feature-matrix.yml new file mode 100644 index 0000000..c421147 --- /dev/null +++ b/.github/workflows/feature-matrix.yml @@ -0,0 +1,40 @@ +# Cargo feature compatibility gate. +# +# `sema` (the core compiler) must build without the `cli` feature. Library +# consumers such as qdagent depend on `marqdo` with `default-features = false`, +# so any unconditional reference to a `cli`-gated module is a release blocker. +# Keep this matrix in sync with the feature graph in Cargo.toml. +name: feature-matrix + +on: + push: + branches: [main] + paths: + - "src/**" + - "Cargo.toml" + - "Cargo.lock" + - ".github/workflows/feature-matrix.yml" + pull_request: + paths: + - "src/**" + - "Cargo.toml" + - "Cargo.lock" + - ".github/workflows/feature-matrix.yml" + workflow_dispatch: + +concurrency: + group: feature-matrix-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + lib-feature-matrix: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@1.81.0 + - name: Library builds with no default features + run: cargo check --locked --lib --no-default-features + - name: Library builds with only the cli feature + run: cargo check --locked --lib --no-default-features --features cli + - name: Library builds with default features + run: cargo check --locked --lib diff --git a/.github/workflows/release-v2.9.yml b/.github/workflows/release-v2.9.yml deleted file mode 100644 index 07a4ed4..0000000 --- a/.github/workflows/release-v2.9.yml +++ /dev/null @@ -1,91 +0,0 @@ -# One-time, fail-closed promotion from verified main to immutable v2.9.0. -# GITHUB_TOKEN-created tag pushes do not recursively start tag workflows. -# Explicit workflow_dispatch is used to run the existing multi-platform -# Release workflow against the immutable tag itself. -name: Release v2.9.0 promotion -on: - push: - branches: [main] - paths: - - "Cargo.toml" - - "doc/releases/v2.9.0.md" - - ".github/workflows/release-v2.9.yml" - pull_request: - paths: - - "Cargo.toml" - - "Cargo.lock" - - "crates/marqdo-wasm/Cargo.toml" - - "ext/VERSION" - - "doc/releases/v2.9.0.md" - - ".github/workflows/release-v2.9.yml" - workflow_dispatch: -permissions: - contents: write - actions: write -concurrency: - group: release-v2.9-promotion - cancel-in-progress: false -jobs: - verify-and-dispatch: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - persist-credentials: true - - uses: dtolnay/rust-toolchain@stable - - name: Verify complete, matching release metadata - run: | - set -euo pipefail - python3 - <<'PY' - import re, pathlib - want = '2.9.0' - for file in ['Cargo.toml', 'crates/marqdo-wasm/Cargo.toml']: - data = pathlib.Path(file).read_text() - assert re.search(r'^version\s*=\s*"2\.9\.0"\s*$', data, re.M), file - lock = pathlib.Path('Cargo.lock').read_text() - for name in ['marqdo', 'marqdo-wasm']: - assert re.search(r'\[\[package\]\]\nname = "'+name+r'"\nversion = "2\.9\.0"', lock), name - assert pathlib.Path('ext/VERSION').read_text().strip() == want - assert pathlib.Path('doc/releases/v2.9.0.md').exists() - PY - git diff --exit-code - - name: Install pinned Lean checker - run: | - curl -sSf https://elan.lean-lang.org/elan-init.sh | sh -s -- -y --default-toolchain leanprover/lean4:v4.35.0 - echo "$HOME/.elan/bin" >> "$GITHUB_PATH" - - name: Validate Lean and source-derived proof library - run: | - lean --version - bash scripts/check-proof-library.sh - lean doc/verification/skill-proof/MarqdoModularProof.lean - lean doc/verification/skill-proof/MarqdoEffects.lean - - name: Build and gate source semantics, actual Lean and compatibility - env: - MARQDO_PROOF_REQUIRE_LEAN: "1" - run: | - cargo build --locked - cargo test --locked --lib knowledge:: - cargo test --locked --test knowledge_proof - cargo test --locked --test prove_lean - cargo test --locked --test prove_corpus - cargo test --locked --test conformance - cargo test --locked --test executable_knowledge - cargo test --locked --test release_handbook - - name: Create v2.9.0 only once and dispatch full platform release - if: github.repository == 'cflmy/marqdo' && github.ref == 'refs/heads/main' && github.event_name != 'pull_request' - env: - GH_TOKEN: ${{ github.token }} - run: | - set -euo pipefail - if git ls-remote --exit-code --tags origin refs/tags/v2.9.0 >/dev/null 2>&1; then - echo "v2.9.0 already exists; refusing to replace or re-dispatch assets" - exit 1 - fi - test "$(git rev-parse HEAD)" = "$GITHUB_SHA" - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - git tag -a v2.9.0 "$GITHUB_SHA" -m "Marqdo v2.9.0 full: Verified Knowledge Compiler" - git push origin refs/tags/v2.9.0 - gh workflow run release.yml --ref v2.9.0 - echo "Dispatched Release workflow for immutable tag v2.9.0" diff --git a/CHANGELOG.md b/CHANGELOG.md index a7e5988..d0458bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,22 @@ # Changelog -## Unreleased +## v2.9.1 — 2026-11-18 · Full release / 正式补丁版本 + +Marqdo 2.9.1 修复 2.9.0 的库构建回归:`knowledge` 属于核心编译器,不再由 `cli` 特性门控,`default-features = false` 的下游库恢复可编译;并新增 feature-matrix CI 守卫。无运行时语义、插件 ABI 或证书格式变化。 + +**EN:** 2.9.1 fixes the 2.9.0 library regression where the core compiler's `knowledge` module was gated on `cli`, breaking `default-features = false` consumers; a feature-matrix CI gate now prevents regressions. No runtime semantics, plugin ABI or certificate format changes. + +### Fixed + +- Library builds with `--no-default-features` again. `sema::ir` unconditionally + emits `proof-index.json` / `proof-obligations.json` through `knowledge`, but + `knowledge` was gated on `cli`; it is now part of the core compiler, so + downstream crates using `default-features = false` no longer hit + `E0433: could not find knowledge in the crate root`. +- CI: `feature-matrix` checks the library with no features, `cli` only, and + default features to prevent feature-gate regressions. + +详情 / Details: [2.9.1 release notes](doc/releases/v2.9.1.md). ## v2.9.0 — 2026-11-18 · Full release / 正式完整版本 diff --git a/Cargo.lock b/Cargo.lock index 297f151..414a6af 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "adler2" @@ -615,7 +615,7 @@ checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad" [[package]] name = "marqdo" -version = "2.9.0" +version = "2.9.1" dependencies = [ "anyhow", "assert_cmd", @@ -656,7 +656,7 @@ dependencies = [ [[package]] name = "marqdo-wasm" -version = "2.9.0" +version = "2.9.1" dependencies = [ "marqdo", "serde_json", diff --git a/Cargo.toml b/Cargo.toml index ac4661b..b50971f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "marqdo" -version = "2.9.0" +version = "2.9.1" edition = "2021" license = "Apache-2.0" description = "Marqdo — Markdown markers as an interpreted programming language" diff --git a/crates/marqdo-wasm/Cargo.toml b/crates/marqdo-wasm/Cargo.toml index f41ca24..b49a8e3 100644 --- a/crates/marqdo-wasm/Cargo.toml +++ b/crates/marqdo-wasm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "marqdo-wasm" -version = "2.9.0" +version = "2.9.1" edition = "2021" license = "Apache-2.0" description = "Marqdo interpreter as WebAssembly (browser host bridge)" diff --git a/debian/changelog b/debian/changelog index a6b7f9e..802d6d2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +marqdo (2.9.1-1ppa1) noble; urgency=medium + + * Release 2.9.1; see the reviewed upstream CHANGELOG. + + -- Marqdo Maintainers Wed, 18 Nov 2026 18:43:10 +0800 + marqdo (2.8.0-1ppa1) noble; urgency=medium * Release 2.8.0; see the reviewed upstream CHANGELOG. diff --git a/doc/releases/v2.9.1.md b/doc/releases/v2.9.1.md new file mode 100644 index 0000000..b9550ad --- /dev/null +++ b/doc/releases/v2.9.1.md @@ -0,0 +1,33 @@ +# Marqdo v2.9.1 · Library Feature-Gate Fix / 库可选特性修复 + +## 核心更新 · Highlights + +Marqdo 2.9.1 修复 2.9.0 引入的库构建回归:`sema::ir` 在输出 `proof-index.json` 与 `proof-obligations.json` 时无条件使用 `knowledge` 模块,而该模块此前只在 `cli` 特性下编译,导致以 `default-features = false` 依赖本库的下游工程出现 `E0433: could not find knowledge in the crate root`。 + +**EN:** Marqdo 2.9.1 fixes a library-build regression introduced in 2.9.0. `sema::ir` unconditionally emits `proof-index.json` and `proof-obligations.json` through the `knowledge` module, but that module was gated on the `cli` feature, so downstream crates depending on the library with `default-features = false` failed with `E0433: could not find knowledge in the crate root`. + +- `knowledge` 现在是核心编译器的一部分,不再由 `cli` 特性门控;CLI 二进制仍由 `required-features = ["cli"]` 约束。 +- 新增 `feature-matrix` CI:分别用无默认特性、仅 `cli`、默认特性检查库构建,防止特性门控再次回归。 +- 没有运行时语义、文稿格式、插件 ABI(v2)或证明证书格式的变化。 + +## 兼容性 · Compatibility + +- 2.9.0 的 `.mq.md` 文稿、原生插件(ABI v2)和知识证明证书保持兼容,无需迁移。 +- 下游库可继续使用 `default-features = false`;2.9.0 期间为绕过该回归而启用的 `cli` 特性可以撤销。 +- 不可变标签 `v2.9.0` 保持不变,本次是同一主线的补丁版本。 + +## 验证 · Verification + +- `cargo check --locked --lib --no-default-features`、`--no-default-features --features cli` 与默认特性三种配置均通过。 +- `cargo test --locked` 全量通过(Linux x86_64 本地环境)。 +- 下游验证:qdagent 原生插件恢复 `default-features = false` 后重新编译通过,`cargo test` 17 项通过。 +- 限制:Windows 与 Linux 发布产物由标签触发的 Release 流水线构建;本地验证不代表其他平台已通过,最终以实际流水线结果和资产校验为准。 + +## 完整发行产物 · Full distribution + +The `v2.9.1` full packaging workflow produces: +- Windows x86_64 native CLI (standalone EXE and bundled ZIP); +- Linux x86_64 CLI+libraries bundle; +- standard library ZIP, source ZIP and static user-site ZIP; +- editor `marqdo-2.9.1.vsix` from the independent editor branch; +- both Windows and Linux official native plugin packs, plus the versioned extension source pack when `ext/VERSION` matches `2.9.1`. diff --git a/ext/VERSION b/ext/VERSION index c8e38b6..dedcc7d 100644 --- a/ext/VERSION +++ b/ext/VERSION @@ -1 +1 @@ -2.9.0 +2.9.1 diff --git a/src/lib.rs b/src/lib.rs index 7a61214..c1e06cc 100755 --- a/src/lib.rs +++ b/src/lib.rs @@ -19,7 +19,10 @@ pub mod capture; pub mod narrative_ratio; #[cfg(feature = "cli")] pub mod catalog; -#[cfg(feature = "cli")] +// `sema::ir` unconditionally emits `proof-index.json` and +// `proof-obligations.json` through this module, so it is part of the core +// compiler rather than the CLI surface. Gating it on `cli` broke library +// consumers that disable default features (E0433). pub mod knowledge; pub mod check; pub mod contract;