Follow-up cleanup of text left by the concurrent implementation:
- marqdo-markdown AST, marqdo-ir statements/branch arms, frontend units,
payload and signature module docs now describe RFC-LANG-0002 roles
(payload carriers, heading modes, if/else groups, while/end, params)
- marqdo-expression public docs list parse_payload_statement and stop
describing a Markdown-link call that no longer exists
- retired markdown.invalid_construct/markdown.inert_executable constants
are documented as decode-only history for old Analysis/Trace JSON
- drop the stale 'expected red' comment in the CLI integration test
- the dev-only .mq.md review aid no longer reports semicolons inside
string literals, and skips AST baselines / expected-invalid negatives
Verified: fmt, clippy -D warnings and cargo test --workspace --locked green.
The pre-RFC link-form block-quote call was removed by RFC-LANG-0002, but the
IR still carried Stmt::Call, CallSite and CallTarget with matching branches in
the runtime, infer, call validation, loader, analysis projection and JSON
output. No mapper produces that variant any more, so it was a second call
representation that could never be reached.
- remove Stmt::Call, CallSite and CallTarget from marqdo-ir
- remove the runtime exec_call_site path and every exhaustive match arm
- remove the 'call_site' Analysis node and its JSON helpers
- state in spec/analysis-v2.md that calls are expressions; keep v1 as history
with a note that call_site is not produced by the current language
Verified: cargo clippy --workspace --all-targets -D warnings clean and
cargo test --workspace --locked green (62 targets).
One Markdown-to-program mapping, no version selector or legacy mapper.
Frontend/runtime:
- resolve @exec/@knowledge heading declarations with nearest-ancestor
inheritance; only an Exec H2 is callable; add UnitKind::Knowledge and
sem.* diagnostics (mode marker, unit name, exec-without-function,
payload nesting/empty, syntax, control stack, params position,
version directive, inferred-signature lint)
- extract Strong/Emph/inline Code as one-statement carriers, refuse
nested carriers, and honour heading segment boundaries so an if/while
cannot be closed across a heading
- lower if/else/while/end to the existing Branch/Loop/Return IR with a
compile-time control stack; keep payload-relative source spans through
expression parsing and rewrite them onto the file
- accept params(...) only as the first direct Exec H2 payload; keep the
existing free-variable inference and named-only rule for inferred
signatures; fix duplicate-mode/else/end and Knowledge-body inertness
- reject marqdo_semantics/syntax front matter directives
Data and tests:
- migrate stdlib/**/*.mq.md, regenerate stdlib.json digest
- migrate examples and the full semantics/negative/runtime corpus to
the only current syntax; expected values/runtime codes preserved
- migrate Rust-embedded .mq.md fixtures, init template, CLI help and
security-lane fixtures
Verified: cargo fmt --check, cargo clippy -D warnings and
cargo test --workspace --locked (green).
- Delete HostOp::Print and StdHost::op_print; the print builtin only routes to
bundled io.写值 when Program.print_override is set, otherwise returns a
structured kernel.unavailable error (ADR-0031).
- Keep the 打印/print builtin name for arity/static validation; Value::display
remains only for CLI result rendering, not print execution.
- Teach the direct-runtime semantic harness to mirror loader stdlib injection
and import edges; replace runtime tests that used print with non-print
effects.
- Update spec/security/status/changelog/README, add ADR-0031 and evidence.
Gate: fmt, clippy -D warnings, 419 tests passed.
- 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.
- add CallableId/Descriptor/Origin and CallableRegistry in marqdo-ir
- include builtins, Marqdo functions and declared ABI exports in one static
lookup model with deterministic conflict rules
- validate declared plugin export signatures in the frontend without loading
any shared library
- add registry and frontend static-plugin-signature tests
- replace path-only ModuleId with {instance, relative_path} and canonical
<instance>::<path> encoding
- add PackageResolver/ResolvedPackage in marqdo-package for path sources;
hash package trees deterministically for content-addressed instance ids
- move import resolution out of the CLI loader; reject package escapes
- emit lock_version 2 with instance ids and migrate v1 lockfiles
- update references/package-format specs and the function-ref golden
- add package resolver tests for stable identity across path moves
- value: add ErrorCategory::RefAmbiguous (code ref.ambiguous) for the S-07 rule
that a reference matching several resources must never silently pick the
first one; re-export float/integer conversion helpers at the crate root.
- ir/builtins: math/foreign calls accept positional arguments followed by named
ones (matching the documented examples) instead of being named-only; arity
and unknown-name validation still apply.
- tests updated for the new builtin call shape.
Add the independent program IR from blueprint sections 7.1 and 11:
- ModuleId, FunctionId and UnitId canonical identities; UnitInfo/UnitKind for
heading scopes (root, namespace, function, section).
- Function with explicit or inferred signature metadata, params and defaults;
assignments, expression statements, link-form calls, branches, loops and
returns, all carrying source spans.
- CallTarget distinguishes same-module, import-alias-qualified and
link-resolved calls.
- ImportDecl from explicit front-matter imports; Resource records inert
Formula/Code artifacts with SHA-256 content hashes and owning units.
- Module anchors, resolved import edges and Program lookup helpers used by the
runtime and CLI.
- Builtin registry (names, aliases, arity, named-only/effect flags) shared by
static validation and runtime dispatch; adding a builtin is a spec change.
Prose is absent from the IR by construction, so narrative edits cannot change
the executable projection.
Create the Marqdo CLI Rust workspace with the module boundaries from the
development blueprint (section 11):
- marqdo-span: byte spans and line/column mapping shared by every layer
- marqdo-value, marqdo-expression, marqdo-markdown, marqdo-ir
- marqdo-frontend, marqdo-runtime, marqdo-host, marqdo-sandbox
- marqdo-math, marqdo-foreign, marqdo-package
- marqdo-plugin-abi, marqdo-plugin-sdk
- marqdo-cli (binary `marqdo`)
Pin the Markdown parser exactly (comrak =1.0.0, no default features) so the
frozen profile can never drift silently. Dependencies are centralized in
workspace.dependencies; no crate is allowed to add its own version of a shared
dependency.