code wiki / shard

topic: shard

13 modules sharing the shard name family (derived from the tree's prefix discipline).

The 'shard' topic family enables scalable, parallelized data management within the Nishi sovereign ecosystem by partitioning work and data across shards. The nx_shard module provides a parallelism-ready work-sharding primitive, while nx_shard_query implements a distributed read path for efficient, sharded queries. nx_shard_registry serves as the single source of truth for shard metadata, ensuring consistency across the ecosystem.

auto-narrated by the local model from this topic's module headers; links verified against the wiki index.

narrated overview -- maintained by the narration lane, module links verified against this wiki.

moduledescriptionlinesfuncs
nx_shard.nxparallelism-ready work-sharding primitive. 1606
nx_shard_compact.nxfold a domain's PUBLIC shard to ONE segment via the store's own cap-aware503
nx_shard_governance_gate.nx867
nx_shard_guardrail.nxCAP-SHARD-GUARDRAIL (cross-shard R4): org-level POLICY INHERITANCE. An org-default172
nx_shard_guardrail_gate.nxhermetic gate for CAP-SHARD-GUARDRAIL (R4). Proves the tighten-only inheritance:473
nx_shard_query.nxLIB: sharded SCATTER-GATHER query = the distributed READ PATH that makes the index scale463
nx_shard_query_gate.nxproves sharded scatter-gather top-k == single whole-corpus top-k (EXACT), incl. when the624
nx_shard_registry.nxthe SSOT reader for the Nishi SHARDED ecosystem (CAP-SHARD-REGISTRY). Industry best-practice866
nx_shard_registry_gate.nx736
nx_shard_validator.nxper-decl structural validator.1913
nx_shard_view.nxthe cross-shard FLEET VIEW builder (CAP-SHARD-VIEW). Serializes the shard registry705
nx_shard_writer.nxsize-rotating sharded output writer.17214
nx_shard_writer_test.nxsmoke for size-rotating output writer.501