M3: refuse positional paths instead of destroying arrays; fix the drop use-after-free #5

Merged
dev merged 4 commits from m3-positional-refusal into main 2026-08-10 15:48:40 +00:00
Showing only changes of commit 8136ffe8d4 - Show all commits

13
PLAN.md
View File

@@ -1045,6 +1045,19 @@ has to be its own commit with its own re-recorded scorecard.
`$out`/`$merge` durability semantics, whether the expression evaluator is `$out`/`$merge` durability semantics, whether the expression evaluator is
shared with M3's pipeline updates, and whether `allowDiskUse` has to stop shared with M3's pipeline updates, and whether `allowDiskUse` has to stop
being a lie. being a lie.
- **`drop` segfaults when dispatched in-process** — found while writing the
positional-refusal tests, unrelated to them, and **reproduces at `3c5eee2`
with the change stashed**, so it is not caused by that work. A single
`insert` followed by a single `drop` against a `TestDb` engine terminates
with SIGSEGV and no stack trace; dropping a collection that never existed is
fine. The wire path is clean — 25 insert / refused-update / distinct / drop
cycles against a live server on `:27020` all passed — so what differs is the
in-process caller, not the command. That matters more than it looks: D1's
whole architecture is "in-process server now, library + C API later", and
this is the embedding path. **`drop` has no unit test at all** — the only
`parse_fake_msg("drop", ...)` calls in the tree were the scratch ones written
to find this — which is why it went unseen. Needs its own commit: reproduce
it in a committed test first, then fix.
- **M3 update operators** — open. `distinct` landed first because it was a - **M3 update operators** — open. `distinct` landed first because it was a
whole missing command with no dependencies, and measuring it turned up three whole missing command with no dependencies, and measuring it turned up three
things worth keeping, none of which are `distinct`'s to fix: things worth keeping, none of which are `distinct`'s to fix: