tests: resolve one pinned Bundle and separate the loader lane

Add crates/cli/tests/support/stdlib.rs as the product/conformance test
resolver: explicit MARQDO_TEST_STDLIB_BUNDLE or the pinned path, always
verified against bundle-pin.json (name/version/commit/digests), with a
bad explicit override failing closed. Route stdlib_product,
stdlib_bundle, http, table, alias routing, p2_closure,
conformance_semantics and architecture_boundaries through it.

Loader unit tests now build small synthetic Bundles; discovery is split
into discover_with so the bad-override-no-fallback rule is testable.
This commit is contained in:
cflmy committed 2026-11-26 15:15:59 +08:00
1 parent 422b9de6d7
commit 3a68260cf2
10 files changed
+467 -107

No files matched your search

+7 -3
View File
@@ -3,6 +3,9 @@
#[path = "support/observation.rs"]
pub mod observation;
#[path = "support/stdlib.rs"]
pub mod stdlib_support;
use std::path::{Path, PathBuf};
use std::process::Command;
@@ -109,7 +112,8 @@ fn p2_algorithms_run_in_a_pure_no_foreign_no_plugin_host() {
#[test]
fn p2_stdlib_table_also_runs_in_pure_mode() {
let path = repo_root().join("stdlib").join("tests").join("table.mq.md");
let bundle = stdlib_support::bundle_dir();
let path = bundle.join("tests").join("table.mq.md");
let output = Command::new(env!("CARGO_BIN_EXE_marqdo"))
.args([
"run",
@@ -119,8 +123,8 @@ fn p2_stdlib_table_also_runs_in_pure_mode() {
"--output",
"json",
])
.current_dir(repo_root().join("stdlib"))
.env("MARQDO_STDLIB_DIR", repo_root().join("stdlib"))
.current_dir(&bundle)
.env("MARQDO_STDLIB_DIR", &bundle)
.output()
.expect("run table self-test");
assert_eq!(