Ingest Stonks provider boundary records

This commit is contained in:
Meta Vens 2026-06-16 12:04:26 +01:00
commit 9dc6c0afab
6 changed files with 106 additions and 40 deletions

View file

@ -914,14 +914,14 @@ fn daemon_transport_profile(
) -> IdunnDaemonTransportProfileRecord {
let (current_transport, state, cut_line) = match target.daemon_id.as_str() {
"stonks" => (
"daemon-published-rudp-health + compatibility.local-command fallback",
"partial-rudp-health-live",
"Stonks daemon health is published over CultNet/RUDP; provider advertisement and command_boundary publication remain migration debt before the HTTP probe can be deleted.",
"daemon-published-rudp-health + daemon-owned-cultcache-provider-store + compatibility.local-command fallback",
"partial-rudp-health-and-provider-store-live",
"Stonks daemon health is published over CultNet/RUDP, and provider advertisement, market snapshot, Eve surface, command_boundary, and transport_profile records are in the daemon-owned CultCache store; HTTP/WebSocket are renderer/debug lowerings.",
),
"weksa" => (
"daemon-published-rudp-health + compatibility.local-command fallback",
"partial-rudp-health-live",
"Weksa daemon health is published over CultNet/RUDP; provider advertisement and command_boundary publication remain migration debt before the HTTP probe can be deleted.",
"daemon-published-rudp-health + daemon-owned-cultcache-provider-store + compatibility.local-command fallback",
"partial-rudp-health-and-provider-store-live",
"Weksa daemon health is published over CultNet/RUDP, and provider advertisement, operator state, Eve surface, command_boundary, and transport_profile records are in the daemon-owned CultCache store; MiMo VoiceDesign command ingress remains compatibility HTTP debt.",
),
"voidbot" => (
"daemon-published-rudp-health + compatibility.local-command fallback",
@ -1082,22 +1082,21 @@ fn daemon_surgery_plan(target: &DaemonTarget, updated_at: &str) -> IdunnDaemonSu
];
}
"stonks" => {
status = "partial-rudp-health-live";
status = "partial-rudp-health-and-provider-store-live";
owner = "Stonks TypeScript runtime";
current_mechanism =
"Stonks publishes daemon health over CultNet/RUDP after each serialized market refresh; provider manifest, market state, and command boundary still retain HTTP/WebSocket compatibility surfaces."
"Stonks publishes daemon health over CultNet/RUDP after each serialized market refresh, and its daemon-owned CultCache store contains provider advertisement, market snapshot, Eve surface, command_boundary, and transport_profile records that Odin can ingest. HTTP and WebSocket remain renderer/debug lowerings."
.to_string();
intended_authority =
"Stonks publishes daemon health, provider advertisement, market snapshot, and command boundary as typed CultMesh/CultNet records over cultnet.transport.rudp.v0; HTTP/WebSocket remain renderer/debug lowerings."
"Stonks publishes daemon health, provider advertisement, market snapshot, Eve surface, command boundary, and transport profile as typed CultMesh/CultNet records over cultnet.transport.rudp.v0; HTTP/WebSocket remain renderer/debug lowerings."
.to_string();
cut_line =
"Keep the HTTP probe as fallback only until Stonks provider advertisement and command_boundary records are also daemon-owned RUDP publications."
"Keep HTTP/WebSocket as lowerings over Stonks CultCache records; demote health-stonks.cmd to a manual compatibility probe with no lifecycle truth once Idunn and Odin consistently consume the typed store."
.to_string();
steps = vec![
"Keep live stonks.cultnet-rudp-market-health publication running from the Stonks daemon.".to_string(),
"Publish Stonks provider advertisement and market snapshot records over cultnet.transport.rudp.v0.".to_string(),
"Publish Stonks command_boundary and transport_profile records from the daemon runtime.".to_string(),
"Teach Odin to prefer the Stonks RUDP provider records over HTTP manifest ingestion.".to_string(),
"Keep Stonks provider advertisement, market snapshot, Eve surface, command_boundary, and transport_profile records in the daemon-owned CultCache store.".to_string(),
"Keep Odin provider discovery accepting Stonks' typed store instead of relying on HTTP manifest ingestion.".to_string(),
"Delete or demote health-stonks.cmd to a manual compatibility probe with no lifecycle truth.".to_string(),
];
}
@ -2439,7 +2438,7 @@ mod tests {
}
#[test]
fn stonks_transport_profile_marks_partial_rudp_health() {
fn stonks_transport_profile_marks_provider_store_live() {
let stonks = DaemonTarget {
daemon_id: "stonks".to_string(),
verse_id: "starfire.local".to_string(),
@ -2454,17 +2453,17 @@ mod tests {
let profile = daemon_transport_profile(&stonks, "unix:100");
assert_eq!(profile.state, "partial-rudp-health-live");
assert_eq!(profile.state, "partial-rudp-health-and-provider-store-live");
assert!(
profile
.current_transport
.contains("daemon-published-rudp-health")
.contains("daemon-owned-cultcache-provider-store")
);
assert!(profile.cut_line.contains("provider advertisement"));
assert!(profile.cut_line.contains("HTTP/WebSocket"));
}
#[test]
fn weksa_transport_profile_marks_partial_rudp_health() {
fn weksa_transport_profile_marks_provider_store_live() {
let weksa = DaemonTarget {
daemon_id: "weksa".to_string(),
verse_id: "starfire.local".to_string(),
@ -2479,16 +2478,12 @@ mod tests {
let profile = daemon_transport_profile(&weksa, "unix:100");
assert_eq!(profile.state, "partial-rudp-health-live");
assert_eq!(profile.state, "partial-rudp-health-and-provider-store-live");
assert_eq!(
profile.current_transport,
"daemon-published-rudp-health + compatibility.local-command fallback"
);
assert!(
profile
.cut_line
.contains("Weksa daemon health is published over CultNet/RUDP")
"daemon-published-rudp-health + daemon-owned-cultcache-provider-store + compatibility.local-command fallback"
);
assert!(profile.cut_line.contains("MiMo VoiceDesign"));
}
#[test]

View file

@ -298,13 +298,16 @@ now publishes daemon-owned provider advertisement, operator state, Eve surface,
command boundary, and transport profile records in its provider store, and Odin
local discovery can ingest those records. Weksa still owes CultNet/RUDP command
document ingress for MiMo VoiceDesign before its HTTP command route can become a
debug-only lowering. Stonks, VoidBot, Gjallar, Mimir, and the Nightwing Eve
runtime services still owe provider advertisement and command-boundary RUDP
publication before their compatibility surfaces can be purely display/debug
lowerings; Gjallar also owes native CultMesh/RUDP deck input to replace the
current Odin WebSocket lowering bridge. Raven Muninn task action repair is
queued separately and remains blocked while Raven is unreachable over SSH; the
prepared actuator is
debug-only lowering. Stonks now publishes daemon-owned provider advertisement,
market snapshot, Eve surface, command boundary, and transport profile records in
its CultCache store, and Odin local discovery can ingest those records; its
HTTP/WebSocket endpoints are renderer/debug lowerings. VoidBot, Gjallar, Mimir,
and the Nightwing Eve runtime services still owe provider advertisement and
command-boundary RUDP publication before their compatibility surfaces can be
purely display/debug lowerings; Gjallar also owes native CultMesh/RUDP deck
input to replace the current Odin WebSocket lowering bridge. Raven Muninn task
action repair is queued separately and remains blocked while Raven is
unreachable over SSH; the prepared actuator is
`scripts\repair-raven-muninn-task-actions.ps1`.
Vili's Node daemon now has an in-process Idunn RUDP publisher for

View file

@ -203,12 +203,15 @@ and a daemon-owned provider store containing provider advertisement, operator
state, Eve surface, command boundary, and transport profile records; Odin local
discovery can ingest that typed store too. Weksa still owes CultNet/RUDP command
document ingress for MiMo VoiceDesign before its HTTP command route can become
debug-only. Raven Muninn task actions are also an explicit ops invariant: Task
Scheduler must execute `wscript.exe //B //Nologo` hidden launcher actions
directly for `GameCult-Muninn`, `GameCult-Muninn-Activate`, and
`GameCult-Muninn-VideoProof`, never raw `.cmd` wrappers. After those live cuts,
continue daemon-by-daemon until compatibility HTTP, TCP, WebSocket, and command
probes are fallback witnesses only.
debug-only. Stonks publishes RUDP health and a daemon-owned CultCache store
containing provider advertisement, market snapshot, Eve surface, command
boundary, and transport profile records; Odin local discovery can ingest that
store as provider truth. Raven Muninn task actions are also an explicit ops
invariant: Task Scheduler must execute `wscript.exe //B //Nologo` hidden
launcher actions directly for `GameCult-Muninn`, `GameCult-Muninn-Activate`,
and `GameCult-Muninn-VideoProof`, never raw `.cmd` wrappers. After those live
cuts, continue daemon-by-daemon until compatibility HTTP, TCP, WebSocket, and
command probes are fallback witnesses only.
Rust no longer gets to claim the transport is imaginary:
`vendor/cultnet-rs` includes the canonical CNR0 `cultnet.transport.rudp.v0`

View file

@ -39,6 +39,7 @@ function buildConfig(argv) {
path.join(repoRoot, "..", "Bifrost", ".bifrost", "provider-advertisement.cc"),
path.join(repoRoot, "..", "weksa", ".weksa", "provider-advertisement-store.cc"),
path.join(repoRoot, "..", "Vili", ".vili", "vili.service.cc"),
path.join(repoRoot, "..", "Stonks", "scratch", "stonks", "stonks-state.cc"),
].join(",");
const interfaceBindingStores = String(
args.interfaceBindingStore ||

View file

@ -8,6 +8,10 @@ function defineOdinDocuments(defineDocumentType) {
interfaceBindingDefinition: null,
operatorStateDefinition: null,
providerAdvertisementDefinition: null,
stonksCommandBoundaryDefinition: null,
stonksMarketSnapshotDefinition: null,
stonksRequestEventDefinition: null,
stonksTransportProfileDefinition: null,
surfaceDefinition: null,
viliCommandBoundaryDefinition: null,
viliTransportProfileDefinition: null,
@ -106,6 +110,41 @@ function defineOdinDocuments(defineDocumentType) {
name: (value) => value?.profile_id || value?.profileId || value?.daemon_id || value?.daemonId || "weksa",
schema: parseObjectDocument("Weksa transport profile"),
});
const stonksRequestEventDefinition = defineDocumentType({
type: "stonks.request_event",
schemaName: "stonks.request_event",
schemaId: "stonks.request_event.v1",
schemaVersion: "stonks.request_event.v1",
global: false,
name: (value) => value?.id || "request",
schema: parseObjectDocument("Stonks request event"),
});
const stonksMarketSnapshotDefinition = defineDocumentType({
type: "stonks.market_snapshot",
schemaName: "stonks.market_snapshot",
schemaId: "stonks.market_snapshot.v1",
schemaVersion: "stonks.market_snapshot.v1",
global: true,
schema: parseObjectDocument("Stonks market snapshot"),
});
const stonksCommandBoundaryDefinition = defineDocumentType({
type: "stonks.command_boundary",
schemaName: "stonks.command_boundary",
schemaId: "stonks.command_boundary.v1",
schemaVersion: "stonks.command_boundary.v1",
global: false,
name: (value) => value?.boundaryId || value?.daemonId || "stonks",
schema: parseObjectDocument("Stonks command boundary"),
});
const stonksTransportProfileDefinition = defineDocumentType({
type: "stonks.transport_profile",
schemaName: "stonks.transport_profile",
schemaId: "stonks.transport_profile.v1",
schemaVersion: "stonks.transport_profile.v1",
global: false,
name: (value) => value?.profileId || value?.daemonId || "stonks",
schema: parseObjectDocument("Stonks transport profile"),
});
const voidbotSwarmSnapshotDefinition = defineDocumentType({
type: "voidbot.swarm_state_snapshot",
schemaName: "voidbot.swarm_state_snapshot",
@ -119,6 +158,10 @@ function defineOdinDocuments(defineDocumentType) {
interfaceBindingDefinition,
operatorStateDefinition,
providerAdvertisementDefinition,
stonksCommandBoundaryDefinition,
stonksMarketSnapshotDefinition,
stonksRequestEventDefinition,
stonksTransportProfileDefinition,
surfaceDefinition,
viliCommandBoundaryDefinition,
viliTransportProfileDefinition,

View file

@ -55,6 +55,10 @@ function createInterfaceDiscovery({
interfaceBindingDefinition,
operatorStateDefinition,
providerAdvertisementDefinition,
stonksCommandBoundaryDefinition,
stonksMarketSnapshotDefinition,
stonksRequestEventDefinition,
stonksTransportProfileDefinition,
surfaceDefinition,
viliCommandBoundaryDefinition,
viliTransportProfileDefinition,
@ -63,7 +67,7 @@ function createInterfaceDiscovery({
weksaTransportProfileDefinition,
voidbotSwarmSnapshotDefinition,
} = documents;
if (!CultMesh || !interfaceBindingDefinition || !operatorStateDefinition || !surfaceDefinition || !viliCommandBoundaryDefinition || !viliTransportProfileDefinition || !weksaCommandBoundaryDefinition || !weksaOperatorStateDefinition || !weksaTransportProfileDefinition || !voidbotSwarmSnapshotDefinition || !providerAdvertisementDefinition) {
if (!CultMesh || !interfaceBindingDefinition || !operatorStateDefinition || !stonksCommandBoundaryDefinition || !stonksMarketSnapshotDefinition || !stonksRequestEventDefinition || !stonksTransportProfileDefinition || !surfaceDefinition || !viliCommandBoundaryDefinition || !viliTransportProfileDefinition || !weksaCommandBoundaryDefinition || !weksaOperatorStateDefinition || !weksaTransportProfileDefinition || !voidbotSwarmSnapshotDefinition || !providerAdvertisementDefinition) {
return [];
}
@ -76,9 +80,13 @@ function createInterfaceDiscovery({
const node = await CultMesh.createNode(storePath, {
documents: [
voidbotSwarmSnapshotDefinition,
stonksRequestEventDefinition,
stonksMarketSnapshotDefinition,
providerAdvertisementDefinition,
interfaceBindingDefinition,
surfaceDefinition,
stonksCommandBoundaryDefinition,
stonksTransportProfileDefinition,
operatorStateDefinition,
viliCommandBoundaryDefinition,
viliTransportProfileDefinition,
@ -117,10 +125,12 @@ function createInterfaceDiscovery({
commandBoundary: providerRecord(node, [
viliCommandBoundaryDefinition,
weksaCommandBoundaryDefinition,
stonksCommandBoundaryDefinition,
], advertisement) || null,
transportProfile: providerRecord(node, [
viliTransportProfileDefinition,
weksaTransportProfileDefinition,
stonksTransportProfileDefinition,
], advertisement) || null,
usesCultMesh: true,
transport: advertisement.provider?.transport || "CultMesh provider advertisement",
@ -145,6 +155,10 @@ function createInterfaceDiscovery({
interfaceBindingDefinition,
operatorStateDefinition,
providerAdvertisementDefinition,
stonksCommandBoundaryDefinition,
stonksMarketSnapshotDefinition,
stonksRequestEventDefinition,
stonksTransportProfileDefinition,
surfaceDefinition,
viliCommandBoundaryDefinition,
viliTransportProfileDefinition,
@ -153,7 +167,7 @@ function createInterfaceDiscovery({
weksaTransportProfileDefinition,
voidbotSwarmSnapshotDefinition,
} = documents;
if (!CultMesh || !interfaceBindingDefinition || !operatorStateDefinition || !surfaceDefinition || !viliCommandBoundaryDefinition || !viliTransportProfileDefinition || !weksaCommandBoundaryDefinition || !weksaOperatorStateDefinition || !weksaTransportProfileDefinition || !voidbotSwarmSnapshotDefinition || !providerAdvertisementDefinition) {
if (!CultMesh || !interfaceBindingDefinition || !operatorStateDefinition || !stonksCommandBoundaryDefinition || !stonksMarketSnapshotDefinition || !stonksRequestEventDefinition || !stonksTransportProfileDefinition || !surfaceDefinition || !viliCommandBoundaryDefinition || !viliTransportProfileDefinition || !weksaCommandBoundaryDefinition || !weksaOperatorStateDefinition || !weksaTransportProfileDefinition || !voidbotSwarmSnapshotDefinition || !providerAdvertisementDefinition) {
return [];
}
const interfaces = [];
@ -165,9 +179,13 @@ function createInterfaceDiscovery({
const node = await CultMesh.createNode(storePath, {
documents: [
voidbotSwarmSnapshotDefinition,
stonksRequestEventDefinition,
stonksMarketSnapshotDefinition,
providerAdvertisementDefinition,
interfaceBindingDefinition,
surfaceDefinition,
stonksCommandBoundaryDefinition,
stonksTransportProfileDefinition,
operatorStateDefinition,
viliCommandBoundaryDefinition,
viliTransportProfileDefinition,
@ -198,10 +216,12 @@ function createInterfaceDiscovery({
commandBoundary: providerRecord(node, [
viliCommandBoundaryDefinition,
weksaCommandBoundaryDefinition,
stonksCommandBoundaryDefinition,
], advertisement) || null,
transportProfile: providerRecord(node, [
viliTransportProfileDefinition,
weksaTransportProfileDefinition,
stonksTransportProfileDefinition,
], advertisement) || null,
}));
}
@ -317,6 +337,7 @@ function providerRecordKeys(advertisement) {
];
if (advertisement?.providerId === "vili.animation") keys.push("vili");
if (advertisement?.providerId === "weksa.intent.service") keys.push("weksa");
if (advertisement?.providerId === "stonks.market") keys.push("stonks");
return [...new Set(keys.filter(Boolean).map(String))];
}