archctx-contracts 0.12.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fixtures/invalid/hook-debt-checkpoint-failed-read.json +6 -1
- package/fixtures/invalid/projection-result-applied-incomplete-coverage.json +2 -2
- package/fixtures/valid/archctx-capabilities.json +5 -5
- package/fixtures/valid/architecture-refresh-signal.json +1 -3
- package/fixtures/valid/architecture-state-machine.json +158 -0
- package/fixtures/valid/hook-debt-checkpoint.json +6 -1
- package/fixtures/valid/product-version-manifest.json +5 -5
- package/fixtures/valid/projection-manifest.json +2 -4
- package/fixtures/valid/projection-request.json +1 -1
- package/fixtures/valid/projection-result.json +2 -2
- package/fixtures/valid/state-machine-check.json +80 -0
- package/package.json +1 -1
- package/schemas/repo/architecture-state-machine.schema.json +153 -0
- package/schemas/runtime/archctx-capabilities.schema.json +4 -4
- package/schemas/runtime/architecture-debt.schema.json +6 -3
- package/schemas/runtime/architecture-refresh-signal.schema.json +3 -4
- package/schemas/runtime/projection-apply-readback.schema.json +41 -41
- package/schemas/runtime/projection-apply-recovery.schema.json +7 -8
- package/schemas/runtime/projection-manifest.schema.json +21 -108
- package/schemas/runtime/projection-publish-run.schema.json +1 -1
- package/schemas/runtime/projection-request.schema.json +1 -1
- package/schemas/runtime/projection-result.schema.json +20 -21
- package/schemas/runtime/projection-target.schema.json +2 -2
- package/schemas/runtime/state-machine-check.schema.json +181 -0
- package/src/architecture-debt.ts +2 -2
- package/src/architecture-history.ts +8 -0
- package/src/failure.ts +29 -6
- package/src/index.ts +1 -0
- package/src/ledger.ts +2 -2
- package/src/product-version.ts +1 -1
- package/src/projection-manifest.ts +53 -156
- package/src/projection-writer.ts +1 -1
- package/src/projection.ts +122 -99
- package/src/state-machine.ts +280 -0
- package/src/validator.ts +7 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://archcontext.dev/schemas/runtime/architecture-refresh-signal.schema.json",
|
|
4
|
-
"title": "
|
|
4
|
+
"title": "ArchitectureRefreshSignalV2",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"additionalProperties": false,
|
|
7
7
|
"required": ["schemaVersion", "signalId", "idempotencyKey", "mode", "repository", "worktree", "cause", "reasonCodes", "affectedNodeIds", "refreshTargets", "baseDigests", "resultingDigests", "projectionReceiptDigest"],
|
|
8
8
|
"properties": {
|
|
9
|
-
"schemaVersion": { "const": "archcontext.architecture-refresh-signal/
|
|
9
|
+
"schemaVersion": { "const": "archcontext.architecture-refresh-signal/v2" },
|
|
10
10
|
"signalId": { "$ref": "#/$defs/digest" },
|
|
11
11
|
"idempotencyKey": { "$ref": "#/$defs/digest" },
|
|
12
12
|
"mode": { "enum": ["human-action-required", "refresh-required"] },
|
|
@@ -103,10 +103,9 @@
|
|
|
103
103
|
"digestSet": {
|
|
104
104
|
"type": "object",
|
|
105
105
|
"additionalProperties": false,
|
|
106
|
-
"required": ["modelDigest", "
|
|
106
|
+
"required": ["modelDigest", "flowProofDigest", "projectionDigest"],
|
|
107
107
|
"properties": {
|
|
108
108
|
"modelDigest": { "$ref": "#/$defs/digest" },
|
|
109
|
-
"sourceTreeDigest": { "$ref": "#/$defs/digest" },
|
|
110
109
|
"flowProofDigest": { "$ref": "#/$defs/digest" },
|
|
111
110
|
"projectionDigest": { "$ref": "#/$defs/digest" }
|
|
112
111
|
}
|
|
@@ -386,7 +386,6 @@
|
|
|
386
386
|
"additionalProperties": false,
|
|
387
387
|
"required": [
|
|
388
388
|
"modelDigest",
|
|
389
|
-
"sourceTreeDigest",
|
|
390
389
|
"flowProofDigest",
|
|
391
390
|
"projectionDigest"
|
|
392
391
|
],
|
|
@@ -394,9 +393,6 @@
|
|
|
394
393
|
"modelDigest": {
|
|
395
394
|
"$ref": "#/$defs/digest"
|
|
396
395
|
},
|
|
397
|
-
"sourceTreeDigest": {
|
|
398
|
-
"$ref": "#/$defs/digest"
|
|
399
|
-
},
|
|
400
396
|
"flowProofDigest": {
|
|
401
397
|
"$ref": "#/$defs/digest"
|
|
402
398
|
},
|
|
@@ -442,7 +438,7 @@
|
|
|
442
438
|
],
|
|
443
439
|
"properties": {
|
|
444
440
|
"schemaVersion": {
|
|
445
|
-
"const": "archcontext.architecture-refresh-signal/
|
|
441
|
+
"const": "archcontext.architecture-refresh-signal/v2"
|
|
446
442
|
},
|
|
447
443
|
"signalId": {
|
|
448
444
|
"$ref": "#/$defs/digest"
|
|
@@ -822,12 +818,11 @@
|
|
|
822
818
|
"targetChange": {
|
|
823
819
|
"type": "object",
|
|
824
820
|
"additionalProperties": false,
|
|
825
|
-
"description": "How one target changes since the committed projection and what this run's write does to its file (#327). null is an unknown comparison. classification follows blocked > proof-change (a known proof change) > baseline-missing > semantic-change > output-change >
|
|
821
|
+
"description": "How one target changes since the committed projection and what this run's write does to its file (#327). null is an unknown comparison. classification follows blocked > proof-change (a known proof change) > baseline-missing > semantic-change > output-change > unchanged.",
|
|
826
822
|
"required": [
|
|
827
823
|
"targetId",
|
|
828
824
|
"path",
|
|
829
825
|
"affectedCapabilityIds",
|
|
830
|
-
"stampChanged",
|
|
831
826
|
"outputChanged",
|
|
832
827
|
"semanticChanged",
|
|
833
828
|
"proofChanged",
|
|
@@ -865,12 +860,6 @@
|
|
|
865
860
|
"minLength": 1
|
|
866
861
|
}
|
|
867
862
|
},
|
|
868
|
-
"stampChanged": {
|
|
869
|
-
"type": [
|
|
870
|
-
"boolean",
|
|
871
|
-
"null"
|
|
872
|
-
]
|
|
873
|
-
},
|
|
874
863
|
"outputChanged": {
|
|
875
864
|
"type": "boolean"
|
|
876
865
|
},
|
|
@@ -901,7 +890,6 @@
|
|
|
901
890
|
"output-change",
|
|
902
891
|
"proof-change",
|
|
903
892
|
"semantic-change",
|
|
904
|
-
"stamp-only",
|
|
905
893
|
"unchanged"
|
|
906
894
|
]
|
|
907
895
|
},
|
|
@@ -920,7 +908,6 @@
|
|
|
920
908
|
"rendered-output-changed",
|
|
921
909
|
"selector-evidence-changed",
|
|
922
910
|
"semantic-fingerprint-changed",
|
|
923
|
-
"source-stamp-changed",
|
|
924
911
|
"target-added",
|
|
925
912
|
"target-removed",
|
|
926
913
|
"target-row-missing",
|
|
@@ -954,10 +941,7 @@
|
|
|
954
941
|
"if": {
|
|
955
942
|
"properties": {
|
|
956
943
|
"classification": {
|
|
957
|
-
"
|
|
958
|
-
"stamp-only",
|
|
959
|
-
"unchanged"
|
|
960
|
-
]
|
|
944
|
+
"const": "unchanged"
|
|
961
945
|
}
|
|
962
946
|
},
|
|
963
947
|
"required": [
|
|
@@ -972,9 +956,6 @@
|
|
|
972
956
|
"outputChanged": {
|
|
973
957
|
"const": false
|
|
974
958
|
},
|
|
975
|
-
"stampChanged": {
|
|
976
|
-
"type": "boolean"
|
|
977
|
-
},
|
|
978
959
|
"semanticChanged": {
|
|
979
960
|
"const": false
|
|
980
961
|
},
|
|
@@ -1128,11 +1109,11 @@
|
|
|
1128
1109
|
"freshness": {
|
|
1129
1110
|
"type": "object",
|
|
1130
1111
|
"additionalProperties": false,
|
|
1131
|
-
"description": "Present on check results only. Canonical wire orders and the ok/reasonCodes/
|
|
1112
|
+
"description": "Present on check results only: render-equivalent freshness (ADR-0056 §1). Canonical wire orders and the ok/reasonCodes/staleTargets coupling are enforced by projectionResultInvariantIssues.",
|
|
1132
1113
|
"required": [
|
|
1133
1114
|
"ok",
|
|
1134
1115
|
"reasonCodes",
|
|
1135
|
-
"
|
|
1116
|
+
"staleTargets"
|
|
1136
1117
|
],
|
|
1137
1118
|
"properties": {
|
|
1138
1119
|
"ok": {
|
|
@@ -1143,34 +1124,52 @@
|
|
|
1143
1124
|
"uniqueItems": true,
|
|
1144
1125
|
"items": {
|
|
1145
1126
|
"enum": [
|
|
1127
|
+
"projection-manifest-changed",
|
|
1146
1128
|
"projection-manifest-missing",
|
|
1147
1129
|
"projection-manifest-unreadable",
|
|
1148
|
-
"projection-
|
|
1149
|
-
"projection-source-stamp-missing",
|
|
1150
|
-
"projection-source-tree-digest-mismatch"
|
|
1130
|
+
"projection-output-changed"
|
|
1151
1131
|
]
|
|
1152
1132
|
}
|
|
1153
1133
|
},
|
|
1154
|
-
"
|
|
1134
|
+
"staleTargets": {
|
|
1155
1135
|
"type": "array",
|
|
1156
1136
|
"items": {
|
|
1157
1137
|
"type": "object",
|
|
1158
1138
|
"additionalProperties": false,
|
|
1159
1139
|
"required": [
|
|
1160
|
-
"
|
|
1161
|
-
"
|
|
1162
|
-
"
|
|
1140
|
+
"targetId",
|
|
1141
|
+
"path",
|
|
1142
|
+
"committedOutputDigest",
|
|
1143
|
+
"renderedOutputDigest"
|
|
1163
1144
|
],
|
|
1164
1145
|
"properties": {
|
|
1165
|
-
"
|
|
1146
|
+
"targetId": {
|
|
1166
1147
|
"type": "string",
|
|
1167
1148
|
"minLength": 1
|
|
1168
1149
|
},
|
|
1169
|
-
"
|
|
1170
|
-
"
|
|
1150
|
+
"path": {
|
|
1151
|
+
"type": "string",
|
|
1152
|
+
"minLength": 1
|
|
1171
1153
|
},
|
|
1172
|
-
"
|
|
1173
|
-
"
|
|
1154
|
+
"committedOutputDigest": {
|
|
1155
|
+
"anyOf": [
|
|
1156
|
+
{
|
|
1157
|
+
"$ref": "#/$defs/digest"
|
|
1158
|
+
},
|
|
1159
|
+
{
|
|
1160
|
+
"type": "null"
|
|
1161
|
+
}
|
|
1162
|
+
]
|
|
1163
|
+
},
|
|
1164
|
+
"renderedOutputDigest": {
|
|
1165
|
+
"anyOf": [
|
|
1166
|
+
{
|
|
1167
|
+
"$ref": "#/$defs/digest"
|
|
1168
|
+
},
|
|
1169
|
+
{
|
|
1170
|
+
"type": "null"
|
|
1171
|
+
}
|
|
1172
|
+
]
|
|
1174
1173
|
}
|
|
1175
1174
|
}
|
|
1176
1175
|
}
|
|
@@ -1255,7 +1254,7 @@
|
|
|
1255
1254
|
],
|
|
1256
1255
|
"properties": {
|
|
1257
1256
|
"schemaVersion": {
|
|
1258
|
-
"const": "archcontext.projection-result/
|
|
1257
|
+
"const": "archcontext.projection-result/v3"
|
|
1259
1258
|
},
|
|
1260
1259
|
"requestId": {
|
|
1261
1260
|
"type": "string",
|
|
@@ -1331,7 +1330,7 @@
|
|
|
1331
1330
|
},
|
|
1332
1331
|
"changes": {
|
|
1333
1332
|
"type": "array",
|
|
1334
|
-
"description": "Present on every check and plan result and on no other. One entry per target
|
|
1333
|
+
"description": "Present on every check and plan result and on no other. One entry per target, the projection manifest excluded; targetId is unique, and only agent-context targets share a path (ADR-0056 §9). Canonical wire order is by path, then targetId; the precedence derivation of classification, the reason-code couplings and the binding of plannedAction to files[] and of blocked targets to coverage are enforced by projectionTargetChangesIssues and projectionResultInvariantIssues.",
|
|
1335
1334
|
"items": {
|
|
1336
1335
|
"$ref": "#/$defs/targetChange"
|
|
1337
1336
|
}
|
|
@@ -1578,7 +1577,7 @@
|
|
|
1578
1577
|
],
|
|
1579
1578
|
"properties": {
|
|
1580
1579
|
"schemaVersion": {
|
|
1581
|
-
"const": "archcontext.projection-apply-recovery-binding/
|
|
1580
|
+
"const": "archcontext.projection-apply-recovery-binding/v2"
|
|
1582
1581
|
},
|
|
1583
1582
|
"targets": {
|
|
1584
1583
|
"type": "array",
|
|
@@ -1588,7 +1587,8 @@
|
|
|
1588
1587
|
"items": {
|
|
1589
1588
|
"enum": [
|
|
1590
1589
|
"agent-context",
|
|
1591
|
-
"architecture-docs"
|
|
1590
|
+
"architecture-docs",
|
|
1591
|
+
"architecture-history"
|
|
1592
1592
|
]
|
|
1593
1593
|
}
|
|
1594
1594
|
},
|
|
@@ -1683,7 +1683,7 @@
|
|
|
1683
1683
|
],
|
|
1684
1684
|
"properties": {
|
|
1685
1685
|
"schemaVersion": {
|
|
1686
|
-
"const": "archcontext.projection-apply-readback-result/
|
|
1686
|
+
"const": "archcontext.projection-apply-readback-result/v2"
|
|
1687
1687
|
},
|
|
1688
1688
|
"requestId": {
|
|
1689
1689
|
"type": "string",
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"additionalProperties": false,
|
|
7
7
|
"required": ["schemaVersion"],
|
|
8
8
|
"properties": {
|
|
9
|
-
"schemaVersion": { "enum": ["archcontext.projection-apply-recovery-intent/v1", "archcontext.projection-apply-recovery-proof/
|
|
9
|
+
"schemaVersion": { "enum": ["archcontext.projection-apply-recovery-intent/v1", "archcontext.projection-apply-recovery-proof/v2", "archcontext.projection-apply-recovery-result/v2"] },
|
|
10
10
|
"requestId": {},
|
|
11
11
|
"profile": {},
|
|
12
12
|
"acceptedChange": {},
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"then": { "$ref": "#/$defs/intent" }
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
|
-
"if": { "properties": { "schemaVersion": { "const": "archcontext.projection-apply-recovery-proof/
|
|
28
|
+
"if": { "properties": { "schemaVersion": { "const": "archcontext.projection-apply-recovery-proof/v2" } }, "required": ["schemaVersion"] },
|
|
29
29
|
"then": { "$ref": "#/$defs/proof" }
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
|
-
"if": { "properties": { "schemaVersion": { "const": "archcontext.projection-apply-recovery-result/
|
|
32
|
+
"if": { "properties": { "schemaVersion": { "const": "archcontext.projection-apply-recovery-result/v2" } }, "required": ["schemaVersion"] },
|
|
33
33
|
"then": { "$ref": "#/$defs/result" }
|
|
34
34
|
}
|
|
35
35
|
],
|
|
@@ -54,10 +54,9 @@
|
|
|
54
54
|
"digestSet": {
|
|
55
55
|
"type": "object",
|
|
56
56
|
"additionalProperties": false,
|
|
57
|
-
"required": ["modelDigest", "
|
|
57
|
+
"required": ["modelDigest", "flowProofDigest", "projectionDigest"],
|
|
58
58
|
"properties": {
|
|
59
59
|
"modelDigest": { "$ref": "#/$defs/digest" },
|
|
60
|
-
"sourceTreeDigest": { "$ref": "#/$defs/digest" },
|
|
61
60
|
"flowProofDigest": { "$ref": "#/$defs/digest" },
|
|
62
61
|
"projectionDigest": { "$ref": "#/$defs/digest" }
|
|
63
62
|
}
|
|
@@ -152,7 +151,7 @@
|
|
|
152
151
|
"additionalProperties": false,
|
|
153
152
|
"required": ["schemaVersion", "requestId", "requestDigest", "proofDigest", "deliveryStatus", "receipt", "acceptedChange", "expectedResultingDigests", "current"],
|
|
154
153
|
"properties": {
|
|
155
|
-
"schemaVersion": { "const": "archcontext.projection-apply-recovery-proof/
|
|
154
|
+
"schemaVersion": { "const": "archcontext.projection-apply-recovery-proof/v2" },
|
|
156
155
|
"requestId": { "type": "string", "pattern": "^[a-zA-Z0-9_.:-]+$", "minLength": 1 },
|
|
157
156
|
"requestDigest": { "$ref": "#/$defs/digest" },
|
|
158
157
|
"proofDigest": { "$ref": "#/$defs/digest" },
|
|
@@ -178,7 +177,7 @@
|
|
|
178
177
|
"additionalProperties": false,
|
|
179
178
|
"required": ["schemaVersion", "signalId", "idempotencyKey", "mode", "repository", "worktree", "cause", "reasonCodes", "affectedNodeIds", "refreshTargets", "baseDigests", "resultingDigests", "projectionReceiptDigest"],
|
|
180
179
|
"properties": {
|
|
181
|
-
"schemaVersion": { "const": "archcontext.architecture-refresh-signal/
|
|
180
|
+
"schemaVersion": { "const": "archcontext.architecture-refresh-signal/v2" },
|
|
182
181
|
"signalId": { "$ref": "#/$defs/digest" },
|
|
183
182
|
"idempotencyKey": { "$ref": "#/$defs/digest" },
|
|
184
183
|
"mode": { "enum": ["human-action-required", "refresh-required"] },
|
|
@@ -200,7 +199,7 @@
|
|
|
200
199
|
"additionalProperties": false,
|
|
201
200
|
"required": ["schemaVersion", "proof", "refreshSignals"],
|
|
202
201
|
"properties": {
|
|
203
|
-
"schemaVersion": { "const": "archcontext.projection-apply-recovery-result/
|
|
202
|
+
"schemaVersion": { "const": "archcontext.projection-apply-recovery-result/v2" },
|
|
204
203
|
"proof": { "$ref": "#/$defs/proof" },
|
|
205
204
|
"refreshSignals": { "type": "array", "items": { "$ref": "#/$defs/refreshSignal" } }
|
|
206
205
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://archcontext.dev/schemas/runtime/projection-manifest.schema.json",
|
|
4
|
-
"title": "
|
|
5
|
-
"description": "The committed docs/architecture/.projection-manifest.json the architecture documentation projection writes (#264, #327). Version
|
|
4
|
+
"title": "ArchitectureDocsProjectionManifestV4",
|
|
5
|
+
"description": "The committed docs/architecture/.projection-manifest.json the architecture documentation projection writes (#264, #327, ADR-0056). Version v4 records no digest of raw source: a target row holds only what the render produced, and its outputDigest is the target's freshness identity, so a source edit that changes no output, no proof evidence and no header line leaves the file byte-identical. Header lines change only on a protocol upgrade, semanticBaseline.modelDigest is the one Git-visible anchor, and every other value belongs to one capability or one target row, so changes to different capabilities rewrite disjoint lines. A v1, v2 or v3 manifest is not valid against this schema and is refused with projection-manifest-upgrade-required. Sorted/unique orders and the byte layout are enforced by architectureDocsProjectionManifestIssues and serializeArchitectureDocsProjectionManifest.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"additionalProperties": false,
|
|
8
8
|
"required": [
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
],
|
|
17
17
|
"properties": {
|
|
18
18
|
"schemaVersion": {
|
|
19
|
-
"const": "archcontext.architecture-docs-projection-manifest/
|
|
19
|
+
"const": "archcontext.architecture-docs-projection-manifest/v4"
|
|
20
20
|
},
|
|
21
21
|
"rendererVersion": {
|
|
22
22
|
"type": "string",
|
|
@@ -208,41 +208,6 @@
|
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
},
|
|
211
|
-
"scaleBucket": {
|
|
212
|
-
"type": "object",
|
|
213
|
-
"additionalProperties": false,
|
|
214
|
-
"required": [
|
|
215
|
-
"lower",
|
|
216
|
-
"upper"
|
|
217
|
-
],
|
|
218
|
-
"description": "The half-open 1-2-5 magnitude range [lower, upper) that contains a measured count; {lower: 0, upper: 1} holds only zero.",
|
|
219
|
-
"properties": {
|
|
220
|
-
"lower": {
|
|
221
|
-
"type": "integer",
|
|
222
|
-
"minimum": 0
|
|
223
|
-
},
|
|
224
|
-
"upper": {
|
|
225
|
-
"type": "integer",
|
|
226
|
-
"minimum": 1
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
},
|
|
230
|
-
"scale": {
|
|
231
|
-
"type": "object",
|
|
232
|
-
"additionalProperties": false,
|
|
233
|
-
"required": [
|
|
234
|
-
"fileCountBucket",
|
|
235
|
-
"lineCountBucket"
|
|
236
|
-
],
|
|
237
|
-
"properties": {
|
|
238
|
-
"fileCountBucket": {
|
|
239
|
-
"$ref": "#/$defs/scaleBucket"
|
|
240
|
-
},
|
|
241
|
-
"lineCountBucket": {
|
|
242
|
-
"$ref": "#/$defs/scaleBucket"
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
},
|
|
246
211
|
"target": {
|
|
247
212
|
"type": "object",
|
|
248
213
|
"additionalProperties": false,
|
|
@@ -254,7 +219,21 @@
|
|
|
254
219
|
"format",
|
|
255
220
|
"outputDigest"
|
|
256
221
|
],
|
|
257
|
-
"description": "One target row, keyed by its targetId. The key and the manifest header carry the targetId and the renderer version, so the row repeats neither.",
|
|
222
|
+
"description": "One target row, keyed by its targetId. The key and the manifest header carry the targetId and the renderer version, so the row repeats neither. An agent-context row owns one node's region in a contract file, so it is mixed, markdown and entity-scoped with an id, and several agent-context rows may share a path when their scope ids differ.",
|
|
223
|
+
"if": {
|
|
224
|
+
"properties": { "type": { "const": "agent-context" } },
|
|
225
|
+
"required": ["type"]
|
|
226
|
+
},
|
|
227
|
+
"then": {
|
|
228
|
+
"properties": {
|
|
229
|
+
"ownership": { "const": "mixed" },
|
|
230
|
+
"format": { "const": "markdown" },
|
|
231
|
+
"scope": {
|
|
232
|
+
"properties": { "kind": { "const": "entity" }, "id": { "type": "string", "minLength": 1 } },
|
|
233
|
+
"required": ["kind", "id"]
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
},
|
|
258
237
|
"properties": {
|
|
259
238
|
"type": {
|
|
260
239
|
"enum": [
|
|
@@ -262,12 +241,12 @@
|
|
|
262
241
|
"entity-summary",
|
|
263
242
|
"relation-summary",
|
|
264
243
|
"decision-index",
|
|
265
|
-
"architecture-changelog",
|
|
266
244
|
"diagram-mermaid",
|
|
267
245
|
"diagram-structurizr",
|
|
268
246
|
"diagram-likec4",
|
|
269
247
|
"diagram-runtime-topology",
|
|
270
248
|
"runtime-topology-summary",
|
|
249
|
+
"architecture-history",
|
|
271
250
|
"agent-context"
|
|
272
251
|
]
|
|
273
252
|
},
|
|
@@ -284,8 +263,7 @@
|
|
|
284
263
|
"entity",
|
|
285
264
|
"relation",
|
|
286
265
|
"decision",
|
|
287
|
-
"diagram"
|
|
288
|
-
"changelog"
|
|
266
|
+
"diagram"
|
|
289
267
|
]
|
|
290
268
|
},
|
|
291
269
|
"id": {
|
|
@@ -329,73 +307,8 @@
|
|
|
329
307
|
},
|
|
330
308
|
"outputDigest": {
|
|
331
309
|
"$ref": "#/$defs/digest"
|
|
332
|
-
},
|
|
333
|
-
"sourceStamps": {
|
|
334
|
-
"type": "object",
|
|
335
|
-
"description": "entity-summary and runtime topology targets only: the content digest of every declared source footprint this target documents, by node id. A footprint belongs to its node's nearest ancestor-or-self with an entity-summary target, so it is stamped on exactly one entity-summary row; a runtime topology node's footprint is stamped on every runtime topology row instead, and those rows carry identical stamps (ADR-0049).",
|
|
336
|
-
"additionalProperties": {
|
|
337
|
-
"$ref": "#/$defs/digest"
|
|
338
|
-
}
|
|
339
|
-
},
|
|
340
|
-
"scale": {
|
|
341
|
-
"$ref": "#/$defs/scale",
|
|
342
|
-
"description": "Present exactly when sourceStamps stamps the target's own node."
|
|
343
|
-
}
|
|
344
|
-
},
|
|
345
|
-
"allOf": [
|
|
346
|
-
{
|
|
347
|
-
"if": {
|
|
348
|
-
"required": [
|
|
349
|
-
"scale"
|
|
350
|
-
]
|
|
351
|
-
},
|
|
352
|
-
"then": {
|
|
353
|
-
"required": [
|
|
354
|
-
"sourceStamps"
|
|
355
|
-
]
|
|
356
|
-
}
|
|
357
|
-
},
|
|
358
|
-
{
|
|
359
|
-
"if": {
|
|
360
|
-
"properties": {
|
|
361
|
-
"type": {
|
|
362
|
-
"not": {
|
|
363
|
-
"enum": [
|
|
364
|
-
"entity-summary",
|
|
365
|
-
"diagram-runtime-topology",
|
|
366
|
-
"runtime-topology-summary"
|
|
367
|
-
]
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
},
|
|
372
|
-
"then": {
|
|
373
|
-
"not": {
|
|
374
|
-
"required": [
|
|
375
|
-
"sourceStamps"
|
|
376
|
-
]
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
},
|
|
380
|
-
{
|
|
381
|
-
"if": {
|
|
382
|
-
"properties": {
|
|
383
|
-
"type": {
|
|
384
|
-
"not": {
|
|
385
|
-
"const": "entity-summary"
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
},
|
|
390
|
-
"then": {
|
|
391
|
-
"not": {
|
|
392
|
-
"required": [
|
|
393
|
-
"scale"
|
|
394
|
-
]
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
310
|
}
|
|
398
|
-
|
|
311
|
+
}
|
|
399
312
|
}
|
|
400
313
|
}
|
|
401
314
|
}
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"publisher": { "enum": ["command", "gh", "none"] },
|
|
32
32
|
"files": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 }, "description": "Repository-relative generated paths the published commit changes, sorted. Paths only, never contents." },
|
|
33
|
-
"projectionStatus": { "type": ["string", "null"], "description": "
|
|
33
|
+
"projectionStatus": { "type": ["string", "null"], "description": "ProjectionResultV3.status of the apply this run made, or null without one." },
|
|
34
34
|
"humanActions": {
|
|
35
35
|
"type": "array",
|
|
36
36
|
"items": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"minItems": 1,
|
|
16
16
|
"uniqueItems": true,
|
|
17
17
|
"description": "Canonical wire order is lexicographic and is enforced by projectionRequestInvariantIssues.",
|
|
18
|
-
"items": { "enum": ["agent-context", "architecture-docs"] }
|
|
18
|
+
"items": { "enum": ["agent-context", "architecture-docs", "architecture-history"] }
|
|
19
19
|
},
|
|
20
20
|
"changedPaths": {
|
|
21
21
|
"type": "array",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://archcontext.dev/schemas/runtime/projection-result.schema.json",
|
|
4
|
-
"title": "
|
|
4
|
+
"title": "ProjectionResultV3",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"additionalProperties": false,
|
|
7
7
|
"required": ["schemaVersion", "requestId", "status", "inputSnapshot", "outputSnapshot", "affectedNodeIds", "files", "humanActions", "refreshSignals", "receiptDigest"],
|
|
8
8
|
"properties": {
|
|
9
|
-
"schemaVersion": { "const": "archcontext.projection-result/
|
|
9
|
+
"schemaVersion": { "const": "archcontext.projection-result/v3" },
|
|
10
10
|
"requestId": { "type": "string", "pattern": "^[a-zA-Z0-9_.:-]+$", "minLength": 1 },
|
|
11
11
|
"status": { "enum": ["adoption-required", "applied", "applied-partial", "applied-reconcile-required", "blocked", "human-action-required", "noop", "permanent-failure", "planned", "planned-partial", "retryable-failure"] },
|
|
12
12
|
"inputSnapshot": { "$ref": "#/$defs/snapshot" },
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"priorCommittedApplies": { "type": "array", "minItems": 1, "description": "Omitted, never empty. Canonical wire order is by changeSetId and is enforced by projectionResultInvariantIssues.", "items": { "$ref": "#/$defs/priorCommittedApply" } },
|
|
20
20
|
"freshness": { "$ref": "#/$defs/freshness" },
|
|
21
21
|
"architectureDebt": { "$ref": "#/$defs/architectureDebt" },
|
|
22
|
-
"changes": { "type": "array", "description": "Present on every check and plan result and on no other. One entry per target
|
|
22
|
+
"changes": { "type": "array", "description": "Present on every check and plan result and on no other. One entry per target, the projection manifest excluded; targetId is unique, and only agent-context targets share a path (ADR-0056 §9). Canonical wire order is by path, then targetId; the precedence derivation of classification, the reason-code couplings and the binding of plannedAction to files[] and of blocked targets to coverage are enforced by projectionTargetChangesIssues and projectionResultInvariantIssues.", "items": { "$ref": "#/$defs/targetChange" } },
|
|
23
23
|
"replayed": { "const": true, "description": "A repeated apply for the same requestId and request digest returned the committed result without applying again. Excluded from receiptDigest." },
|
|
24
24
|
"written": { "type": "boolean", "description": "Present exactly when replayed is. false: the replay wrote nothing. true: the projection-owned outputs differed from the approved result at the approved snapshot and the replay wrote the committed fixed point again under the original receipt. Excluded from receiptDigest." },
|
|
25
25
|
"majorChangeAcceptance": { "const": "declined-unprovable-proof", "description": "Present only when the request sent acceptObservedMajorChange and the provider declined it because a capability proof is unprovable; humanActions then carries unprovable-required-flow instead of unresolved-major-change." },
|
|
@@ -176,10 +176,9 @@
|
|
|
176
176
|
"digestSet": {
|
|
177
177
|
"type": "object",
|
|
178
178
|
"additionalProperties": false,
|
|
179
|
-
"required": ["modelDigest", "
|
|
179
|
+
"required": ["modelDigest", "flowProofDigest", "projectionDigest"],
|
|
180
180
|
"properties": {
|
|
181
181
|
"modelDigest": { "$ref": "#/$defs/digest" },
|
|
182
|
-
"sourceTreeDigest": { "$ref": "#/$defs/digest" },
|
|
183
182
|
"flowProofDigest": { "$ref": "#/$defs/digest" },
|
|
184
183
|
"projectionDigest": { "$ref": "#/$defs/digest" }
|
|
185
184
|
}
|
|
@@ -213,7 +212,7 @@
|
|
|
213
212
|
"additionalProperties": false,
|
|
214
213
|
"required": ["schemaVersion", "signalId", "idempotencyKey", "mode", "repository", "worktree", "cause", "reasonCodes", "affectedNodeIds", "refreshTargets", "baseDigests", "resultingDigests", "projectionReceiptDigest"],
|
|
215
214
|
"properties": {
|
|
216
|
-
"schemaVersion": { "const": "archcontext.architecture-refresh-signal/
|
|
215
|
+
"schemaVersion": { "const": "archcontext.architecture-refresh-signal/v2" },
|
|
217
216
|
"signalId": { "$ref": "#/$defs/digest" },
|
|
218
217
|
"idempotencyKey": { "$ref": "#/$defs/digest" },
|
|
219
218
|
"mode": { "enum": ["human-action-required", "refresh-required"] },
|
|
@@ -260,25 +259,26 @@
|
|
|
260
259
|
"freshness": {
|
|
261
260
|
"type": "object",
|
|
262
261
|
"additionalProperties": false,
|
|
263
|
-
"description": "Present on check results only. Canonical wire orders and the ok/reasonCodes/
|
|
264
|
-
"required": ["ok", "reasonCodes", "
|
|
262
|
+
"description": "Present on check results only: render-equivalent freshness (ADR-0056 §1). Canonical wire orders and the ok/reasonCodes/staleTargets coupling are enforced by projectionResultInvariantIssues.",
|
|
263
|
+
"required": ["ok", "reasonCodes", "staleTargets"],
|
|
265
264
|
"properties": {
|
|
266
265
|
"ok": { "type": "boolean" },
|
|
267
266
|
"reasonCodes": {
|
|
268
267
|
"type": "array",
|
|
269
268
|
"uniqueItems": true,
|
|
270
|
-
"items": { "enum": ["projection-manifest-
|
|
269
|
+
"items": { "enum": ["projection-manifest-changed", "projection-manifest-missing", "projection-manifest-unreadable", "projection-output-changed"] }
|
|
271
270
|
},
|
|
272
|
-
"
|
|
271
|
+
"staleTargets": {
|
|
273
272
|
"type": "array",
|
|
274
273
|
"items": {
|
|
275
274
|
"type": "object",
|
|
276
275
|
"additionalProperties": false,
|
|
277
|
-
"required": ["
|
|
276
|
+
"required": ["targetId", "path", "committedOutputDigest", "renderedOutputDigest"],
|
|
278
277
|
"properties": {
|
|
279
|
-
"
|
|
280
|
-
"
|
|
281
|
-
"
|
|
278
|
+
"targetId": { "type": "string", "minLength": 1 },
|
|
279
|
+
"path": { "type": "string", "minLength": 1 },
|
|
280
|
+
"committedOutputDigest": { "anyOf": [{ "$ref": "#/$defs/digest" }, { "type": "null" }] },
|
|
281
|
+
"renderedOutputDigest": { "anyOf": [{ "$ref": "#/$defs/digest" }, { "type": "null" }] }
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
284
|
}
|
|
@@ -317,8 +317,8 @@
|
|
|
317
317
|
"targetChange": {
|
|
318
318
|
"type": "object",
|
|
319
319
|
"additionalProperties": false,
|
|
320
|
-
"description": "How one target changes since the committed projection and what this run's write does to its file (#327). null is an unknown comparison. classification follows blocked > proof-change (a known proof change) > baseline-missing > semantic-change > output-change >
|
|
321
|
-
"required": ["targetId", "path", "affectedCapabilityIds", "
|
|
320
|
+
"description": "How one target changes since the committed projection and what this run's write does to its file (#327). null is an unknown comparison. classification follows blocked > proof-change (a known proof change) > baseline-missing > semantic-change > output-change > unchanged.",
|
|
321
|
+
"required": ["targetId", "path", "affectedCapabilityIds", "outputChanged", "semanticChanged", "proofChanged", "plannedAction", "classification", "reasonCodes"],
|
|
322
322
|
"properties": {
|
|
323
323
|
"targetId": { "type": "string", "minLength": 1 },
|
|
324
324
|
"path": {
|
|
@@ -327,16 +327,15 @@
|
|
|
327
327
|
"not": { "anyOf": [{ "pattern": "^/" }, { "pattern": "\\\\" }, { "pattern": "(^|/)\\.\\.(/|$)" }] }
|
|
328
328
|
},
|
|
329
329
|
"affectedCapabilityIds": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
|
|
330
|
-
"stampChanged": { "type": ["boolean", "null"] },
|
|
331
330
|
"outputChanged": { "type": "boolean" },
|
|
332
331
|
"semanticChanged": { "type": ["boolean", "null"] },
|
|
333
332
|
"proofChanged": { "type": ["boolean", "null"] },
|
|
334
333
|
"plannedAction": { "enum": ["create", "delete", "none", "update"] },
|
|
335
|
-
"classification": { "enum": ["baseline-missing", "blocked", "output-change", "proof-change", "semantic-change", "
|
|
334
|
+
"classification": { "enum": ["baseline-missing", "blocked", "output-change", "proof-change", "semantic-change", "unchanged"] },
|
|
336
335
|
"reasonCodes": {
|
|
337
336
|
"type": "array",
|
|
338
337
|
"uniqueItems": true,
|
|
339
|
-
"items": { "enum": ["adoption-required", "ambiguous-ownership", "baseline-missing", "file-bytes-changed", "flow-proof-changed", "model-digest-changed", "orphan-review-required", "rendered-output-changed", "selector-evidence-changed", "semantic-fingerprint-changed", "
|
|
338
|
+
"items": { "enum": ["adoption-required", "ambiguous-ownership", "baseline-missing", "file-bytes-changed", "flow-proof-changed", "model-digest-changed", "orphan-review-required", "rendered-output-changed", "selector-evidence-changed", "semantic-fingerprint-changed", "target-added", "target-removed", "target-row-missing", "unprovable-required-flow", "verified-flow-proof-changed"] }
|
|
340
339
|
}
|
|
341
340
|
},
|
|
342
341
|
"allOf": [
|
|
@@ -345,8 +344,8 @@
|
|
|
345
344
|
"then": { "properties": { "plannedAction": { "const": "none" } } }
|
|
346
345
|
},
|
|
347
346
|
{
|
|
348
|
-
"if": { "properties": { "classification": { "
|
|
349
|
-
"then": { "properties": { "plannedAction": { "const": "none" }, "outputChanged": { "const": false }, "
|
|
347
|
+
"if": { "properties": { "classification": { "const": "unchanged" } }, "required": ["classification"] },
|
|
348
|
+
"then": { "properties": { "plannedAction": { "const": "none" }, "outputChanged": { "const": false }, "semanticChanged": { "const": false }, "proofChanged": { "const": false } } }
|
|
350
349
|
},
|
|
351
350
|
{
|
|
352
351
|
"if": { "properties": { "classification": { "const": "unchanged" } }, "required": ["classification"] },
|