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

+5 -2
View File
@@ -20,6 +20,9 @@
//! expectation; the checked-in goldens were reviewed individually.
use std::fs;
#[path = "support/stdlib.rs"]
pub mod stdlib_support;
use std::path::{Path, PathBuf};
use marqdo_host::{Capabilities, Host, StdHost};
@@ -291,7 +294,7 @@ fn normalise_relative(path: &Path) -> String {
/// unique registry, run the single binding pass and install its table. There is
/// no `print_override` and no runtime name guessing.
fn bind_calls_with_stdlib_aliases(program: &mut Program) {
let root = repo_root().join("stdlib");
let root = stdlib_support::bundle_dir();
let mut loaded = std::collections::BTreeSet::new();
let mut official = Vec::new();
if root.join("stdlib.json").is_file() {
@@ -428,7 +431,7 @@ fn install_entry_stdlib_imports(
module_id: &ModuleId,
analysis: &marqdo_frontend::AnalysisResult,
) {
let root = repo_root().join("stdlib");
let root = stdlib_support::bundle_dir();
let Some(imports) = analysis
.document
.frontmatter()