WHY
- macOS/Windows failed to compile because `cfg!` left `linux::probe()` in the
type-checked branch (E0433).
- GitHub-hosted Linux can pass the strict probe and then fail the real launch
with EAGAIN; the CLI test treated the inspect snapshot as a permanent promise.
- The security matrix shared process-id-based scratch paths, so parallel
`cargo test --workspace` made its own tests clobber each other.
- Condition paragraphs silently ignored executable `Strong`/`Emph`, and
condition parse spans included the code-span backticks.
- The corpus had no native power/control-flow/inert fixtures and no independent
generic Tool consumers.
WHAT
- Dispatch strict detection through `#[cfg]` functions; add a non-Linux
compile/fail-closed regression test.
- Split `linux::run` into an injectable probe/spawn seam; test probe-OK ->
launch-EAGAIN returns LaunchFailed and never executes unrestricted.
- Make the Linux CLI contract accept only (a) successful isolated run or
(b) non-zero, diagnosed, fail-closed refusal with no project stdout.
- Give each security test a unique project/outside path and compile the helper
once.
- Reject executable roles in a condition paragraph; map condition expressions
from the literal bytes inside the backticks.
- Add 10 AST, 8 semantic, 4 compile-negative and 2 runtime-negative fixtures
for power, branch/loop conditions, source spans, inert prose/code fences and
error boundaries.
- Add `sample-view`/`sample-knowledge`/`sample-proof` independent Tool v1
packages and an end-to-end Analysis/Trace consumer test.
- Add a locked path-dependency content-tamper test.
TESTS
- cargo fmt --all -- --check
- cargo clippy --workspace --all-targets -- -D warnings
- cargo test --workspace --locked
- G-C VM lane (separate evidence commit/run)
CI_URL
- none from this host: the checkout has a Gitee remote and no GitHub
credentials. Windows/macOS CI remains UNVERIFIED.
BREAKING_CHANGE
- An executable node in a list-item condition paragraph is now a hard
`markdown.invalid_construct` error instead of being silently ignored.
SECURITY_SCOPE
- strict remains fail-closed; no downgrade, no new capability, L2 still
rejected. G-C still requires the dedicated self-hosted lane for CI-signed
evidence.
- 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
Findings from the conformance corpus workstream, all fixed at the source:
- value/wire: enable serde_json's float_roundtrip so typed wire floats keep
their exact digits across foreign/plugin boundaries (Python pi*9 now stays
28.274333882308138).
- host: default interpreter stack budget lowered to 128 frames so deeply
recursive documents hit a structured resource.exhausted instead of exhausting
the native debug-build Rust stack; --stack remains available.
- frontend/map: calling an external HTTP(S) link is reported as ref.unresolved
(consistent with other unresolvable call targets) instead of math.unsupported.
- frontend/analyze: invalid front matter emits a single frontmatter.invalid
diagnostic (the YAML error is not repeated by the imports pass).
- spec/mapping: clarify that would-be execution nodes outside any function body
are inert with a markdown.inert_executable warning (no "return outside a
function" hard-error claim).
- tests: add the conformance corpus and harness (150 AST goldens, 36 semantic
goldens, 48 hard-error + 6 warning + 10 runtime-error negatives, CLI/module/
plugin integration tests, prose-invariance properties) and update the
three reported observations to the fixed behaviour.
Blueprint section 10 / P6: exports of an explicitly trusted plugin are callable
from a `.mq.md` file through a bound namespace.
- host: StdHost::load_plugin requires an explicit trust decision and a granted
plugin capability, loads the native artifact through the ABI v1 loader with
no capability handler (all plugin host-capability requests denied), and
dispatches HostOp::PluginInvoke through the typed wire request/response.
In-process native code is documented as sharing the host address space; no
isolated worker transport exists in this build.
- runtime: a qualified call whose base is not a local value, import alias or
builtin namespace is routed to the plugin namespace; plugin calls take named
arguments only and plugin values become Marqdo values (Unit when absent).
- cli: run/call gain `--plugin <path>`, `--trust-native-plugin` and reuse
`--allow-plugin <package>`; missing trust/grant/loaded namespace surface as
structured errors.
- frontend: member-call bases are namespaces (builtin/import/plugin), never
inferred parameters, so `solver.add(...)` does not invent a parameter.
- calls: validate_program runs after a whole project is loaded and checks
qualified calls through explicit import aliases against the imported module's
signatures (missing function, missing/unknown arguments), plus qualified
builtin calls such as math.eval; local calls stay checked by
validate_module so diagnostics are not duplicated.
- infer: `math.eval(...)` / `foreign.call(...)` callee namespaces are builtin
namespaces, not free variable reads, so they no longer become inferred
parameters or unknown-variable errors. Explicit signatures behave likewise.
Implement the P0/P1 frontend from spec/mapping.md, spec/evaluation.md:
- units: heading scope index (level-1 namespace, level-2 function, level>=3
section), range computation, duplicate/empty-name diagnostics, GitHub anchor
table kept separate from canonical ids, and warnings for would-be execution
nodes outside function bodies.
- map: AST-to-IR mapping where role comes from node kind + position. Strong is
an execution statement, Emph a return, ordered list a branch, bullet list a
loop sequence, block quote a call; invalid shapes are hard
markdown.invalid_construct errors, never prose fallback. Payload parsing
errors are mapped from payload-relative to file-relative spans.
- payload: strict text/code payload concatenation with exact span mapping
(including code-span delimiter handling) used to rewrite expression spans
onto the source file.
- signature: optional `(name: Type = const)` paragraph declaration; defaults
must be compile-time constants; duplicates and malformed declarations are
errors.
- infer: definite-assignment data-flow parameter inference (must/may/ambiguous
states, loop first-iteration handling, branch joins) per blueprint S-04.
- calls: static call validation of arity/named arguments/builtin signatures
after all signatures are known; inferred signatures accept named args only.
- resources: inert Formula/Code resources with owning units and SHA-256
content hashes.
- analyze: pipeline (parse -> units -> frontmatter imports -> map -> signature/
inference -> module -> call checks) that never executes anything.
Tests include factorial recursion, loop counter, prose-invariance (IR equal
modulo spans), and hard-error cases.
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.