Uh oh!
There was an error while loading. Please reload this page.
feat(schemas): Model Plane inference-provenance contracts (T7-1/T7-3/T7-4) - #240
Conversation
There was a problem hiding this comment.
Pull request overview
Adds the first Model Plane inference-provenance schema tranche to sourceos-spec, introducing normative, validation-enforced contracts for per-completion receipts, governed escalation across residency/tier boundaries, and human-governed LoRA adapter promotion. This fits the repo’s role as the canonical contract/schema source by extending the existing Agent Machine / Model Carry vocabulary rather than forking it.
Changes:
- Introduces three new Draft 2020-12 schemas:
InferenceReceipt,EscalationDecision, andAdapterPromotionDecision. - Adds canonical JSON examples for each new schema.
- Documents the design reconciliation and rollout via ADR-0015, plus catalog + changelog updates.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| schemas/README.md | Adds a “Recent additions” section for Tranche 7 Model Plane provenance types. |
| schemas/InferenceReceipt.json | New per-completion provenance receipt schema with SEAM-015 if/then gating. |
| schemas/EscalationDecision.json | New governed tier/residency boundary decision schema with fail-closed if/then rules. |
| schemas/AdapterPromotionDecision.json | New human-governed LoRA adapter promotion decision schema with promotion “teeth”. |
| examples/inference-receipt.json | Canonical example instance for InferenceReceipt. |
| examples/escalation-decision.json | Canonical example instance for EscalationDecision. |
| examples/adapter-promotion-decision.json | Canonical example instance for AdapterPromotionDecision. |
| docs/adr/0015-model-plane-inference-provenance.md | ADR capturing reuse vs. deferrals for T7 and schema-level governance constraints. |
| CHANGELOG.md | Adds an Unreleased entry describing the new Model Plane provenance contracts and examples. |
| "sensitiveCategories": { "type": "array", "description": "Categories detected (e.g. pii, biometric, credential, health). A biometric detection forbids any crossing.", "items": { "type": "string" } } | ||
| } | ||
| }, | ||
| "grantRef": { "type": ["string", "null"], "pattern": "^urn:srcos:lease:", "description": "AgentCapabilityLease URN authorizing the crossing to the target residency class. Null when no grant exists — in which case the verdict must be refused (enforced below)." }, |
There was a problem hiding this comment.
Fixed in 03ad41e — renamed grantRef → capabilityLeaseRef across schema + example + ADR + CHANGELOG so both EscalationDecision and InferenceReceipt use one consistent name for the urn:srcos:lease: reference.
| "then": { | ||
| "required": ["capabilityLeaseRef", "escalatedFrom"], | ||
| "properties": { | ||
| "capabilityLeaseRef": { "type": "string" }, | ||
| "escalationChain": { "minItems": 1 } | ||
| } | ||
| } |
There was a problem hiding this comment.
Fixed in 03ad41e — the off-device then now lists escalationChain in required (so minItems:1 actually fires) and tightens escalatedFrom to a non-null tier enum [T0,T1,T2,T3]. Added negative tests: an off-device receipt with a missing/empty escalationChain or escalatedFrom:null now rejects. Good catch — my original negative test only covered the missing-lease case.
…T7-4) Add InferenceReceipt, EscalationDecision, and AdapterPromotionDecision atop the existing Agent Machine / Model Carry family (InferenceProvider, ModelResidency, SourceOSModelCarryRef, ExternalModelProviderProfile reused, not restated). Governance is enforced as schema if/then teeth verified to fire both ways: off-device receipt requires lease + escalation chain (SEAM-015); permitted escalation requires grant + passing T0 sensitivity check (SEAM-015); promoted adapter requires signature + consent + all eval gates (incl. adversarial probe) + human promoter + rollback target (SEAM-016/017). Optional ledgerPrevHash (hash-chain) and confidenceMethod added as review hardening. Defers T7-2 (ModelManifest/AdapterManifest vs SourceOSModelCarryRef + AdapterDescriptor name collision) and T7-5 (inference_provider agent_class vs deliberate separate-object InferenceProvider) to tracked issues; see docs/adr/0015-model-plane-inference-provenance.md.
Copilot #2: InferenceReceipt off-device gate under-enforced — escalationChain was not in the 'then' required list (minItems never fired if omitted) and escalatedFrom could still be null. Now both are required+non-null for any off-device (sovereign_cluster/external_permitted) receipt. Negative tests added: missing/empty escalationChain and null escalatedFrom now all reject. Copilot #1: unify field name — EscalationDecision.grantRef -> capabilityLeaseRef to match InferenceReceipt for the same urn:srcos:lease: concept (schema + example + ADR + CHANGELOG).
80f5043 to
03ad41eCompareUh oh!
There was an error while loading. Please reload this page.
Tranche 7 — Model Plane, first schema drop
Implements T7-1, T7-3, T7-4 from the Model Plane spec v0.1 (§XIV). Authored against the current repo, not the spec's 2026-06-09 snapshot, so it reuses the existing Agent Machine / Model Carry family (
InferenceProvider,ModelResidency,SourceOSModelCarryRef,ExternalModelProviderProfile,AgentMachineReceipt) rather than forking it.Added
schemas/InferenceReceipt.json(T7-1) — per-completion provenance primitive.schemas/EscalationDecision.json(T7-3) — governed tier / data-residency boundary crossing.schemas/AdapterPromotionDecision.json(T7-4) — human-governed LoRA-adapter promotion.schemas/README.mdfamily rows + recent-additions block,CHANGELOG.mdentry,docs/adr/0015-model-plane-inference-provenance.md.Governance is schema
if/thenteeth — verified to fire both waysInferenceReceipt(sovereign_cluster/external_permitted) cannot validate without an authorizingcapabilityLeaseRef+ non-emptyescalationChain(SEAM-015).EscalationDecisioncannot bepermittedwithout agrantRefandsensitivityCheck.result: pass;prompt-unansweredis the fail-closed resolution for non-interactive workloads (SEAM-015).AdapterPromotionDecisioncannot bepromotedwithout verified signature + per-event consent + all eval gates (incl.adversarialProbePassed) + namedpromotedBy+ mandatoryrollbackTargetDigest(SEAM-016/017).Negative tests confirm each gate rejects the bad case and admits the good case.
Review hardening (optional, additive)
ledgerPrevHashon all three (append-only-ledger hash-chaining).confidenceMethodon the receipt (the escalation trigger is self-reported).Deferred to tracked issues (design decisions, not rammed through)
ModelManifest/AdapterManifest— overlapsSourceOSModelCarryRef; "AdapterManifest" collides withAdapterDescriptor.inference_providertoAgentPassport.agent_class— the estate already models providers as the separateInferenceProviderobject (apparent deliberate choice); a 6th host-process class is a core-ontology change (breaksEXPECTED_CLASSES, touches ADR-0014).Validation run
ajv compileof all three (with sibling refs) — pass.scripts/check_duplicate_schema_ids.py— 338 unique$id, pass.Grant refs use the estate's
urn:srcos:lease:, not the spec's illustrativeurn:srcos:grant:(which does not exist).