From 3f6e91c9628642eedb0a234c54ad03650f21d91e Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Wed, 30 Sep 2026 22:58:17 +0200 Subject: [PATCH] Declare each document version as its full schema id CultLib's C1 cut puts a document's declared version on the wire as its schema id and refuses to register a binding whose version lacks `.vN`. Every Stonks definition declared the bare version "v1", so after C1 the provider advertisement sent to Odin would carry "v1", and registration would refuse it first. Each schemaVersion now equals the definition's schemaId, which is also .v1. Against current CultLib main nothing moves: TS stores and wire puts key records by schemaId, which is unchanged. Only the schemaVersion field of the catalog entry the cache builds for newly written records changes, together with the canonical JSON built from it. Co-Authored-By: Claude Opus 5.5 --- src/stonks-daemon.cjs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/stonks-daemon.cjs b/src/stonks-daemon.cjs index aefe251..4573be7 100644 --- a/src/stonks-daemon.cjs +++ b/src/stonks-daemon.cjs @@ -153,7 +153,7 @@ const requestEventDocument = defineDocumentType({ type: "request-event", schemaId: "stonks.request_event.v1", schemaName: "stonks.request_event", - schemaVersion: "v1", + schemaVersion: "stonks.request_event.v1", schema: passThroughSchema, indexes: { direction: "direction", @@ -164,7 +164,7 @@ const marketSnapshotDocument = defineDocumentType({ type: "market-snapshot", schemaId: "stonks.market_snapshot.v1", schemaName: "stonks.market_snapshot", - schemaVersion: "v1", + schemaVersion: "stonks.market_snapshot.v1", schema: passThroughSchema, global: true, }); @@ -172,7 +172,7 @@ const providerAdvertisementDocument = defineDocumentType({ type: "provider-advertisement", schemaId: "gamecult.eve.provider_advertisement.v1", schemaName: "gamecult.eve.provider_advertisement", - schemaVersion: "v1", + schemaVersion: "gamecult.eve.provider_advertisement.v1", schema: passThroughSchema, name: (value) => value?.providerId || providerId, }); @@ -180,7 +180,7 @@ const commandBoundaryDocument = defineDocumentType({ type: "command-boundary", schemaId: "stonks.command_boundary.v1", schemaName: "stonks.command_boundary", - schemaVersion: "v1", + schemaVersion: "stonks.command_boundary.v1", schema: passThroughSchema, name: (value) => value?.boundaryId || value?.daemonId || "stonks", }); @@ -188,7 +188,7 @@ const transportProfileDocument = defineDocumentType({ type: "transport-profile", schemaId: "stonks.transport_profile.v1", schemaName: "stonks.transport_profile", - schemaVersion: "v1", + schemaVersion: "stonks.transport_profile.v1", schema: passThroughSchema, name: (value) => value?.profileId || value?.daemonId || "stonks", }); @@ -196,7 +196,7 @@ const eveSurfaceDocument = defineDocumentType({ type: "eve-surface", schemaId: "gamecult.eve.surface_state.v1", schemaName: "gamecult.eve.surface_state", - schemaVersion: "v1", + schemaVersion: "gamecult.eve.surface_state.v1", schema: passThroughSchema, global: true, });