gnomonlearn
Docs/RFC-0032 build-layer RDF model proposal

RFC-0032 build-layer RDF model 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: source review; RDF contract correction pending. Owner: build infrastructure and spec. No Gnomon system is deployed, so no runtime migration is needed.

Source-bound finding

RFC-0032 §1 explicitly defines rules_gnomon as the Bazel build layer and excludes the Gnomon language, compiler internals, and runtime from its scope. The source-bound review in kg/projection-reviews.textproto identifies these category errors:

RDF nodesCurrent classAuthored meaning
Seven gnomon_* targetsDeclarationKindBazel rules in Starlark and BUILD files, not Gnomon top-level declarations
Three Gnomon*Info declarationsNamedDeclarationBazel providers, not instances of Gnomon declarations
Four gnomon.* effectsEffectKindBuild/compiler steps and bazel run migration application, not typed Gnomon operation effects
rules_gnomon, rules_proto, rules_rust, gazelle.gnmModuleBazel rule sets and Gazelle extension, not application or platform Gnomon modules
Five CanonicalIr, CompiledBundle, and Gnomon*Info typesDataTypeInternal compiler artifacts and Bazel provider types, not author-writable Gnomon Value types
Twenty-five field/* slotsFieldBazel rule attributes and provider fields, not slots on Gnomon declarations

wasm-fingerprint-matches-bundle is also mismatched: §4.3 says the WASM SHA-256 is checked against the storage manifest at runtime, while RDF says the WASM fingerprint must match the module bundle fingerprint. Different artifacts cannot be assumed to have the same digest. The Lean M32004 diagnostic also repeats the bundle comparison, so it must be reconciled with the authored §4.3 runtime contract.

The gnomon-compiler-hermetic invariant omits gnomon_client.specs when it lists declared compiler file inputs as only srcs and deps; §4.6 and §7 explicitly require spec-backed clients’ spec files as tracked inputs. Seven other build invariants match the authored rules and Lean summaries, though their target subjects need the class corrections above.

The review establishes source fidelity, not whether the build rules exist or pass hermeticity tests. No source triples or subject IRIs changed in this review.

Proposed model

Add build-layer classes such as BuildRule, BuildProvider, BuildAction, BuildRuleSet, BuildExtension, and BuildArtifactType, all under DomainEntity. Keep DeclarationKind, NamedDeclaration, EffectKind, Module, and DataType for the Gnomon language and runtime concepts their ontology definitions describe. Introduce BuildAttribute and BuildProviderField categories for the 25 reviewed RDF Field nodes; the current Field definition is a slot on a Gnomon declaration. Retain a field’s isRequired only when its Bazel rule/provider contract actually mandates it. Build invariants should point to corrected build-layer subjects, with their enforcement phase checked independently. Include tracked client spec files in the hermetic compiler input rule.

Preserve an existing subject IRI only when its identity stays the same; record an old-to-new IRI map for any reclassified subject. Correct the WASM fingerprint relationship to the storage manifest after confirming the exact manifest field and runtime check in RFC-0010. Because nothing is deployed, this needs a clean initial publication contract rather than migration code.

Acceptance

  1. Resolve the recorded class, requiredness, hermetic-input, and fingerprint discrepancies across all 57 reviewed RFC-0032 domain nodes.
  2. Align RDF source, ontology, generated Turtle, Lean references, and the Bazel-rule source or implementation contract. Rebind source-bound reviews to the corrected facts.
  3. Verify representative Bazel targets and providers, hermetic input tracking, reproducible bundle bytes, Gazelle generation, and the WASM-to-storage- manifest fingerprint check. Compare checked-in SPARQL results before initial publication.