writeonce/docs/plan/oop-vm
shoney.arickathil c793456fe3 feat(json): Bool encodes true/false; fraction/exponent decode fails honestly
Closes json's two documented fidelity limits (iteration 5 strictness):

- field_class gains WOB_FIELD_BOOL (a plain `Bool` field) and
  WOB_FIELD_NIL_BOOL (a `?Bool`: WO_NIL_SCALAR nil + bool encoding) — the
  kind byte alone cannot tell a Bool slot from an Int slot, so the metadata
  carries it. Emitter writes them (field_class_meta); loader whitelists
  them; json.c encodes `true`/`false` (and `null` for a ?Bool nil), decode's
  null/omitted-key pre-write covers NIL_BOOL.
- A JSON number with a fraction or exponent is MALFORMED for an Int field:
  the checked decode (`json.decode(t) as T`) yields nil for the whole
  document instead of silently truncating 3.7 to 3 — the language has no
  float, and corrupting data quietly was the one thing a "checked decode"
  must never do. Floats stay representable through a raw `json.Value` field.
- corpus: run/json-bool-fidelity pins the round-trip (true/false both ways,
  ?Bool null both ways, fraction AND exponent rejected).
- Board's two known-gap entries struck; format doc's field_class marker list
  extended.

Verified: oop-e2e 87/0; runtime test + test-iso OK; woc-test 540/0;
log-watcher 7/0; employee 8/0.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-19 18:04:15 +02:00
..
00-wob-format.md feat(json): Bool encodes true/false; fraction/exponent decode fails honestly 2026-08-19 18:04:15 +02:00
01-error-catalog.md feat(compiler): doctrine reject rows — WO-E105 (iter 5 strictness) 2026-08-19 17:57:36 +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
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 docs: iteration 7b migration — amend the normative docs (Phase 4) 2026-08-19 17:11:35 +02:00
README.md feat: milestone 1 complete — .wob emitter, conformance corpus, single binary; GC redesign specced 2026-08-11 19:31:26 +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-shard-actor.md shard ownership, mailboxes, send-as-move 4
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.