Skip to content

feat(contracts): add AttestationDecision schema + examples + validator [T2-1/T2-2/T2-4/5] - #121

Merged
mdheller merged 1 commit into
mainfrom
feat/t2-attestation-decision
Jul 31, 2026
Merged

feat(contracts): add AttestationDecision schema + examples + validator [T2-1/T2-2/T2-4/5]#121
mdheller merged 1 commit into
mainfrom
feat/t2-attestation-decision

Conversation

@mdheller

Copy link
Copy Markdown
Contributor

Implements the T2 contract scope (T2-1 schema, T2-2 docs, T2-4/5 examples + validator). The runtime attest CLI (T2-3, real system probes) is deferred to a macOS attestation environment.

What

  • contracts/attestation-decision.schema.json — host attestation decision.
  • examples: passed / failed-sip / failed-mdm.
  • scripts/validate-attestation.py — enforces activation_permitted ⇔ all 8 blocking checks pass, all required blocking checks present, and overall_status consistency. Wired into make validate.
  • src/agent_machine/contracts.py — register AttestationDecision kind (so validate-json maps it).
  • docs/architecture/attestation-model.md.

Verification

  • make validate-attestationOK: AttestationDecision schema + 3 examples valid; fail-closed activation rule and 8 blocking checks enforced
  • make validate-json → exit 0; all 3 examples map to the schema and validate.

Acceptance

  • Schema validates (draft 2020-12)
  • activation_permitted false if ANY blocking check fails; true only if ALL pass
  • examples/attestation-decision.{passed,failed-sip,failed-mdm}.json validate; failed-* have activation_permitted:false
  • make validate passes
  • T2-3 attest subcommand — deferred (macOS attestation env)

Unblocks T4-4 (mcp-a2a-zero-trust agent-machine-provider references the AttestationDecision URN). Closes #120

…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.
Copilot AI review requested due to automatic review settings July 31, 2026 05:16
@mdheller
mdheller merged commit 8160a80 into main Jul 31, 2026
4 checks passed
@mdheller
mdheller deleted the feat/t2-attestation-decision branch July 31, 2026 05:18

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 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 AttestationDecision JSON Schema (draft 2020-12) and registered it for validate-json kind 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
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.

feat(contracts): add AttestationDecision schema + examples + validator [T2-1/T2-2/T2-4/5]

2 participants