Skip to content

feat(conformance): AgentPassport good/bad fixtures + validator patch [T5-1..T5-5] - #47

Merged
mdheller merged 1 commit into
mainfrom
feat/t5-agent-passport-conformance
Jul 31, 2026
Merged

feat(conformance): AgentPassport good/bad fixtures + validator patch [T5-1..T5-5]#47
mdheller merged 1 commit into
mainfrom
feat/t5-agent-passport-conformance

Conversation

@mdheller

Copy link
Copy Markdown
Member

Implements Tranche T5. AgentPassport conformance fixtures + agent-class validation, consuming sourceos-spec T0-1.

Verification

  • make validate → exit 0: VALID (good): conformance/good/agent-passport-classified.json; both bad fixtures OK: failed as expected; all pre-existing fixtures intact.
  • Rejection messages: unclassified → 'unclassified agents are not permitted (anySource is not a valid class)'; self-elevated → 'third_party cannot claim system_core capabilities'.

Acceptance

  • T5-1 good/agent-passport-classified.json validates
  • T5-2 bad/agent-passport-unclassified.json → non-zero, error contains 'unclassified'/'anySource'
  • T5-3 bad/agent-passport-self-elevated.json → non-zero, error references class elevation
  • T5-4/5 semantic/agent-system.jsonld import + validate_contract.py patch (reject unclassified, reject third_party suppress/system_bundle, structured errors)

Closes the T5 tranche.

…(T5-1..T5-5)

Consumes the AgentPassport model (sourceos-spec T0-1):
- conformance/good/agent-passport-classified.json: valid third_party passport.
- conformance/bad/agent-passport-unclassified.json: no agent_class -> rejected
  ('unclassified agents are not permitted; anySource is not a valid class').
- conformance/bad/agent-passport-self-elevated.json: third_party with
  suppress_user_authorization_prompt+system_bundle -> rejected (class elevation).
- tools/validate_contract.py: route kind:AgentPassport to agent-class rules.
- semantic/agent-system.jsonld: vocabulary import (mirrors T0-3).

make validate (PY=python3) green: good passes, both bad fail as expected. Closes the T5 tranche.
Copilot AI review requested due to automatic review settings July 31, 2026 05:10
@mdheller
mdheller merged commit d08e7db into main Jul 31, 2026
5 checks passed
@mdheller
mdheller deleted the feat/t5-agent-passport-conformance branch July 31, 2026 05:11

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

Implements Tranche T5 AgentPassport conformance by adding good/bad fixtures, importing the agent-system JSON-LD vocabulary, and extending the validator to enforce AgentPassport agent-class governance invariants outside the WorkstationContract schema.

Changes:

  • Added AgentPassport validation path to tools/validate_contract.py with class allowlist and elevation rejection for third_party.
  • Introduced semantic/agent-system.jsonld vocabulary import used by conformance artifacts.
  • Added AgentPassport conformance fixtures under conformance/good and conformance/bad.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tools/validate_contract.py Adds AgentPassport-specific validation rules (class allowlist + elevation rejection) and bypasses WorkstationContract schema for that kind.
semantic/agent-system.jsonld Adds JSON-LD vocabulary import for agent-system terms used in conformance.
conformance/good/agent-passport-classified.json Adds a “good” AgentPassport fixture expected to validate.
conformance/bad/agent-passport-unclassified.json Adds a “bad” AgentPassport fixture expected to fail due to missing/invalid class.
conformance/bad/agent-passport-self-elevated.json Adds a “bad” AgentPassport fixture expected to fail due to class elevation flags.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +83 to +90
agent_class = doc.get("agent_class")
if agent_class not in AGENT_CLASSES:
print(
f"FAIL agent.class: {p}: unclassified agents are not permitted "
f"(agent_class={agent_class!r}; anySource is not a valid class)",
file=sys.stderr,
)
return False
Comment on lines +91 to +94
if agent_class == "third_party" and (
doc.get("suppress_user_authorization_prompt") is True
or doc.get("system_bundle") is True
):
"rdfs": "http://www.w3.org/2000/01/rdf-schema#"
},
"@id": "https://spec.sourceos.dev/vocab/agent-system",
"rdfs:comment": "Agent-system vocabulary import for workstation-contracts conformance. Mirrors the canonical seed in sourceos-spec (T0-3: semantic/agent-system-vocabulary.jsonld) and the OWL/SHACL realization in ontogenesis (T1). Terms: AgentClass, PermissionFlag, ManagedSpace, SeamDefinition, CapabilityException, BundleIdentity.",
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