gnomonlearn
Docs/RFC-0036 diagnostic consistency for predicate and permission inputs

RFC-0036 diagnostic consistency for predicate and permission inputs

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 required before normative release. Owners: Graph Platform, Storage, spec.

Conflicting authored facts

RFC-0036 §4.2 invariant 1 requires exactly one of predicateId and predicate at statement write time. An input with neither cannot be accepted. The Lean diagnostic catalog and generated reference §Diagnostics nevertheless classify M36070 (neither field supplied) as a warning. Its source claim says the insert emits that warning, which permits an interpretation in which creation proceeds despite an unresolved relation. The four TypeScript backend boundaries now reject this input; they currently use a plain validation error because the normative diagnostic is inconsistent.

RFC-0036 §5 says permission bits outside {0,1,3,7,15} are a defect M36030 and must not be silently normalized. The Lean diagnostic catalog and generated reference also define M36080 as a warning that the backend normalized such a value. The two descriptions leave the accepted value and whether M36030 is still required unclear.

Recommendation

Make M36070 an error for missing or simultaneous predicate references, matching the exactly-one rule. The same code can cover both invalid shapes with a diagnostic parameter identifying the condition, or separate codes can be assigned before publication. Reject the write before allocating an ID or sending an RPC.

Remove M36080 as a normalization allowance. If a legacy import needs a compatibility warning, constrain it to an explicit pre-validation conversion path with a separately specified output and provenance; normal graph writes reject invalid bits with M36030. The first release has no deployed Gnomon state that requires silent normalization.

Acceptance

  1. Update RFC prose, Lean diagnostics and claims, reference catalogs, RDF source projections, and source-bound reviews as one semantic change. Preserve stable claim IRIs where their intended subject remains the same; record any removed diagnostic reference.
  2. Verify all four graph backend write boundaries and PostgreSQL policy inserts/updates emit the selected error behavior. Check scalar and batch writes before mutation.
  3. Run diagnostic inventory, Lean, claim-query, projection-drift, and published graph conformance gates, then repin the site.

Owner decision

Choose whether M36070 becomes the rejecting exactly-one error and M36080 is removed from ordinary writes, or specify a different precise warning-plus-rejection contract for both codes.