archctx-contracts 0.11.4 → 0.13.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.
Files changed (45) hide show
  1. package/fixtures/invalid/hook-debt-checkpoint-failed-read.json +6 -1
  2. package/fixtures/valid/archctx-capabilities.json +1 -1
  3. package/fixtures/valid/architecture-state-machine.json +158 -0
  4. package/fixtures/valid/hook-debt-checkpoint.json +6 -1
  5. package/fixtures/valid/product-version-manifest.json +5 -9
  6. package/fixtures/valid/state-machine-check.json +76 -0
  7. package/package.json +1 -1
  8. package/schemas/repo/architecture-state-machine.schema.json +153 -0
  9. package/schemas/runtime/architecture-debt.schema.json +6 -3
  10. package/schemas/runtime/product-version-manifest.schema.json +2 -6
  11. package/schemas/runtime/state-machine-check.schema.json +163 -0
  12. package/src/architecture-debt.ts +2 -2
  13. package/src/failure.ts +17 -11
  14. package/src/index.ts +2 -2
  15. package/src/ports.ts +0 -35
  16. package/src/product-version.ts +1 -9
  17. package/src/review-guards.ts +90 -0
  18. package/src/schema.ts +0 -2
  19. package/src/state-machine.ts +275 -0
  20. package/src/validator.ts +7 -0
  21. package/fixtures/boundary/attestation-v2-error.json +0 -43
  22. package/fixtures/boundary/check-delivery-dead-letter.json +0 -14
  23. package/fixtures/boundary/review-challenge-v2-organization.json +0 -15
  24. package/fixtures/boundary/runner-identity-organization-scope.json +0 -16
  25. package/fixtures/invalid/attestation-v2-finding-field.json +0 -39
  26. package/fixtures/invalid/check-delivery-legacy-check-name.json +0 -14
  27. package/fixtures/invalid/review-challenge-v2-private-field.json +0 -16
  28. package/fixtures/valid/attestation-v2.json +0 -38
  29. package/fixtures/valid/attestation.json +0 -25
  30. package/fixtures/valid/check-delivery.json +0 -14
  31. package/fixtures/valid/device-identity.json +0 -10
  32. package/fixtures/valid/governance-key-status.json +0 -11
  33. package/fixtures/valid/org-runner-identity.json +0 -10
  34. package/fixtures/valid/review-challenge-v2.json +0 -15
  35. package/fixtures/valid/runner-identity.json +0 -13
  36. package/schemas/cloud/attestation-v2.schema.json +0 -85
  37. package/schemas/cloud/attestation.schema.json +0 -49
  38. package/schemas/cloud/check-delivery.schema.json +0 -25
  39. package/schemas/cloud/device-identity.schema.json +0 -18
  40. package/schemas/cloud/governance-key-status.schema.json +0 -19
  41. package/schemas/cloud/org-runner-identity.schema.json +0 -21
  42. package/schemas/cloud/review-challenge-v2.schema.json +0 -23
  43. package/schemas/cloud/runner-identity.schema.json +0 -42
  44. package/src/control-plane-routes.ts +0 -35
  45. package/src/github-governance.ts +0 -850
