feat(stdlib): ship a verified bundled stdlib with std: imports
- Move the Compat-A print prototype into stdlib/ as the official offline bundle with stdlib.json (version 0.1.0 + sha256 content digest). - Add std:<relative> import resolution in the loader with bundle path confinement, extension inference and fail-closed digest verification. - Record the verified version/digest/instance_id in Analysis v2 project.stdlib; stdlib modules get a std:name@version#digest instance id. - Add CLI tests: std:io execution, digest-tamper rejection, missing manifest, Analysis identity, no foreign/plugin calls, and frozen binary hash equality. - Update ADR-0028, specs, status, changelog and evidence. Gate: fmt, clippy -D warnings, 415 tests passed.
This commit is contained in:
1 parent
1a978c7a42
commit
1377af1601
28 files changed
+879
-23
No files matched your search
@@ -24,7 +24,7 @@ No GitHub CI is available from this checkout; this is local evidence.
|
||||
|
||||
## Prototype
|
||||
|
||||
Ordinary `.mq.md` modules under `examples/stdlib/`:
|
||||
Ordinary `.mq.md` modules (now the bundled `stdlib/` tree, ADR-0028):
|
||||
|
||||
| File | Responsibility |
|
||||
|---|---|
|
||||
@@ -50,7 +50,7 @@ The module is loaded only through an explicit Markdown import alias.
|
||||
## Output comparison
|
||||
|
||||
```text
|
||||
$ marqdo run examples/stdlib/demo.mq.md
|
||||
$ marqdo run stdlib/demo.mq.md
|
||||
["文本", 2, 1.5, [3, true], {a: 1, b: "x"}, None]
|
||||
["文本", 2, 1.5, [3, true], {a: 1, b: "x"}, None]
|
||||
Table[名称 | 分数]{甲 | 87; 乙 | 92}
|
||||
@@ -88,7 +88,7 @@ extension, not part of this slice. This is the explicit blocker for Compat-B.
|
||||
export PATH=/root/.cargo/bin:$PATH
|
||||
export CARGO_HOME=/root/work/marqdo-cli/.cache/cargo
|
||||
export CARGO_TARGET_DIR=/root/work/marqdo-cli/.cache/target
|
||||
cargo run -q -p marqdo-cli -- run examples/stdlib/demo.mq.md
|
||||
cargo run -q -p marqdo-cli -- run stdlib/demo.mq.md
|
||||
cargo test -p marqdo-cli --test examples_r6
|
||||
cargo test --workspace --locked
|
||||
```
|
||||
Reference in new issue
Block a user