From 8440e563e8d614bd0b73ae50c0584925a9c4f973 Mon Sep 17 00:00:00 2001 From: cflmy Date: Wed, 18 Nov 2026 16:57:04 +0800 Subject: [PATCH] release: prepare Marqdo v2.9.0 full with exact versioning, documented proof limits, and guarded tag promotion --- .github/workflows/knowledge-proof.yml | 27 --------- .github/workflows/proof.yml | 11 ---- .github/workflows/release-v2.9.yml | 83 +++++++++++++++++++++++++++ .github/workflows/release.yml | 2 + CHANGELOG.md | 15 +++++ Cargo.lock | 4 +- Cargo.toml | 2 +- README.md | 10 +++- crates/marqdo-wasm/Cargo.toml | 2 +- doc/releases/v2.9.0.md | 51 ++++++++++++++++ ext/VERSION | 2 +- 11 files changed, 163 insertions(+), 46 deletions(-) delete mode 100644 .github/workflows/knowledge-proof.yml mode change 100755 => 100644 .github/workflows/proof.yml create mode 100644 .github/workflows/release-v2.9.yml mode change 100755 => 100644 .github/workflows/release.yml mode change 100755 => 100644 Cargo.lock mode change 100755 => 100644 Cargo.toml mode change 100755 => 100644 README.md mode change 100755 => 100644 crates/marqdo-wasm/Cargo.toml create mode 100644 doc/releases/v2.9.0.md mode change 100755 => 100644 ext/VERSION diff --git a/.github/workflows/knowledge-proof.yml b/.github/workflows/knowledge-proof.yml deleted file mode 100644 index 45d89e7..0000000 --- a/.github/workflows/knowledge-proof.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: knowledge-proof-integration -on: - pull_request: - paths: - - "src/sema/ir.rs" - - "src/knowledge/**" - - "src/prove/**" - - "tests/knowledge_proof.rs" - - ".github/workflows/knowledge-proof.yml" - workflow_dispatch: - -jobs: - knowledge: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - - name: Compile tests and run semantic anchor unit cases - run: cargo test --locked --lib sema::ir::tests -- --nocapture - - name: Module composition, symbolic paths and proof VC unit tests - run: cargo test --locked --lib knowledge:: -- --nocapture - - name: Knowledge / proof linkage tests - run: cargo test --locked --test knowledge_proof -- --nocapture - - name: Existing proof contracts - run: cargo test --locked --test prove - - name: Executable knowledge compatibility - run: cargo test --locked --test executable_knowledge diff --git a/.github/workflows/proof.yml b/.github/workflows/proof.yml old mode 100755 new mode 100644 index 86db122..a119553 --- a/.github/workflows/proof.yml +++ b/.github/workflows/proof.yml @@ -16,8 +16,6 @@ on: branches: [main] paths: - "src/prove/**" - - "src/knowledge/**" - - "src/sema/ir.rs" - "doc/verification/skill-proof/**" - "lib/**" - "tests/prove*.rs" @@ -25,8 +23,6 @@ on: pull_request: paths: - "src/prove/**" - - "src/knowledge/**" - - "src/sema/ir.rs" - "doc/verification/skill-proof/**" - "lib/**" - "tests/prove*.rs" @@ -56,17 +52,10 @@ jobs: run: | chmod +x scripts/check-proof-library.sh scripts/check-proof-library.sh - - name: Verify modular assume-guarantee logic and required bridge counterexample - run: lean doc/verification/skill-proof/MarqdoModularProof.lean - - - name: Verify stateful ABI and fuel-bounded loop semantics - run: lean doc/verification/skill-proof/MarqdoEffects.lean - name: Build run: cargo build --locked - - name: Module proof composition and path-sensitive VC unit tests - run: cargo test --locked --lib knowledge:: - name: Judgment matrix (real Lean; CI requires toolchain) env: MARQDO_PROOF_REQUIRE_LEAN: "1" diff --git a/.github/workflows/release-v2.9.yml b/.github/workflows/release-v2.9.yml new file mode 100644 index 0000000..b80bd8e --- /dev/null +++ b/.github/workflows/release-v2.9.yml @@ -0,0 +1,83 @@ +# 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" + workflow_dispatch: +permissions: + contents: write + actions: write +concurrency: + group: release-v2.9-promotion + cancel-in-progress: false +jobs: + verify-and-dispatch: + if: github.repository == 'cflmy/marqdo' && github.ref == 'refs/heads/main' + 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 + 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/.github/workflows/release.yml b/.github/workflows/release.yml old mode 100755 new mode 100644 index dfd0735..1ddd5ff --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,6 +5,7 @@ on: push: tags: - "v*" + workflow_dispatch: permissions: contents: write @@ -51,6 +52,7 @@ jobs: New-Item -ItemType Directory -Force -Path dist | Out-Null Push-Location vscode-extension npm ci + npm version "$ver" --no-git-tag-version --allow-same-version npm run compile npx @vscode/vsce package --no-dependencies -o "../dist/marqdo-$ver.vsix" Pop-Location diff --git a/CHANGELOG.md b/CHANGELOG.md index 25baeac..e17218a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,21 @@ ## Unreleased +## v2.9.0 — 2026-11-18 · Full release / 正式完整版本 + +Marqdo Verified Knowledge Compiler: source-addressable knowledge proof artifacts, bounded Lean 4 modular contract composition, precise evidence grades, independent replay, and fail-closed unsupported semantics. + +- Unified source-derived pure-function proof DAG with symbolic parameters, sequential calls, total conditional branches, multi-module imports, and kernel-checked caller contracts. +- Stable statement and theorem anchors, dependency closure signatures, proof indexes and source-change invalidation. +- `proved`, `model_proved`, `tested`, `assumed`, `unknown`, `refuted`, `stale` are distinct; Lean Int-model proofs **do not** prove the complete Marqdo `number` or i64 runtime. +- Independent Lean replay and negative regression tests for changed source, missing preconditions, unsupported effects, and false caller conclusions. +- Full CLI/WASM/ext version synchronization, Windows/Linux native archives and editor release packaging (completion requires actual release workflow and asset verification). +- Existing `marqdo prove` behavior, classic knowledge references, and `marqdo call` remain supported. Unsupported loops, recursive functions, dynamic dispatch, plugins and unverified runtime behaviors never become auto-proved. + +Marqdo 2.9.0(full)发布可寻址知识制品、统一纯函数模块化契约组合、真实 Lean 证书独立重放与证据等级;保留旧证明证书重放。仅支持明确的纯整数抽象子集,不宣称完整运行时正确性或所有函数自动可证。 + +详情 / Details: [2.9.0 release notes](doc/releases/v2.9.0.md) · [Trust boundaries](doc/design/verified-knowledge-compiler-boundaries.md). + ## v2.8.0 — 2026-11-17 `marqdo prove` 正式发布:定理表 → Lean 4 证明 → 自动判定。离线符号执行(F1–F5)无工具链可用,`checked` 永远弱于 `proved`;单调性护栏让判定器缺陷显式失败;假定理给出反例见证;证书缓存与目录模式面向智能体批量出证。 diff --git a/Cargo.lock b/Cargo.lock old mode 100755 new mode 100644 index 1f83758..e78c897 --- a/Cargo.lock +++ b/Cargo.lock @@ -615,7 +615,7 @@ checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad" [[package]] name = "marqdo" -version = "2.8.0" +version = "2.9.0" dependencies = [ "anyhow", "assert_cmd", @@ -656,7 +656,7 @@ dependencies = [ [[package]] name = "marqdo-wasm" -version = "2.8.0" +version = "2.9.0" dependencies = [ "marqdo", "serde_json", diff --git a/Cargo.toml b/Cargo.toml old mode 100755 new mode 100644 index ebb81c3..ac4661b --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "marqdo" -version = "2.8.0" +version = "2.9.0" edition = "2021" license = "Apache-2.0" description = "Marqdo — Markdown markers as an interpreted programming language" diff --git a/README.md b/README.md old mode 100755 new mode 100644 index 09a02bd..3ad263d --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@

