Skip to content

Add UTS test specs for the LiveObjects REST API (RSO*) - #569

Draft
ttypic wants to merge 1 commit into
AIT-468/liveobjects-rest-specfrom
AIT-468/liveobjects-rest-spec-uts
Draft

ttypic wants to merge 1 commit into
AIT-468/liveobjects-rest-specfrom
AIT-468/liveobjects-rest-spec-uts

Conversation

@ttypic

@ttypic ttypic commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Adds UTS test specs for the LiveObjects REST API (RSL16, RSO1–RSO16) specified in the base PR (AIT-468/liveobjects-rest-spec). Assertions are based on that spec, with the behaviour list in the earlier REST-OBJECTS-PROPOSAL.md (branch uts-liveobjects-rest) used as a checklist for the integration tests.

What's added

File Tests Covers
uts/objects/unit/rest_object_get.md 15 RestChannel#object (one instance per channel; error 40019 without the plugin), get endpoint and percent-encoded objectId segment, path/compact query params, paths passed through verbatim (RSO6), compact results returned verbatim (JSON and msgpack), full-mode decoding into RestLiveMap / RestLiveCounter / ObjectData leaves, unrecognised shapes passed through, server errors surfaced
uts/objects/unit/rest_object_publish.md 17 POST body as an array (JSON and msgpack), batches in a single request, no client-side batch limit, wire shape of all 7 operation types with no action field, id/objectId/path preserved verbatim, semantics and leaf-value encoding per OMP2/OD4, no auto-generated id even with idempotentRestPublishing, 40003 for zero or multiple body fields, targeting not validated client-side, RestObjectPublishResult decoding
uts/objects/unit/rest_object_generate_id.md 12 Map/counter type prefix, objectId derived per RTO14 from initialValue, nonce and server time, initialValue contents, JSON encoding even on a msgpack client, unrecognised semantics / missing body → 40003, nonce of 16+ characters, unique per call, deterministic initialValue, generated values sent unchanged in *WithObjectId operations
uts/objects/integration/rest_object_test.md 10 Sandbox round-trips for JSON and msgpack: all leaf types, counter create/increment, standalone and path-targeted mapCreate, mapRemove, wildcard path, client-generated IDs accepted in one batch, idempotent id, error surfacing for unresolvable targets

uts/docs/completion-status.md gains an RSL16 row and a RestObject (RSO) section.

Test IDs use the objects/unit/... and objects/integration/... categories, matching the LiveObjects tests already on main. This branch was cut before uts/objects/ landed on main, but the new file names don't clash with it.

Points for reviewers

These tests depend on spec wording that is ambiguous or may not match the service:

  1. JSON leaf encoding. RSO3d2 / RSO4e1b point to OD4d5, so the tests expect JSON values on the wire as string + encoding: "json". main adds an OD2g json field, which suggests the real wire format may differ.
  2. semantics on the wire. Requests and mocked full-mode responses use the OMP2 integer (0 = LWW). If the server actually returns "lww", the mocked responses need updating.
  3. generateObjectId and server time. RSO4b says the function does no I/O, but RSO4g requires server time per RTO16, which means a GET /time on a fresh client. The unit tests follow RSO4g: they mock /time and assert the exact objectId timestamp. If local time is intended, RSO4g should change and so should these tests.
  4. objectId path encoding. Tests use encode_uri_component, which escapes : and @. RFC 3986 allows both unescaped in a path segment.
  5. Integration server assumptions. The wildcard (items.*) and idempotent-id tests, and the compact-map assertions, assume server behaviour that hasn't been checked against the sandbox yet.

🤖 Generated with Claude Code

Unit specs (mocked HTTP) for RestChannel#object, RestObject#get,
RestObject#publish and RestObject#generateObjectId, plus a sandbox
integration spec covering end-to-end round-trips in both JSON and
msgpack protocol variants. Update the completion-status matrix with
RSL16 and the RSO section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
staging/pull/569 — a65338dd Deployed Oct 30, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant