Artist Without A Canvas Studio

Serve your domain — registration, in your copy of the service

Base-level note (C5): at the base level, a domain is configuration data, not source: IN-4 (the general-licensee port) registers a domain from a stated configuration — founding schema, fact types, recipe pins, mechanism bindings — through the record layer, with no edit to any service source and no compiled-in domain list (collapser-c5-2026-11-22.md §2). The two-edit walkthrough below is the E3 prototype service's by-hand registration, kept as the prototype guide it documents; it is not the base level's registration path.

5.1 — The import. In service/src/service.mjs, the import block at the top ends with the monster-forks line. Add yours after it:

import { convoy, CANONICAL as CONVOY_CANONICAL } from '../../domains/convoy/src/convoy.mjs';

5.2 — The registry entry. In the DOMAINS array, after the monster-forks entry (the second entry), add:

  {
    domain: convoy,
    blurb: 'A convoy logistics simulation with score verification (the pilot template domain, registered by hand).',
    foundingFields: { name: 'string!', ruleset: 'string!', seed: 'int!' },
    factTypes: { input: { tick: 'int!', truck: 'string!', action: 'string!' } },
    recipeParams: {
      'final-state@1': {},
      'verify-score@1': { claimedScore: 'int' },
    },
    example: {
      subject: CONVOY_CANONICAL.subject, moment: CONVOY_CANONICAL.moment,
      founding: { ...CONVOY_CANONICAL.founding }, facts: CONVOY_CANONICAL.facts.map((f) => ({ ...f })),
      collapses: [
        { pin: 'final-state@1', params: {} },
        { pin: 'verify-score@1', params: { claimedScore: 10 } },
      ],
    },
  },

Three notes on this entry. (a) claimedScore: 10 in the example is the unmodified template's derived score — if you changed the rules in §4.3, put your derived score there. (b) foundingFields / factTypes in the entry are display metadata for GET /domains; enforcement lives in your domain's own defineDomain declaration. Keep them in sync anyway — a /domains page that lies about the schema is a defect. (c) The entry makes your domain a first-class citizen of every endpoint: founding, facts, collapse, verify, replay, the playground's example list.

5.3 — Restart and confirm. Stop the §1 instance (Ctrl-C in its terminal) and start it again the same way. Two things to observe on boot: the chronicle record from §2 is still there (curl -s $B/stats shows records: 1, ledgerEntries: 1 — state rebuilt from the JSONL store), and curl -s $B/domains | jq '[.domains[].id]' now returns:

[
  "chronicle",
  "monster-forks",
  "convoy"
]

5.4 — Found your record over HTTP.

curl -s -X POST $B/records -H 'content-type: application/json' -d '{
  "domain": "convoy",
  "subject": "harbour-loop-pilot",
  "moment": 1797000000000,
  "founding": {"name": "Harbour Loop", "ruleset": "convoy-rules@1", "seed": 77031}
}'

Expected: HTTP 201, "recordId": "rec_2af984457ed6d76b", "schema": "convoy@1", "created": true, "head": 0 (for the unmodified template's canonical founding). Set RID=rec_2af984457ed6d76b.

5.5 — Append the run. The fixture's ten inputs, one POST each to $B/records/$RID/facts:

{"type":"input","tick":1,"truck":"ada","action":"load"}
{"type":"input","tick":1,"truck":"bo","action":"load"}
{"type":"input","tick":2,"truck":"ada","action":"drive"}
{"type":"input","tick":2,"truck":"bo","action":"drive"}
{"type":"input","tick":3,"truck":"ada","action":"drive"}
{"type":"input","tick":3,"truck":"bo","action":"drive"}
{"type":"input","tick":4,"truck":"ada","action":"drive"}
{"type":"input","tick":4,"truck":"bo","action":"refuel"}
{"type":"input","tick":5,"truck":"ada","action":"drive"}
{"type":"input","tick":5,"truck":"bo","action":"drive"}

Expected: positions and heads climb 1 through 10.

5.6 — Collapse and verify.

curl -s -X POST $B/records/$RID/collapse -H 'content-type: application/json' -d '{"pin":"final-state@1","params":{}}'
curl -s -X POST $B/records/$RID/collapse -H 'content-type: application/json' -d '{"pin":"verify-score@1","params":{"claimedScore":10}}'

Expected: the first returns "executed": true with "score": 10 in the artifact and "stateHash": "sha256:b629f3cc13d550a5b20f4802759afa8d0eca79030d15fb52c385c2f15d12e003" — the same state hash your in-process driver printed in §4.2. The service is the same derivation over the same record layer, not a second implementation of your sim. The second returns "verdict": "VERIFIED".

5.7 — The tamper, over HTTP. A record's id derives from its founding hash, and the identical founding (same subject, same moment, same founding fields) returns the same record with "created": false — so a twin is founded under a distinct subject, with the founding fields themselves byte-identical. That is what makes the comparison honest: the founding content is the same; only the stream differs.

curl -s -X POST $B/records -H 'content-type: application/json' -d '{
  "domain": "convoy",
  "subject": "harbour-loop-pilot-tampered",
  "moment": 1797000000000,
  "founding": {"name": "Harbour Loop", "ruleset": "convoy-rules@1", "seed": 77031}
}'

Expected: "recordId": "rec_b5fc0b04a2779086", "created": true. Append the same ten inputs to this record, with one change — the tick-3 ada input is wait, not drive — then claim the honest score against it:

curl -s -X POST $B/records/rec_b5fc0b04a2779086/collapse -H 'content-type: application/json' -d '{"pin":"verify-score@1","params":{"claimedScore":10}}'

Expected: "verdict": "REFUTED", "claimedScore": 10, "derivedScore": 5. One altered input in an append-only log, caught by re-derivation, with the verdict itself issued as a manifest-carrying artifact you can fetch from the ledger (GET $B/proof/<entry>) and re-verify (POST $B/proof/verify). That is the whole product, working on your domain.

← Your own domain — the convoy template · The refusal law, as you will meet it →