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.
| module | description | lines | funcs |
|---|---|---|---|
| nx_shard.nx | parallelism-ready work-sharding primitive. | 160 | 6 |
| nx_shard_compact.nx | fold a domain's PUBLIC shard to ONE segment via the store's own cap-aware | 50 | 3 |
| nx_shard_governance_gate.nx | 86 | 7 | |
| nx_shard_guardrail.nx | CAP-SHARD-GUARDRAIL (cross-shard R4): org-level POLICY INHERITANCE. An org-default | 17 | 2 |
| nx_shard_guardrail_gate.nx | hermetic gate for CAP-SHARD-GUARDRAIL (R4). Proves the tighten-only inheritance: | 47 | 3 |
| nx_shard_query.nx | LIB: sharded SCATTER-GATHER query = the distributed READ PATH that makes the index scale | 46 | 3 |
| nx_shard_query_gate.nx | proves sharded scatter-gather top-k == single whole-corpus top-k (EXACT), incl. when the | 62 | 4 |
| nx_shard_registry.nx | the SSOT reader for the Nishi SHARDED ecosystem (CAP-SHARD-REGISTRY). Industry best-practice | 86 | 6 |
| nx_shard_registry_gate.nx | 73 | 6 | |
| nx_shard_validator.nx | per-decl structural validator. | 191 | 3 |
| nx_shard_view.nx | the cross-shard FLEET VIEW builder (CAP-SHARD-VIEW). Serializes the shard registry | 70 | 5 |
| nx_shard_writer.nx | size-rotating sharded output writer. | 172 | 14 |
| nx_shard_writer_test.nx | smoke for size-rotating output writer. | 50 | 1 |