content: typed block objects on smalltalk + 38 tests
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 51s

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-06 23:51:46 +00:00
parent d446562ed1
commit 6a246039b5
6 changed files with 382 additions and 4 deletions

View File

@@ -19,7 +19,7 @@ injected adapter, not core.
## Status (rolling)
`bash lib/content/conformance.sh`**0/0** (not yet started)
`bash lib/content/conformance.sh`**38/38** (Phase 1: typed blocks)
## Ground rules
@@ -57,7 +57,7 @@ lib/content/api.sx ── (content/edit) (content/render) (content/history) ─
```
## Phase 1 — Block document model
- [ ] `block.sx` — typed block objects
- [x] `block.sx` — typed block objects
- [ ] `doc.sx` — ordered tree, apply edit op, structural moves
- [ ] `render.sx` — block tree → HTML/SX
- [ ] `api.sx` + tests + scoreboard + conformance.sh
@@ -76,7 +76,17 @@ lib/content/api.sx ── (content/edit) (content/render) (content/history) ─
- [ ] tests: round-trip import/export, conflict on concurrent external edit
## Progress log
(loop fills this in)
- 2026-06-06 — Phase 1 `block.sx`: typed block objects as Smalltalk instances
(`CtBlock` hierarchy: text/heading/code/quote/image/embed/divider/list).
Type tag + accessors are message sends (polymorphic dispatch); fields are
immutable copy-on-write via functional `st-iv-set!` (history-safe). Added
`mk-*` constructors, `block?` predicate, `lib/content/conformance.sh` +
scoreboard. 38/38.
## Blockers
(loop fills this in)
- Smalltalk-only load chain (tokenizer/parser/runtime/eval) does **not** load
`lib/r7rs.sx`/`spec/stdlib.sx`, so r7rs aliases (`car`/`cdr`/`null?`) are
absent. Use base SX primitives (`first`/`rest`/`(= (len x) 0)`) in
`lib/content/**`. Not a substrate bug — just the load surface.