Stop double-wrapping the operator notification schema

publishIdunnAlarm has never successfully published. Every non-dry run died
with "definition.schema.parse is not a function" inside CultMeshNode.put.

parseObjectDocument already returns a schema-shaped object:

  function parseObjectDocument(label) { return { parse(input) { ... } }; }

but all five document definitions wrapped it a second time:

  schema: { parse: parseObjectDocument("Operator DM request") }

so definition.schema.parse was an object, and CultMesh called it as a
function. Pass the helper's result straight through instead.

This was present in the file's only prior commit, so the alarm path has never
worked. The dry-run branch returns before touching CultMesh, which is why the
publisher looked healthy: --dry-run prints a well-formed request and exits 0
without ever exercising put.

Verified end to end against a throwaway store: exit 0, ok:true, the .cc is
written, and the document reads back as
{"alarm":"verify-fix","svc":"probe-daemon","cmd":"owner.dm.send","status":"pending"}.
CultMesh creates missing store directories, so an absent .voidbot tree is not
a blocker.

Not exercised here: real delivery of the DM by VoidBot's worker, which needs
the operator's say-so rather than a probe.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-04 01:54:21 +02:00
commit c289c820c6

View file

@ -60,7 +60,7 @@ async function publishIdunnAlarm(options) {
contentHash: requestSchemaId,
global: false,
name: "requestId",
schema: { parse: parseObjectDocument("Operator DM request") },
schema: parseObjectDocument("Operator DM request"),
});
const node = await CultMesh.createNode(storePath, {
documents: [
@ -72,7 +72,7 @@ async function publishIdunnAlarm(options) {
schemaVersion: "voidbot.swarm_state_snapshot.v1",
contentHash: "voidbot.swarm_state_snapshot.v1",
global: false,
schema: { parse: parseObjectDocument("VoidBot swarm snapshot") },
schema: parseObjectDocument("VoidBot swarm snapshot"),
}),
defineDocumentType({
type: "gamecult.eve.provider_advertisement",
@ -82,7 +82,7 @@ async function publishIdunnAlarm(options) {
contentHash: "gamecult.eve.provider_advertisement.v1",
global: false,
name: "providerId",
schema: { parse: parseObjectDocument("Eve provider advertisement") },
schema: parseObjectDocument("Eve provider advertisement"),
}),
defineDocumentType({
type: "gamecult.eve.surface_state",
@ -92,7 +92,7 @@ async function publishIdunnAlarm(options) {
contentHash: "gamecult.eve.surface_state.v1",
global: false,
name: "providerId",
schema: { parse: parseObjectDocument("Eve surface state") },
schema: parseObjectDocument("Eve surface state"),
}),
defineDocumentType({
type: "gamecult.eve.interface_binding",
@ -102,7 +102,7 @@ async function publishIdunnAlarm(options) {
contentHash: "gamecult.eve.interface_binding.v1",
global: false,
name: "bindingId",
schema: { parse: parseObjectDocument("Eve interface binding") },
schema: parseObjectDocument("Eve interface binding"),
}),
],
});