|
1 | 1 | { |
2 | 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", |
3 | | - "$id": "https://example.invalid/hermes-config-audit.schema.json", |
4 | 3 | "type": "object", |
| 4 | + "additionalProperties": false, |
5 | 5 | "required": [ |
6 | 6 | "schemaVersion", |
7 | | - "command", |
8 | | - "generatedAt", |
9 | | - "readOnly", |
10 | 7 | "provenance", |
11 | | - "surfaces", |
12 | | - "findings", |
13 | | - "moduleSummary", |
14 | | - "limits", |
15 | | - "safety" |
| 8 | + "applicationInventory", |
| 9 | + "moduleInventory", |
| 10 | + "local", |
| 11 | + "comparison", |
| 12 | + "limits" |
16 | 13 | ], |
17 | 14 | "properties": { |
18 | | - "schemaVersion": { "const": 4 }, |
19 | | - "command": { "const": "audit" }, |
20 | | - "generatedAt": { "type": "string", "format": "date-time" }, |
21 | | - "readOnly": { "const": true }, |
| 15 | + "schemaVersion": { "const": 5 }, |
22 | 16 | "provenance": { |
23 | 17 | "type": "object", |
| 18 | + "additionalProperties": false, |
24 | 19 | "required": [ |
25 | 20 | "selection", |
26 | 21 | "lockedSha", |
27 | 22 | "resolvedSha", |
28 | 23 | "owner", |
29 | 24 | "repo", |
30 | 25 | "targetRepo", |
31 | | - "targetDirty", |
32 | | - "host" |
| 26 | + "host", |
| 27 | + "backend" |
33 | 28 | ], |
34 | 29 | "properties": { |
35 | 30 | "selection": { "enum": ["locked", "latest"] }, |
|
38 | 33 | "owner": { "type": "string", "minLength": 1 }, |
39 | 34 | "repo": { "type": "string", "minLength": 1 }, |
40 | 35 | "targetRepo": { "type": "string", "minLength": 1 }, |
41 | | - "targetDirty": { "type": "boolean" }, |
42 | 36 | "host": { "type": "string", "minLength": 1 }, |
| 37 | + "backend": { "enum": ["gh-api", "git-object"] }, |
| 38 | + "latestSha": { "$ref": "#/$defs/sha" }, |
43 | 39 | "resolvedAt": { "type": "string", "format": "date-time" } |
44 | | - }, |
45 | | - "allOf": [ |
46 | | - { |
47 | | - "if": { "properties": { "selection": { "const": "latest" } } }, |
48 | | - "then": { "required": ["resolvedAt"] } |
49 | | - } |
50 | | - ] |
| 40 | + } |
| 41 | + }, |
| 42 | + "applicationInventory": { |
| 43 | + "type": "object", |
| 44 | + "additionalProperties": false, |
| 45 | + "required": ["entries", "diagnostics", "completeness"], |
| 46 | + "properties": { |
| 47 | + "entries": { "type": "array", "items": { "$ref": "#/$defs/applicationEntry" } }, |
| 48 | + "diagnostics": { "type": "array", "items": { "type": "string" } }, |
| 49 | + "completeness": { "type": "string" }, |
| 50 | + "latestComparison": { "$ref": "#/$defs/latestComparison" } |
| 51 | + } |
51 | 52 | }, |
52 | | - "surfaces": { |
| 53 | + "moduleInventory": { |
53 | 54 | "type": "object", |
54 | | - "required": ["runtime", "module", "host"], |
| 55 | + "additionalProperties": false, |
| 56 | + "required": ["entries", "completeness"], |
55 | 57 | "properties": { |
56 | | - "runtime": { |
| 58 | + "entries": { "type": "array", "items": { "$ref": "#/$defs/moduleEntry" } }, |
| 59 | + "completeness": { "type": "string" }, |
| 60 | + "latestComparison": { "$ref": "#/$defs/latestComparison" } |
| 61 | + } |
| 62 | + }, |
| 63 | + "local": { |
| 64 | + "oneOf": [ |
| 65 | + { |
57 | 66 | "type": "object", |
58 | | - "required": ["contracts", "defaultCount"], |
59 | | - "properties": { |
60 | | - "contracts": { "type": "object" }, |
61 | | - "defaultCount": { "type": "integer", "minimum": 0 } |
62 | | - } |
| 67 | + "additionalProperties": false, |
| 68 | + "required": ["available", "reason"], |
| 69 | + "properties": { "available": { "const": false }, "reason": { "type": "string" } } |
63 | 70 | }, |
64 | | - "module": { |
| 71 | + { |
65 | 72 | "type": "object", |
| 73 | + "additionalProperties": false, |
66 | 74 | "required": [ |
67 | | - "source", |
68 | | - "optionCount", |
69 | | - "options", |
70 | | - "completeness", |
71 | | - "diagnostics", |
72 | | - "generation" |
| 75 | + "available", |
| 76 | + "enabled", |
| 77 | + "mode", |
| 78 | + "configFileSet", |
| 79 | + "nativeShape", |
| 80 | + "applicationShape" |
73 | 81 | ], |
74 | 82 | "properties": { |
75 | | - "source": { "type": "string" }, |
76 | | - "optionCount": { "type": "integer" }, |
77 | | - "options": { "type": "array", "items": { "$ref": "#/$defs/option" } }, |
78 | | - "completeness": { "type": "string" }, |
79 | | - "diagnostics": { "type": "array", "items": { "type": "string" } }, |
80 | | - "generation": { "type": "object" } |
| 83 | + "available": { "const": true }, |
| 84 | + "enabled": { "type": "boolean" }, |
| 85 | + "mode": { "enum": ["disabled", "generated", "configFile"] }, |
| 86 | + "configFileSet": { "type": "boolean" }, |
| 87 | + "nativeShape": { "type": "object" }, |
| 88 | + "applicationShape": { "type": ["object", "null"] } |
81 | 89 | } |
| 90 | + } |
| 91 | + ] |
| 92 | + }, |
| 93 | + "comparison": { |
| 94 | + "oneOf": [ |
| 95 | + { |
| 96 | + "type": "object", |
| 97 | + "additionalProperties": false, |
| 98 | + "required": ["available", "reason"], |
| 99 | + "properties": { "available": { "const": false }, "reason": { "type": "string" } } |
82 | 100 | }, |
83 | | - "host": { |
| 101 | + { |
84 | 102 | "type": "object", |
| 103 | + "additionalProperties": false, |
85 | 104 | "required": [ |
86 | | - "host", |
87 | | - "provenance", |
88 | | - "evaluated", |
89 | | - "runtimeDocument", |
90 | | - "moduleValues", |
91 | | - "localAssignments", |
92 | | - "mode", |
93 | | - "settingsEmpty", |
94 | | - "configFileBypassesSettings", |
95 | | - "limits" |
96 | | - ] |
| 105 | + "available", |
| 106 | + "applicationAvailable", |
| 107 | + "presentInGeneratedOverride", |
| 108 | + "catalogPathsAbsentFromGeneratedOverride", |
| 109 | + "applicationMismatches", |
| 110 | + "presentInEvaluatedNativeShape", |
| 111 | + "catalogPathsAbsentFromEvaluatedNativeShape", |
| 112 | + "moduleMismatches" |
| 113 | + ], |
| 114 | + "properties": { |
| 115 | + "available": { "const": true }, |
| 116 | + "applicationAvailable": { "type": "boolean" }, |
| 117 | + "applicationReason": { "type": "string" }, |
| 118 | + "presentInGeneratedOverride": { "type": "array", "items": { "type": "string" } }, |
| 119 | + "catalogPathsAbsentFromGeneratedOverride": { |
| 120 | + "type": "array", |
| 121 | + "items": { "type": "string" } |
| 122 | + }, |
| 123 | + "applicationMismatches": { "type": "array", "items": { "$ref": "#/$defs/mismatch" } }, |
| 124 | + "presentInEvaluatedNativeShape": { "type": "array", "items": { "type": "string" } }, |
| 125 | + "catalogPathsAbsentFromEvaluatedNativeShape": { |
| 126 | + "type": "array", |
| 127 | + "items": { "type": "string" } |
| 128 | + }, |
| 129 | + "moduleMismatches": { "type": "array", "items": { "$ref": "#/$defs/mismatch" } } |
| 130 | + } |
97 | 131 | } |
98 | | - } |
99 | | - }, |
100 | | - "findings": { |
101 | | - "type": "array", |
102 | | - "items": { "$ref": "#/$defs/finding" } |
| 132 | + ] |
103 | 133 | }, |
104 | | - "moduleSummary": { |
| 134 | + "limits": { "type": "array", "items": { "type": "string" } } |
| 135 | + }, |
| 136 | + "$defs": { |
| 137 | + "sha": { "type": "string", "pattern": "^[0-9a-f]{40}$" }, |
| 138 | + "latestComparison": { |
105 | 139 | "type": "object", |
106 | | - "required": ["effectiveTopLevelValues", "optionCoverage"], |
| 140 | + "additionalProperties": false, |
| 141 | + "required": ["sha", "addedPaths", "removedPaths", "changedPaths"], |
107 | 142 | "properties": { |
108 | | - "effectiveTopLevelValues": { "type": "array" }, |
109 | | - "optionCoverage": { "const": "unavailable" } |
| 143 | + "sha": { "$ref": "#/$defs/sha" }, |
| 144 | + "addedPaths": { "type": "array", "items": { "type": "string" } }, |
| 145 | + "removedPaths": { "type": "array", "items": { "type": "string" } }, |
| 146 | + "changedPaths": { "type": "array", "items": { "type": "string" } } |
110 | 147 | } |
111 | 148 | }, |
112 | | - "limits": { "type": "array", "items": { "type": "string" } }, |
113 | | - "safety": { "type": "object", "required": ["performed", "forbidden"] } |
114 | | - }, |
115 | | - "$defs": { |
116 | | - "sha": { "type": "string", "pattern": "^[0-9a-f]{40}$" }, |
117 | 149 | "evidence": { |
118 | 150 | "type": "object", |
| 151 | + "additionalProperties": false, |
119 | 152 | "required": ["source", "line", "url", "excerpt"], |
120 | 153 | "properties": { |
121 | 154 | "source": { "type": "string" }, |
|
124 | 157 | "excerpt": { "type": "string" } |
125 | 158 | } |
126 | 159 | }, |
127 | | - "option": { |
| 160 | + "applicationEntry": { |
128 | 161 | "type": "object", |
| 162 | + "additionalProperties": false, |
129 | 163 | "required": [ |
130 | 164 | "path", |
131 | | - "typeExpression", |
132 | | - "default", |
133 | | - "example", |
134 | | - "description", |
135 | | - "declaration", |
136 | | - "mappingEvidence" |
| 165 | + "expected", |
| 166 | + "condition", |
| 167 | + "dynamic", |
| 168 | + "confidence", |
| 169 | + "migration", |
| 170 | + "evidence" |
137 | 171 | ], |
138 | 172 | "properties": { |
139 | 173 | "path": { "type": "string" }, |
140 | | - "typeExpression": { "type": ["string", "null"] }, |
141 | | - "declaration": { "$ref": "#/$defs/evidence" }, |
142 | | - "mappingEvidence": { "type": "array" } |
| 174 | + "default": {}, |
| 175 | + "defaultShape": { "type": "string" }, |
| 176 | + "expected": { "type": "string" }, |
| 177 | + "condition": { "type": "string" }, |
| 178 | + "dynamic": { "type": "boolean" }, |
| 179 | + "confidence": { |
| 180 | + "enum": [ |
| 181 | + "base-default", |
| 182 | + "known-consumed-field", |
| 183 | + "validation-open-dictionary", |
| 184 | + "explicit-migration" |
| 185 | + ] |
| 186 | + }, |
| 187 | + "migration": { "type": "string" }, |
| 188 | + "evidence": { "$ref": "#/$defs/evidence" } |
143 | 189 | } |
144 | 190 | }, |
145 | | - "finding": { |
| 191 | + "moduleEntry": { |
146 | 192 | "type": "object", |
147 | | - "required": ["path", "classification", "reason"], |
| 193 | + "additionalProperties": false, |
| 194 | + "required": ["path", "type", "default", "example", "description", "mapping", "evidence"], |
148 | 195 | "properties": { |
149 | 196 | "path": { "type": "string" }, |
| 197 | + "type": { "type": ["string", "null"] }, |
| 198 | + "default": {}, |
| 199 | + "example": {}, |
| 200 | + "description": { "type": ["string", "null"] }, |
| 201 | + "mapping": { |
| 202 | + "enum": ["service-behavior", "generates-application-config", "selects-application-config"] |
| 203 | + }, |
| 204 | + "evidence": { "$ref": "#/$defs/evidence" } |
| 205 | + } |
| 206 | + }, |
| 207 | + "mismatch": { |
| 208 | + "type": "object", |
| 209 | + "additionalProperties": false, |
| 210 | + "required": ["path", "type", "classification"], |
| 211 | + "properties": { |
| 212 | + "path": { "type": "string" }, |
| 213 | + "type": { "type": "string" }, |
| 214 | + "expected": { "type": "string" }, |
150 | 215 | "classification": { |
151 | 216 | "enum": [ |
152 | | - "current", |
153 | | - "valid-dynamic-extension", |
154 | | - "obsolete-or-wrong-shape", |
155 | | - "ignored-or-nonexistent", |
156 | | - "intentional-semantic-exception", |
| 217 | + "wrong-shape", |
| 218 | + "deprecated-or-migrated", |
| 219 | + "invalid-or-ignored", |
157 | 220 | "uncertain-needs-targeted-review" |
158 | 221 | ] |
159 | 222 | }, |
160 | | - "reason": { "type": "string" }, |
161 | | - "evidence": { "$ref": "#/$defs/evidence" } |
| 223 | + "evidence": { "$ref": "#/$defs/evidence" }, |
| 224 | + "candidates": { "type": "array", "items": { "$ref": "#/$defs/evidence" } } |
162 | 225 | } |
163 | 226 | } |
164 | 227 | } |
|
0 commit comments