RFC-0053 field-type and PostgreSQL mapping proposal
Versioned draft snapshot
RFCs, reference catalogs, and evidence reflect Spec 3b2e3e7a114fb826b1445d39a48756b8fff629cd. Counts and pending/status notes belong to that snapshot. Read the dated project update for later progress.
Source repositories are private during staging. Links marked “repository access required” need access to the linked repository.
This is a trace and gap record from the pinned draft specification. It does not establish proof or implementation conformance.
Status: owner decision pending. Owners: Semantic Core, Compiler, Storage, and spec. RFC-0053 is draft; no Gnomon graph is deployed or RDF catalog published.
Observed conflict
RFC-0006 §4.A defines authored value types such as Text, Integer,
Decimal, Boolean, Date, Timestamp, Identifier, JSON, and a
Reference branch resolved from a declared entity name. RFC-0051 §10 gives
the PostgreSQL adapter’s type mapping, including Number, Bigint, Bytes,
and Uuid, which are absent from RFC-0006’s complete hierarchy. RFC-0053
§4 instead calls lowercase text, integer, number, boolean, date,
bytes, uuid, and reference “Gnomon field types.” It also lists
textarea and select, which serve presentation or enum-selection roles,
and ltree, which is a PostgreSQL classifier representation. Its integer
cast is BIGINT, while RFC-0051 maps Integer to INTEGER; its reference
cast is BIGINT, while RFC-0006 says a declared-entity reference resolves as
an Identifier at storage and RFC-0051 maps Identifier to TEXT.
The RFC-0053 domain projection reuses eight canonical type IRIs with lowercase
FQNs. That creates eight of the remaining shared-IRI FQN conflicts: Boolean,
Bytes, Date, Integer, Number, Reference, Text, and Uuid. The projected
Bytes, Number, and Uuid nodes additionally say definedIn RFC-0006,
although RFC-0006’s complete value-type hierarchy does not list them. A
case-only RDF edit would conceal the source and storage conflicts.
An in-memory counterfactual replacing the eight lower-case FQN literals with
upper-case names changes two of the 16 checked-in claim-query result lists.
implicit-conflicts.rq loses its boolean, integer, and text rows;
cross-rfc-claims.rq loses those three rows and shows three other rows at its
30-row limit. The graph still contains the underlying claims. The other 14
result lists are unchanged. This is local query evidence only; exact-FQN
external RDF clients and materialized query results remain unverified.
An exact-IRI scan of the other five extracted repositories found these eight
type IRIs only in the framework’s still-duplicated claim/domain Turtle tree;
no executable consumer matched. The public site’s generated evidence reads
the pinned spec artifact rather than those framework copies.
The extracted framework’s graph-module compiler still consumes lower-case
object field labels such as type: text and type: reference; some form
metadata uses type: select. This is implementation evidence, not proof that
the authored RFC-0006 type grammar accepts those labels. No deployed payloads
need migration, but source consumers and bundle fixtures need alignment.
Recommended first-release boundary
- Use resolved RFC-0006 value-type identities as the compiler and public schema contract. State explicitly whether lower-case authoring spellings are supported aliases, legacy input, or errors. Do not infer this from existing object JSON alone.
- Define the view mapper over resolved type descriptors. Keep
textareaas presentation metadata andselectas a UI rendering of an enum or variant, not independent storage types. Treatltreeas an adapter representation for an explicitly modeled classifier. AddBytes,Uuid,Number, orBigintto the value hierarchy only with authored semantics; otherwise remove them from the first-release field mapping. - Use one PostgreSQL cast table shared by RFC-0051 and RFC-0053. Decide the
Integerwidth and reference/identifier storage explicitly. Generate view SQL from that table and test the casts and indexes against the actual graph schema. - Keep canonical type IRIs and FQNs distinct from UI labels and SQL cast names. After the authored decision, change RFC prose, Lean facts, RDF protobuf sources, generated Turtle/reference catalogs, source-bound reviews, compiler fixtures, and affected consumers together.
The alternative is to make RFC-0053’s lower-case field tokens the first-release type language. That requires a deliberate RFC-0006 and RFC-0051 rewrite, a normalization rule for existing upper-case type references, and equivalent compiler and storage tests; simply changing RDF FQNs would not suffice.
Acceptance
- One authored type inventory covers every field type in RFC-0053 §4, with explicit aliases, presentation forms, backend-only representations, and unsupported entries.
- RFC-0006, RFC-0051, and RFC-0053 agree on
Integer,Reference, and identifier storage, with SQL tests for each cast and index strategy. - Exact-IRI RDF consumers and all 16 checked-in claim queries are compared before and after source changes. The domain identity, projection review, Lean/reference drift, and strict release gates report no type-name conflict.