@@ -0,0 +1,275 @@
1
+ import type { Json } from "./schema";
2
+
3
+ export const STATE_MACHINE_SCHEMA_VERSION = "archcontext.state-machine/v1";
4
+ export const STATE_MACHINE_CHECK_SCHEMA_VERSION = "archcontext.state-machine-check/v1";
5
+ /** The largest product of region sizes that a model may declare; the check enumerates at most this many global states. */
6
+ export const STATE_MACHINE_PRODUCT_LIMIT = 100_000;
7
+
8
+ export interface StateMachineCodeSource {
9
+ kind: "code";
10
+ /** A repository-relative POSIX path. */
11
+ path: string;
12
+ symbol?: string;
13
+ confirmedDigest?: string;
14
+ }
15
+
16
+ export interface StateMachineEnvironmentSource {
17
+ kind: "environment";
18
+ }
19
+
20
+ export interface StateMachineState {
21
+ id: string;
22
+ label: string;
23
+ terminal?: boolean;
24
+ }
25
+
26
+ export interface StateMachineRegion {
27
+ id: string;
28
+ label: string;
29
+ initial: string;
30
+ states: StateMachineState[];
31
+ /** The code that owns the region. A region without one is a history region. */
32
+ source?: StateMachineCodeSource;
33
+ }
34
+
35
+ /** `when` maps a region to the states the step accepts; `then` maps a region to the state the step writes. */
36
+ export interface StateMachineStep {
37
+ when: Record<string, string[]>;
38
+ then: Record<string, string>;
39
+ }
40
+
41
+ export interface StateMachineEvent {
42
+ id: string;
43
+ label: string;
44
+ source: StateMachineCodeSource | StateMachineEnvironmentSource;
45
+ steps: StateMachineStep[];
46
+ }
47
+
48
+ export interface StateMachineFinding {
49
+ /** An https URL of the issue that tracks the known break. */
50
+ tracking: string;
51
+ }
52
+
53
+ interface StateMachineRuleBase {
54
+ id: string;
55
+ label: string;
56
+ finding?: StateMachineFinding;
57
+ }
58
+
59
+ /** No reachable global state has every named region in one of its listed states. */
60
+ export interface StateMachineNeverRule extends StateMachineRuleBase {
61
+ never: Record<string, string[]>;
62
+ final?: never;
63
+ }
64
+
65
+ /** Once its one region is in a listed state, no enabled step moves it to another state. */
66
+ export interface StateMachineFinalRule extends StateMachineRuleBase {
67
+ final: Record<string, string[]>;
68
+ never?: never;
69
+ }
70
+
71
+ export type StateMachineRule = StateMachineNeverRule | StateMachineFinalRule;
72
+
73
+ /** `schemas/repo/architecture-state-machine.schema.json`, one file under `.archcontext/model/state-machines/`. */
74
+ export interface StateMachineV1 {
75
+ schemaVersion: typeof STATE_MACHINE_SCHEMA_VERSION;
76
+ id: string;
77
+ capabilityId: string;
78
+ name: string;
79
+ regions: StateMachineRegion[];
80
+ events: StateMachineEvent[];
81
+ rules: StateMachineRule[];
82
+ }
83
+
84
+ export type StateMachineInvariant =
85
+ | "state-machine-id-duplicate"
86
+ | "state-machine-capability-missing"
87
+ | "state-machine-initial-unknown"
88
+ | "state-machine-region-unknown"
89
+ | "state-machine-state-unknown"
90
+ | "state-machine-step-source-missing"
91
+ | "state-machine-product-too-large";
92
+
93
+ export interface StateMachineIssue {
94
+ /** The machine id. */
95
+ entityId: string;
96
+ /** The path of the value inside the machine, for example `regions[1].initial`. */
97
+ field: string;
98
+ invariant: StateMachineInvariant;
99
+ }
100
+
101
+ /** One state per region, keyed by region id in declaration order. */
102
+ export type StateMachineGlobalState = Record<string, string>;
103
+
104
+ /** `step` is the 1-based index of the step in its event. */
105
+ export interface StateMachinePathStep {
106
+ event: string;
107
+ step: number;
108
+ }
109
+
110
+ export interface StateMachineGuard {
111
+ event: string;
112
+ step: number;
113
+ region: string;
114
+ }
115
+
116
+ export type StateMachineRuleStatus = "holds" | "broken" | "finding-open" | "finding-resolved";
117
+
118
+ export interface StateMachineRuleResult {
119
+ id: string;
120
+ kind: "never" | "final";
121
+ status: StateMachineRuleStatus;
122
+ /** Present when the rule carries a finding. */
123
+ tracking?: string;
124
+ /** Present when the rule is broken. */
125
+ state?: StateMachineGlobalState;
126
+ /** Present when the rule is broken: the shortest path to `state`; for a `final` rule it ends with the step that moves the region. */
127
+ path?: StateMachinePathStep[];
128
+ /** Present when the rule holds and the check ran the protection analysis. */
129
+ protectedBy?: StateMachineGuard[];
130
+ }
131
+
132
+ export type StateMachineBreak =
133
+ | { kind: "unreachable-state"; region: string; state: string }
134
+ | { kind: "dead-step"; event: string; step: number }
135
+ | { kind: "deadlock"; state: StateMachineGlobalState; path: StateMachinePathStep[]; count: number };
136
+
137
+ export interface StateMachineMachineReport {
138
+ id: string;
139
+ capabilityId: string;
140
+ reachableStates: number;
141
+ transitions: number;
142
+ rules: StateMachineRuleResult[];
143
+ breaks: StateMachineBreak[];
144
+ }
145
+
146
+ /** The model-only result of `checkStateMachines`: rules and breaks, no code read. */
147
+ export interface StateMachineRuleCheckV1 {
148
+ schemaVersion: typeof STATE_MACHINE_CHECK_SCHEMA_VERSION;
149
+ /** Sorted by machine id. */
150
+ machines: StateMachineMachineReport[];
151
+ }
152
+
153
+ export type StateMachineAnchorStatus =
154
+ | "anchor-missing-path"
155
+ | "anchor-language-unsupported"
156
+ | "anchor-missing-symbol"
157
+ | "anchor-ambiguous-symbol"
158
+ | "unchecked"
159
+ | "anchor-unconfirmed"
160
+ | "anchor-changed"
161
+ | "confirmed";
162
+
163
+ /** The status of one `code` source of a region or an event, measured against the current file. */
164
+ export interface StateMachineAnchor {
165
+ owner: "region" | "event";
166
+ ownerId: string;
167
+ path: string;
168
+ symbol?: string;
169
+ status: StateMachineAnchorStatus;
170
+ /** Present for `anchor-unconfirmed`, `anchor-changed` and `confirmed`. */
171
+ digest?: string;
172
+ /** Present for `unchecked`: the reason code of the unavailable symbol reader. */
173
+ reason?: "index-missing" | "index-open-failed";
174
+ }
175
+
176
+ export interface StateMachineCheckMachineV1 extends StateMachineMachineReport {
177
+ /** Every code anchor, regions first, then events, each in declaration order. */
178
+ anchors: StateMachineAnchor[];
179
+ }
180
+
181
+ /** `schemas/runtime/state-machine-check.schema.json`, the data of `archctx state-machines check`. */
182
+ export interface StateMachineCheckReportV1 {
183
+ schemaVersion: typeof STATE_MACHINE_CHECK_SCHEMA_VERSION;
184
+ /** Sorted by machine id. */
185
+ machines: StateMachineCheckMachineV1[];
186
+ }
187
+
188
+ type NodeRecord = Readonly<Record<string, Json | undefined>>;
189
+
190
+ /**
191
+ * Cross-entity rules of the state machine model that the per-file schema cannot state. The
192
+ * loader and the YAML model store both call this one function on schema-valid machines, so
193
+ * `archctx validate` and `archctx state-machines check` cannot disagree.
194
+ *
195
+ * The result is aligned with `stateMachines`: entry `i` holds the issues of machine `i`, so a
196
+ * caller can name the file of each issue even when two machines share an id. A repeated machine
197
+ * id is reported on every machine after the first. A lookup that meets a duplicate id inside a
198
+ * machine uses the first declaration. A region that the machine does not declare is reported
199
+ * once; its states are not checked. Each entry is sorted by field, then invariant.
200
+ */
201
+ export function stateMachineModelIssuesByMachine(model: { nodes: readonly NodeRecord[]; stateMachines: readonly StateMachineV1[] }): StateMachineIssue[][] {
202
+ const capabilities = new Set(model.nodes.filter((node) => node.kind === "capability" && typeof node.id === "string").map((node) => node.id as string));
203
+ const machineIds = new Set<string>();
204
+ return model.stateMachines.map((machine) => {
205
+ const issues: StateMachineIssue[] = [];
206
+ const report = (field: string, invariant: StateMachineInvariant) => issues.push({ entityId: machine.id, field, invariant });
207
+ if (machineIds.has(machine.id)) report("id", "state-machine-id-duplicate");
208
+ machineIds.add(machine.id);
209
+ if (!capabilities.has(machine.capabilityId)) report("capabilityId", "state-machine-capability-missing");
210
+ const regions = new Map<string, Set<string>>();
211
+ let product = 1;
212
+ machine.regions.forEach((region, regionIndex) => {
213
+ if (regions.has(region.id)) report(`regions[${regionIndex}].id`, "state-machine-id-duplicate");
214
+ const states = new Set<string>();
215
+ region.states.forEach((state, stateIndex) => {
216
+ if (states.has(state.id)) report(`regions[${regionIndex}].states[${stateIndex}].id`, "state-machine-id-duplicate");
217
+ states.add(state.id);
218
+ });
219
+ if (!states.has(region.initial)) report(`regions[${regionIndex}].initial`, "state-machine-initial-unknown");
220
+ if (!regions.has(region.id)) regions.set(region.id, states);
221
+ product *= region.states.length;
222
+ });
223
+ if (product > STATE_MACHINE_PRODUCT_LIMIT) report("regions", "state-machine-product-too-large");
224
+ const checkStates = (field: string, entries: Record<string, string | string[]>) => {
225
+ for (const [regionId, value] of Object.entries(entries)) {
226
+ const states = regions.get(regionId);
227
+ if (!states) {
228
+ report(`${field}.${regionId}`, "state-machine-region-unknown");
229
+ continue;
230
+ }
231
+ if (typeof value === "string") {
232
+ if (!states.has(value)) report(`${field}.${regionId}`, "state-machine-state-unknown");
233
+ continue;
234
+ }
235
+ value.forEach((state, index) => {
236
+ if (!states.has(state)) report(`${field}.${regionId}[${index}]`, "state-machine-state-unknown");
237
+ });
238
+ }
239
+ };
240
+ const eventIds = new Set<string>();
241
+ machine.events.forEach((event, eventIndex) => {
242
+ if (eventIds.has(event.id)) report(`events[${eventIndex}].id`, "state-machine-id-duplicate");
243
+ eventIds.add(event.id);
244
+ event.steps.forEach((step, stepIndex) => {
245
+ const field = `events[${eventIndex}].steps[${stepIndex}]`;
246
+ checkStates(`${field}.when`, step.when);
247
+ checkStates(`${field}.then`, step.then);
248
+ for (const regionId of Object.keys(step.then)) {
249
+ if (!Object.hasOwn(step.when, regionId)) report(`${field}.then.${regionId}`, "state-machine-step-source-missing");
250
+ }
251
+ });
252
+ });
253
+ const ruleIds = new Set<string>();
254
+ machine.rules.forEach((rule, ruleIndex) => {
255
+ if (ruleIds.has(rule.id)) report(`rules[${ruleIndex}].id`, "state-machine-id-duplicate");
256
+ ruleIds.add(rule.id);
257
+ if (rule.never) checkStates(`rules[${ruleIndex}].never`, rule.never);
258
+ else checkStates(`rules[${ruleIndex}].final`, rule.final);
259
+ });
260
+ return issues.sort(compareIssues);
261
+ });
262
+ }
263
+
264
+ /** Every issue of `stateMachineModelIssuesByMachine` in one list, sorted by entity id, then field and invariant. */
265
+ export function stateMachineModelIssues(model: { nodes: readonly NodeRecord[]; stateMachines: readonly StateMachineV1[] }): StateMachineIssue[] {
266
+ return stateMachineModelIssuesByMachine(model).flat().sort(compareIssues);
267
+ }
268
+
269
+ function compareIssues(left: StateMachineIssue, right: StateMachineIssue): number {
270
+ return compare(left.entityId, right.entityId) || compare(left.field, right.field) || compare(left.invariant, right.invariant);
271
+ }
272
+
273
+ function compare(left: string, right: string): number {
274
+ return left < right ? -1 : left > right ? 1 : 0;
275
+ }
package/src/validator.ts CHANGED
@@ -31,6 +31,9 @@ type JsonSchema = {
31
31
  else?: JsonSchema;
32
32
  not?: JsonSchema;
33
33
  additionalProperties?: boolean | JsonSchema;
34
+ propertyNames?: JsonSchema;
35
+ minProperties?: number;
36
+ maxProperties?: number;
34
37
  minItems?: number;
35
38
  maxItems?: number;
36
39
  uniqueItems?: boolean;
@@ -179,6 +182,10 @@ function visit(
179
182
  if (!Object.hasOwn(schema.properties, key)) issues.push({ path: `${path}.${key}`, message: "additional property denied" });
180
183
  }
181
184
  }
