Remove duplicate server codec and unsafe dtype interning #64

Merged
lost-rob0t merged 8 commits from agent/issue-12-remove-duplicate-codec into agent/schema-org-v0.9 2026-07-26 14:05:06 +00:00
lost-rob0t commented 2026-07-26 13:57:20 +00:00 (Migrated from github.com)

Summary

  • replace the active server as-json/from-json implementation with thin wrappers over the canonical star-cl codec
  • preserve JSOWN objects separately from serialized JSON strings
  • enforce the v0.9 write profile while retaining v0.8 read/index decoding
  • add a versioned dtype-to-CLOS-class registry built once from exported document classes
  • reject unknown dtypes before decode without interning request-controlled text
  • validate caller-supplied document classes against the registered dtype
  • replace the actor with-json implementation before actor modules compile
  • fix dataset lookup and route all actor document reads through the versioned document API
  • add executable regressions for arrays, false, null, nested objects, _rev, registered class selection, unknown dtype rejection, symbol-table non-growth, v0.8 read-only behavior, and macro expansion

Design

The server now has one active document codec. The database package retains compatibility names, but those names delegate to spec:encode, spec:decode, and star.documents:decode-document.

Class selection uses a per-schema CLOS registry. The registry is populated at load time using class metadata; request dtype strings are normalized and looked up as strings. They are never passed to intern.

Validation

Required CI runs:

  • existing 49-dtype shared conformance suite
  • server codec compatibility suite through the Docker conformance stage

Stack

  • base: agent/schema-org-v0.9
  • includes merged issue #11 conformance work
  • depends on the companion star-cl v0.9 branch

Closes #12

## Summary - replace the active server `as-json`/`from-json` implementation with thin wrappers over the canonical `star-cl` codec - preserve JSOWN objects separately from serialized JSON strings - enforce the v0.9 write profile while retaining v0.8 read/index decoding - add a versioned dtype-to-CLOS-class registry built once from exported document classes - reject unknown dtypes before decode without interning request-controlled text - validate caller-supplied document classes against the registered dtype - replace the actor `with-json` implementation before actor modules compile - fix dataset lookup and route all actor document reads through the versioned document API - add executable regressions for arrays, false, null, nested objects, `_rev`, registered class selection, unknown dtype rejection, symbol-table non-growth, v0.8 read-only behavior, and macro expansion ## Design The server now has one active document codec. The database package retains compatibility names, but those names delegate to `spec:encode`, `spec:decode`, and `star.documents:decode-document`. Class selection uses a per-schema CLOS registry. The registry is populated at load time using class metadata; request dtype strings are normalized and looked up as strings. They are never passed to `intern`. ## Validation Required CI runs: - existing 49-dtype shared conformance suite - server codec compatibility suite through the Docker `conformance` stage ## Stack - base: `agent/schema-org-v0.9` - includes merged issue #11 conformance work - depends on the companion `star-cl` v0.9 branch Closes #12
Sign in to join this conversation.
No description provided.