Skip to content

feat(vocab): governed draft->approved glossary promotion — the 3-method alignment pass (task #13) - #258

Merged
mdheller merged 3 commits into
mainfrom
feat/glossary-alignment-promotion
Aug 2, 2026
Merged

feat(vocab): governed draft->approved glossary promotion — the 3-method alignment pass (task #13)#258
mdheller merged 3 commits into
mainfrom
feat/glossary-alignment-promotion

Conversation

@mdheller

@mdheller mdheller commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Close the vocabulary lifecycle

The vocab-currency loop ingests terms as draft; a draft term names something but doesn't yet regulate state. This is the governed pass that makes it approved — and only through the 3-method alignment from the GlossaryTerm contract (#250), as a fail-closed meet (same shape as DAR = governance ∧ IP/legal):

  1. capturealignment.ontologyClassRef
  2. vector-alignalignment.vectorLink, pinned to the sovereign nomic-ai/nomic-embed-text-v1.5 / 768 space and reciprocated by the named peer (a one-way link is not an alignment)
  3. implementalignment.estateBinding (entity / service / action)

tools/promote_glossary_term.py recomputes the meet (never trusts a declared flag) and promotes ONLY if all three hold; otherwise it refuses and names the unaligned method(s), leaving the term draft. An approved-but-unaligned term is a governance hole — exactly what #250's drift-guard rejects.

Teeth (make validate-glossary-promotion)

Example: governed-loopoperational-dag reciprocal pair, promoting governed-loop draft→approved.

Full lifecycle now closed: currency-detect (#255) → propose draft (#256) → dogfood (#257) → ontogenesis ingest + SHACL gate (ontogenesis#133) → governed alignment promotion → approved (here).

…od alignment pass (task #13)

Closes the vocabulary lifecycle. tools/promote_glossary_term.py promotes a draft GlossaryTerm to
approved ONLY when the 3-method alignment holds as a fail-closed MEET: capture (ontologyClassRef)
AND vector-align (vectorLink pinned to the sovereign nomic/768 space AND reciprocated by the named
peer) AND implement (estateBinding entity/service/action). It recomputes the meet (never trusts a
declared flag), refuses on any missing/non-reciprocal/off-space method (term stays draft — no
governance hole), and its approved output PASSES the #250 alignment drift-guard by construction.

validate-glossary-promotion (in make validate) teeth: full alignment promotes; missing-implement,
non-reciprocal peer, and off-sovereign-space embedding are each refused; promoted output passes
the reused #250 check_alignment. Example: governed-loop <-> operational-dag reciprocal pair.
Copilot AI review requested due to automatic review settings August 2, 2026 23:19
…d (own review)

promote() now refuses a non-GlossaryTerm input and an already-approved term (no silent mutation),
and uses .get('id') so malformed input can't KeyError. Two teeth added; 7 total.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a governed, fail-closed “draft → approved” promotion step for GlossaryTerm, intended to close the vocabulary lifecycle by only approving terms that satisfy the 3-method alignment contract (capture, vector-align, implement) and by gating the output against the existing #250 alignment drift-guard.

Changes:

  • Introduces tools/promote_glossary_term.py to recompute the 3-method alignment meet and promote/refuse accordingly.
  • Adds tools/validate_glossary_promotion.py + validate-glossary-promotion Makefile target to enforce promotion “teeth” in CI using the existing #250 alignment checker.
  • Adds a worked fixture + spec doc describing the promotion pass, and documents the addition in CHANGELOG.md.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tools/validate_glossary_promotion.py CI validation harness for promotion behavior and #250 drift-guard consistency.
tools/promote_glossary_term.py Implements the fail-closed promotion logic from draft to approved via 3-method alignment checks.
specs/glossary-promotion.md Normative description of the glossary promotion pass (v0.1).
Makefile Adds validate-glossary-promotion target and wires it into make validate.
examples/glossary_promotion.governed_loop.json Fixture bundle used by the promotion validation script.
CHANGELOG.md Documents the new glossary promotion tool + validation gate.

Comment on lines +41 to +47
G250.FAILURES.clear()
G250.check_alignment({"approved": approved, "peer": peer})
holes = [m for m in G250.FAILURES if approved["id"] in m or "governance hole" in m]
if holes:
FAILURES.append(f"promoted term fails #250 alignment drift-guard: {holes}")
else:
CHECKS["promoted-output:passes-250-guard"] = True
Comment on lines +41 to +57
# 2. vector-align — present, const-pinned to the sovereign space, and RECIPROCATED by the peer
vl = alignment.get("vectorLink") or {}
if not vl.get("peerRef"):
fails.append("vector-align (alignment.vectorLink missing)")
elif vl.get("model") != EMBED_MODEL or vl.get("dimension") != EMBED_DIM:
fails.append(f"vector-align (vectorLink must pin {EMBED_MODEL} / dim {EMBED_DIM})")
else:
back = ((peer or {}).get("alignment") or {}).get("vectorLink") or {}
if not peer or peer.get("id") != vl["peerRef"]:
fails.append(f"vector-align (peer {vl['peerRef']} not supplied for reciprocity check)")
elif back.get("peerRef") != term.get("id"):
fails.append(f"vector-align (peer {vl['peerRef']} does not link back — one-way link is not an alignment)")
# 3. implement
eb = alignment.get("estateBinding") or {}
if eb.get("kind") not in ESTATE_KINDS or not str(eb.get("ref") or "").strip():
fails.append("implement (alignment.estateBinding missing a valid kind+ref)")
return fails
…output + guard filter

- promote() now requires vectorLink.cosine (number in [-1,1], schema-required) AND validates the
  minted approved term against GlossaryTerm.json — it can never produce a schema-invalid approved
  term (fail-closed on the output, not just the alignment content).
- the #250-guard teeth keyed the terms dict by 'approved'/'peer', but check_alignment prefixes
  messages with the dict key, so a real failure (e.g. non-reciprocal) whose message lacked the
  term id could slip the filter. Now keyed by id; filter catches any failure prefixed with the id.
- added teeth: missing-cosine refused + a regression test proving the #250-guard filter catches a
  holey approved term. 9 teeth total.
@mdheller
mdheller merged commit 3e22df6 into main Aug 2, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants