docs: reserve polycentric observer-control schema family lane - #14
Merged
Conversation
mdheller
marked this pull request as ready for review
April 9, 2026 15:13
mdheller
added a commit
that referenced
this pull request
Aug 2, 2026
…side governance (task #14) (#251) * feat(data): DataClass (OntoDT/OntoDQ) + TF-Lattice classifier — data-side governance (task #14) The data-side counterpart to the glossary (biz-side, #250). A DataClass binds, fail-closed: OntoDT datatype-ontology class (capture) + business GlossaryTerm (biz↔data) + ValidValues domain (enum/range/regex) + an optional TF-Lattice wide-and-deep classifier that ASSIGNS the class by inference (OntoDQ) and is a first-class CATALOGED model — modelRef→ModelManifest, runRef→RunRecord, compute on Ray/TritFabric, monotonicFeatures lattice constraint, labels that are GlossaryTerm URNs (assigned in the glossary). EntityField gains an optional dataClassRef. Drift-guard (validate_data_class_examples.py, -resolved via a referencing registry): ontological typing + glossary link + domain required; classifier labels are glossary terms, model is cataloged, compute is ray/tritfabric; a field bound to a DataClass must share its domain kind. 4 negative vectors; teeth-verified (bad-label, kind-mismatch). make validate ok; dup-$id 346. Ties biz-glossary #250 ↔ DataClass ↔ EntityField ↔ model catalog ↔ Ray/TritFabric runs. * feat(data): two-level classifier — per-class LOGISTIC + per-table SOFTMAX (LSA + doc2vec) Per Charles: each class needs an individually-testable classifier, and each table needs a softmax aligning a LSA bag-of-words embedding and a doc2vec sentence-encoder (the n-ary logit→class examples). - DataClass.classifier is now the PER-CLASS head: head=logistic (one-vs-rest, binary) + a REQUIRED evalRunRef (the individual per-class test) + threshold. A class with no eval run is untestable and refused. - New TableClassifier: per-table head=softmax (n-ary), embeddings MUST include BOTH lsa-bag-of-words AND doc2vec-sentence-encoder, a cataloged ModelManifest with a run on Ray/TritFabric, assignsClasses = the N DataClasses. - Validator enforces both + 2 new negative vectors. Teeth-verified (missing-doc2vec, missing-evalRunRef). make validate ok; dup-$id 347. * fix(data): address Copilot review on DataClass (#251) - DataClass.classifier now REQUIRES runRef + compute and both are non-null — a classifier is a fully cataloged model with a run on ray/tritfabric, not a partial block (fail-closed intent). - EntityField: allOf if/then — dataClassRef present ⇒ validValues required, so schema-only validators also catch a field bound to a class without a declared domain. - validate_data_class_examples.py: validate each collection against its INTENDED schema explicitly (never pick schema from the instance's own type — a mistyped doc could validate against the wrong schema). - spec: reword 'binds four things, fail-closed if any missing' → three required + an optional fourth (assignment), matching the schema/validator. make validate ok; dup-$id 347. * fix(data): harden classifier validator — independent runRef check + type-guards (Copilot #251) check_classifier now verifies classifier.runRef is a RunRecord URN independently (not just via the schema pattern), consistent with how it checks modelRef, and guards against a non-dict classifier/compute so a prior schema failure can't crash the validator. check_table_classifiers skips non-dict embedding entries. The other four review items were already resolved in earlier remediation (validate-by-intended-schema, schema requires runRef+compute, EntityField if/then dataClassRef=>validValues, spec reworded 'three + optional fourth'). Teeth-verified.
mdheller
added a commit
that referenced
this pull request
Aug 3, 2026
…ained→reproduced (task #14) (#264) The DataClass contract specified a TF-Lattice classifier + referenced a ModelManifest/RunRecord by URN, but those URNs pointed at nothing (specified, not trained). This closes it: - tools/train_dataclass_classifiers.py trains real per-class LOGISTIC (one-vs-rest) + per-table SOFTMAX heads, MONOTONE-constrained in monotonicFeatures (weight >=0 projection each GD step = the TF-Lattice essence — raising a monotone feature never lowers the class score). Deterministic (seeded, full-batch) so weights + ModelManifest.modelDigest are reproducible. - Emits trained_model.json + a conformant ModelManifest (id=DataClass modelRef) + train/eval RunRecords (ids=runRef/evalRunRef), so the previously-dangling DataClass classifier refs RESOLVE. - validate-trained-classifiers (recompute-don't-trust, in make validate): manifest digest matches the weight bytes; eval accuracy REPRODUCED from weights+fixture (an inflated claim fails); model verified genuinely monotone (perturb up -> score never drops); refs resolve; artifacts conform. Teeth-verified (tampered weights refused). numpy in the make recipe.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reserves
SourceOS-Linux/sourceos-specas the canonical machine-readable contract home for the polycentric observer-control model being captured upstream in the SocioProphet standards canon.What this PR does
docs/adr/ADR-0006-polycentric-observer-schema-family.mdWhy here
sourceos-specalready serves as the canonical machine-readable specification layer for SourceOS metadata governance and the SociOS agent plane, so it is the correct downstream home for the schema family.Upstream / downstream split
SocioProphet/socioprophet-standards-storageSocioProphet/TriTRPCSocioProphet/agentplaneSocioProphet/prophet-platform