185
+ const keys = Object.keys(objectValue);
186
+ if (schema.minProperties !== undefined && keys.length < schema.minProperties) issues.push({ path, message: `expected at least ${schema.minProperties} properties` });
187
+ if (schema.maxProperties !== undefined && keys.length > schema.maxProperties) issues.push({ path, message: `expected at most ${schema.maxProperties} properties` });
188
+ if (schema.propertyNames) for (const key of keys) visit(schema.propertyNames, key, `${path}.${key}`, issues, root, resolveSchema);
182
189
  if (schema.additionalProperties && typeof schema.additionalProperties === "object") {
183
190
  for (const [key, child] of Object.entries(objectValue)) {
184
191
  if (!Object.hasOwn(schema.properties ?? {}, key)) visit(schema.additionalProperties, child, `${path}.${key}`, issues, root, resolveSchema);
@@ -1,43 +0,0 @@
1
- {
2
- "schemaVersion": "archcontext.attestation/v2",
3
- "attestationId": "att_20260620_error",
4
- "challengeId": "chal_20260620_0001",
5
- "installationId": 10001,
6
- "repositoryId": 20002,
7
- "pullRequestNumber": 42,
8
- "headSha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
9
- "baseSha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
10
- "mergeBaseSha": "cccccccccccccccccccccccccccccccccccccccc",
11
- "headTreeOid": "tree_aaaaaaaa",
12
- "worktreeDigest": "sha256:0000000000000000000000000000000000000000000000000000000000000000",
13
- "modelDigest": "sha256:1111111111111111111111111111111111111111111111111111111111111111",
14
- "policyDigest": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
15
- "codeFactsDigest": "sha256:3333333333333333333333333333333333333333333333333333333333333333",
16
- "reviewDigest": "sha256:4444444444444444444444444444444444444444444444444444444444444444",
17
- "result": "error",
18
- "errorCode": "CODEGRAPH_FAILED",
19
- "execution": {
20
- "trustLevel": "organization",
21
- "source": "organization-runner-checkout",
22
- "principalId": "runner_0001",
23
- "publicKeyId": "key_runner_0001",
24
- "runnerId": "runner_0001",
25
- "workflowRef": "owner/repo/.github/workflows/archcontext-review.yml@refs/heads/main",
26
- "runId": "1234567890",
27
- "runAttempt": 1
28
- },
29
- "runtime": {
30
- "version": "0.2.1",
31
- "buildDigest": "sha256:5555555555555555555555555555555555555555555555555555555555555555",
32
- "codeGraphVersion": "1.0.1",
33
- "capabilitiesDigest": "sha256:6666666666666666666666666666666666666666666666666666666666666666"
34
- },
35
- "nonce": "nonce_base64url_0001",
36
- "startedAt": "2026-06-20T09:03:00Z",
37
- "completedAt": "2026-06-20T09:04:00Z",
38
- "expiresAt": "2026-06-20T09:15:00Z",
39
- "signature": {
40
- "algorithm": "ed25519",
41
- "value": "base64url_signature"
42
- }
43
- }
@@ -1,14 +0,0 @@
1
- {
2
- "schemaVersion": "archcontext.check-delivery/v1",
3
- "deliveryId": "delivery_dead_letter",
4
- "challengeId": "chal_20260620_0001",
5
- "checkRunId": null,
6
- "checkName": "ArchContext / Organization Runner",
7
- "headSha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
8
- "status": "DEAD_LETTER",
9
- "attemptCount": 5,
10
- "nextAttemptAt": null,
11
- "lastErrorCode": "CHALLENGE_SUPERSEDED",
12
- "createdAt": "2026-06-20T09:00:00Z",
13
- "updatedAt": "2026-06-20T09:30:00Z"
14
- }
@@ -1,15 +0,0 @@
1
- {
2
- "schemaVersion": "archcontext.review-challenge/v2",
3
- "challengeId": "chal_20260620_org",
4
- "installationId": 10001,
5
- "repositoryId": 20002,
6
- "pullRequestNumber": 42,
7
- "headSha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
8
- "baseSha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
9
- "nonce": "nonce_base64url_org",
10
- "requiredTrust": "organization",
11
- "policyProfileId": "policy.organization",
12
- "createdAt": "2026-06-20T09:00:00Z",
13
- "expiresAt": "2026-06-20T09:15:00Z",
14
- "status": "LEASED"
15
- }
@@ -1,16 +0,0 @@
1
- {
2
- "schemaVersion": "archcontext.runner-identity/v1",
3
- "runnerId": "runner_org_0001",
4
- "installationId": 10001,
5
- "repositoryIds": [],
6
- "scope": {
7
- "kind": "organization"
8
- },
9
- "workflowRef": "owner/repo/.github/workflows/archcontext-review.yml@refs/heads/main",
10
- "publicKeyId": "key_runner_org_0001",
11
- "publicKeyFingerprint": "sha256:8888888888888888888888888888888888888888888888888888888888888888",
12
- "status": "active",
13
- "createdAt": "2026-06-20T09:00:00Z",
14
- "rotatedAt": null,
15
- "revokedAt": null
16
- }
@@ -1,39 +0,0 @@
1
- {
2
- "schemaVersion": "archcontext.attestation/v2",
3
- "attestationId": "att_bad_finding",
4
- "challengeId": "chal_20260620_0001",
5
- "installationId": 10001,
6
- "repositoryId": 20002,
7
- "pullRequestNumber": 42,
8
- "headSha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
9
- "baseSha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
10
- "mergeBaseSha": "cccccccccccccccccccccccccccccccccccccccc",
11
- "headTreeOid": "tree_aaaaaaaa",
12
- "worktreeDigest": "sha256:0000000000000000000000000000000000000000000000000000000000000000",
13
- "modelDigest": "sha256:1111111111111111111111111111111111111111111111111111111111111111",
14
- "policyDigest": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
15
- "codeFactsDigest": "sha256:3333333333333333333333333333333333333333333333333333333333333333",
16
- "reviewDigest": "sha256:4444444444444444444444444444444444444444444444444444444444444444",
17
- "result": "pass",
18
- "execution": {
19
- "trustLevel": "developer",
20
- "source": "clean-commit-worktree",
21
- "principalId": "device_0001",
22
- "publicKeyId": "key_device_0001"
23
- },
24
- "runtime": {
25
- "version": "0.2.1",
26
- "buildDigest": "sha256:5555555555555555555555555555555555555555555555555555555555555555",
27
- "codeGraphVersion": "1.0.1",
28
- "capabilitiesDigest": "sha256:6666666666666666666666666666666666666666666666666666666666666666"
29
- },
30
- "nonce": "nonce_base64url_0001",
31
- "startedAt": "2026-06-20T09:03:00Z",
32
- "completedAt": "2026-06-20T09:04:00Z",
33
- "expiresAt": "2026-06-20T09:15:00Z",
34
- "signature": {
35
- "algorithm": "ed25519",
36
- "value": "base64url_signature"
37
- },
38
- "finding": "private finding body"
39
- }
@@ -1,14 +0,0 @@
1
- {
2
- "schemaVersion": "archcontext.check-delivery/v1",
3
- "deliveryId": "delivery_bad_legacy",
4
- "challengeId": "chal_20260620_0001",
5
- "checkRunId": "check_legacy",
6
- "checkName": "ArchContext / Legacy Architecture Review",
7
- "headSha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
8
- "status": "PENDING",
9
- "attemptCount": 0,
10
- "nextAttemptAt": null,
11
- "lastErrorCode": null,
12
- "createdAt": "2026-06-20T09:00:00Z",
13
- "updatedAt": "2026-06-20T09:00:00Z"
14
- }
@@ -1,16 +0,0 @@
1
- {
2
- "schemaVersion": "archcontext.review-challenge/v2",
3
- "challengeId": "chal_bad_private_field",
4
- "installationId": 10001,
5
- "repositoryId": 20002,
6
- "pullRequestNumber": 42,
7
- "headSha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
8
- "baseSha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
9
- "nonce": "nonce_base64url_0001",
10
- "requiredTrust": "developer",
11
- "policyProfileId": "policy.default",
12
- "createdAt": "2026-06-20T09:00:00Z",
13
- "expiresAt": "2026-06-20T09:15:00Z",
14
- "status": "PENDING",
15
- "filename": "src/private.ts"
16
- }
@@ -1,38 +0,0 @@
1
- {
2
- "schemaVersion": "archcontext.attestation/v2",
3
- "attestationId": "att_20260620_0001",
4
- "challengeId": "chal_20260620_0001",
5
- "installationId": 10001,
6
- "repositoryId": 20002,
7
- "pullRequestNumber": 42,
8
- "headSha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
9
- "baseSha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
10
- "mergeBaseSha": "cccccccccccccccccccccccccccccccccccccccc",
11
- "headTreeOid": "tree_aaaaaaaa",
12
- "worktreeDigest": "sha256:0000000000000000000000000000000000000000000000000000000000000000",
13
- "modelDigest": "sha256:1111111111111111111111111111111111111111111111111111111111111111",
14
- "policyDigest": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
15
- "codeFactsDigest": "sha256:3333333333333333333333333333333333333333333333333333333333333333",
16
- "reviewDigest": "sha256:4444444444444444444444444444444444444444444444444444444444444444",
17
- "result": "pass",
18
- "execution": {
19
- "trustLevel": "developer",
20
- "source": "clean-commit-worktree",
21
- "principalId": "device_0001",
22
- "publicKeyId": "key_device_0001"
23
- },
24
- "runtime": {
25
- "version": "0.2.1",
26
- "buildDigest": "sha256:5555555555555555555555555555555555555555555555555555555555555555",
27
- "codeGraphVersion": "1.0.1",
28
- "capabilitiesDigest": "sha256:6666666666666666666666666666666666666666666666666666666666666666"
29
- },
30
- "nonce": "nonce_base64url_0001",
31
- "startedAt": "2026-06-20T09:03:00Z",
32
- "completedAt": "2026-06-20T09:04:00Z",
33
- "expiresAt": "2026-06-20T09:15:00Z",
34
- "signature": {
35
- "algorithm": "ed25519",
36
- "value": "base64url_signature"
37
- }
38
- }
@@ -1,25 +0,0 @@
1
- {
2
- "schemaVersion": "archcontext.attestation/v1",
3
- "attestationId": "att_123",
4
- "challengeId": "challenge_123",
5
- "repository": {
6
- "provider": "github",
7
- "owner": "ancienttwo",
8
- "name": "arch-context",
9
- "visibility": "private"
10
- },
11
- "headSha": "abc123",
12
- "worktreeDigest": "sha256:0000000000000000000000000000000000000000000000000000000000000000",
13
- "reviewDigest": "sha256:1111111111111111111111111111111111111111111111111111111111111111",
14
- "device": {
15
- "deviceId": "device_local",
16
- "publicKeyId": "pk_local"
17
- },
18
- "issuedAt": "2026-06-19T00:00:00Z",
19
- "expiresAt": "2026-06-19T00:10:00Z",
20
- "trustLevel": "developer",
21
- "signature": {
22
- "alg": "ed25519",
23
- "value": "base64-test-signature"
24
- }
25
- }
@@ -1,14 +0,0 @@
1
- {
2
- "schemaVersion": "archcontext.check-delivery/v1",
3
- "deliveryId": "delivery_0001",
4
- "challengeId": "chal_20260620_0001",
5
- "checkRunId": "check_0001",
6
- "checkName": "ArchContext / Developer Review",
7
- "headSha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
8
- "status": "PENDING",
9
- "attemptCount": 0,
10
- "nextAttemptAt": null,
11
- "lastErrorCode": null,
12
- "createdAt": "2026-06-20T09:00:00Z",
13
- "updatedAt": "2026-06-20T09:00:00Z"
14
- }
@@ -1,10 +0,0 @@
1
- {
2
- "schemaVersion": "archcontext.device-identity/v1",
3
- "deviceId": "device_0001",
4
- "accountId": "acct_0001",
5
- "publicKeyId": "key_device_0001",
6
- "publicKeyFingerprint": "sha256:8888888888888888888888888888888888888888888888888888888888888888",
7
- "status": "active",
8
- "createdAt": "2026-06-20T09:00:00Z",
9
- "revokedAt": null
10
- }
@@ -1,11 +0,0 @@
1
- {
2
- "schemaVersion": "archcontext.governance-key-status/v1",
3
- "publicKeyId": "key_runner_0001",
4
- "ownerKind": "runner",
5
- "ownerId": "runner_0001",
6
- "fingerprint": "sha256:9999999999999999999999999999999999999999999999999999999999999999",
7
- "status": "active",
8
- "createdAt": "2026-06-20T09:00:00Z",
9
- "rotatedAt": null,
10
- "revokedAt": null
11
- }
@@ -1,10 +0,0 @@
1
- {
2
- "schemaVersion": "archcontext.org-runner-identity/v1",
3
- "runnerId": "runner_acme_prod_1",
4
- "installationId": 12345,
5
- "repositoryNumericIds": [1001, 1002],
6
- "publicKeyId": "org_pk_1",
7
- "publicKeyFingerprint": "sha256:3333333333333333333333333333333333333333333333333333333333333333",
8
- "status": "active",
9
- "createdAt": "2026-06-19T00:00:00Z"
10
- }
@@ -1,15 +0,0 @@
1
- {
2
- "schemaVersion": "archcontext.review-challenge/v2",
3
- "challengeId": "chal_20260620_0001",
4
- "installationId": 10001,
5
- "repositoryId": 20002,
6
- "pullRequestNumber": 42,
7
- "headSha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
8
- "baseSha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
9
- "nonce": "nonce_base64url_0001",
10
- "requiredTrust": "developer",
11
- "policyProfileId": "policy.default",
12
- "createdAt": "2026-06-20T09:00:00Z",
13
- "expiresAt": "2026-06-20T09:15:00Z",
14
- "status": "PENDING"
15
- }
@@ -1,13 +0,0 @@
1
- {
2
- "schemaVersion": "archcontext.runner-identity/v1",
3
- "runnerId": "runner_0001",
4
- "installationId": 10001,
5
- "repositoryIds": [20002],
6
- "workflowRef": "owner/repo/.github/workflows/archcontext-review.yml@refs/heads/main",
7
- "publicKeyId": "key_runner_0001",
8
- "publicKeyFingerprint": "sha256:7777777777777777777777777777777777777777777777777777777777777777",
9
- "status": "active",
10
- "createdAt": "2026-06-20T09:00:00Z",
11
- "rotatedAt": null,
12
- "revokedAt": null
13
- }