@intentius/terragucci 0.4.34 → 0.4.36

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.
@@ -8,25 +8,27 @@
8
8
  "properties": {
9
9
  "schema": { "const": "terragucci.audit/v1" },
10
10
  "id": { "type": "string", "description": "sha256: over where the entry came from; the same records give the same id." },
11
- "kind": { "enum": ["approval-requested", "approval", "approval-revoked", "override-requested", "override", "override-revoked", "apply", "refused", "migration", "unlock", "state-export", "ephemeral-apply", "ephemeral-destroy"] },
11
+ "kind": { "enum": ["approval-requested", "approval", "approval-revoked", "override-requested", "override", "override-revoked", "apply", "refused", "migration", "unlock", "state-export", "ephemeral-apply", "ephemeral-destroy", "unrecorded-write"] },
12
12
  "project": { "type": "string", "description": "<host>/<path> of the repo." },
13
13
  "at": { "type": "string", "description": "When it happened, ISO 8601." },
14
- "who": { "type": ["string", "null"], "description": "The approver, the overrider, whoever removed the line, or for an apply the approver it applied under. Null when nobody did." },
15
- "what": { "type": "string", "description": "The gate (wave-<k>, or a migration's name) or, for an override or a state export, the root." },
14
+ "who": { "type": ["string", "null"], "description": "The approver, the overrider, whoever removed the line, for an apply the approver it applied under, or for an unrecorded write the writer a log of the state bucket names. Null when nobody did, or no log names one." },
15
+ "what": { "type": "string", "description": "The gate (wave-<k>, or a migration's name) or, for an override, a state export or an unrecorded write, the root." },
16
16
  "digest": { "type": ["string", "null"], "description": "The wave's set digest, or the digest an override binds. Null when a root failed to plan." },
17
17
  "result": { "type": "string" },
18
18
  "evidence": {
19
19
  "type": "object",
20
20
  "required": ["source"],
21
21
  "properties": {
22
- "source": { "enum": ["ledger", "report"] },
22
+ "source": { "enum": ["ledger", "report", "state"] },
23
23
  "branch": { "type": "string" },
24
24
  "path": { "type": "string" },
25
25
  "commit": { "type": "string" },
26
26
  "bucket": { "type": "string" },
27
27
  "key": { "type": "string" },
28
28
  "url": { "type": "string" },
29
- "job_url": { "type": "string" }
29
+ "job_url": { "type": "string" },
30
+ "location": { "type": "string", "description": "An unrecorded write: the state's location." },
31
+ "version_id": { "type": "string", "description": "An unrecorded write: the version the store lists." }
30
32
  }
31
33
  },
32
34
  "detail": { "type": "object", "description": "What else the source says, by kind." }
@@ -268,6 +268,20 @@
268
268
  "report": { "type": "string", "description": "The wave's report.html, when the page can link it." }
269
269
  }
270
270
  }
271
+ },
272
+ "unrecorded": {
273
+ "type": "array",
274
+ "description": "The versions the state's store lists that no wave or migration recorded, from the audit trail's unrecorded-write entries, newest first. Absent when there are none.",
275
+ "items": {
276
+ "type": "object",
277
+ "required": ["version_id", "written_at", "who"],
278
+ "properties": {
279
+ "version_id": { "type": "string" },
280
+ "written_at": { "type": "string" },
281
+ "who": { "type": ["string", "null"], "description": "The writer a log of the state bucket names, else null." },
282
+ "deleted": { "type": "boolean", "description": "An S3 delete marker." }
283
+ }
284
+ }
271
285
  }
272
286
  }
