giles
5f72801901
Step 3: IO registry — spec-level defio + io contract dispatch
Promotes defio from native OCaml special form to spec-level CEK
evaluator feature. The IO registry is now the contract layer between
evaluator and platform.
Evaluator additions (spec/evaluator.sx):
- *io-registry* mutable dict global (like *library-registry*)
- io-register!, io-registered?, io-lookup, io-names accessors
- defio-parse-kwargs! recursive keyword parser
- sf-defio processes (defio "name" :category :data :params (...) ...)
- "defio" dispatch in step-eval-list
- step-sf-io: the contract function — validates against registry,
then delegates to perform for IO suspension
- "io" dispatch in step-eval-list
Native OCaml defio handlers removed from:
- sx_server.ml (~20 lines)
- sx_browser.ml (~20 lines)
- run_tests.ml (~18 lines)
All replaced with __io-registry alias to spec's *io-registry*.
IO accessor functions bound in run_tests.ml env so tests can
call io-registered?, io-lookup, io-names.
10 new tests (spec/tests/test-io-registry.sx):
- defio populates registry
- io-lookup returns spec with name/category/returns/doc
- io-registered?/io-names work correctly
- kwargs parsing (batchable, cacheable, params)
- io contract rejects unregistered ops
- io contract passes validation for registered ops
2608/2608 tests passing (+10 new).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 21:18:04 +00:00
..
2026-03-15 12:12:48 +00:00
2026-03-29 07:53:16 +00:00
2026-03-15 18:05:00 +00:00
2026-03-30 17:28:47 +00:00
2026-03-15 11:51:24 +00:00
2026-03-15 12:23:58 +00:00
2026-03-29 18:08:47 +00:00
2026-03-15 11:51:24 +00:00
2026-03-15 12:23:58 +00:00
2026-03-16 08:37:50 +00:00
2026-04-01 00:57:57 +00:00
2026-03-26 00:00:19 +00:00
2026-03-15 16:13:07 +00:00
2026-04-03 21:18:04 +00:00
2026-04-03 18:55:43 +00:00
2026-03-15 13:03:02 +00:00
2026-04-02 11:31:57 +00:00
2026-04-03 18:55:43 +00:00
2026-03-31 21:34:19 +00:00
2026-03-23 23:58:40 +00:00
2026-04-03 08:29:57 +00:00
2026-03-31 17:44:11 +00:00
2026-03-15 15:32:21 +00:00
2026-03-24 02:36:46 +00:00
2026-03-15 12:23:58 +00:00
2026-04-02 13:55:40 +00:00
2026-03-15 12:12:48 +00:00
2026-04-01 18:00:51 +00:00
2026-03-15 12:23:58 +00:00
2026-04-02 12:50:35 +00:00