feat(cli): route print through the bundled stdlib (Compat-B)
- Add Program.print_override and lazy stdlib injection: only programs that call 打印/print load std:io and route to io.写值 (ADR-0030). - Record resource.open/read/write/close as trace effect events so the stdlib print path is auditable; HostOp::Print no longer runs on that path. - Permit only stdio/stdout (existing console) in strict; file/network resource opens remain permission.denied. - Exclude std: modules from the human-readable checked-module count; update the Python analysis consumer to accept std: instance ids. - Add print-routing and strict-console tests, ADR-0030 and evidence. Gate: fmt, clippy -D warnings, 418 tests passed.
This commit is contained in:
1 parent
e119727c5d
commit
e26971f489
21 files changed
+560
-36
No files matched your search
@@ -6,8 +6,8 @@ Baseline: `a113d89` plus the uncommitted RFC-CM P0–P3 changes.
|
||||
Decision record: [ADR-0027](../adr/0027-print-migration-compat-a.md)
|
||||
Related: [Resource P3](2026-11-20-resource-stream-p3.md),
|
||||
[file write](2026-11-20-resource-file-write-p3.md), [STATUS §5](../STATUS.md).
|
||||
Scope: **Compat-A only**. Builtin `打印` is not migrated; no alias routing and
|
||||
no removal of `HostOp::Print`.
|
||||
Scope: **Compat-A only** at the time of that slice. A later ADR-0030 step
|
||||
added Compat-B routing; this report remains the Compat-A baseline.
|
||||
|
||||
## Environment and gate
|
||||
|
||||
@@ -76,7 +76,8 @@ extension, not part of this slice. This is the explicit blocker for Compat-B.
|
||||
|
||||
## What is not migrated
|
||||
|
||||
* `打印`/`print` still resolves to the existing builtin and `HostOp::Print`.
|
||||
* At the time of this slice, `打印`/`print` resolved to the builtin and
|
||||
`HostOp::Print`; ADR-0030 later added Compat-B routing.
|
||||
* No alias table, no bundled stdlib resolution, no `std` package.
|
||||
* No stdlib version/digest or offline distribution (CM-A10).
|
||||
* No Compat-B/C comparison lane or removal of the Rust `Value::display()` path.
|
||||
|
||||
Reference in new issue
Block a user