Skip to content

Commit ee503b6

Browse files
Aitomatesclaude
andcommitted
fix(contracts): re-vendor authoritative v1.1.0 schemas; pin LF via gitattributes
The vendored common.schema.json content diverged from the pinned cas-contracts release manifest; the compatibility test correctly caught it. Re-vendored byte-identical from registry/releases/v1.1.0 and marked contracts as -text. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent ae67cdc commit ee503b6

7 files changed

Lines changed: 284 additions & 282 deletions

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Vendored cas-contracts schemas are hashed byte-for-byte — store exactly, no EOL conversion.
2+
tests/contracts/** -text
Lines changed: 103 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,103 @@
1-
{
2-
"$schema": "https://json-schema.org/draft/2020-12/schema",
3-
"$id": "https://schemas.coding-autopilot.dev/v1.1/common.schema.json",
4-
"title": "CAS Common Definitions v1.1",
5-
"$defs": {
6-
"actor": {
7-
"type": "object",
8-
"additionalProperties": false,
9-
"required": ["id", "type"],
10-
"properties": {
11-
"id": { "type": "string", "minLength": 1, "maxLength": 256 },
12-
"type": {
13-
"type": "string",
14-
"enum": ["human", "agent", "service", "workflow"]
15-
},
16-
"displayName": { "type": "string", "minLength": 1, "maxLength": 256 }
17-
}
18-
},
19-
"traceContext": {
20-
"type": "object",
21-
"additionalProperties": false,
22-
"required": ["traceparent"],
23-
"properties": {
24-
"traceparent": {
25-
"type": "string",
26-
"pattern": "^[\\da-f]{2}-[\\da-f]{32}-[\\da-f]{16}-[\\da-f]{2}$"
27-
},
28-
"tracestate": { "type": "string", "maxLength": 512 }
29-
}
30-
},
31-
"lifecycleMetadata": {
32-
"type": "object",
33-
"required": [
34-
"correlationId",
35-
"promptId",
36-
"runId",
37-
"repo",
38-
"actor",
39-
"timestamp",
40-
"schemaVersion",
41-
"traceContext"
42-
],
43-
"properties": {
44-
"correlationId": { "type": "string", "minLength": 1, "maxLength": 128 },
45-
"promptId": { "type": "string", "minLength": 1, "maxLength": 128 },
46-
"runId": { "type": "string", "minLength": 1, "maxLength": 128 },
47-
"repo": {
48-
"type": "string",
49-
"pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$"
50-
},
51-
"actor": { "$ref": "#/$defs/actor" },
52-
"timestamp": { "type": "string", "format": "date-time" },
53-
"schemaVersion": { "const": "1.1.0" },
54-
"traceContext": { "$ref": "#/$defs/traceContext" }
55-
}
56-
},
57-
"evidence": {
58-
"type": "object",
59-
"additionalProperties": false,
60-
"required": ["kind", "uri"],
61-
"properties": {
62-
"kind": { "type": "string", "minLength": 1, "maxLength": 64 },
63-
"uri": { "type": "string", "format": "uri" },
64-
"sha256": { "type": "string", "pattern": "^[\\da-f]{64}$" }
65-
}
66-
},
67-
"phaseId": {
68-
"type": "string",
69-
"enum": [
70-
"understand",
71-
"research",
72-
"analyze",
73-
"plan",
74-
"risk-assessment",
75-
"implement",
76-
"verify",
77-
"review",
78-
"improve",
79-
"document",
80-
"update-memory",
81-
"finished"
82-
]
83-
},
84-
"executionBatch": {
85-
"type": "string",
86-
"enum": ["discovery", "design", "change", "assurance", "closure"]
87-
},
88-
"phaseStatus": {
89-
"type": "string",
90-
"enum": [
91-
"pending",
92-
"ready",
93-
"running",
94-
"passed",
95-
"failed",
96-
"invalidated",
97-
"rolled-back",
98-
"waiting",
99-
"terminal"
100-
]
101-
}
102-
}
103-
}
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://schemas.coding-autopilot.dev/v1.1/common.schema.json",
4+
"title": "CAS Common Definitions v1.1",
5+
"$defs": {
6+
"actor": {
7+
"type": "object",
8+
"additionalProperties": false,
9+
"required": ["id", "type"],
10+
"properties": {
11+
"id": { "type": "string", "minLength": 1, "maxLength": 256 },
12+
"type": {
13+
"type": "string",
14+
"enum": ["human", "agent", "service", "workflow"]
15+
},
16+
"displayName": { "type": "string", "minLength": 1, "maxLength": 256 }
17+
}
18+
},
19+
"traceContext": {
20+
"type": "object",
21+
"additionalProperties": false,
22+
"required": ["traceparent"],
23+
"properties": {
24+
"traceparent": {
25+
"type": "string",
26+
"pattern": "^[\\da-f]{2}-[\\da-f]{32}-[\\da-f]{16}-[\\da-f]{2}$"
27+
},
28+
"tracestate": { "type": "string", "maxLength": 512 }
29+
}
30+
},
31+
"lifecycleMetadata": {
32+
"type": "object",
33+
"required": [
34+
"correlationId",
35+
"promptId",
36+
"runId",
37+
"repo",
38+
"actor",
39+
"timestamp",
40+
"schemaVersion",
41+
"traceContext"
42+
],
43+
"properties": {
44+
"correlationId": { "type": "string", "minLength": 1, "maxLength": 128 },
45+
"promptId": { "type": "string", "minLength": 1, "maxLength": 128 },
46+
"runId": { "type": "string", "minLength": 1, "maxLength": 128 },
47+
"repo": {
48+
"type": "string",
49+
"pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$"
50+
},
51+
"actor": { "$ref": "#/$defs/actor" },
52+
"timestamp": { "type": "string", "format": "date-time" },
53+
"schemaVersion": { "const": "1.1.0" },
54+
"traceContext": { "$ref": "#/$defs/traceContext" }
55+
}
56+
},
57+
"evidence": {
58+
"type": "object",
59+
"additionalProperties": false,
60+
"required": ["kind", "uri"],
61+
"properties": {
62+
"kind": { "type": "string", "minLength": 1, "maxLength": 64 },
63+
"uri": { "type": "string", "format": "uri" },
64+
"sha256": { "type": "string", "pattern": "^[\\da-f]{64}$" }
65+
}
66+
},
67+
"phaseId": {
68+
"type": "string",
69+
"enum": [
70+
"understand",
71+
"research",
72+
"analyze",
73+
"plan",
74+
"risk-assessment",
75+
"implement",
76+
"verify",
77+
"review",
78+
"improve",
79+
"document",
80+
"update-memory",
81+
"finished"
82+
]
83+
},
84+
"executionBatch": {
85+
"type": "string",
86+
"enum": ["discovery", "design", "change", "assurance", "closure"]
87+
},
88+
"phaseStatus": {
89+
"type": "string",
90+
"enum": [
91+
"pending",
92+
"ready",
93+
"running",
94+
"passed",
95+
"failed",
96+
"invalidated",
97+
"rolled-back",
98+
"waiting",
99+
"terminal"
100+
]
101+
}
102+
}
103+
}
Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
1-
{
2-
"$schema": "https://json-schema.org/draft/2020-12/schema",
3-
"$id": "https://schemas.coding-autopilot.dev/v1.1/phase-execution-request.schema.json",
4-
"title": "PhaseExecutionRequest",
5-
"type": "object",
6-
"allOf": [
7-
{ "$ref": "common.schema.json#/$defs/lifecycleMetadata" },
8-
{
9-
"type": "object",
10-
"required": ["kind", "profileVersion", "phase", "batch", "goal", "constraints"],
11-
"properties": {
12-
"kind": { "const": "PhaseExecutionRequest" },
13-
"profileVersion": { "type": "string", "const": "v1.1" },
14-
"phase": { "$ref": "common.schema.json#/$defs/phaseId" },
15-
"batch": { "$ref": "common.schema.json#/$defs/executionBatch" },
16-
"goal": { "type": "string", "minLength": 1, "maxLength": 5000 },
17-
"constraints": {
18-
"type": "array",
19-
"items": { "type": "string", "minLength": 1, "maxLength": 1000 }
20-
},
21-
"validatedInputs": { "type": "array", "items": { "type": "string" } },
22-
"priorEvidence": { "type": "array", "items": { "$ref": "common.schema.json#/$defs/evidence" } },
23-
"requiredOutputSchema": { "type": "string", "minLength": 1, "maxLength": 256 },
24-
"requiredArtifacts": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 256 } },
25-
"successCriteria": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 1000 } },
26-
"verifier": { "type": "string", "minLength": 1, "maxLength": 256 },
27-
"failureBehavior": { "type": "string", "minLength": 1, "maxLength": 5000 },
28-
"rollbackBehavior": { "type": "string", "minLength": 1, "maxLength": 5000 },
29-
"memoryCandidateFields": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 256 } },
30-
"humanEscalationConditions": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 1000 } }
31-
}
32-
}
33-
],
34-
"unevaluatedProperties": false
35-
}
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://schemas.coding-autopilot.dev/v1.1/phase-execution-request.schema.json",
4+
"title": "PhaseExecutionRequest",
5+
"type": "object",
6+
"allOf": [
7+
{ "$ref": "common.schema.json#/$defs/lifecycleMetadata" },
8+
{
9+
"type": "object",
10+
"required": ["kind", "profileVersion", "phase", "batch", "goal", "constraints"],
11+
"properties": {
12+
"kind": { "const": "PhaseExecutionRequest" },
13+
"profileVersion": { "type": "string", "const": "v1.1" },
14+
"phase": { "$ref": "common.schema.json#/$defs/phaseId" },
15+
"batch": { "$ref": "common.schema.json#/$defs/executionBatch" },
16+
"goal": { "type": "string", "minLength": 1, "maxLength": 5000 },
17+
"constraints": {
18+
"type": "array",
19+
"items": { "type": "string", "minLength": 1, "maxLength": 1000 }
20+
},
21+
"validatedInputs": { "type": "array", "items": { "type": "string" } },
22+
"priorEvidence": { "type": "array", "items": { "$ref": "common.schema.json#/$defs/evidence" } },
23+
"requiredOutputSchema": { "type": "string", "minLength": 1, "maxLength": 256 },
24+
"requiredArtifacts": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 256 } },
25+
"successCriteria": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 1000 } },
26+
"verifier": { "type": "string", "minLength": 1, "maxLength": 256 },
27+
"failureBehavior": { "type": "string", "minLength": 1, "maxLength": 5000 },
28+
"rollbackBehavior": { "type": "string", "minLength": 1, "maxLength": 5000 },
29+
"memoryCandidateFields": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 256 } },
30+
"humanEscalationConditions": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 1000 } }
31+
}
32+
}
33+
],
34+
"unevaluatedProperties": false
35+
}
Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
{
2-
"$schema": "https://json-schema.org/draft/2020-12/schema",
3-
"$id": "https://schemas.coding-autopilot.dev/v1.1/phase-execution-result.schema.json",
4-
"title": "PhaseExecutionResult",
5-
"type": "object",
6-
"allOf": [
7-
{ "$ref": "common.schema.json#/$defs/lifecycleMetadata" },
8-
{
9-
"type": "object",
10-
"required": ["kind", "phase", "status", "promptDigest"],
11-
"properties": {
12-
"kind": { "const": "PhaseExecutionResult" },
13-
"phase": { "$ref": "common.schema.json#/$defs/phaseId" },
14-
"batch": { "$ref": "common.schema.json#/$defs/executionBatch" },
15-
"status": { "$ref": "common.schema.json#/$defs/phaseStatus" },
16-
"promptDigest": { "type": "string", "pattern": "^[\\da-f]{64}$" },
17-
"artifacts": { "type": "array", "items": { "$ref": "common.schema.json#/$defs/evidence" } },
18-
"output": { "type": "object" },
19-
"promptMetadata": { "type": "object" },
20-
"sanitizedPrompt": { "type": "string", "maxLength": 50000 },
21-
"verifier": { "type": "string", "minLength": 1, "maxLength": 256 },
22-
"checkpoint": { "type": "string", "minLength": 1, "maxLength": 256 }
23-
}
24-
}
25-
],
26-
"unevaluatedProperties": false
27-
}
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://schemas.coding-autopilot.dev/v1.1/phase-execution-result.schema.json",
4+
"title": "PhaseExecutionResult",
5+
"type": "object",
6+
"allOf": [
7+
{ "$ref": "common.schema.json#/$defs/lifecycleMetadata" },
8+
{
9+
"type": "object",
10+
"required": ["kind", "phase", "status", "promptDigest"],
11+
"properties": {
12+
"kind": { "const": "PhaseExecutionResult" },
13+
"phase": { "$ref": "common.schema.json#/$defs/phaseId" },
14+
"batch": { "$ref": "common.schema.json#/$defs/executionBatch" },
15+
"status": { "$ref": "common.schema.json#/$defs/phaseStatus" },
16+
"promptDigest": { "type": "string", "pattern": "^[\\da-f]{64}$" },
17+
"artifacts": { "type": "array", "items": { "$ref": "common.schema.json#/$defs/evidence" } },
18+
"output": { "type": "object" },
19+
"promptMetadata": { "type": "object" },
20+
"sanitizedPrompt": { "type": "string", "maxLength": 50000 },
21+
"verifier": { "type": "string", "minLength": 1, "maxLength": 256 },
22+
"checkpoint": { "type": "string", "minLength": 1, "maxLength": 256 }
23+
}
24+
}
25+
],
26+
"unevaluatedProperties": false
27+
}
Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
{
2-
"$schema": "https://json-schema.org/draft/2020-12/schema",
3-
"$id": "https://schemas.coding-autopilot.dev/v1.1/phase-verification-result.schema.json",
4-
"title": "PhaseVerificationResult",
5-
"type": "object",
6-
"allOf": [
7-
{ "$ref": "common.schema.json#/$defs/lifecycleMetadata" },
8-
{
9-
"type": "object",
10-
"required": ["kind", "phase", "verifier", "outcome"],
11-
"properties": {
12-
"kind": { "const": "PhaseVerificationResult" },
13-
"phase": { "$ref": "common.schema.json#/$defs/phaseId" },
14-
"verifier": { "type": "string", "minLength": 1, "maxLength": 256 },
15-
"outcome": { "enum": ["passed", "failed", "inconclusive"] },
16-
"invalidatedPhaseIds": {
17-
"type": "array",
18-
"items": { "$ref": "common.schema.json#/$defs/phaseId" },
19-
"uniqueItems": true
20-
},
21-
"evidence": { "type": "array", "items": { "$ref": "common.schema.json#/$defs/evidence" } },
22-
"reason": { "type": "string", "maxLength": 5000 }
23-
}
24-
}
25-
],
26-
"unevaluatedProperties": false
27-
}
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://schemas.coding-autopilot.dev/v1.1/phase-verification-result.schema.json",
4+
"title": "PhaseVerificationResult",
5+
"type": "object",
6+
"allOf": [
7+
{ "$ref": "common.schema.json#/$defs/lifecycleMetadata" },
8+
{
9+
"type": "object",
10+
"required": ["kind", "phase", "verifier", "outcome"],
11+
"properties": {
12+
"kind": { "const": "PhaseVerificationResult" },
13+
"phase": { "$ref": "common.schema.json#/$defs/phaseId" },
14+
"verifier": { "type": "string", "minLength": 1, "maxLength": 256 },
15+
"outcome": { "enum": ["passed", "failed", "inconclusive"] },
16+
"invalidatedPhaseIds": {
17+
"type": "array",
18+
"items": { "$ref": "common.schema.json#/$defs/phaseId" },
19+
"uniqueItems": true
20+
},
21+
"evidence": { "type": "array", "items": { "$ref": "common.schema.json#/$defs/evidence" } },
22+
"reason": { "type": "string", "maxLength": 5000 }
23+
}
24+
}
25+
],
26+
"unevaluatedProperties": false
27+
}

0 commit comments

Comments
 (0)