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.
Replace the Strong/Emph/List/Quote mapping in place with the single
@exec/@knowledge heading-mode model, unified payload carriers and keyword
control flow.
- add the authoritative RFC, ADR-0052 and a historical ADR index
- rewrite spec/mapping.md and spec/expression.ebnf as the normative
mapping/statement grammar; update evaluation, references, math,
foreign, package-format, plugin-abi, security and schema notes
- rewrite README, AGENTS, COMPATIBILITY and CHANGELOG for the breaking
language change; update the architecture index/overview and active docs
- mark superseded planning docs, compute RFCs, evidence and syntax-role
ADRs as historical/superseded without rewriting their decisions
- add migration guide, per-file inventory and dev-only audit scripts
The frontend/stdlib migration is completed in the following commits; this
commit contains documentation only.
- 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.
- 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.
- 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.
- 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.
WHY
- The code fixes existed locally without same-SHA release material; the G0..G12
gate matrix, G-C VM evidence, RC artifact and explicit non-claims must be
reviewable together.
- The release-candidate workflow packaged no consumers and did not verify its
own checksum in the clean-install directory.
WHAT
- Record the current Linux/VM evidence at f075c96 and keep remote CI/G-C as
UNVERIFIED; overall decision DO NOT RELEASE.
- Add G-C evidence (7/7 + positive CLI + 47-binary workspace run), RC report
with gate matrix, clean-install and checksum result.
- Update STATUS, COMPATIBILITY, CHANGELOG, README, tests/README, mapping spec
and releasing procedure for the new condition/span/power/Tool behavior.
- Harden release-candidate packaging: include tests/consumers, SOURCE_SHA,
rustc -vV, verify the checksum before extraction, and run independent
Analysis/Trace validation from the extracted archive.
- Record the local convergence note in NEXT_RELEASE_CI_CONVERGENCE.md.
TESTS
- Local fmt/clippy/workspace PASS; G-C VM PASS at f075c96.
- Linux RC: sha256 -c OK and clean-install smoke PASS.
CI_URL
- none: Gitee remote, no GitHub credentials. Windows/macOS and same-SHA G-C CI
remain the blocking gates.
BREAKING_CHANGE
- none in this docs/workflow commit.
SECURITY_SCOPE
- strict remains fail-closed; no new capability or platform claim. G-C is
local-VM evidence, not a CI-signed security URL.
Strict mode now re-executes the CLI inside a Bubblewrap supervisor with
user/mount/PID/net/UTS/IPC namespaces, no-new-privs, all capabilities dropped,
a read-only /project, private /proc and /dev, rlimits, output capture and
wall-clock process-group cleanup. The child verifies PID 1, NoNewPrivs, empty
CapEff, an unshared uid map and loopback-only networking before project code.
- PlatformCapabilities::detect runs a real bwrap probe; no probe, no strict
- strict L1 supports pure Marqdo + Math; Foreign/ABI/worker/kernel/grants/trace
are rejected with exit 2 before sandboxing
- forged MARQDO_STRICT_ACTIVE is rejected; missing bwrap fails closed
- add adversarial helper, 7-test escape/resource matrix, seeded security lane
script and self-hosted security workflow
- executed G-C lane as uid 1000 in a disposable Ubuntu 26.04 VM: 7/7 PASS
plus positive CLI and refusal matrix; evidence in docs/evidence
- ADR-0021, spec/security.md, STATUS/COMPATIBILITY/README/CHANGELOG updated;
ADR-0019 remains for non-Linux/fail-closed rules
A verified environment_dir was only prepended to PATH, so built-in providers
still ran the host interpreter and external entrypoints could live outside the
verified tree.
- external entrypoints must resolve inside environment_dir
- built-in providers cannot be bound to an environment (fail closed)
- bound children get exactly the environment bin on PATH, no host fallback
- declared interpreter_version is verified against the resolved program
- built-in descriptors now also run environment validation
- ADR-0020 + spec/foreign.md document the binding and limitations
- positive/negative tests for binding, outside-entrypoint, builtin binding and
version drift
- add environment_dir to KernelDescriptor and verify its deterministic
file-set digest at registration and immediately before every spawn
- reject missing digests, relative/missing dirs, symlinks, special files and
oversized environments; tampering fails with EnvironmentIntegrity
- inject MARQDO_FOREIGN_ENV and prepend <env>/bin to PATH for the child
- add a real provider test covering success and post-registration tampering
- document that uv/npm environment generation and lock-v3 integration remain
open
- enforce at most 64 capability requests and 64 KiB per serialized request
in both the worker handler and the host bridge
- return structured capability.budget_exceeded / request_too_large errors and
kill the worker on a host-side violation
- add a real C loop fixture and CLI test proving a runaway plugin is stopped
without producing file contents
- update ADR-0018, plugin-abi and STATUS
- add request-scoped capability_request/capability_reply/capability_error
frames to the worker transport (ADR-0018); no C ABI change
- worker routes its capability handler through stdin/stdout, the host serves
requests inside the existing invoke deadline and binds identity from the
spawned worker, never from frame text
- both native and worker plugins now execute a granted fs.read through
ProjectFs with audit; unsupported capabilities return capability.unavailable
- add a real C capability plugin and CLI test for granted read and denial
- document the bridge and that strict OS isolation (H3-B) is still refused
- CapabilityBroker::execute separates authorization from execution; native
plugins requesting fs.read get real project file bytes through ProjectFs
- unsupported capabilities (fs.write/net/process/console/vendor without a
handler) return capability.unavailable instead of empty success
- keep audit decisions for granted/denied/unavailable without logging contents
- document that worker capability bridging, live ABI session identity and OS
isolation (H3-B) remain open; no G-C claim is made
- add environment_id/environment_digest/interpreter_version to KernelDescriptor
- require external CLI descriptors to pin an absolute executable and a full
provider digest
- verify the digest at registration and immediately before every spawn;
tampering after registration fails with ForeignError::Integrity before spawn
- validate digest formats and reject relative external entrypoints
- pin the example provider digest and add an integrity test
- document that uv/npm environment materialization and lock integration remain
open; strict isolation is unchanged and still refused
- add an independent schema job with a pinned Draft 2020-12 validator that
validates real Analysis v2/Trace v2/Tool artifacts and negative mutations
- tighten the tool schema (SemVer, package-relative entrypoint, non-empty
protocol arrays)
- run cargo test --workspace plus portable CLI/analysis/trace smoke and a
strict-refusal assertion on Windows and macOS
- record honestly that Tool/C-ABI/worker runtime coverage remains Unix-only
- replace the hand-rolled version matcher with semver; require valid tool
versions and marqdo ranges
- declare SupportedProtocols (tool 1, analysis 2, trace 2) and negotiate tool
Analysis/Trace declarations at install and dispatch; disjoint/empty sets fail
closed with tool.protocol_incompatible
- record a v2 whole-bundle manifest (path/size/sha256 + deterministic bundle
digest), copy exactly that bundle into staging, re-verify it, and recompute it
before every dispatch
- reject auxiliary-file, extra-file, missing-file and entrypoint tampering,
record/command mismatches, traversal and a source root record.json
- remove tools by detaching with rename before deletion
- expose negotiated protocol environment variables to declared tools
- update tool-v1 and STATUS; add negotiation/bundle tests
- bind traces to the logical project identity and the exact emitted Analysis
digest; every span-bearing event carries module_id
- add host TraceState budgets (100k events / 32 MiB defaults), CLI
--trace-max-events/--trace-max-bytes, terminal trace.truncated events, and a
final serialized byte cap; budgets never change run.status
- disable semantic recording when no trace is requested
- cap worker frames at 8 MiB, align request/result/capability wire caps, make
clean EOF distinct from protocol errors, and mark/kill a worker after a
transport failure instead of reusing it
- add trace-v2 spec/schema, independent trace consumer, CI check and tests
- record the S2/C state in STATUS
- add ProjectIdentity (manifest root instance or workspace snapshot digest)
and remove absolute-path root ids from Analysis bytes
- replace the resources count with an addressable array over the two real
marqdo-ir resource kinds (formula, code), including unit/span/payload digest
and code language
- project diagnostics by module/relative path/span, removing machine paths
- define the digest as SHA-256 of the exact emitted bytes so consumers can
verify it; Trace binds to the same digest
- add analysis-v2 spec and JSON schema, supersede v1, update the independent
Python consumer, schemas and docs
- tests: location-independent byte equality and resource addressing
- lock the full transitive closure with per-instance alias edges, root
manifest digest, full content digests and structured path/git sources
- reject v1/v2 locks; validate ids, digests, edges, reachability and sources
- resolve every locked edge by (parent instance, alias) and fail closed on
missing locks/edges/records, digest or source drift and root drift
- require a lock for run/check/inspect when dependencies exist and map lock
errors to exit 1
- make sync strict in both modes, never rewrite the lock, and materialize the
whole closure with env.json schema 2
- verify Git cache markers, require full commit hashes and confirm HEAD
- stop add/remove from patching the lock; regenerate example locks
- update package-format.md and STATUS for S1
Add content_profile_version 1 with one selection shared by hash_tree and
materialization: exclude .git/.marqdo, include target, reject symlinks and
special files, propagate walk errors, enforce file/size/depth budgets, and use
a domain-separated length-prefixed encoding (fixes the old NUL-delimiter
ambiguity). Materialization hashes exactly the bytes it writes and verifies the
expected digest before publishing.
Record the decision in ADR-0016 and update the package-format hash contract.
- add a hidden __plugin-worker mode that loads one native library in a child
process and serves length-prefixed JSON invoke frames
- add host WorkerPlugin with ready handshake, export cross-check, per-call
timeout and crash/EOF propagation
- route kind: worker without in-process trust; native still requires explicit
trust; wasm is rejected explicitly
- report worker_processes=true while keeping strict OS isolation unavailable
- test successful worker calls and worker crash isolation
- update plugin ABI spec and R2 status
- add runnable examples for an unknown-name Tool, multi-export plugin,
external kernel provider and same-name multi-version packages
- add JSON Schemas for Analysis v1, Trace v1 and Tool v1 and validate them in CI
- extend CI with protocol/consumer smoke tests and a Windows/macOS cargo check
- add --kernel provider descriptors and R6 example integration tests
- document the examples and update M0.6 status
- add content-addressed Git checkout cache for exact revisions; no hooks,
submodules or floating branches
- resolve transitive @alias imports from each package's own manifest
- materialize locked path/Git packages into .marqdo/env atomically and prefer
a matching env copy in the resolver
- make sync a real environment sync while keeping lock immutable
- kill Unix foreign-kernel process groups so grandchildren do not survive
- add Git/env/transitive integration tests and update package/security specs
- add check --emit with a deterministic, read-only semantic projection:
package-aware modules, signatures, normalized bodies, refs, calls,
diagnostics and source digests
- remove stale analysis artifacts on compile errors; atomic writes
- add run/call --trace-file with interpreter call/branch/loop/return events
and host effect events under one sequence; redact values and record error
status
- add Analysis/Trace v1 specs, ADR-0015 and an independent Python consumer
- add contract tests for determinism, stale artifacts, trace ordering/status
and secret redaction
- add PluginHandleTable with owner, run id and generation scoping
- reject forged, cross-owner, cross-run and post-unload handles
- reject any plugin_handle returned by plugin or foreign-kernel output,
including nested values
- add ADR-0014 and update value-wire/security specs
- register every plugin export by its complete dotted name; reject conflicting
loads atomically instead of overwriting the first namespace
- route plugin calls by full export name and expose loaded descriptors to the
runtime
- add CapabilityBroker for core grants and vendor policy, with audit records
- accept syntactically valid vendor capability requests in manifests while
still denying them until a trusted policy exists
- add check --plugin static signature validation without dlopen
- test multi-export C plugin routing, conflict rollback, broker decisions and
static arity rejection
- add KernelDescriptor/KernelRegistry with built-in Python/Node providers
- route run/call through the registry; external providers need an explicit
executable and wire version
- expose provider registration on StdHost and use it in the foreign adapter
- add mocklang registration/call, duplicate-label, wire-version and timeout tests
- update spec/foreign.md and M0.6 progress
- 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
- move the revision package into docs/ and spec/, preserving all content
- record the M0.6 plan/audit cross-references and Proposed status
- correct stale STATUS claims about CI, console capability and check --refs
- add Accepted ADRs 0008-0012 for package identity, callable resolution,
plugin export routing, capability broker and kernel providers
- record the passing R0 baseline gate (fmt, clippy, workspace tests)
Complete the documentation set for the M0.5 toolchain, grounded in the code:
- spec/references.md: import/reference/call edges, identities, loader rules,
anchors, `ref` resolution/ambiguity, `check --refs` validation.
- spec/value-wire.md: exact wire_version 1 typed encoding, integer-as-decimal
string rule, special floats, limits and exact float round-trip.
- spec/security.md: modes (strict refuses without OS isolation), capabilities,
path rules, budgets, tracing, foreign process caveats, plugin trust.
- spec/package-format.md: marqdo.yaml/lock formats, validation, lock/sync,
unsupported registry/git/environment work.
- spec/plugin-abi.md: ABI v1 layout/ownership/negotiation, manifest/artifact
rules, wire envelopes, loader lifecycle, trust boundary, SDK/C demo, and the
implemented CLI plugin-invocation flow with its limitations.
- spec/math.md and spec/foreign.md: the implemented math subset and the
foreign request/response/timeout/capability contract.
- docs/adr/0001..0007: accepted decisions for the span foundation, inert
executables outside function bodies, ref ambiguity (S-07), strict refusal,
AST normalization, CLI contract and BigInt/typed wire (S-08).
- docs/contributor-guide.md: repo map, workflow, fixture/golden updates,
quality gate, ADR/commit policy.
- docs/STATUS.md: P0-P7 matrix with evidence, open items and the blueprint §18
Alpha checklist (conclusion: not yet Alpha-complete), including known
divergences rather than overclaims.
- README.md rewritten from "design-only starter" to the working implementation
with quickstart, implemented phases, deliberate limits and doc index.
- AGENTS.md: updated pointers/workflow only; architectural rules unchanged.
- Consistency fixes in spec/mapping.md/evaluation.md (inert emph outside
functions, unsupported math.simplify/differentiate).
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.