Schemas, examples and a flag registry for the twelve HUX cards, a dependency-free validator, the governance rules (memory ledger, autonomy matrix, friendly modes mapped to real Switchyard routes, privacy defaults, suggestion gating, release state machine) and the contract doc UI work codes against. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RNPhwu2bsaRNg3DETSAZoM
58 lines
3.1 KiB
JSON
58 lines
3.1 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://hermes.bstein.dev/contracts/hux/v1/release.schema.json",
|
|
"title": "HUX release state",
|
|
"description": "Deployment follow-through (HUX-12). One record per reviewed commit per workload. The state machine is linear and every forward transition requires named evidence, so merged, built and deployed can never be conflated: built needs a Harbor digest, deployed needs the Flux revision, converged needs the running pod digest to equal the built digest, live_verified needs a health probe.",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["schema", "id", "workload", "commit", "state", "evidence", "transitions"],
|
|
"properties": {
|
|
"schema": {"const": "hux.release.v1"},
|
|
"id": {"$ref": "common.schema.json#/$defs/id"},
|
|
"workload": {"type": "string", "enum": ["hermes-chat-router", "hermes-chat-tenant", "hermes-webui", "hermes-agent", "hermes-switchyard"]},
|
|
"feature_flags": {"type": "array", "uniqueItems": true, "items": {"type": "string", "pattern": "^hux\\.[a-z_]+$"}},
|
|
"commit": {"type": "string", "pattern": "^[0-9a-f]{40}$"},
|
|
"state": {"type": "string", "enum": ["reviewed", "merged", "built", "verified", "deployed", "converged", "live_verified", "rolled_back"]},
|
|
"evidence": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"review_url": {"type": "string", "maxLength": 500},
|
|
"merge_commit": {"type": "string", "pattern": "^[0-9a-f]{40}$"},
|
|
"ci_build_url": {"type": "string", "maxLength": 500},
|
|
"image_ref": {"type": "string", "pattern": "^[a-z0-9./-]+:[A-Za-z0-9._-]+@sha256:[0-9a-f]{64}$"},
|
|
"image_digest": {"$ref": "common.schema.json#/$defs/sha256"},
|
|
"harbor_digest": {"$ref": "common.schema.json#/$defs/sha256"},
|
|
"flux_revision": {"type": "string", "pattern": "^main@sha1:[0-9a-f]{40}$"},
|
|
"pod_digest": {"$ref": "common.schema.json#/$defs/sha256"},
|
|
"health_check": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["url", "status", "at"],
|
|
"properties": {
|
|
"url": {"type": "string", "maxLength": 500},
|
|
"status": {"type": "string", "enum": ["pass", "fail"]},
|
|
"at": {"$ref": "common.schema.json#/$defs/timestamp"}
|
|
}
|
|
},
|
|
"rollback_target": {"$ref": "common.schema.json#/$defs/sha256"}
|
|
}
|
|
},
|
|
"transitions": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["from", "to", "at", "by"],
|
|
"properties": {
|
|
"from": {"type": "string", "enum": ["reviewed", "merged", "built", "verified", "deployed", "converged", "live_verified", "rolled_back"]},
|
|
"to": {"type": "string", "enum": ["reviewed", "merged", "built", "verified", "deployed", "converged", "live_verified", "rolled_back"]},
|
|
"at": {"$ref": "common.schema.json#/$defs/timestamp"},
|
|
"by": {"$ref": "common.schema.json#/$defs/actor"},
|
|
"evidence": {"type": "array", "items": {"$ref": "common.schema.json#/$defs/evidence_ref"}}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|