feat(contracts): add AttestationDecision schema + examples + validator [T2-1/T2-2/T2-4/5] - #121
Merged
Merged
Conversation
…r (T2-1/2/4/5) Host-attestation decision contract. activation_permitted is true IFF all eight blocking checks pass (SIP/NVRAM/MDM/SEP/SECURITY_DB/DNS/TLS/EFI); advisory checks (TELEMETRY_BOUNDARY/SEAM-013, DISPLAY_UUID_STABILITY/SEAM-008) warn only. - contracts/attestation-decision.schema.json (urn:...:attestation-decision:v0.1.0) - examples: passed (activation_permitted true), failed-sip, failed-mdm (both false) - scripts/validate-attestation.py: enforces the fail-closed rule + 8 blocking checks present + overall_status consistency; wired into make validate - src/agent_machine/contracts.py: register AttestationDecision in schema_by_kind - docs/architecture/attestation-model.md (T2-2) T2-3 runtime attest CLI deferred to a macOS attestation env. This contract is what T4-4 depends on. Closes the T2 contract scope.
There was a problem hiding this comment.
Pull request overview
Adds the new AttestationDecision contract to the Agent Machine contracts layer, including schema, examples, and CI/Makefile validation hooks, plus architecture documentation describing how host attestation gates activation.
Changes:
- Added
AttestationDecisionJSON Schema (draft 2020-12) and registered it forvalidate-jsonkind mapping. - Added three attestation decision example fixtures (pass / failed-sip / failed-mdm).
- Added a dedicated validator and wired it into
make validate, plus added an architecture doc for the attestation model.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/agent_machine/contracts.py | Registers AttestationDecision so kind-based JSON validation can locate the schema. |
| scripts/validate-attestation.py | Adds a dedicated validator to enforce fail-closed activation + required blocking checks and fixture expectations. |
| Makefile | Wires validate-attestation into the overall validate target. |
| contracts/attestation-decision.schema.json | Introduces the AttestationDecision JSON Schema (v0.1.0). |
| examples/attestation-decision.passed.json | Adds a passing attestation fixture. |
| examples/attestation-decision.failed-sip.json | Adds a SIP-failure attestation fixture. |
| examples/attestation-decision.failed-mdm.json | Adds an MDM-failure attestation fixture. |
| docs/architecture/attestation-model.md | Documents the attestation vs activation model and check taxonomy. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+20
to
+24
| try: | ||
| import jsonschema | ||
| except ImportError: # pragma: no cover | ||
| print("ERR: jsonschema not installed", file=sys.stderr) | ||
| sys.exit(2) |
Comment on lines
+53
to
+55
| for name, expect_permitted in EXAMPLES.items(): | ||
| path = ROOT / "examples" / f"attestation-decision.{name}.json" | ||
| doc = load(path) |
Comment on lines
+18
to
+21
| "check_results": { | ||
| "type": "array", | ||
| "minItems": 1, | ||
| "items": { |
Comment on lines
+84
to
+89
| "check_id": "DISPLAY_UUID_STABILITY", | ||
| "check_name": "Display UUID stability (SEAM-008)", | ||
| "status": "warn", | ||
| "expected": "stable displayUUID", | ||
| "actual": "stable displayUUID", | ||
| "blocking": false |
Comment on lines
+84
to
+89
| "check_id": "DISPLAY_UUID_STABILITY", | ||
| "check_name": "Display UUID stability (SEAM-008)", | ||
| "status": "warn", | ||
| "expected": "stable displayUUID", | ||
| "actual": "stable displayUUID", | ||
| "blocking": false |
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.
Implements the T2 contract scope (T2-1 schema, T2-2 docs, T2-4/5 examples + validator). The runtime
attestCLI (T2-3, real system probes) is deferred to a macOS attestation environment.What
contracts/attestation-decision.schema.json— host attestation decision.scripts/validate-attestation.py— enforces activation_permitted ⇔ all 8 blocking checks pass, all required blocking checks present, and overall_status consistency. Wired intomake validate.src/agent_machine/contracts.py— register AttestationDecision kind (sovalidate-jsonmaps it).docs/architecture/attestation-model.md.Verification
make validate-attestation→OK: AttestationDecision schema + 3 examples valid; fail-closed activation rule and 8 blocking checks enforcedmake validate-json→ exit 0; all 3 examples map to the schema and validate.Acceptance
Unblocks T4-4 (mcp-a2a-zero-trust agent-machine-provider references the AttestationDecision URN). Closes #120