让 SKILL 真正成为工具:文档即知识,知识即可执行。

-release +release Apache-2.0 Rust runtime Pure by default @@ -21,9 +21,13 @@ View · Guide · Website · -Release notes +Release notes

+## Marqdo 2.9.0 — Verified Knowledge Compiler + +Knowledge statements and claims have stable addresses; verified pure contracts compose across static modules and produce independently replayable Lean certificates. Evidence distinguishes abstract `model_proved` from true runtime `proved`. Unsupported runtime effects and semantics are explicitly unverified. [Proof scope and acceptance](doc/design/verified-knowledge-compiler-boundaries.md) · [Release notes](doc/releases/v2.9.0.md). + ## One Markdown file. Three views. Real execution. [![Watch Marqdo 2.7.1 — from Markdown to execution](assets/marketing/marqdo-2.7.1-markdown-to-execution-cover.jpg)](assets/marketing/marqdo-2.7.1-markdown-to-execution.mp4) @@ -47,7 +51,7 @@ ## Quickstart — one function, one command -Install the [2.7.1 CLI release for Windows or Linux](https://github.com/cflmy/marqdo/releases/tag/v2.7.1), then run from this repository's root: +Install the [latest 2.9.0 CLI release for Windows or Linux](https://github.com/cflmy/marqdo/releases/tag/v2.9.0), then run from this repository's root: ```bash marqdo call examples/calculator.mq.md 计算器.加法 a=2 b=3 diff --git a/crates/marqdo-wasm/Cargo.toml b/crates/marqdo-wasm/Cargo.toml old mode 100755 new mode 100644 index 76ccc34..f41ca24 --- a/crates/marqdo-wasm/Cargo.toml +++ b/crates/marqdo-wasm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "marqdo-wasm" -version = "2.8.0" +version = "2.9.0" edition = "2021" license = "Apache-2.0" description = "Marqdo interpreter as WebAssembly (browser host bridge)" diff --git a/doc/releases/v2.9.0.md b/doc/releases/v2.9.0.md new file mode 100644 index 0000000..5a1ae7f --- /dev/null +++ b/doc/releases/v2.9.0.md @@ -0,0 +1,51 @@ +# Marqdo v2.9.0 · Full Release / 正式完整版本 + +## 核心更新 · Highlights + +Marqdo 2.9.0 将 Markdown 原生可执行知识库推进为 **可验证知识编译器(Verified Knowledge Compiler)**。这不是全语言自动证明工具:Lean 4 仅证明明确支持的逻辑模型,系统继续保存来源、信任边界与失效原因。 + +- **统一模块契约**:`knowledge compose` 支持静态纯函数的形参、整数表达式、连续赋值、穷尽分支、多次函数调用和多级模块调用 DAG。 +- **独立 Lean 模块证明**:每个受支持函数由源码生成可检查模块;调用方导入被调方定理,而不是将定理声明自动当成公理。 +- **知识锚点**:带标记步骤和定理声明具有稳定身份;`[]()` 用于可寻址引用,绝不自动赋予执行权。 +- **可信证据**:`model_proved`、`proved`、`tested`、`assumed`、`unknown`、`refuted`、`stale` 严格区分;证明收据绑定源码与依赖闭包,支持失效检测和独立重放。 +- **兼容性**:旧版 `marqdo prove`、`marqdo call`、知识视图和旧式简单组合证书继续兼容,Rust 与 Lean 差分测试保护语义边界。 + +**EN:** Marqdo 2.9.0 introduces a Verified Knowledge Compiler for native Markdown knowledge artifacts, stable anchors, source-derived bounded assume/guarantee composition, and independently replayable Lean 4 certificates. The implementation **does not** claim universal program correctness: supported Lean `Int` theorems are labeled `model_proved` until a runtime semantic correspondence is established. + +## 可信边界 · Verification boundaries + +Lean 自动组合仅适用于源码可精确翻译的无副作用、静态纯整数模型片段;有界整数溢出、动态 `number` / `Formula`、插件效应、未知异常、循环和递归不会自动升级为已证明。前置条件未证明、源码漂移、证书篡改、Lean 不可用或超出支持范围时,必须拒绝出证或明确返回未验证状态。 + +Formal logic proves **properties of the declared model**, not empirical facts or the entire runtime. External API responses, quantum hardware measurements and agent behavior require explicit experiment/test/provenance evidence. See [design decision](../design/verified-knowledge-compiler-boundaries.md). + +## 使用 · Usage + +```sh +marqdo knowledge . +marqdo knowledge compose --strict --json . +marqdo knowledge proof-deps --verify --json . +marqdo knowledge replay --json . +``` + +A `model_proved` certificate is **not** an unconditional authorization to call plugins or execute side effects. + +## 完整发行产物 · Full distribution + +The `v2.9.0` 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.0.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.0`. + +**Release completion is determined by actual CI artifacts and publication evidence, not by this note.** In addition to GitHub assets the repository's [release handbook](../../skills/marqdo-release/index.mq.md) requires CDN/R2 byte parity and Ubuntu PPA publication/apt verification. Missing credentials, failed cross-platform builds or unverified publication channels must be reported as incomplete; never invent hashes or success. + +## 质量验收 · Quality gates + +- `modular-proof-smoke` — actual Lean kernel-checkable intermodule source contracts, negative/stale replay tests. +- `knowledge-proof-full-gate` — knowledge, semantic-IR, proof corpus and interpreter/Lean differential tests. +- `executable-knowledge` — backward compatibility and knowledge execution tests. +- `Release` — verify both platform assets were built from the exact immutable tag. +- `release-v2.9` gate — verify metadata, build/test on main and create the immutable tag only when checks pass. + +Version 2.9.0 is a **scoped Verified Knowledge Compiler**, not a theorem that every program or scientific experiment is automatically correct. diff --git a/ext/VERSION b/ext/VERSION old mode 100755 new mode 100644 index 24ba9a3..c8e38b6 --- a/ext/VERSION +++ b/ext/VERSION @@ -1 +1 @@ -2.7.0 +2.9.0