- Código
NS-3- Título
- UNI de registros de riesgo (gramática, correspondencia con lo existente, autoridad de asignación)
- Versión
- 0.1.0
- Estado
- PROPUESTA
- Fecha
- catalogue 2026-10-16 · circulated 17 October 2026
- Unique Nexus Identifier
NXS-STD-ST-000003- Alcance de responsabilidad
- confianza; datos canónicos
- Fuente
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.
- Estado
- PROPUESTA
- Propietario
- the trust and assurance system (standard) and NXS-GRX (records)
- Implementación de referencia (nexus-foundry): biblioteca
the network's own records, storeserver/grix/uni/recordUniStore.ts, migrationthe network's own records, pruebathe 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).
Cita
NS-3, clause 1. NXS-STD-ST-000003@0.1.0. https://nexustandards.com/standards/ns-3/#nx-c-11. Gramática
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 así como @1.2.0; an artefact carries a semantic version, a record an integer. A ref with a semantic version is not a record ref.
| Tipo | Código | Tipo | Código |
|---|---|---|---|
| Hecho de observación | OB | Versión del cronotopo | CT |
| Versión de origen | SR | Registro de corrección | CR |
| Definición del indicador | IN | Registro de producto analítico | AP |
| Definición de la medida | ME | Sujeto (lugar, activo, organización) | SU |
| Versión de los límites | 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).
Cita
NS-3, clause 2. NXS-STD-ST-000003@0.1.0. https://nexustandards.com/standards/ns-3/#nx-c-22. Los identificadores heredados siguen siendo válidos
NXS-GRX ya incluye identificadores de registro como obs:unrisk:<key>, uni:source:worldbank.wdi, uni:indicator:<code> e identificadores con puntos, como grix.eo.stac.catalogue. Se interpretan como LEGACY, keep working in <ref>@<version> refs (parseRecordRef, ahora utilizado por el dossier de cortes de datos de riesgo regulado), y se vinculan con un UNI NS-1 cuando se asigna. Nada se renombra in situ; un registro o bien lleva un NS-1 recordUni (new records) or a legacy recordUni más la parte asignada uni (ObservationFact.uni, opcional durante la transición).
Cita
NS-3, clause 3. NXS-STD-ST-000003@0.1.0. https://nexustandards.com/standards/ns-3/#nx-c-33. Allocation
Los números de serie nunca se derivan ni se escriben a mano (NS1-R2). Proceden de nexus_uni.allocate_record_serial(scope, category, region), un contador atómico por (GRX, kind, region) in nexus_uni.record_serial_sequence, que solo avanza dentro de una transacción de inquilino con ámbito definido (o mediante la omisión de la plataforma). Cada asignación es una fila de solo anexado en nexus_uni.record_uni_allocation (tenant, workspace, account, UNI, kind, region, serial, legacy_uni, principal verificado). El identificador heredado es la clave de idempotencia dentro de una cuenta: asignar dos veces el mismo identificador heredado devuelve el mismo UNI con reused: true. Los UNI nunca se reutilizan ni se reasignan: UPDATE, DELETE y TRUNCATE generan un error UNI_RECORD_ALLOCATION_IMMUTABLE, and a CHECK keeps the UNI string equal to its segment columns.
El aislamiento sigue el patrón FORCE RLS del repositorio (par de ámbito de cuenta v956, protección de ámbito sistémico, protección de membresía v959). Los contadores no contienen datos de inquilinos; son legibles desde cualquier ámbito. La prueba de integración demuestra, sobre un PostgreSQL real, como un NOSUPERUSER NOBYPASSRLS role: serials shared across accounts, crosswalk private to the account, a forged scope writes nothing, mutation refused, the counter refused outside a scoped transaction, and the migration re-applies as a no-op.
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)Sin conexión es un 503 tipificado (AuthoritativeStoreUnavailableError); there is no memory fallback.
Cita
NS-3, clause 4. NXS-STD-ST-000003@0.1.0. https://nexustandards.com/standards/ns-3/#nx-c-44. Qué cambia para las rutas de ingesta
- New records: allocate through the store at write time and store the NS-1 form in
recordUni. - Rutas existentes (
obs:unrisk:…inserver/unrisk/realDataObservationIngest.tsand the others): unchanged until each path is migrated; they can allocate and setunion the fact without changing theirrecordUnikey. - Refs: compilar con
formatRecordRef(recordUni, recordVersion)y léase junto conparseRecordRef(ref); se aceptan ambas formas para que las dependencias de las correcciones sigan resolviéndose durante la transición.
Cita
NS-3, clause 4a. NXS-STD-ST-000003@0.1.0. https://nexustandards.com/standards/ns-3/#nx-c-4a4a. Vías adoptadas
- WDI bootstrap (CGRIC-03): allocates SR and OB UNIs with a verified
uniScope;WdiBootstrapResult.uniAllocation. - Hidratación con datos reales (
server/unrisk/realDataHydration.ts, NS-3c):hydrateUnriskRealData(context, { uniScope: { accountId }, recordUniStore? })establece correspondencias de cadaobs:unrisk:<key>@<version>ref de la hidratación a un OB UNI (región = ISO3 para hidrataciones de ámbito nacional) medianteserver/unrisk/realDataRecordUni.tsand records the outcome indata.uniAllocation(ALLOCATEDcon tablas de correspondencia,NOT_REQUESTED, orUNAVAILABLEcon avance parcial). La ingesta síncrona (realDataObservationIngest.ts) keeps its legacy keys; the data cut and consumers keep matching them, and a product's PROV-O bundle maps both forms (NS-3b). The envelope's requester carries no account id, so callers supply it (NS-3d below); without it hydration reportsNOT_REQUESTED.
- Reenvío verificado de cuentas (NS-3d):
server/standards/verifiedUniScope.tslecturas{ 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/runpasses it asuniScopea los bootstraps de los WDI;UnriskFabricScope.accountIdes remitido porrunUnriskFabricQuerya través dehydrateUnriskRealDataCompleteyhydrateUnriskRealDataExtendedtohydrateUnriskRealData. 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.tsasigna un OB UNI para cada observación que escribe el plano de datos públicos (indicadores nativos del Banco Mundial, UNSD, OMS, FMI y los adaptadores estadísticos; eventos de amenazas públicas; registros actuales, de pronóstico y de conjunto de Open-Meteo) bajo el ámbito propiedad del sistema que el plano ya utiliza para SQL (accountACC-GRIX-PUBLIC-DATA, identidadsystem:grix-public-data). REGION es la dimensión ISO3 o la referencia de lugar del país; los puntos y los globales no tienen región. El heredadorecordUnisigue siendo la clave de la estructura (fabric); el UNI viaja con el hecho almacenado (el archivo duradero y la carga útil del registro de PostgreSQL), se conserva a lo largo de las correcciones, y una versión vigente escrita antes de NS-3e recibe su UNI en su siguiente corrección mediante la tabla de equivalencias heredada. Las filas sin cambios no suponen ninguna consulta de ida y vuelta a la estructura. Una caída de la estructura nunca bloquea la escritura de una observación: la primera caída tipificada activa un cortacircuitos por pasada y el del acuse de recibouniAllocationinformesUNAVAILABLEcon los recuentos parciales; cualquier otro alcance esNOT_REQUESTED.
Cita
NS-3, clause 5. NXS-STD-ST-000003@0.1.0. https://nexustandards.com/standards/ns-3/#nx-c-55. Seguimiento
NS-3b delivered (NS-3b-dataset-and-product-metadata-profile.md). NS-3d (verified account forwarding) and NS-3e (open-data ingests) delivered. Remaining: a dedicated uni columna activada grix_chrono.observation_facts so the UNI is queryable without reading the record payload; the Builder v2 scope becomes claims-only so its tool can forward too.
Historial de cambios
Versions from the catalogue; entries from the changelog that name this document.
| Versión | Fecha | Nota |
|---|---|---|
0.1.0 | 16 de octubre de 2026 | 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/.