7 Commits
Author SHA1 Message Date
cflmy 328f1a8db3 docs: defer stdlib extraction; add local credential and Woodpecker setup
CI / fmt + clippy + test (Linux x86_64) (push) Waiting to run
CI / schema instance validation + consumers (push) Waiting to run
CI / runtime contract (macos-latest) (push) Waiting to run
CI / runtime contract (windows-latest) (push) Waiting to run
ci/woodpecker/push/woodpecker Pipeline was canceled
- Add ADR-0039: keep stdlib in-repo while architecture is small; extraction is
  a future trigger-driven option, not a pending gate. Update ADR-0028,
  STATUS, architecture index, package/P2/completion evidence.
- Add .woodpecker.yml (fmt/clippy/test + release build) for ci.cflmy.cn.
- Add docs/development-credentials.md and ignore .secrets/ plus .env.local;
  real credentials stay in the ignored local file and are never committed.

Gate: fmt, clippy -D warnings, 440 tests passed.
2026-11-20 23:40:38 +08:00
cflmy b6fc18233d feat(sandbox): implement probe-gated Linux strict isolation (ADR-0021)
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
2026-11-20 15:01:49 +08:00
cflmy 18d9f39562 docs(release): reconcile status, compatibility and release evidence
- adopt docs/STABLE_RELEASE_IMPLEMENTATION.md as the single next-phase plan
- archive the stale M0.5 status snapshot under docs/history/
- record real local gate results, the red baseline CI, the Windows autocrlf
  reproduction and the unresolved macOS/native-CI status
- add COMPATIBILITY.md (protocol versions + honest platform matrix),
  CHANGELOG.md, dual license files, docs/releasing.md and docs/security-gate.md
- keep strict fail-closed: document the container EPERM/read-only cgroup probe
  and the exact G-C requirements instead of claiming isolation
- document foreign environment binding (ADR-0020) and add a release-candidate
  CI job that is gated on all platform jobs
2026-11-20 13:58:40 +08:00
cflmy c7f3a8422c fix(ci): anchor AST goldens to LF bytes and test CRLF explicitly
The Windows CI failure was a checkout byte-identity problem, not a Markdown
semantics change: CRLF goldens compared with LF parser output produced
'0 line(s) differ'.

- add .gitattributes: text files are LF, native products are binary, and the
  intentional CRLF fixture stays a byte fixture
- report the first differing byte and whether only line endings differ
- fail early when a golden contains CR instead of the opaque mismatch
- assert exactly one CRLF fixture and that its golden is canonical LF
- add a markdown test proving CRLF/LF have equal structure while spans remain
  byte offsets into the original source
2026-11-20 13:54:16 +08:00
cflmy 4ce37afb39 feat(m0.6-r6): release examples, public schemas and cross-platform CI
- 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
2026-11-20 11:50:27 +08:00
cflmy e1ba630068 feat(cli): marqdo init/run/call/check/inspect/fmt/plugin/lock/sync
Composition root wiring the frontend, runtime, host and package layers:

- Project loader: deterministic project-root discovery, explicit front-matter
  imports only (`@dependency` or relative `.mq.md`), recursive module loading
  with cycle diagnostics, resolved import edges and cross-module call checks.
  Loading never executes anything.
- run/call: sandbox mode enforcement (strict refuses when unavailable),
  explicit capability grants, fuel/stack/output/timeout overrides, typed
  `--arg name=value` constants, program stdout separated from diagnostics, and
  machine-readable JSON output that embeds program output without mixing.
- check: static diagnostics only, human-readable locations with source lines
  and stable machine codes in JSON.
- inspect: canonical AST, heading units, signatures (explicit/inferred),
  executable IR, static reference edges (including cross-file links analysed
  without execution) and platform capability report.
- fmt: conservative, AST-preserving normalisation of line endings and trailing
  newlines; --check mode.
- plugin inspect: manifest/ABI/artifact validation and hash verification,
  never loading plugin code.
- init: minimal project (manifest, entry document, .gitignore).
- lock/sync --locked: deterministic path-dependency lockfile, stale lock or
  changed dependency content is an error (no silent upgrades).
- examples: hello, factorial, math formula, Python foreign call, static
  references and a two-module project with an explicit import.
2026-11-20 10:44:03 +08:00
cflmy df878b434a chore(workspace): scaffold Rust workspace and crate graph
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.
2026-11-20 10:23:39 +08:00