feat(vocab): emit conformant draft GlossaryTerms from the currency loop (task #13) - #256
Merged
Conversation
…op (task #13) Closes the currency→proposal lifecycle. Each remediation step now emits a status:draft GlossaryTerm artifact (result.proposedTerms) for the token it connects — directly ingestible by ontogenesis for the 3-method alignment pass. The loop PROPOSES only: partOfSpeech, alignment, and approval are downstream; status stays draft (the loop never self-approves). The CI harness refuses any proposed term that doesn't conform to GlossaryTerm.json or that isn't status:draft, so the loop can't push malformed or self-approved vocab into the glossary. 6 teeth.
There was a problem hiding this comment.
Pull request overview
This PR extends the LIVE vocab-currency GovernedLoop to emit remediation artifacts as conformant GlossaryTerm draft proposals (result.proposedTerms), closing the currency → proposal lifecycle so downstream ontogenesis can ingest the loop’s outputs without the loop self-approving terms.
Changes:
- Add
proposed_term(...)generation and include emitted draftGlossaryTermartifacts inresult.proposedTerms(and per-connected token metadata). - Harden CI validation to require every emitted proposal conforms to
schemas/GlossaryTerm.jsonand hasstatus: "draft". - Document the emitted remediation artifacts in the vocab-currency loop spec and changelog.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tools/vocab_currency_loop.py | Emits conformant draft GlossaryTerm proposal artifacts during each remediation step and surfaces them as result.proposedTerms. |
| tools/validate_vocab_currency_loop.py | Adds a validator check to ensure emitted proposed terms conform to GlossaryTerm.json and remain status:draft. |
| specs/vocab-currency-loop.md | Documents the new remediation artifact emission contract (result.proposedTerms). |
| CHANGELOG.md | Records the new draft-term emission behavior and the added CI “tooth” enforcing schema conformance + draft status. |
Comment on lines
+58
to
+69
| gt = jsonschema.Draft202012Validator(vcl.load(GLOSSARY_SCHEMA)) | ||
| proposals = r.get("proposedTerms", []) + run("corpus_divergent.json").get("proposedTerms", []) | ||
| bad = [(t.get("id"), e.message) for t in proposals for e in gt.iter_errors(t)] | ||
| self_approved = [t["id"] for t in proposals if t.get("status") != "draft"] | ||
| if bad: | ||
| FAILURES.append(f"proposed term(s) do not conform to GlossaryTerm.json: {bad[:3]}") | ||
| elif self_approved: | ||
| FAILURES.append(f"proposed term(s) not status:draft — the loop must not self-approve: {self_approved[:3]}") | ||
| elif not proposals: | ||
| FAILURES.append("expected the loop to emit proposed draft terms, got none") | ||
| else: | ||
| CHECKS["proposed-terms:conform-and-draft"] = True |
…osal reports, not crashes (Copilot #256) A proposal missing 'id' is exactly what the conformance check should surface; using t['id'] (computed before the 'if bad' branch) would KeyError-crash first. Use t.get('id').
This was referenced Aug 2, 2026
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.
Close the currency → proposal lifecycle
Builds on the merged vocab-currency loop (#255). The loop detected divergence and named the unnamed terms; now it emits them as artifacts ontogenesis can ingest.
Each remediation step emits a conformant status:draft
GlossaryTerminresult.proposedTermsfor the token it connects. The loop proposes only —partOfSpeech,alignment, and approval are the downstream 3-method pass; status staysdraft, so the loop never self-approves.Teeth (
make validate-vocab-currency-loop, now 6)GlossaryTerm.jsonand be status:draft— the loop may not push malformed or self-approved vocab into the glossary.Sample emitted artifact:
{ "id": "urn:srcos:glossary:quarantine", "type": "GlossaryTerm", "specVersion": "2.0.0", "name": "quarantine", "definition": "Proposed by vocab-currency loop …", "status": "draft" }This is the ontogenesis on-ramp: currency detection (#255) → conformant draft proposals (here) → 3-method alignment (downstream). Dependency-free.