refactor: accept the ecosystem stdlib Bundle and remove the in-repo sources
Phase B of ADR-0070 (issue #11): the CLI no longer owns standard-library sources. The pin names the accepted ecosystem Bundle (marqdo-stdlib@0.2.0, root commit + tree/alias digests); tools/ci/fetch_ecosystem_bundle.py materializes it from the pinned root commit and stdlib gitlinks and verifies the digests. bundle.py and the test harness require an explicit verified Bundle for the accepted identity, and runtime discovery has no compile-time source fallback in any profile. Delete stdlib/ (modules, self-tests, aliases manifest). Module and domain tests stay with their component owners; the CLI product lane now verifies the external Bundle's public surface, std: resolution and official print/打印 alias routing (tests/product-stdlib). Composition assertions whose owner is the ecosystem (Table split, print-format equivalence) moved to the root Bundle acceptance; the generic TCP round-trip stays a CLI test. Spawned-CLI tests name the verified Bundle explicitly. CI (Woodpecker + GitHub) materializes the pinned Bundle before product tests, packaging and performance lanes; packaging and release take --stdlib-dir from that artifact. Docs, STATUS, ADR-0070 and a Phase B evidence record updated. Refs cflmy/marqdo#9, cflmy/marqdo-cli#11
This commit is contained in:
1 parent
f8b82d4143
commit
72f57beee0
85 files changed
+796
-5939
No files matched your search
+14
-10
@@ -13,11 +13,13 @@ steps:
|
||||
image: rust:1.100-bookworm
|
||||
commands:
|
||||
- apt-get update
|
||||
- apt-get install -y --no-install-recommends ca-certificates python3 python3-jsonschema
|
||||
- apt-get install -y --no-install-recommends ca-certificates git python3 python3-jsonschema
|
||||
- cargo build --locked -p marqdo-cli -p marqdo-provider-worker
|
||||
- python3 tools/ci/check_dependency_boundaries.py
|
||||
- python3 tools/ci/fetch_ecosystem_bundle.py --out target/ecosystem-stdlib
|
||||
- |
|
||||
set -eux
|
||||
export MARQDO_STDLIB_DIR="$PWD/target/ecosystem-stdlib"
|
||||
./target/debug/marqdo check tests/consumers/fixtures/observation/basic.mq.md --emit /tmp/analysis.json
|
||||
./target/debug/marqdo run tests/consumers/fixtures/observation/basic.mq.md --output jsonl --observation-file /tmp/observation.json > /tmp/observation.jsonl
|
||||
python3 tests/consumers/analysis_consumer.py /tmp/analysis.json
|
||||
@@ -37,23 +39,24 @@ steps:
|
||||
commands:
|
||||
- rustup component add clippy rustfmt
|
||||
- apt-get update
|
||||
- apt-get install -y --no-install-recommends curl ca-certificates python3 python3-jsonschema build-essential gcc-mingw-w64-x86-64
|
||||
- apt-get install -y --no-install-recommends curl ca-certificates git python3 python3-jsonschema build-essential gcc-mingw-w64-x86-64
|
||||
- curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
|
||||
- apt-get install -y --no-install-recommends nodejs
|
||||
- python3 tools/stdlib/bundle.py
|
||||
- python3 tools/ci/fetch_ecosystem_bundle.py --out target/ecosystem-stdlib
|
||||
- python3 tools/stdlib/bundle.py --stdlib-dir target/ecosystem-stdlib
|
||||
- cargo fmt --all -- --check
|
||||
- cargo clippy --workspace --all-targets -- -D warnings
|
||||
# Provider CLI tests resolve a real provider worker next to the CLI
|
||||
# binary. Build it once so the test harness does not need a nested build.
|
||||
- cargo build --locked -p marqdo-provider-worker
|
||||
- cargo test --workspace --locked
|
||||
- cargo test -p marqdo-cli --test docs_consistency
|
||||
- cargo test -p marqdo-cli --test architecture_boundaries
|
||||
- MARQDO_TEST_STDLIB_BUNDLE="$PWD/target/ecosystem-stdlib" cargo test --workspace --locked
|
||||
- MARQDO_TEST_STDLIB_BUNDLE="$PWD/target/ecosystem-stdlib" cargo test -p marqdo-cli --test docs_consistency
|
||||
- MARQDO_TEST_STDLIB_BUNDLE="$PWD/target/ecosystem-stdlib" cargo test -p marqdo-cli --test architecture_boundaries
|
||||
- python3 tools/ci/check_dependency_boundaries.py
|
||||
- python3 tools/ci/check_engine_boundary.py
|
||||
- python3 tools/ci/check_plugin_sdk.py
|
||||
- python3 -m unittest discover -s tools/ci -p "test_*.py"
|
||||
- MARQDO_TEST_STDLIB_BUNDLE="$PWD/stdlib" MARQDO_TEST_BUNDLE_PIN="$PWD/tools/stdlib/bundle-pin.json" cargo test -p marqdo-cli --test stdlib_product
|
||||
- MARQDO_TEST_STDLIB_BUNDLE="$PWD/target/ecosystem-stdlib" python3 -m unittest discover -s tools/ci -p "test_*.py"
|
||||
- MARQDO_TEST_STDLIB_BUNDLE="$PWD/target/ecosystem-stdlib" cargo test -p marqdo-cli --test stdlib_product
|
||||
# Windows compile gate: runtime lanes are native on GitHub; this catches
|
||||
# cfg/compile regressions on the Linux CI without a Windows runner.
|
||||
- rustup target add x86_64-pc-windows-gnu
|
||||
@@ -83,7 +86,8 @@ steps:
|
||||
# only supported transport and resolution is a sibling-of-CLI lookup.
|
||||
- cargo build --release --locked -p marqdo-cli -p marqdo-provider-worker
|
||||
- test -x target/release/marqdo-provider-worker
|
||||
- python3 tools/stdlib/bundle.py
|
||||
- python3 tools/ci/fetch_ecosystem_bundle.py --out target/ecosystem-stdlib
|
||||
- python3 tools/stdlib/bundle.py --stdlib-dir target/ecosystem-stdlib
|
||||
# Build the deterministic archive from this exact commit and cold-install
|
||||
# smoke-test it; the package script refuses a dirty tree or wrong SHA.
|
||||
- |
|
||||
@@ -91,7 +95,7 @@ steps:
|
||||
version="$(cargo metadata --no-deps --format-version 1 --offline \
|
||||
| python3 -c 'import json,sys; print(next(p["version"] for p in json.load(sys.stdin)["packages"] if p["name"]=="marqdo-cli"))')"
|
||||
python3 tools/release/package.py --source-sha "$CI_COMMIT_SHA" --version "$version" \
|
||||
--stdlib-dir stdlib --bundle-pin tools/stdlib/bundle-pin.json
|
||||
--stdlib-dir target/ecosystem-stdlib --bundle-pin tools/stdlib/bundle-pin.json
|
||||
python3 tools/release/smoke.py --archive dist/marqdo-*.tar.gz
|
||||
tools/ci/run_frozen_extensions.sh dist/marqdo-*.tar.gz "$CI_COMMIT_SHA" dist/frozen-extension-evidence.json
|
||||
cat dist/frozen-extension-evidence.json
|
||||
@@ -10,7 +10,8 @@ steps:
|
||||
commands:
|
||||
- apt-get update
|
||||
- apt-get install -y --no-install-recommends python3 util-linux ca-certificates git openssl build-essential
|
||||
- python3 tools/stdlib/bundle.py
|
||||
- python3 tools/ci/fetch_ecosystem_bundle.py --out target/ecosystem-stdlib
|
||||
- python3 tools/stdlib/bundle.py --stdlib-dir target/ecosystem-stdlib
|
||||
- cargo build --release --locked -p marqdo-cli -p marqdo-provider-worker
|
||||
- |
|
||||
set -eu
|
||||
@@ -24,7 +25,7 @@ steps:
|
||||
|
||||
version="$(target/release/marqdo --version | cut -d ' ' -f 2)"
|
||||
python3 tools/release/package.py --version "$version" --source-sha "$CI_COMMIT_SHA" \
|
||||
--stdlib-dir stdlib --bundle-pin tools/stdlib/bundle-pin.json --out-dir "$perf_dir"
|
||||
--stdlib-dir target/ecosystem-stdlib --bundle-pin tools/stdlib/bundle-pin.json --out-dir "$perf_dir"
|
||||
archive="$perf_dir/marqdo-$version-x86_64-unknown-linux-gnu.tar.gz"
|
||||
(cd "$perf_dir" && sha256sum -c "$(basename "$archive.sha256")")
|
||||
tar -xzf "$archive" -C "$perf_dir"
|
||||
|
||||
Reference in new issue
Block a user