273
287
  },
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://intentius.io/terragucci/schemas/estates/v1/estates.schema.json",
4
+ "title": "terragucci.estates/v1",
5
+ "description": "estates.json at the top of a reports prefix: each estate whose roster a tf-apply wave or an estate migration wrote, with its resource count. Within v1 fields are only added, and an existing field never changes meaning.",
6
+ "type": "object",
7
+ "required": ["schema", "estates"],
8
+ "properties": {
9
+ "schema": { "const": "terragucci.estates/v1" },
10
+ "estates": {
11
+ "type": "array",
12
+ "description": "By estate name.",
13
+ "items": {
14
+ "type": "object",
15
+ "required": ["estate", "count", "at", "project", "root", "roster"],
16
+ "properties": {
17
+ "estate": { "type": "string", "description": "The estate a choudoufu root's live block names, or a stock root's path." },
18
+ "count": { "type": "integer", "description": "How many resources the roster holds." },
19
+ "at": { "type": "string", "description": "When the roster was read: the wave's end, or the migration's write." },
20
+ "project": { "type": "string" },
21
+ "root": { "type": "string" },
22
+ "roster": { "type": "string", "description": "The roster's key, relative to estates.json: estates/<estate>/roster.json." }
23
+ }
24
+ }
25
+ }
26
+ }
27
+ }
@@ -39,7 +39,7 @@
39
39
  "groups": { "type": "integer" },
40
40
  "totals": { "$ref": "#/$defs/totals" },
41
41
  "refused": { "type": "integer", "description": "Roots that refused to plan." },
42
- "failed": { "type": "integer", "description": "Roots that failed to plan or apply. Absent on rows written before it was kept." },
42
+ "failed": { "type": "integer", "description": "Roots that failed to plan or apply; on a tf-apply wave whose apply failed, every root of the wave. Absent on rows written before it was kept." },
43
43
  "changed": { "type": "integer", "description": "Roots with at least one change; on a tf-drift row, the roots that drifted." },
44
44
  "approval": { "enum": ["waiting", "approved", "not-required"], "description": "A tf-apply wave's gate." },
45
45
  "waiting_since": { "type": "string", "description": "When a waiting wave began waiting for an approval of its digest." },
@@ -177,6 +177,10 @@
177
177
  "rules": { "type": "array", "items": { "type": "string" }, "description": "The ids of the rules that denied, sorted (minor 10)." },
178
178
  "warnings": { "type": "array", "items": { "type": "string" } },
179
179
  "error": { "type": "string" },
180
+ "held_by": { "type": "array", "items": { "type": "string" }, "description": "With hold in policy.outcomes at base: the ids of the hold rules that matched, sorted; its wave waits for an approval (minor 40)." },
181
+ "holds": { "type": "array", "items": { "type": "string" }, "description": "The messages of those hold rules (minor 40)." },
182
+ "allowed_by": { "type": "array", "items": { "type": "string" }, "description": "With allow_unattended in policy.outcomes at base: the ids of the allow_unattended rules that matched, sorted (minor 40)." },
183
+ "overriders": { "type": "array", "items": { "type": "string" }, "description": "With scoped policy.override entries at base: who may override this root's denial by its rules, names then roles with their holders (minor 40)." },
180
184
  "override": {
181
185
  "description": "The policy override that stands for this root's plan and rules (minor 10).",
182
186
  "type": "object",
@@ -357,6 +361,32 @@
357
361
  }
358
362
  }
359
363
  },
364
+ "policy_gate": {
365
+ "type": "object",
366
+ "description": "What the policy's hold and allow_unattended rules did to the wave's gate: held, or unattended when every root that changes something is allowed and none holds; the rules' ids and, on a tf-apply wave, the commit the policy was read at (minor 40).",
367
+ "required": ["outcome", "rules"],
368
+ "properties": {
369
+ "outcome": { "enum": ["held", "unattended"] },
370
+ "rules": { "type": "array", "items": { "type": "string" } },
371
+ "commit": { "type": "string" }
372
+ }
373
+ },
374
+ "approval_rules": {
375
+ "type": "array",
376
+ "description": "The approval_rules entries at base the wave's roots take: what each asks for and, on a tf-apply wave, the approvers of its digest it counted and whether it is met (minor 40).",
377
+ "items": {
378
+ "type": "object",
379
+ "required": ["roots", "count", "approvers", "met"],
380
+ "properties": {
381
+ "roots": { "type": "array", "items": { "type": "string" } },
382
+ "count": { "type": "integer", "minimum": 1 },
383
+ "roles": { "type": "array", "items": { "type": "string" } },
384
+ "not_author": { "type": "boolean" },
385
+ "approvers": { "type": "array", "items": { "type": "string" } },
386
+ "met": { "type": "boolean" }
387
+ }
388
+ }
389
+ },
360
390
  "held_by_steps": {
361
391
  "type": "array",
362
392
  "items": { "type": "string" },
@@ -376,7 +406,32 @@
376
406
  "over": { "type": "boolean" }
377
407
  }
