Files
cflmy 8af72620f1 docs(release): record convergence evidence, RC, and support matrix
WHY
- The code fixes existed locally without same-SHA release material; the G0..G12
  gate matrix, G-C VM evidence, RC artifact and explicit non-claims must be
  reviewable together.
- The release-candidate workflow packaged no consumers and did not verify its
  own checksum in the clean-install directory.

WHAT
- Record the current Linux/VM evidence at f075c96 and keep remote CI/G-C as
  UNVERIFIED; overall decision DO NOT RELEASE.
- Add G-C evidence (7/7 + positive CLI + 47-binary workspace run), RC report
  with gate matrix, clean-install and checksum result.
- Update STATUS, COMPATIBILITY, CHANGELOG, README, tests/README, mapping spec
  and releasing procedure for the new condition/span/power/Tool behavior.
- Harden release-candidate packaging: include tests/consumers, SOURCE_SHA,
  rustc -vV, verify the checksum before extraction, and run independent
  Analysis/Trace validation from the extracted archive.
- Record the local convergence note in NEXT_RELEASE_CI_CONVERGENCE.md.

TESTS
- Local fmt/clippy/workspace PASS; G-C VM PASS at f075c96.
- Linux RC: sha256 -c OK and clean-install smoke PASS.

CI_URL
- none: Gitee remote, no GitHub credentials. Windows/macOS and same-SHA G-C CI
  remain the blocking gates.

BREAKING_CHANGE
- none in this docs/workflow commit.

SECURITY_SCOPE
- strict remains fail-closed; no new capability or platform claim. G-C is
  local-VM evidence, not a CI-signed security URL.
2026-11-20 15:51:48 +08:00

206 lines
8.7 KiB
YAML

name: CI
on:
push:
pull_request:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: fmt + clippy + test (Linux x86_64)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: Formatting
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --workspace --all-targets -- -D warnings
- name: Tests
run: cargo test --workspace
- name: Validate public JSON schemas
run: |
python3 - <<'PY'
import json, pathlib
for path in pathlib.Path("spec/schemas").glob("*.json"):
json.loads(path.read_text())
print("schemas parse")
PY
- name: Smoke test the CLI, protocols and examples
run: |
cargo build -p marqdo-cli
./target/debug/marqdo check examples/factorial.mq.md
./target/debug/marqdo call examples/factorial.mq.md 阶乘 --arg n=5
./target/debug/marqdo call examples/math.mq.md 计算圆面积
./target/debug/marqdo inspect examples/references.mq.md --refs
./target/debug/marqdo check examples/multi-module/index.mq.md --refs \
--emit /tmp/marqdo-analysis.json
./target/debug/marqdo run examples/multi-module/index.mq.md \
--trace-file /tmp/marqdo-analysis-trace.json
python3 tests/consumers/analysis_consumer.py /tmp/marqdo-analysis.json
python3 tests/consumers/trace_consumer.py \
/tmp/marqdo-analysis.json /tmp/marqdo-analysis-trace.json
./target/debug/marqdo run examples/hello.mq.md \
--trace-file /tmp/marqdo-trace.json
python3 - <<'PY'
import json
json.load(open("/tmp/marqdo-trace.json"))
print("trace parses")
PY
./target/debug/marqdo run examples/packages-multi-version/index.mq.md
./target/debug/marqdo run examples/kernel-mock/demo.mq.md \
--kernel examples/kernel-mock/kernel.json --allow-foreign
export MARQDO_TOOL_HOME="$(mktemp -d)"
./target/debug/marqdo tool install examples/tool-unknown-name/tool.json
./target/debug/marqdo benchmark run .
./target/debug/marqdo tool remove benchmark
./examples/plugin-demo/build.sh
./target/debug/marqdo plugin inspect examples/plugin-demo/build
./target/debug/marqdo run examples/plugin-demo/plugin-call.mq.md \
--plugin examples/plugin-demo/build \
--trust-native-plugin \
--allow-plugin demo.solver
./examples/plugin-multi-export/build.sh
./target/debug/marqdo check examples/plugin-multi-export/plugin-call.mq.md \
--plugin examples/plugin-multi-export/build
./target/debug/marqdo run examples/plugin-multi-export/plugin-call.mq.md \
--plugin examples/plugin-multi-export/build \
--trust-native-plugin \
--allow-plugin demo.solver
schema:
name: schema instance validation + consumers
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Install JSON Schema validator
run: python3 -m pip install --disable-pip-version-check "jsonschema==4.23.0"
- name: Validate real artifacts
run: |
cargo build -p marqdo-cli
./target/debug/marqdo check examples/multi-module/index.mq.md --refs \
--emit /tmp/analysis-v2.json
./target/debug/marqdo run examples/multi-module/index.mq.md \
--trace-file /tmp/trace-v2.json
python3 tests/consumers/validate_protocols.py \
/tmp/analysis-v2.json /tmp/trace-v2.json examples/tool-unknown-name/tool.json
python3 tests/consumers/analysis_consumer.py /tmp/analysis-v2.json
python3 tests/consumers/trace_consumer.py \
/tmp/analysis-v2.json /tmp/trace-v2.json
cross-platform:
name: runtime contract (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Host toolchain report
shell: bash
run: |
rustc -vV
(command -v cc && cc --version | head -1) || echo "cc: unavailable"
(command -v python3 && python3 --version) || echo "python3: unavailable"
(command -v node && node --version) || echo "node: unavailable"
- name: Workspace tests
run: cargo test --workspace
- name: Portable CLI, analysis and trace smoke
shell: bash
run: |
set -e
cargo run -q -p marqdo-cli -- check examples/multi-module/index.mq.md \
--refs --emit /tmp/marqdo-portable-analysis.json
python3 tests/consumers/analysis_consumer.py /tmp/marqdo-portable-analysis.json
cargo run -q -p marqdo-cli -- run examples/multi-module/index.mq.md \
--trace-file /tmp/marqdo-portable-trace.json
python3 tests/consumers/trace_consumer.py \
/tmp/marqdo-portable-analysis.json /tmp/marqdo-portable-trace.json
- name: Strict isolation is unavailable and must fail closed
shell: bash
run: |
set +e
output=$(cargo run -q -p marqdo-cli -- run examples/hello.mq.md --mode strict 2>&1)
code=$?
set -e
test "$code" -eq 1
echo "$output" | grep -qi "strict"
echo "$output"
release-candidate:
name: release candidate artifact (${{ matrix.os }})
needs: [test, schema, cross-platform]
if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch'
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: macos-latest
target: aarch64-apple-darwin
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Build release binary
run: cargo build --release --locked -p marqdo-cli
- name: Package and checksum
shell: bash
run: |
set -euo pipefail
version="$(cargo metadata --no-deps --format-version 1 | python3 -c 'import json,sys; print(json.load(sys.stdin)["packages"][0]["version"])')"
stage="dist/marqdo-${version}-${{ matrix.target }}"
mkdir -p "$stage"
install -m 0755 target/release/marqdo "$stage/"
cp LICENSE-MIT LICENSE-APACHE CHANGELOG.md COMPATIBILITY.md README.md "$stage/"
cp -r spec examples "$stage/"
mkdir -p "$stage/tests"
cp -r tests/consumers "$stage/tests/"
printf 'source_sha=%s\nversion=%s\ntarget=%s\n' "$GITHUB_SHA" "$version" "${{ matrix.target }}" > "$stage/SOURCE_SHA"
rustc -vV > "$stage/rustc-vV.txt"
tar -C dist -czf "dist/marqdo-${version}-${{ matrix.target }}.tar.gz" "$(basename "$stage")"
cd dist
if command -v sha256sum >/dev/null 2>&1; then
sha256sum "marqdo-${version}-${{ matrix.target }}.tar.gz" > "marqdo-${version}-${{ matrix.target }}.tar.gz.sha256"
else
shasum -a 256 "marqdo-${version}-${{ matrix.target }}.tar.gz" > "marqdo-${version}-${{ matrix.target }}.tar.gz.sha256"
fi
cat "marqdo-${version}-${{ matrix.target }}.tar.gz.sha256"
- name: Clean-install smoke
shell: bash
run: |
set -euo pipefail
tmp="$(mktemp -d)"
cp dist/marqdo-*.tar.gz* "$tmp/"
cd "$tmp"
sha256sum -c marqdo-*.tar.gz.sha256 2>/dev/null || shasum -a 256 -c marqdo-*.tar.gz.sha256
tar -xzf marqdo-*.tar.gz
cd marqdo-*
./marqdo --version
./marqdo --help >/dev/null
./marqdo check examples/multi-module/index.mq.md --refs --emit analysis.json
./marqdo run examples/hello.mq.md
./marqdo run examples/multi-module/index.mq.md --trace-file trace.json
python3 tests/consumers/analysis_consumer.py analysis.json
python3 tests/consumers/trace_consumer.py analysis.json trace.json
python3 tests/consumers/validate_protocols.py analysis.json trace.json examples/tool-unknown-name/tool.json
- uses: actions/upload-artifact@v4
with:
name: marqdo-${{ matrix.target }}
path: dist/marqdo-*.tar.gz*
if-no-files-found: error