writeonce/docs/plan/oop-vm
shoney.arickathil e120129f2c feat(woc): WO-E224 — refuse a durable ref into a volatile table
Task 2 of docs/superpowers/plans/2026-08-26-table-residency.md.

- the check lives in `check_field_types`, which already runs over the raw AST
  (so the diagnostic lands at the field's own position, once per declaration)
  in Pass 2 with `syms` fully built
- only the durable -> volatile direction is refused. volatile -> durable is
  legal: the referencing row is the one that disappears, so nothing is left
  holding a stale id
- the message names both classes and both escapes, because "this is wrong" is
  less useful than "make Session durable, or declare Order volatile too"
- sees through a `?` wrapper, so `?ref S` is caught too
- code picked as 24 by sweeping `<stage>_prefix ^ "NN"` — 01-23, 25, 26 and
  50 were taken, so 24 was a genuine hole. Grepping the literal WO-E224
  would have found nothing, which is how ten codes once went missing
- catalogued in the same commit, and the completeness sweep re-run: 53
  emitted, 54 catalogued (the extra is retired WO-W201), none missing

PLAN CORRECTION: the plan's second step said to apply the same check to
`backlink` fields. Dropped — a backlink is "NOT a stored column" (ast.ml:72),
so after a restart it resolves to an EMPTY COLLECTION, which is a legal state
indistinguishable from "nothing references me". There is no id to dangle.
Implementing it would have refused correct programs; a spurious diagnostic is
worse than a missing one. A run fixture now pins that the backlink shape stays
legal, so the check cannot silently grow over-broad later.

Gates: woc-test 557/0, oop-e2e 118/0 (was 116 — one compile-fail and one run
fixture added), employee 8/0, db-actor 8/0; employee, db-bench, db-actor,
porch, log-watcher and gc-cycle all still typecheck.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-26 23:09:40 +02:00
..
00-wob-format.md feat: iteration 36 task 5 — operators sample, docs closeout 2026-08-22 21:42:08 +02:00
01-error-catalog.md feat(woc): WO-E224 — refuse a durable ref into a volatile table 2026-08-26 23:09:40 +02:00
02-corpus.md feat(compiler): iteration 5 Tasks 1-4 — modules, language surface, switch, typedef records + enum variants 2026-08-12 14:40:07 +02:00
03-concurrency-coroutines.md docs: audit all markdown against the code, fix findings, flatten status folders 2026-08-26 19:20:22 +02:00
04-db-binding.md feat: insert executes (iteration 9, Task 3) -- DB_STUB retires for insert 2026-08-15 11:15:06 +02:00
08-builtin-surface.md feat(serve+view): file serving, downloads, supported systems; rename 2026-08-25 04:41:00 +02:00
README.md docs: oop-vm/03 — stackless coroutine contract (no async) 2026-08-21 11:07:52 +02:00

docs/plan/oop-vm/ — OOP + systems track contracts

The normative contract documents both stacks cite. Landed by their named plan tasks:

doc contract plan
00-wob-format.md .wob bytecode format (compiler↔VM) 1
01-error-catalog.md every WO-E### code 2, grows 3/8
02-corpus.md how to add conformance fixtures 3
03-concurrency-coroutines.md stackless fibers, park/resume protocols, reduction budget, the no-async rule arc (was plan 4's slot; that plan ✖ discarded 2026-08-21)
04-db-binding.md row format, WAL records, query subset 5
05-http-service.md route section, trap→HTTP table, JSON subset 6
06-ui-live.md delta frames, subscribe protocol, wo:live 7
07-systems-stdlib.md per-function nil-vs-trap contracts 9
08-builtin-surface.md builtin source names, container/call/entry rules the emitter enforces 3

Specs and plans: docs/superpowers/{specs,plans}/. Repo map: docs/08-project-structure.md.