The concurrent mapper tracked the first params declaration in the Mapper (so
duplicates across heading segments were caught) but checked 'first payload'
with a per-segment vector index. A params(...) in a later ### @exec segment
was therefore accepted even after an earlier segment had executed statements,
and a duplicate could even be reported as a position error.
- track whether any statement has been lowered for the function and require
params(...) to come before it, across all heading segments
- check duplicates first, then execution order, then the in-segment index
- add negative fixtures 48 (after an earlier segment) and 49 (duplicate
across segments); update the corpus count and spec wording
Verified: cargo test --workspace --locked green (62 targets).
Move keyword recognition out of the Markdown mapper and into the single
expression/statement parser:
- add parse_payload_statement + PayloadStatement for if/else/while/end/
return/params/ordinary; keyword matching uses complete tokens, requires
whitespace before a control expression, rejects trailing tokens/colons
and reserves the statement words in expression positions
- keep expression spans payload-relative so the frontend can rewrite them
onto the file; malformed params(...) interiors stay owned by the
signature parser (one sem.syntax diagnostic, not a duplicate)
- simplify the frontend mapper to control-stack lowering and mapped
semantic diagnostics only
- emit sem.no_entry_function from run when no Exec H2 main exists
- add else-under-while, params-in-quote, Knowledge-inertness and
no-entry tests; update the corpus counts
- make the EBNF parameter type annotation optional (params(n) is valid)
Verified: cargo fmt --check, cargo clippy -D warnings and
cargo test --workspace --locked: 501 passed, 0 failed, 2 ignored.
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).
- Add the separate marqdo-provider-worker binary: loads one trusted c-abi-1
shared library and serves the ADR-0035 framed-JSON resource protocol, with
fail-closed startup and no in-process fallback (ADR-0038).
- Reuse StdHost::register_worker_resource_provider; language still sees only
resource.* and project-mode/name grants.
- Compile a C test provider and run open/read/write/close through the helper;
cover missing-library fail-closed. Trusted process boundary, not a sandbox;
existing plugin-Worker ABI binding remains open.
- Add ADR/spec/status/README/changelog/evidence; workspace member and tests.
Gate: fmt, clippy -D warnings, 440 tests passed.
- Add a marqdo.provider schema v1 loader (schema/version/ABI/platform library)
and StdHost::register_provider_package, reusing the C ABI adapter and shared
kind/name checks (ADR-0037).
- Add a compiled-provider + provider.json installation test; language use still
requires project mode and allow_resource_provider.
- Update ADR/spec/status/README/changelog and evidence; no registry, signature
or CLI install is claimed.
Gate: fmt, clippy -D warnings, 437 tests passed.
- Build a second C provider reporting ABI v2 and assert registration fails
with resource.unsupported.
- Assert pure/strict refuse a registered C provider kind with permission.denied.
- Refresh the C ABI evidence/test README.
Gate: fmt, clippy -D warnings, 436 tests passed.
- Add the frozen marqdo_resource_provider.h ABI (version + open/read/write/
close/last_error) and a libloading-based host adapter with version/symbol
checks and callsite-attached host errors (ADR-0036).
- Add StdHost::register_c_resource_provider using the same kind/name validation
and project-mode name grant as the in-process/worker providers.
- Compile a C shared-library test provider; cover round-trip and fail-closed
missing-library behavior. Trusted native code, not a sandbox; plugin-Worker
binding remains open.
- Update ADRs/spec/status/README/changelog and evidence.
Gate: fmt, clippy -D warnings, 435 tests passed.
- Add a host-managed helper process speaking framed JSON (4-byte BE length)
with ping/open/read/write/close/shutdown, max 1 MiB frames and structured
error mapping (ADR-0035).
- Add StdHost::register_worker_resource_provider using the same protocol,
kind-conflict and name-grant checks as the in-process provider; pure/strict
refuse provider kinds.
- Tests spawn a Python helper and cover round-trip, grant/mode denial and
missing-program failure; no parser/Value/runtime/HostOp change.
- Update ADR/spec/status/README/changelog and evidence; C ABI binding remains
open.
Gate: fmt, clippy -D warnings, 433 tests passed.
- Fixture 73 implements triple-list lookup, dense conversion and sparse
multiply with Int arithmetic and exact indexing.
- Include it in the P2 pure closure lane and update golden count to 73,
C12 evidence mapping, status/README/changelog.
Gate: fmt, clippy -D warnings, 430 tests passed.
- Add semantic fixture 72: a .mq.md columnar List/Map table store, converted,
sorted and filtered; compare headers/cells with the T0 row Table via a
cell-wise helper (Table == is not structural in this language version).
- Teach the direct-runtime semantic harness to resolve entry std: imports.
- Update ADR-0032, P4 status, docs/changelog/evidence; semantic goldens 72.
Gate: fmt, clippy -D warnings, 430 tests passed.
- Add stdlib/net/http.mq.md: status/header/chunked response parsing and request
construction in .mq.md; no host HTTP/TLS implementation.
- Add stdlib/tests/http.mq.md and an end-to-end loopback test that sends a GET
over resource.open("tcp"), reads bytes, parses the response and returns
status/content-type/body.
- Update ADR-0034, status/spec/README/changelog and evidence; refresh the
bundle digest.
Gate: fmt, clippy -D warnings, 430 tests passed.
- Add crates/cli/tests/p2_closure.rs: 20 semantic fixtures run through the real
CLI in --mode pure (Capabilities::pure), source scan for foreign./plugin./
import:, and golden value/stdout comparison.
- Run the stdlib table self-test in pure mode; no host shortcut or recompilation
is needed for the selected algorithms.
- Mark P2 gate PASS locally (external stdlib repo publication and remote CI
remain outside the C01-C12 gate); add evidence and docs.
Gate: fmt, clippy -D warnings, 428 tests passed.
- Strict child now gets the verified stdlib tree read-only at
/run/marqdo-stdlib with MARQDO_STDLIB_DIR set, so Compat-C 打印 works under
strict without exposing a host path (ADR-0021 update).
- Add a strict-lane negative: resource.open(file) is refused with
permission.denied; hello/factorial/multi-module and --json still pass.
- StrictHostCommand gains stdlib_dir; CLI discovers the bundle and sandbox
binds it; sandbox tests constructors updated.
Evidence: G-C lane PASS on the disposable Ubuntu 26.04 VM (7/7 adversarial
matrix, positive CLI, strict language-resource refusal, forged marker), plus
fmt/clippy/423 local tests.
- Add ResourceProvider v1 trait with name/protocol/kinds/open/read/write/close;
host still issues the opaque language Resource handle, provider tokens stay
private.
- Add StdHost::register_resource_provider with protocol/version, reserved-name
and duplicate-kind checks; add Capabilities.allow_resource_provider grants.
- Provider kinds are project-mode only; pure/strict refuse them; in-process
providers are trusted and not a sandbox (ADR-0033).
- Reuse resource.* and Result shapes; no parser/Value/runtime/HostOp changes.
- Add mock read/write provider and rejection tests, docs/spec/status/evidence.
Gate: fmt, clippy -D warnings, 423 tests passed.
- Add stdlib/data/table.mq.md with select/filter/sort/append/set-cell/join/
group as value-returning .mq.md functions over table.columns/row/cell.
- Keep Value::Table logical semantics, GFM AST laziness and T0 physical
storage unchanged; no new table builtin or HostOp (ADR-0032).
- Add stdlib/tests/table.mq.md and a CLI test asserting shapes/order and
input immutability; refresh the bundle digest.
- Update architecture/status/spec/README/changelog and evidence.
Gate: fmt, clippy -D warnings, 420 tests passed.
- 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.