- 代码
NS-3- 标题
- 风险记录 UNI(语法、旧编码对照、分配机构)
- 版本
- 0.1.0
- 状态
- 拟议
- 日期
- catalogue 2026-10-16 · circulated 17 October 2026
- Unique Nexus Identifier
NXS-STD-ST-000003- 职责范围
- 信任;规范数据
- 来源
standards/NS-3-grix-record-uni.mdat2cbe0d41b5f8
Preparatory working draft, circulated for review and comment. Not for implementation. Prepared and circulated by Saeed Valadbaygi, Chief Steward, Nexus Standards (saeed@therisk.global), 17 October 2026. Technical review area: TR-02. This document is not a Nexus Standard; it may change without notice and is not to be implemented, relied upon or cited as a Nexus Standard. Its stage is designated only by the Global Standards Council and its technical committees under NS-13. Recipients are invited to submit comments with supporting reasons, and to notify any patent rights of which they are aware. See the notice of circulation.
- 状态
- 拟议
- 负责人
- 信任与保证体系(标准)和 NXS-GRX (记录)
- 参考实现(nexus-foundry):库
the network's own records,存储server/grix/uni/recordUniStore.ts,迁移the network's own records,证明the network's own records
NS-1 gives artefacts (software, reports, datasets, figures) a UNI allocated by the catalogue. NS-3 gives NXS-GRX records (observation facts, source releases, indicators, boundaries, chronotopes, corrections, analytical products, subjects) a UNI allocated by the UNI fabric in PostgreSQL, on the same grammar, so a record can be cited, resolved and crosswalked like any other Nexus artefact. A UNI identifies and resolves a record; it never certifies the record's truth (V3 directive, section 12).
引用
NS-3, clause 1. NXS-STD-ST-000003@0.1.0. https://nexustandards.com/standards/ns-3/#nx-c-11. 语法
NXS-GRX-<KIND>[-<REGION>]-<SERIAL> the record concept (ObservationFact.recordUni) NXS-GRX-<KIND>[-<REGION>]-<SERIAL>@<version> one record version (recordUni@recordVersion) NXS-GRX-OB-KEN-000042@3 observation fact 42 for Kenya, version 3 NXS-GRX-SR-000001 source release 1 (global)The version segment is the NXS-GRX integer recordVersion. NS-1 v1.1 therefore accepts @3 以及 @1.2.0; an artefact carries a semantic version, a record an integer. A ref with a semantic version is not a record ref.
| 类型 | 代码 | 类型 | 代码 |
|---|---|---|---|
| 观测事实 | OB | 时空版本 | CT |
| 来源版本 | SR | 更正记录 | CR |
| 指标定义 | IN | 分析产品记录 | AP |
| 度量定义 | ME | 对象(地点、资产、组织) | SU |
| 边界版本 | BD |
Record kinds and artefact categories never share a code (registry/nexus-standards.yaml#recordCategories; tools/validate.mjs and the consumer unit test enforce it).
引用
NS-3, clause 2. NXS-STD-ST-000003@0.1.0. https://nexustandards.com/standards/ns-3/#nx-c-22. 旧版标识符仍然有效
NXS-GRX 已使用如下记录标识符,例如 obs:unrisk:<key>, uni:source:worldbank.wdi, uni:indicator:<code> 以及带点号的标识符,例如 grix.eo.stac.catalogue. They parse as LEGACY, keep working in <ref>@<version> 参考文献(parseRecordRef,现由受治理的风险数据切片汇编使用),并在分配后与 NS-1 UNI 对照。不会就地重命名;一条记录要么带有 NS-1 recordUni (新记录)或旧版 recordUni 加上分摊的 uni (ObservationFact.uni,过渡期内为可选项)。
引用
NS-3, clause 3. NXS-STD-ST-000003@0.1.0. https://nexustandards.com/standards/ns-3/#nx-c-33. 分配
序列号绝不由人工推导或手动输入(NS1-R2)。它们来自 nexus_uni.allocate_record_serial(scope, category, region),每个对象一个原子计数器 (GRX, kind, region) 在 nexus_uni.record_serial_sequence,仅在限定租户范围的事务内(或通过平台旁路)推进。每次分配均为仅追加的一行,记录于 nexus_uni.record_uni_allocation (tenant, workspace, account, UNI, kind, region, serial, legacy_uni, verified principal). The legacy id is the idempotency key within an account: allocating the same legacy id twice returns the same UNI with reused: true. UNIs are never reused or reassigned: UPDATE, DELETE and TRUNCATE raise UNI_RECORD_ALLOCATION_IMMUTABLE,并由 CHECK 约束保证 UNI 字符串与其分段列一致。
隔离遵循代码库的 FORCE RLS 模式(v956 账户范围对、系统范围防护、v959 成员资格防护)。计数器不保存租户数据;任何范围均可读取。集成测试在真实的 PostgreSQL 上证明,作为一 NOSUPERUSER NOBYPASSRLS 角色:各账户共享的序列号,账户私有的对照,伪造的范围不写入任何内容,拒绝变更,在限定范围的事务之外拒绝计数器,迁移重新应用时为空操作。
const store = resolveRecordUniStore(); const { uni, reused } = await store.allocate(scope, { kind: "OB", region: "KEN", legacyUni: "obs:unrisk:wdi.KEN.SP.POP.TOTL.2020" }); // uni = "NXS-GRX-OB-KEN-000042"; ref for version 3: formatRecordRef(uni, 3)离线状态为类型化的 503(AuthoritativeStoreUnavailableError); there is no memory fallback.
引用
NS-3, clause 4. NXS-STD-ST-000003@0.1.0. https://nexustandards.com/standards/ns-3/#nx-c-44. 摄取路径有哪些变化
- 新记录:在写入时通过存储区分配,并将 NS-1 形式存入
recordUni. - 现有路径(
obs:unrisk:…在server/unrisk/realDataObservationIngest.ts以及其他路径):在各路径完成迁移之前保持不变;它们可以分配并设置union the fact without changing theirrecordUni密钥。 - 参考:构建工具
formatRecordRef(recordUni, recordVersion)and read withparseRecordRef(ref);两种形式均被接受,以便更正所涉依赖关系在过渡期间持续可解析。
引用
NS-3, clause 4a. NXS-STD-ST-000003@0.1.0. https://nexustandards.com/standards/ns-3/#nx-c-4a4a. 已采纳的路径
- WDI bootstrap (CGRIC-03): allocates SR and OB UNIs with a verified
uniScope;WdiBootstrapResult.uniAllocation. - 真实数据填充 (
server/unrisk/realDataHydration.ts, NS-3c):hydrateUnriskRealData(context, { uniScope: { accountId }, recordUniStore? })对照每一项obs:unrisk:<key>@<version>水合的 ref 指向 OB UNI (对国家范围的水合,region = ISO3),经由server/unrisk/realDataRecordUni.tsand records the outcome indata.uniAllocation(ALLOCATED附对照,NOT_REQUESTED,或UNAVAILABLE并有部分进展)。同步摄取(realDataObservationIngest.ts)保留其旧版键;数据切分和使用方继续与之匹配,产品的 PROV-O 包对两种形式均作映射(NS-3b)。信封的请求方不携带账户 ID,因此由调用方提供(见下文 NS-3d);若无此项,数据补全会报告NOT_REQUESTED.
- Verified account forwarding (NS-3d):
server/standards/verifiedUniScope.ts读取{ accountId, principalId }from the request's verified claims only; a header, body or query account is never authority, and theacct:<tenant>the authority context synthesises is never used.POST /source-bootstrap/run将其传递为uniScope对 WDI 的自举抽样;UnriskFabricScope.accountId转发方为runUnriskFabricQuery通过hydrateUnriskRealDataComplete和hydrateUnriskRealDataExtended至hydrateUnriskRealData. The fabric query, NEIF mission-agent, data-agent and Commons agent-team routes and the hex-intel UNRISK contributor forward it; the Builder v2 UNRISK tool does not (its scope accepts a header account, NS3D-G1). Without a claim every path staysNOT_REQUESTED.
- Open-data ingests (NS-3e):
server/grix/fusion/openData/openDataRecordUni.tsallocates an OB UNI for every observation the public-data plane writes (native indicators from World Bank, UNSD, WHO, IMF and the statistical adapters; public hazard events; Open-Meteo current, forecast and ensemble records) under the system-owned scope the plane already uses for SQL (accountACC-GRIX-PUBLIC-DATA,身份system:grix-public-data)。REGION 为 ISO3 维度或国家地点引用;点位和全球数据不分区域。旧版recordUnistays the fabric key; the UNI rides on the stored fact (durable file and the PostgreSQL record payload), is kept across corrections, and a current version written before NS-3e receives its UNI on its next correction through the legacy crosswalk. Unchanged rows cost no fabric round-trip. A fabric outage never blocks an observation write: the first typed outage trips a per-pass circuit and the receipt'suniAllocation报告UNAVAILABLE附部分计数;任何其他范围均为NOT_REQUESTED.
引用
NS-3, clause 5. NXS-STD-ST-000003@0.1.0. https://nexustandards.com/standards/ns-3/#nx-c-55. 后续
NS-3b delivered (NS-3b-dataset-and-product-metadata-profile.md)。NS-3d(已验证账户转发)和 NS-3e(开放数据摄取)已交付。剩余:专用的 uni 列已开启 grix_chrono.observation_facts 因此无需读取记录载荷即可查询 UNI ;Builder v2 的范围改为仅限声明,使其工具也能转发。
变更历史
Versions from the catalogue; entries from the changelog that name this document.
| 版本 | 日期 | 备注 |
|---|---|---|
0.1.0 | 2026年10月16日 | current version in the catalogue |
- 0.1.0 – 2026-10-16 Canonical repository bootstrapped from the standards first drafted inside nexus-foundry (work items LEGAL-NAME-ARCHITECTURE-001, NS-3-7-RECORD-UNI-RESOLVER-001, NS-3B-DATA-PROFILE-001).
- 0.1.0 – 2026-10-16 NS-1 (the UNI and the artefact catalogue), NS-3 (NXS-GRX record UNIs) and NS-3b (STAC, DCAT, PROV-O profile) as PROPOSED documents under
standards/.