code wiki / _hdl_build / nx_workstream_store.nx

nx_workstream_store.nx

buildroot/runtime/_hdl_build/nx_workstream_store.nx

11514 B254 linesdepth 3pulls 3 transitivereach 50 importersview sourcekind librarytopic workstream
docsdependenciesstructsconstsfunctions

about

nx_workstream_store.nx -- WMS-R1 LIB: the content-addressed WORKSTREAM REGISTRY (SSOT), the team's single machine-readable enumeration of EVERY workstream across the 12 empires. Built ON the sovereign segment store (knowledge/store/ws-*, via nx_seg_store) -- NO TSV, NO SQL, NO git. The structural twin of nx_known_issue_store: that catalogues "have we SEEN this failure?"; THIS catalogues "what WORKSTREAMS exist, and is the registry COMPLETE?". It closes the lost-things bug (crash recovery missed entire empires because no SSOT enumerated them). Record schema (all keys under prefix knowledge/store/ws-), TAB-separated value fields: ws:ids -> index: TAB-separated list of every workstream id (the ws_manifest walk order) ws:empires -> index: TAB-separated list of the 12 empire ids (enables empire-completeness) ws:<id> -> id <tab> empire <tab> state <tab> last_touched <tab> memory_link <tab> code_link <tab> deps state = ACTIVE|DONE|BLOCKED|FLOATING|ABSENT (data-driven label set) last_touched = epoch seconds (decimal) or 0 when unknown memory_link = memory file basename or "-" code_link = organ/file path or "-" deps = comma-joined dep ids or "-" ws:provenance -> authorship breadcrumb (verified-vs-staging is machine-visible in the store) REUSE / lineage: ss_* (atomic tmp+fsync+rename commit point) is the substrate; the ws:ids / ws_field TAB-parser / ws_seg_next idioms are lifted straight from nx_known_issue_store (ki:ids / ki_field / ki_seg_next_p) -- the registry is DATA-driven, adding a stream is a seed edit, not new code. Sovereign: imports only nx_seg_store + nx_syscalls (no gcc). license_tier: ORIGINAL

dependencies 2 imports · 36 importers

nx_seg_store.nx nx_syscalls.nx nx_workstream_store.nx nx_discover_loop.nx nx_game_ws_register.nx nx_heartbeat_registry_gate.nx nx_heartbeat_str.nx nx_hub_ws_register.nx nx_iolayer_ws_register.nx nx_iot_ws_inject.nx nx_pipeline_gate.nx nx_pipeline_run.nx nx_pipeline_spine.nx

diagram shows first 10 each side; +0 more imports, +26 more importers in the complete lists below.

imports: nx_seg_store.nxnx_syscalls.nx

imported by: nx_discover_loop.nxnx_game_ws_register.nxnx_heartbeat_registry_gate.nxnx_heartbeat_str.nxnx_hub_ws_register.nxnx_iolayer_ws_register.nxnx_iot_ws_inject.nxnx_pipeline_gate.nxnx_pipeline_run.nxnx_pipeline_spine.nxnx_rag_ws_register.nxnx_site_factory_ws_register.nxnx_watemit_ws_register.nxnx_workflow_lib.nxnx_workstream_audit.nxnx_workstream_audit_gate.nxnx_workstream_popqueue.nxnx_workstream_registry_gate.nxnx_workstream_registry_neg.nxnx_workstream_seed.nxnx_ws_board.nxnx_ws_board_gate.nxnx_ws_board_html_gate.nxnx_ws_board_live_gate.nxnx_ws_cas.nxnx_ws_cas_gate.nxnx_ws_crash_gate.nxnx_ws_discover_gate.nxnx_ws_exceed_gate.nxnx_ws_exceed_git_live_gate.nxnx_ws_ingest.nxnx_ws_ingest_run.nxnx_ws_lost.nxnx_ws_repair.nxnx_ws_repair_gate.nxnx_ws_setstate.nx

structs

none

consts

27const WS_PREFIX: *u8 = "knowledge/store/ws-"
30const WS_FOUND: i64 = 1 // record retrievable
31const WS_GONE: i64 = 0 // tombstoned
32const WS_UNKNOWN: i64 = 0 - 1 // never registered -- the NEG-CONTROL honest answer

functions

34func ws_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: ws_memberws_put_p
39func ws_get_p(prefix: *u8, key: *u8, ptrout: *i64, lenout: *i64) -> i64
42func ws_get(key: *u8, ptrout: *i64, lenout: *i64) -> i64
50func ws_seg_next(prefix: *u8) -> i64
called by 19: mainmainmainmainmainmain+13 calls 1: ss_next_segid
58func ws_field(rec: *u8, rlen: i64, f: i64, out: *u8) -> i64
79func ws_member(list: *u8, llen: i64, tok: *u8) -> i64
113func ws_put_p(prefix: *u8, key: *u8, val: *u8) -> i64
131func ws_put(key: *u8, val: *u8) -> i64
156func ws_manifest_p(prefix: *u8, ids_out: *i64, cap: i64) -> i64
178func ws_manifest(ids_out: *i64, cap: i64) -> i64
called by 1: main calls 1: ws_manifest_p
186func ws_audit_complete_p(prefix: *u8, missing_out: *i64, cap: i64) -> i64
252func ws_audit_complete(missing_out: *i64, cap: i64) -> i64
called by 1: main calls 1: ws_audit_complete_p