test(rfc-cm): close P2 evidence gaps for C01/C06/C12
- Add alloc.double_free detection to the .mq.md free-list allocator and a fixture assertion for a second free returning a recoverable Result. - Add table group fixture 69 (table.row -> Map of value lists). - Add Int matrix-multiply fixture 70 for C12 layout/iteration. - Update counts and P2 evidence/status docs. Gate: fmt, clippy -D warnings, 407 tests passed.
This commit is contained in:
1 parent
92bfbf2568
commit
5d3a5fb13b
12 files changed
+414
-11
No files matched your search
+3
-3
@@ -71,7 +71,7 @@ This is still a **local VM lane**, not a self-hosted GitHub Actions security URL
|
||||
| 2 | Cross-platform strict `cfg` | **Fixed locally; native CI UNVERIFIED** | `#[cfg]` dispatch + non-Linux regression test |
|
||||
| 3 | Strict probe→launch race | **Fixed locally; GitHub Linux CI UNVERIFIED** | fail-closed CLI contract + probe-OK/launch-EAGAIN seam test |
|
||||
| 4 | Parallel security matrix isolation | **Fixed** | unique paths + helper `OnceLock`; 7/7 in parallel workspace run |
|
||||
| 5 | Markdown/power/control-flow corpus | **Done locally** | 160 AST, 68 semantic, 52 compile-negative, 21 runtime-negative fixtures |
|
||||
| 5 | Markdown/power/control-flow corpus | **Done locally** | 160 AST, 70 semantic, 52 compile-negative, 21 runtime-negative fixtures |
|
||||
| 6 | Condition header + source spans | **Fixed** | executable tails rejected; literal-inside-backtick mapping tests |
|
||||
| 7 | Independent Tool consumers | **Done locally** | `sample-view`/`sample-knowledge`/`sample-proof` E2E test |
|
||||
| 8 | lock v3 reproducibility | **Implemented; tamper test added** | `package_env` PASS |
|
||||
@@ -86,7 +86,7 @@ This is still a **local VM lane**, not a self-hosted GitHub Actions security URL
|
||||
|
||||
- Frozen Markdown profile `marqdo.md.v1` with 160 AST goldens and explicit
|
||||
CRLF byte semantics.
|
||||
- Native Rust interpreter with 68 semantic goldens, 52 compile-error fixtures,
|
||||
- Native Rust interpreter with 70 semantic goldens, 52 compile-error fixtures,
|
||||
and runtime error source attribution.
|
||||
- Native `**` power is pinned end-to-end: right associativity, unary-minus
|
||||
precedence, parentheses, float negative exponents, branch/loop conditions,
|
||||
@@ -166,7 +166,7 @@ behavior. This table records only what is in this tree now.
|
||||
|---|---|---|
|
||||
| P0 freeze (ADRs, spec deltas, baseline) | **P1 + partial P2 slice done** | ADR-0022 freezes CM-A01/CM-A02/CM-A03; ADR-0023 freezes CM-A04 (minimal List/Map/Text/Table observation and construction); ADR-0024 freezes CM-A05 (recoverable `Result` map convention); `spec/expression.ebnf`, `spec/evaluation.md`, `spec/value-wire.md`, `spec/analysis-v2.md`, `spec/security.md` updated; existing AST/value goldens unchanged |
|
||||
| P1 Memory + place assignment | **Implemented locally** | `Value::Memory`, run-scoped `MemoryStore` (64 KiB pages, 64 MiB total / 16 MiB region), `memory.new/size/grow`, `m[i]` read, `m[i] = byte`; semantic fixtures 45–47, runtime negatives 13–18, `examples/memory-buffer.mq.md`; evidence [`evidence/2026-11-20-memory-p1.md`](evidence/2026-11-20-memory-p1.md) |
|
||||
| P2 Marqdo-written allocator/data structures + minimal structure observation | **PARTIAL, gate NOT passed** | `.mq.md`-only evidence: bump allocator with u32 codec, linked list, failed-allocation atomicity (48–50); CM-A04 structure primitives and a table filter (51–54, ADR-0023); a first-fit free-list allocator with block reuse, splitting, address-adjacent coalescing and `Result` maps (55, ADR-0024), a `Memory`-backed binary tree with recursive insert/in-order traversal (56), a `.mq.md` CSV row splitter (57), an open-addressing hash table with linear probing, update and `hash.full` (58), a `.mq.md` UTF-8 encoder over `Memory` (59), a validating UTF-8 decoder rejecting truncated, bad-continuation and surrogate/overlong input (60), a `Memory`-backed graph adjacency list (61), a recursive JSON parser for nested arrays/objects, strings with escapes, integers, booleans, null and error Results (62), a `Memory`-backed stack bytecode VM with PUSH/ADD/MUL/JMP/JZ/HALT (63), big-endian 16/32/64-bit plus LEB128 integer codecs (64), a `.mq.md` table sort rebuilding a new table from `table.row/columns/cell` (65), a table join (67), and a quoted/escaped CSV row parser (68). Evidence: [`memory-p2-closure`](evidence/2026-11-20-memory-p2-closure.md), [`structure-api-p2`](evidence/2026-11-20-structure-api-p2.md), [`result-and-free-list-p2`](evidence/2026-11-20-result-and-free-list-p2.md). Still missing: separate `marqdo-stdlib` repo, JSON floats, table group, EOF/partial stream contract, and a frozen-CLI closure lane. |
|
||||
| P2 Marqdo-written allocator/data structures + minimal structure observation | **PARTIAL, gate NOT passed** | `.mq.md`-only evidence: bump allocator with u32 codec, linked list, failed-allocation atomicity (48–50); CM-A04 structure primitives and a table filter (51–54, ADR-0023); a first-fit free-list allocator with block reuse, splitting, address-adjacent coalescing and `Result` maps (55, ADR-0024), a `Memory`-backed binary tree with recursive insert/in-order traversal (56), a `.mq.md` CSV row splitter (57), an open-addressing hash table with linear probing, update and `hash.full` (58), a `.mq.md` UTF-8 encoder over `Memory` (59), a validating UTF-8 decoder rejecting truncated, bad-continuation and surrogate/overlong input (60), a `Memory`-backed graph adjacency list (61), a recursive JSON parser for nested arrays/objects, strings with escapes, integers, booleans, null and error Results (62), a `Memory`-backed stack bytecode VM with PUSH/ADD/MUL/JMP/JZ/HALT (63), big-endian 16/32/64-bit plus LEB128 integer codecs (64), a `.mq.md` table sort rebuilding a new table from `table.row/columns/cell` (65), a table join (67), a quoted/escaped CSV row parser (68), table group (69), and an Int matrix multiply (70); the first-fit allocator also detects double free (`alloc.double_free`). Evidence: [`memory-p2-closure`](evidence/2026-11-20-memory-p2-closure.md), [`structure-api-p2`](evidence/2026-11-20-structure-api-p2.md), [`result-and-free-list-p2`](evidence/2026-11-20-result-and-free-list-p2.md). P2 remaining: JSON floats/formatter, a separate stdlib repository/package, and the frozen-CLI closure lane. C01–C06/C11/C12 now each have `.mq.md` evidence. |
|
||||
| P3 Resource/Stream ABI | **PARTIAL** | ADR-0025/0026 CM-A06 slices: opaque `Resource`, `resource.open/read/write/close`, stdout write in pure/project, granted project-file read and buffered project-file write in project, EOF/closed/handle errors, wire/host rejection; strict refuses all opens. Fixture 66 + CLI/host tests. CM-A07 is **Compat-A only**: `examples/stdlib` provides an explicitly imported `.mq.md` `format/utf8/io` chain whose output matches builtin `打印` for Unit/None/Bool/Int/Float/Text/List/Map/Table; builtin `打印` remains default, no alias routing, and Formula/Code/FunctionRef/PluginHandle formatting is still unobservable. Still missing: Compat-B/C, directories, network, generic provider registry. |
|
||||
| P4 Table logical/physical migration | **NOT IMPLEMENTED** | `Value::Table` remains `Vec<Vec<Value>>`; no stdlib table algorithms |
|
||||
| P5 third-party Provider / TCP / HTTP | **NOT IMPLEMENTED** | `fs.write`, `net.request`, `process`, `clock`, `random` remain unavailable broker services (see §4) |
|
||||
|
||||
@@ -6,7 +6,7 @@ normative RFC text stays at its reviewable path under `docs/`.
|
||||
| Document | Status | Implemented part |
|
||||
|---|---|---|
|
||||
| [RFC-CM-0001: compute machine, addressable memory and system boundary](../MARQDO_COMPUTE_MACHINE_RFC_0001.md) | Draft / design input | R1 (P1): `Memory` value, `memory.new/size/grow`, byte read/write, Memory-index assignment, budgets, wire/host rejection. Implemented per [ADR-0022](../adr/0022-addressable-memory-and-place-assignment.md); see [STATUS §5](../STATUS.md). |
|
||||
| [RFC-CM-0002: minimal core, stdlib self-hosting and system capability migration](../MARQDO_COMPUTE_CORE_STDLIB_MIGRATION_RFC_0002.md) | Draft / design input | P0/P1, a **partial P2**, and a **partial P3** first slice (ADR-0025/0026: stdout write, granted project-file read and buffered project-file write via `resource.*`; strict refuses all opens; ADR-0027 Compat-A `.mq.md` print prototype, builtin still default). P2: fixtures 48–50 (`.mq.md` bump allocator, u32 codec, linked list/traversal, failed-allocation atomicity), CM-A04 structure primitives for List/Map/Text/Table (ADR-0023, fixtures 51–54), and a `.mq.md` first-fit free-list allocator with block splitting, address-adjacent coalescing and `Result` maps (ADR-0024, fixture 55), plus a `Memory`-backed binary tree with recursive insert/in-order traversal (fixture 56), a `.mq.md` CSV row splitter (fixture 57), an open-addressing hash table with linear probing (fixture 58), a `.mq.md` UTF-8 encoder and validating decoder (`utf8.truncated`/`invalid_continuation`/`invalid_scalar`) (fixtures 59–60), a `Memory`-backed graph adjacency list (fixture 61), a recursive JSON parser for arrays, objects, strings with escapes, integers/booleans/null and error Results (fixture 62), a `Memory`-backed stack bytecode VM with PUSH/ADD/MUL/JMP/JZ/HALT (fixture 63), big-endian 16/32/64-bit plus LEB128 integer codecs (fixture 64), a `.mq.md` table sort rebuilding the table without mutating the input (fixture 65), a table join built from `table.row/columns/cell` (fixture 67), and a quoted/escaped CSV row parser (fixture 68). No separate stdlib repo, JSON floats, network/generic providers, P4 Table migration, P5 providers or P6 performance work. |
|
||||
| [RFC-CM-0002: minimal core, stdlib self-hosting and system capability migration](../MARQDO_COMPUTE_CORE_STDLIB_MIGRATION_RFC_0002.md) | Draft / design input | P0/P1, a **partial P2**, and a **partial P3** first slice (ADR-0025/0026: stdout write, granted project-file read and buffered project-file write via `resource.*`; strict refuses all opens; ADR-0027 Compat-A `.mq.md` print prototype, builtin still default). P2: fixtures 48–50 (`.mq.md` bump allocator, u32 codec, linked list/traversal, failed-allocation atomicity), CM-A04 structure primitives for List/Map/Text/Table (ADR-0023, fixtures 51–54), and a `.mq.md` first-fit free-list allocator with block splitting, address-adjacent coalescing and `Result` maps (ADR-0024, fixture 55), plus a `Memory`-backed binary tree with recursive insert/in-order traversal (fixture 56), a `.mq.md` CSV row splitter (fixture 57), an open-addressing hash table with linear probing (fixture 58), a `.mq.md` UTF-8 encoder and validating decoder (`utf8.truncated`/`invalid_continuation`/`invalid_scalar`) (fixtures 59–60), a `Memory`-backed graph adjacency list (fixture 61), a recursive JSON parser for arrays, objects, strings with escapes, integers/booleans/null and error Results (fixture 62), a `Memory`-backed stack bytecode VM with PUSH/ADD/MUL/JMP/JZ/HALT (fixture 63), big-endian 16/32/64-bit plus LEB128 integer codecs (fixture 64), a `.mq.md` table sort rebuilding the table without mutating the input (fixture 65), a table join built from `table.row/columns/cell` (fixture 67), and a quoted/escaped CSV row parser (fixture 68), table group (fixture 69) and an Int matrix multiply (fixture 70). No separate stdlib repo, JSON floats, network/generic providers, P4 Table migration, P5 providers or P6 performance work. |
|
||||
|
||||
The RFCs are architecture constraints, not evidence that a feature exists. The
|
||||
implementation status lives in `docs/STATUS.md`; frozen behavior is in
|
||||
|
||||
@@ -339,9 +339,31 @@ a,,c -> ["a", "", "c"]
|
||||
|
||||
No Rust CSV parser or new `Value` type was added.
|
||||
|
||||
## Table group fixture 69
|
||||
|
||||
`tests/conformance/semantics/69-table-group-stdlib.mq.md` groups a table by a
|
||||
Text key column into a `Map` of value lists using `table.row`, `map.has/get/set`
|
||||
and `list.append`. Input rows `a1,b2,a3,b4,a5` yield
|
||||
`{a:[1,3,5], b:[2,4]}`; the source table is unchanged.
|
||||
|
||||
## Matrix multiply fixture 70
|
||||
|
||||
`tests/conformance/semantics/70-matrix-multiply.mq.md` implements Int
|
||||
list-of-list row-major matrix multiplication with three explicit loops
|
||||
(C12's layout/iteration shape). `[[1,2,3],[4,5,6]] × [[7,8],[9,10],[11,12]]`
|
||||
yields `[[58,64],[139,154]]`; no numeric backend or Rust matrix code is used.
|
||||
|
||||
## Duplicate-free allocator path
|
||||
|
||||
`tests/conformance/semantics/55-first-fit-free-list-allocator.mq.md` now
|
||||
scans the free list before insertion and returns
|
||||
`{ok:false, code:"alloc.double_free", ...}` when a block is freed twice. The
|
||||
second free in fixture 55 returns that Result instead of corrupting the list.
|
||||
|
||||
## What remains open
|
||||
|
||||
* JSON floats, table group, and an independent `marqdo-stdlib` repository;
|
||||
* JSON floats/formatter, and an independent `marqdo-stdlib` repository plus
|
||||
frozen-CLI closure lane;
|
||||
* CM-A06 `Resource`/`Stream` byte-transfer ABI; EOF/partial semantics are
|
||||
reserved by ADR-0024 but not implemented;
|
||||
* CM-A07–CM-A11 (stdlib naming, Table storage, provider ABI, packaging,
|
||||
|
||||
Reference in new issue
Block a user