378
408
  },
379
- "state": { "enum": ["planned", "waiting", "applying", "applied", "refused", "failed"], "description": "Where the wave stands (minor 21): a tf-plan wave is planned; a tf-apply wave waiting, applying, applied, refused or failed." },
409
+ "state": { "enum": ["planned", "waiting", "applying", "applied", "refused", "failed", "blocked"], "description": "Where the wave stands (minor 21): a tf-plan wave is planned; a tf-apply wave waiting, applying, applied, refused or failed, or blocked when none of its roots ran because an upstream of each did not apply (minor 41)." },
410
+ "outcomes": {
411
+ "type": "array",
412
+ "description": "A tf-apply wave's outcome of each root once it ended (minor 41): applied, unchanged, failed (with the first line of its plan's or apply's error), waiting, refused, decided (its share or group job applies it), not-applied (another root of the wave failed to plan) or blocked (with blocked_by).",
413
+ "items": {
414
+ "type": "object",
415
+ "required": ["root", "outcome"],
416
+ "additionalProperties": false,
417
+ "properties": {
418
+ "root": { "type": "string" },
419
+ "outcome": { "enum": ["applied", "unchanged", "failed", "waiting", "refused", "decided", "not-applied", "blocked"] },
420
+ "error": { "type": "string" },
421
+ "blocked_by": { "type": "string" }
422
+ }
423
+ }
424
+ },
425
+ "blocked": {
426
+ "type": "array",
427
+ "description": "A tf-apply wave's roots that did not run because an upstream did not apply in this run; blocked_by names the root whose failure held it, past any root blocked in between (minor 41).",
428
+ "items": {
429
+ "type": "object",
430
+ "required": ["root", "blocked_by"],
431
+ "additionalProperties": false,
432
+ "properties": { "root": { "type": "string" }, "blocked_by": { "type": "string" } }
433
+ }
434
+ },
380
435
  "reads": { "type": "array", "items": { "type": "integer" }, "description": "The waves whose roots' state its roots read (minor 21)." },
381
436
  "replans_after": { "type": "array", "items": { "type": "integer" }, "description": "A tf-plan wave whose plans read outputs known only once these waves apply: it plans again after they apply, and when that plan changes something its gate holds it for an approval of that plan under gate always or on-destructive, but not under gate never; its review digest is null (minor 21)." },
382
437
  "preview": {
@@ -66,7 +66,7 @@
66
66
  "number": { "type": "integer" },
67
67
  "roots": { "type": "array", "items": { "type": "string" } },
68
68
  "reads": { "type": "array", "items": { "type": "integer" }, "description": "The waves whose roots' state its roots read." },
69
- "state": { "enum": ["not-started", "planned", "waiting", "applying", "applied", "refused", "failed"] },
69
+ "state": { "enum": ["not-started", "planned", "waiting", "applying", "applied", "refused", "failed", "blocked"] },
70
70
  "gate": { "type": "string", "description": "Its gate on the ledger, wave-<n>." },
71
71
  "policy": { "type": "string", "description": "The gate policy it ran under: always, on-destructive or never." },
72
72
  "approval": { "enum": ["not-requested", "waiting", "approved", "not-required"] },
@@ -29,6 +29,7 @@
29
29
  "properties": {
30
30
  "version_id": { "type": "string" },
31
31
  "commit": { "type": "string" },
32
+ "started": { "type": "string", "description": "When the wave that recorded the version started. terragucci audit counts a version its store says was written between this and finished as the wave's." },
32
33
  "finished": { "type": "string", "description": "When the wave that recorded the version finished." },
33
34
  "wave": { "type": "integer" },
34
35
  "path": { "type": "string", "description": "The wave's run directory, relative to the project's index.json." }