feat: Marqdo v2.9.0 Verified Knowledge Compiler (full release candidate)

Unified source-verified contracts, accurate evidence grades and independently replayable Lean certificates; version sync, bilingual notes and guarded full release CI. Preserve native AI extension updates from main.
This commit is contained in:
cflmy authored and GitHub committed 2026-11-18 17:12:07 +08:00
1 parent a3948dbe0d
commit 180a111799
43 files changed
+5816 -20

No files matched your search

@@ -0,0 +1,50 @@
name: knowledge-proof-full-gate
on:
pull_request:
paths:
- "src/knowledge/**"
- "src/sema/**"
- "src/prove/**"
- "tests/**"
- "doc/verification/skill-proof/**"
- ".github/workflows/knowledge-proof-full-gate.yml"
workflow_dispatch:
concurrency:
group: knowledge-proof-full-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
complete-proof-regression:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install pinned Lean kernel
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 kernel and embedded 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 run all knowledge unit tests
run: |
cargo build --locked
cargo test --locked --lib knowledge::
cargo test --locked --lib sema::ir::tests
- name: Knowledge and execution compatibility suites
run: |
cargo test --locked --test knowledge_proof
cargo test --locked --test executable_knowledge
cargo test --locked --test prove
- name: Full genuine Lean proof matrix
env:
MARQDO_PROOF_REQUIRE_LEAN: "1"
run: |
cargo test --locked --test prove_lean
cargo test --locked --test prove_corpus
cargo test --locked --test conformance
+70
View File
@@ -0,0 +1,70 @@
name: modular-proof-smoke
on:
pull_request:
paths:
- "src/knowledge/**"
- "src/sema/ir.rs"
- "src/prove/**"
- "tests/prove_lean.rs"
- "doc/verification/skill-proof/**"
- ".github/workflows/modular-proof-smoke.yml"
workflow_dispatch:
concurrency:
group: modular-proof-smoke-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
modular:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Compile isolated modular proof candidates
run: cargo test --locked --lib knowledge::composition::tests -- --nocapture
- name: Compile parameter-projection proof backend
run: cargo test --locked --lib knowledge::projection -- --nocapture
- name: Compile pure-expression VC backend
run: cargo test --locked --lib knowledge::expression::tests -- --nocapture
- name: Unified contract engine and evidence lattice unit tests
run: |
cargo test --locked --lib knowledge::unified::tests -- --nocapture
cargo test --locked --lib knowledge::evidence::tests -- --nocapture
- name: Compile path-sensitive VCs
run: cargo test --locked --lib knowledge::symbolic::tests -- --nocapture
- name: Compile closed-argument VCs
run: cargo test --locked --lib knowledge::vc::tests -- --nocapture
- name: Install Lean 4.35
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: Lean proof of exception, ABI and fuel-bound models
run: |
lean doc/verification/skill-proof/MarqdoModularProof.lean
lean doc/verification/skill-proof/MarqdoEffects.lean
- name: Independently composed Lean modules
env:
MARQDO_PROOF_REQUIRE_LEAN: "1"
run: cargo test --locked --test prove_lean composition_emits_independently_replayable_caller_certificate -- --nocapture
- name: Symbolic parameter projection with independent Lean replay
env:
MARQDO_PROOF_REQUIRE_LEAN: "1"
run: cargo test --locked --test prove_lean projection_composition_proves_symbolic_caller_and_replays_from_source -- --nocapture
- name: Independent arithmetic contract composition with real Lean
env:
MARQDO_PROOF_REQUIRE_LEAN: "1"
run: cargo test --locked --test prove_lean pure_expression_composition_proves_and_replays_real_lean -- --nocapture
- name: Three module DAG and branching caller with independent Lean replay
env:
MARQDO_PROOF_REQUIRE_LEAN: "1"
run: cargo test --locked --test prove_lean unified_modular_contract_proves_multicall_branch_and_transitive_dag -- --nocapture
- name: Regenerated provenance for original Lean certificates
env:
MARQDO_PROOF_REQUIRE_LEAN: "1"
run: cargo test --locked --test prove_lean g2_certificate_hit_after_real_run -- --nocapture
- name: Linear symbolic arithmetic path implication with real Lean
env:
MARQDO_PROOF_REQUIRE_LEAN: "1"
run: cargo test --locked --test prove_lean arithmetic_symbolic_path_implication_uses_real_lean -- --nocapture
- name: Symbolic path implication with real Lean
env:
MARQDO_PROOF_REQUIRE_LEAN: "1"
run: cargo test --locked --test prove_lean symbolic_path_implication_uses_real_lean_without_runtime_promotion -- --nocapture
Executable → Regular
View File
File mode changed.
+91
View File
@@ -0,0 +1,91 @@
# 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"
Executable → Regular
+2
View File
@@ -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