@intentius/chant 0.124.109 → 0.124.110
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/dist/__golden__/wave-loop/fan-out-applied.json +12 -6
- package/dist/__golden__/wave-loop/fan-out-apply-fails.json +8 -4
- package/dist/__golden__/wave-loop/fan-out-gated.json +4 -2
- package/dist/__golden__/wave-loop/fan-out-no-members.json +16 -8
- package/dist/__golden__/wave-loop/fan-out-plan-fails.json +8 -4
- package/dist/__golden__/wave-loop/fan-out-same-root.json +4 -2
- package/dist/agent-facts.d.ts +130 -0
- package/dist/agent-facts.js +196 -0
- package/dist/change-risk.d.ts +216 -0
- package/dist/change-risk.js +304 -0
- package/dist/change-set.d.ts +8 -0
- package/dist/ci-agent-alert.d.ts +139 -0
- package/dist/ci-agent-alert.js +342 -0
- package/dist/ci-agent-triggers.d.ts +152 -0
- package/dist/ci-agent-triggers.js +232 -0
- package/dist/ci-agent-verify-failed.d.ts +149 -0
- package/dist/ci-agent-verify-failed.js +191 -0
- package/dist/ci-agent.d.ts +136 -8
- package/dist/ci-agent.js +353 -26
- package/dist/ci-comment-commands.d.ts +8 -0
- package/dist/ci-comment-commands.js +17 -1
- package/dist/ci-comment-reject.d.ts +70 -0
- package/dist/ci-comment-reject.js +135 -0
- package/dist/ci-comment-replies.d.ts +3 -1
- package/dist/ci-comment-replies.js +6 -0
- package/dist/ci-estate/delivery.d.ts +25 -3
- package/dist/ci-estate/delivery.js +28 -9
- package/dist/ci-estate/page.d.ts +7 -3
- package/dist/ci-estate/page.js +19 -4
- package/dist/ci-estate/rows.d.ts +14 -2
- package/dist/ci-estate/rows.js +9 -1
- package/dist/ci-estate.d.ts +5 -2
- package/dist/ci-estate.js +3 -2
- package/dist/ci-handover.d.ts +2 -7
- package/dist/ci-handover.js +3 -20
- package/dist/ci-jobs.d.ts +6 -0
- package/dist/ci-jobs.js +17 -0
- package/dist/ci-note-commands.d.ts +2 -0
- package/dist/ci-note-commands.js +12 -1
- package/dist/ci-product-words.d.ts +151 -1
- package/dist/ci-product-words.js +1390 -3
- package/dist/ci-product.d.ts +100 -4
- package/dist/ci-product.js +99 -3
- package/dist/ci-respond-run.d.ts +9 -0
- package/dist/ci-respond-run.js +35 -4
- package/dist/ci-respond-summary-env.d.ts +56 -0
- package/dist/ci-respond-summary-env.js +81 -0
- package/dist/ci-respond-summary.d.ts +103 -0
- package/dist/ci-respond-summary.js +243 -0
- package/dist/ci-respond.d.ts +4 -2
- package/dist/ci-respond.js +4 -2
- package/dist/cli/command-group.js +1 -1
- package/dist/cli/commands/lint.js +21 -3
- package/dist/cli/handlers/agent.js +49 -4
- package/dist/cli/handlers/approve.js +3 -1
- package/dist/cli/handlers/build.d.ts +97 -1
- package/dist/cli/handlers/build.js +251 -3
- package/dist/cli/handlers/fan-out.js +55 -0
- package/dist/cli/handlers/graph.d.ts +14 -0
- package/dist/cli/handlers/graph.js +58 -3
- package/dist/cli/handlers/lifecycle-health.d.ts +7 -0
- package/dist/cli/handlers/lifecycle-health.js +47 -9
- package/dist/cli/handlers/lifecycle.js +4 -1
- package/dist/cli/handlers/notify-relay.d.ts +2 -2
- package/dist/cli/handlers/notify-relay.js +67 -7
- package/dist/cli/handlers/pipeline-agent.d.ts +30 -0
- package/dist/cli/handlers/pipeline-agent.js +255 -0
- package/dist/cli/handlers/pipeline-artifacts.d.ts +39 -0
- package/dist/cli/handlers/pipeline-artifacts.js +203 -0
- package/dist/cli/handlers/pipeline.d.ts +16 -0
- package/dist/cli/handlers/pipeline.js +112 -0
- package/dist/cli/handlers/pr-comment.js +4 -0
- package/dist/cli/handlers/pr-notes.js +4 -1
- package/dist/cli/handlers/pr.d.ts +20 -0
- package/dist/cli/handlers/pr.js +114 -11
- package/dist/cli/handlers/promote.js +792 -47
- package/dist/cli/handlers/reject.d.ts +84 -0
- package/dist/cli/handlers/reject.js +216 -0
- package/dist/cli/handlers/replan.d.ts +54 -0
- package/dist/cli/handlers/replan.js +177 -0
- package/dist/cli/handlers/run-generate.d.ts +5 -0
- package/dist/cli/handlers/run-generate.js +31 -4
- package/dist/cli/handlers/run-wave.js +15 -2
- package/dist/cli/handlers/run.js +4 -2
- package/dist/cli/handlers/stage.d.ts +35 -0
- package/dist/cli/handlers/stage.js +90 -0
- package/dist/cli/lsp/server.js +4 -0
- package/dist/cli/main.js +88 -8
- package/dist/cli/parse-args.js +35 -2
- package/dist/cli/registry.d.ts +12 -0
- package/dist/components/auto-release.d.ts +2 -0
- package/dist/components/auto-release.js +1 -0
- package/dist/components/capability.d.ts +40 -0
- package/dist/components/cli-support.d.ts +21 -1
- package/dist/components/cli-support.js +28 -6
- package/dist/components/component.d.ts +23 -4
- package/dist/components/component.schema.json +28 -0
- package/dist/components/declared-reads.d.ts +44 -4
- package/dist/components/declared-reads.js +80 -3
- package/dist/components/discover.d.ts +8 -0
- package/dist/components/discover.js +1 -1
- package/dist/components/driver.d.ts +13 -0
- package/dist/components/driver.js +23 -2
- package/dist/components/environment-sets.d.ts +229 -0
- package/dist/components/environment-sets.js +338 -0
- package/dist/components/fan-out-canary.d.ts +47 -0
- package/dist/components/fan-out-canary.js +58 -0
- package/dist/components/fan-out-run.d.ts +17 -0
- package/dist/components/fan-out-run.js +14 -1
- package/dist/components/fan-out-support.d.ts +7 -0
- package/dist/components/fan-out-support.js +1 -1
- package/dist/components/groups.d.ts +8 -1
- package/dist/components/groups.js +19 -1
- package/dist/components/index.d.ts +5 -2
- package/dist/components/index.js +4 -1
- package/dist/components/pr-cost.d.ts +28 -0
- package/dist/components/pr-cost.js +53 -0
- package/dist/components/pr-pipeline.d.ts +33 -0
- package/dist/components/pr-pipeline.js +32 -5
- package/dist/components/pr-policy.d.ts +33 -2
- package/dist/components/pr-policy.js +5 -2
- package/dist/components/pr-risk.d.ts +42 -0
- package/dist/components/pr-risk.js +74 -0
- package/dist/components/product-pipeline.d.ts +43 -0
- package/dist/components/product-pipeline.js +67 -1
- package/dist/components/promote.d.ts +6 -0
- package/dist/components/promote.js +13 -0
- package/dist/components/release-compile.js +3 -1
- package/dist/components/release-gate.d.ts +6 -1
- package/dist/components/release-gate.js +10 -2
- package/dist/components/step-environments.d.ts +236 -0
- package/dist/components/step-environments.js +392 -0
- package/dist/components/upstream-replan.d.ts +201 -0
- package/dist/components/upstream-replan.js +249 -0
- package/dist/components/verify-step.d.ts +30 -0
- package/dist/components/verify-step.js +27 -0
- package/dist/components/wave-plan.js +6 -2
- package/dist/config-environments.d.ts +4 -2
- package/dist/control/dispatch.d.ts +15 -0
- package/dist/control/dispatch.js +28 -4
- package/dist/cost-estimate.d.ts +188 -0
- package/dist/cost-estimate.js +363 -0
- package/dist/drift-record.d.ts +36 -0
- package/dist/drift-record.js +44 -0
- package/dist/engine-facts.d.ts +105 -0
- package/dist/engine-facts.js +111 -0
- package/dist/exit-codes.d.ts +4 -3
- package/dist/exit-codes.js +4 -3
- package/dist/flag-params.d.ts +2 -2
- package/dist/flag-params.js +9 -4
- package/dist/floor-table.data.js +53 -0
- package/dist/forge-token-vars.d.ts +12 -0
- package/dist/forge-token-vars.js +25 -0
- package/dist/gate-decision.d.ts +3 -1
- package/dist/gate-decision.js +3 -1
- package/dist/gated-waves.d.ts +2 -0
- package/dist/gated-waves.js +1 -0
- package/dist/graph-ir.d.ts +30 -0
- package/dist/graph-ir.js +33 -1
- package/dist/graph-refs.d.ts +26 -0
- package/dist/graph-refs.js +34 -3
- package/dist/graph-schema/graph.schema.json +136 -0
- package/dist/health.d.ts +65 -0
- package/dist/health.js +62 -0
- package/dist/lexicon.d.ts +188 -1
- package/dist/lifecycle/disruption.d.ts +14 -1
- package/dist/lifecycle/disruption.js +5 -1
- package/dist/lifecycle/gate-change-set.d.ts +8 -0
- package/dist/lifecycle/gate-change-set.js +2 -1
- package/dist/lifecycle/gate-ledger.d.ts +26 -0
- package/dist/lifecycle/gate-rejection.d.ts +82 -0
- package/dist/lifecycle/gate-rejection.js +93 -0
- package/dist/lifecycle/gate-seal.d.ts +3 -3
- package/dist/lifecycle/gate-seal.js +5 -5
- package/dist/lifecycle/observe.d.ts +17 -0
- package/dist/lifecycle/observe.js +10 -1
- package/dist/lifecycle/release-cut.js +4 -0
- package/dist/lifecycle/release-ledger.d.ts +8 -0
- package/dist/lifecycle/release-risk.d.ts +137 -0
- package/dist/lifecycle/release-risk.js +214 -0
- package/dist/lifecycle/release-store.d.ts +9 -0
- package/dist/lifecycle/release-store.js +4 -0
- package/dist/lifecycle/stage-log.d.ts +85 -0
- package/dist/lifecycle/stage-log.js +141 -0
- package/dist/lint/canary-checks.d.ts +31 -0
- package/dist/lint/canary-checks.js +45 -0
- package/dist/lint/rule.d.ts +1 -0
- package/dist/lint/rules/evl012-pipeline-fold.d.ts +14 -0
- package/dist/lint/rules/evl012-pipeline-fold.js +30 -0
- package/dist/lint/rules/index.d.ts +1 -0
- package/dist/lint/rules/index.js +3 -0
- package/dist/notify-relay-repo.d.ts +54 -0
- package/dist/notify-relay-repo.js +84 -0
- package/dist/notify-relay.d.ts +53 -3
- package/dist/notify-relay.js +96 -3
- package/dist/notify.d.ts +57 -1
- package/dist/notify.js +7 -1
- package/dist/notify.schema.json +61 -3
- package/dist/observation.d.ts +34 -0
- package/dist/observation.js +14 -1
- package/dist/op/activities/review-agent.d.ts +39 -2
- package/dist/op/activities/review-agent.js +88 -5
- package/dist/op/agent-permit.d.ts +88 -0
- package/dist/op/agent-permit.js +97 -0
- package/dist/op/gate-approval-base.d.ts +8 -0
- package/dist/op/gate-approval-base.js +9 -0
- package/dist/op/gate-approval.d.ts +30 -1
- package/dist/op/gate-approval.js +23 -2
- package/dist/op/gate-quorum.d.ts +114 -8
- package/dist/op/gate-quorum.js +198 -21
- package/dist/op/gate-reject.d.ts +79 -0
- package/dist/op/gate-reject.js +96 -0
- package/dist/op/gate-summary.js +1 -1
- package/dist/op/gate.d.ts +28 -3
- package/dist/op/gate.js +55 -13
- package/dist/op/generate-pipeline.d.ts +15 -1
- package/dist/op/generate-pipeline.js +32 -5
- package/dist/op/index.d.ts +11 -6
- package/dist/op/index.js +10 -5
- package/dist/op/local-executor.d.ts +2 -0
- package/dist/op/local-executor.js +23 -4
- package/dist/op/op-waves-after-plan.d.ts +23 -0
- package/dist/op/op-waves-after-plan.js +12 -1
- package/dist/op/op-waves-capability-spec.d.ts +14 -0
- package/dist/op/op-waves-capability-spec.js +46 -6
- package/dist/op/op-waves-capability.d.ts +21 -13
- package/dist/op/op-waves-capability.js +22 -59
- package/dist/op/op-waves-environment-sets.d.ts +41 -0
- package/dist/op/op-waves-environment-sets.js +82 -0
- package/dist/op/op-waves-quorum-warnings.d.ts +53 -0
- package/dist/op/op-waves-quorum-warnings.js +90 -0
- package/dist/op/op-waves-release-port.d.ts +7 -0
- package/dist/op/op-waves-release-port.js +15 -3
- package/dist/op/op-waves-release.d.ts +15 -0
- package/dist/op/op-waves-release.js +15 -0
- package/dist/op/op-waves-run.d.ts +37 -3
- package/dist/op/op-waves-run.js +141 -18
- package/dist/op/op-waves-soak.d.ts +57 -0
- package/dist/op/op-waves-soak.js +111 -0
- package/dist/op/op-waves-split.d.ts +4 -0
- package/dist/op/op-waves-split.js +4 -0
- package/dist/op/op-waves.d.ts +67 -4
- package/dist/op/op-waves.js +71 -3
- package/dist/pipeline/agent-ajv.d.ts +4 -0
- package/dist/pipeline/agent-ajv.js +14 -0
- package/dist/pipeline/agent-steps.d.ts +329 -0
- package/dist/pipeline/agent-steps.js +602 -0
- package/dist/pipeline/artifacts.d.ts +264 -0
- package/dist/pipeline/artifacts.js +425 -0
- package/dist/pipeline/diff.d.ts +45 -0
- package/dist/pipeline/diff.js +177 -0
- package/dist/pipeline/fold.d.ts +43 -0
- package/dist/pipeline/fold.js +140 -0
- package/dist/pipeline/generate.d.ts +52 -0
- package/dist/pipeline/generate.js +120 -0
- package/dist/pipeline/product.d.ts +225 -0
- package/dist/pipeline/product.js +257 -0
- package/dist/pipeline/promote.d.ts +404 -0
- package/dist/pipeline/promote.js +694 -0
- package/dist/pipeline/read.d.ts +37 -0
- package/dist/pipeline/read.js +58 -0
- package/dist/pipeline/rendered.d.ts +25 -0
- package/dist/pipeline/rendered.js +53 -0
- package/dist/pipeline/soak-checks.d.ts +80 -0
- package/dist/pipeline/soak-checks.js +254 -0
- package/dist/pipeline/soak-gate.d.ts +97 -0
- package/dist/pipeline/soak-gate.js +176 -0
- package/dist/pipeline/soak-sources.d.ts +17 -0
- package/dist/pipeline/soak-sources.js +42 -0
- package/dist/pipeline/soak.d.ts +260 -0
- package/dist/pipeline/soak.js +378 -0
- package/dist/pipeline/spec.d.ts +724 -0
- package/dist/pipeline/spec.js +567 -0
- package/dist/pipeline/stage-ledger.d.ts +187 -0
- package/dist/pipeline/stage-ledger.js +185 -0
- package/dist/pipeline/stage-waves.d.ts +114 -0
- package/dist/pipeline/stage-waves.js +161 -0
- package/dist/pipeline/stages.d.ts +64 -0
- package/dist/pipeline/stages.js +174 -0
- package/dist/pipeline/verify-rollback.d.ts +277 -0
- package/dist/pipeline/verify-rollback.js +393 -0
- package/dist/pipeline.d.ts +142 -0
- package/dist/pipeline.js +143 -0
- package/dist/pr-loop.d.ts +22 -0
- package/dist/pr-loop.js +8 -0
- package/dist/pr-plan-note.d.ts +15 -1
- package/dist/pr-plan-note.js +8 -0
- package/dist/pr-post.d.ts +31 -0
- package/dist/pr-post.js +89 -0
- package/dist/release-floors.d.ts +1 -1
- package/dist/release-floors.js +1 -1
- package/dist/report-store/audit.schema.json +50 -0
- package/dist/report-store/dora.schema.json +331 -0
- package/dist/report-store/estate.schema.json +96 -0
- package/dist/report-store/run.schema.json +14 -0
- package/dist/report-store.d.ts +151 -0
- package/dist/report-store.js +344 -0
- package/dist/run-event.d.ts +7 -2
- package/dist/wave-runtime.mjs +458 -404
- package/dist/workspace/catalog-edges.js +3 -3
- package/dist/workspace/change-set.schema.json +4 -0
- package/dist/workspace/ci-cloud-identity.d.ts +4 -0
- package/dist/workspace/ci-cloud-identity.js +30 -0
- package/dist/workspace/ci-run.js +17 -2
- package/dist/workspace/ci-secrets.d.ts +3 -1
- package/dist/workspace/ci-secrets.js +7 -1
- package/dist/workspace/compose-graph.d.ts +1 -1
- package/dist/workspace/compose-graph.js +3 -1
- package/dist/workspace/declaration.d.ts +27 -0
- package/dist/workspace/declaration.js +35 -0
- package/dist/workspace/declaration.schema.json +56 -0
- package/dist/workspace/graph-cli.js +26 -0
- package/dist/workspace/graph.schema.json +5 -1
- package/dist/workspace/identity-gate-rule.d.ts +4 -0
- package/dist/workspace/identity-gate-rule.js +2 -2
- package/dist/workspace/identity-reject-rule.d.ts +14 -0
- package/dist/workspace/identity-reject-rule.js +24 -0
- package/dist/workspace/identity.d.ts +3 -0
- package/dist/workspace/identity.js +2 -1
- package/dist/workspace/nested-graph.js +2 -0
- package/dist/workspace/pr-report.schema.json +65 -0
- package/dist/workspace/promotion-order.d.ts +19 -4
- package/dist/workspace/promotion-order.js +26 -4
- package/dist/workspace/release-train.d.ts +14 -0
- package/dist/workspace/release-train.js +32 -0
- package/dist/workspace/run-event.schema.json +2 -2
- package/dist/workspace/stack-read-edges.d.ts +19 -0
- package/dist/workspace/stack-read-edges.js +54 -0
- package/dist/workspace/status-gates.d.ts +51 -1
- package/dist/workspace/status-gates.js +60 -0
- package/dist/workspace/status-stages.d.ts +223 -0
- package/dist/workspace/status-stages.js +279 -0
- package/dist/workspace/status.d.ts +45 -1
- package/dist/workspace/status.js +109 -5
- package/dist/workspace/status.schema.json +283 -2
- package/dist/workspace/trust/seal.d.ts +7 -0
- package/dist/workspace/trust/seal.js +9 -0
- package/package.json +5 -1
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://intentius.io/chant/schemas/report-store/v1/dora.schema.json",
|
|
4
|
+
"title": "chant.dora/v1",
|
|
5
|
+
"description": "dora.json in a CI product's report store, beside estate.json: the four DORA metrics per member (project) and for the estate, from the workspace ledger (buildDelivery) or a product's own records (buildRecordDelivery) in @intentius/chant/ci-estate, and the release ledger's promotes and rollbacks. A product-named id (terragucci.dora/v1) is the same document, its product named by the id. Within v1 fields are only added, and an existing field never changes meaning.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"schema",
|
|
9
|
+
"generated",
|
|
10
|
+
"weeks",
|
|
11
|
+
"window",
|
|
12
|
+
"drift_window_seconds",
|
|
13
|
+
"audit",
|
|
14
|
+
"estate",
|
|
15
|
+
"projects"
|
|
16
|
+
],
|
|
17
|
+
"properties": {
|
|
18
|
+
"schema": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"pattern": "^[a-z][a-z0-9-]*\\.dora/v1$",
|
|
21
|
+
"description": "chant.dora/v1, or the product-named id <product>.dora/v1."
|
|
22
|
+
},
|
|
23
|
+
"product": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"description": "The product that wrote it. Required under chant.dora/v1."
|
|
26
|
+
},
|
|
27
|
+
"generated": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"description": "When the metrics were built, ISO 8601."
|
|
30
|
+
},
|
|
31
|
+
"weeks": {
|
|
32
|
+
"type": "integer",
|
|
33
|
+
"description": "How many weeks the metrics cover, the current one included."
|
|
34
|
+
},
|
|
35
|
+
"window": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"required": [
|
|
38
|
+
"from",
|
|
39
|
+
"to"
|
|
40
|
+
],
|
|
41
|
+
"properties": {
|
|
42
|
+
"from": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"description": "The Monday, 00:00 UTC, the window starts on."
|
|
45
|
+
},
|
|
46
|
+
"to": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"description": "When it ends: generated."
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"drift_window_seconds": {
|
|
53
|
+
"type": "integer",
|
|
54
|
+
"description": "An applied wave whose roots drift within this long counts as a failed change."
|
|
55
|
+
},
|
|
56
|
+
"audit": {
|
|
57
|
+
"type": "boolean",
|
|
58
|
+
"description": "Whether any apply record was read. Without one only drift counts."
|
|
59
|
+
},
|
|
60
|
+
"estate": {
|
|
61
|
+
"$ref": "#/$defs/metrics"
|
|
62
|
+
},
|
|
63
|
+
"projects": {
|
|
64
|
+
"type": "array",
|
|
65
|
+
"items": {
|
|
66
|
+
"type": "object",
|
|
67
|
+
"required": [
|
|
68
|
+
"project",
|
|
69
|
+
"deployments",
|
|
70
|
+
"per_week",
|
|
71
|
+
"lead_time",
|
|
72
|
+
"change_failure",
|
|
73
|
+
"restore",
|
|
74
|
+
"trend"
|
|
75
|
+
],
|
|
76
|
+
"properties": {
|
|
77
|
+
"project": {
|
|
78
|
+
"type": "string"
|
|
79
|
+
},
|
|
80
|
+
"deployments": {
|
|
81
|
+
"type": "integer"
|
|
82
|
+
},
|
|
83
|
+
"per_week": {
|
|
84
|
+
"type": "number"
|
|
85
|
+
},
|
|
86
|
+
"span_seconds": {
|
|
87
|
+
"$ref": "#/$defs/span_seconds"
|
|
88
|
+
},
|
|
89
|
+
"lead_time": {
|
|
90
|
+
"$ref": "#/$defs/lead_time"
|
|
91
|
+
},
|
|
92
|
+
"change_failure": {
|
|
93
|
+
"$ref": "#/$defs/change_failure"
|
|
94
|
+
},
|
|
95
|
+
"restore": {
|
|
96
|
+
"$ref": "#/$defs/restore"
|
|
97
|
+
},
|
|
98
|
+
"trend": {
|
|
99
|
+
"$ref": "#/$defs/trend"
|
|
100
|
+
},
|
|
101
|
+
"releases": {
|
|
102
|
+
"$ref": "#/$defs/releases"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"source": {
|
|
108
|
+
"const": "ledger",
|
|
109
|
+
"description": "Present when the metrics were read from the workspace ledger."
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"$defs": {
|
|
113
|
+
"span_seconds": {
|
|
114
|
+
"type": "integer",
|
|
115
|
+
"description": "What per_week divides by: from generated back to the oldest apply on record, or to the window's start when the history is older; at least a day. With no apply on record, the window's length. Absent from files written before it was added."
|
|
116
|
+
},
|
|
117
|
+
"seconds": {
|
|
118
|
+
"type": [
|
|
119
|
+
"integer",
|
|
120
|
+
"null"
|
|
121
|
+
],
|
|
122
|
+
"description": "A median in seconds; null when nothing counts."
|
|
123
|
+
},
|
|
124
|
+
"metrics": {
|
|
125
|
+
"type": "object",
|
|
126
|
+
"required": [
|
|
127
|
+
"deployments",
|
|
128
|
+
"per_week",
|
|
129
|
+
"lead_time",
|
|
130
|
+
"change_failure",
|
|
131
|
+
"restore",
|
|
132
|
+
"trend"
|
|
133
|
+
],
|
|
134
|
+
"properties": {
|
|
135
|
+
"deployments": {
|
|
136
|
+
"type": "integer",
|
|
137
|
+
"description": "Applied waves in the window."
|
|
138
|
+
},
|
|
139
|
+
"per_week": {
|
|
140
|
+
"type": "number",
|
|
141
|
+
"description": "Deployment frequency: applied waves per week over span_seconds. Files written before span_seconds divided by the whole window."
|
|
142
|
+
},
|
|
143
|
+
"span_seconds": {
|
|
144
|
+
"$ref": "#/$defs/span_seconds"
|
|
145
|
+
},
|
|
146
|
+
"lead_time": {
|
|
147
|
+
"$ref": "#/$defs/lead_time"
|
|
148
|
+
},
|
|
149
|
+
"change_failure": {
|
|
150
|
+
"$ref": "#/$defs/change_failure"
|
|
151
|
+
},
|
|
152
|
+
"restore": {
|
|
153
|
+
"$ref": "#/$defs/restore"
|
|
154
|
+
},
|
|
155
|
+
"trend": {
|
|
156
|
+
"$ref": "#/$defs/trend"
|
|
157
|
+
},
|
|
158
|
+
"releases": {
|
|
159
|
+
"$ref": "#/$defs/releases"
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
"lead_time": {
|
|
164
|
+
"type": "object",
|
|
165
|
+
"description": "From a change's first plan to its wave applied.",
|
|
166
|
+
"required": [
|
|
167
|
+
"changes",
|
|
168
|
+
"median_seconds",
|
|
169
|
+
"before_gate_seconds",
|
|
170
|
+
"at_gate_seconds",
|
|
171
|
+
"after_gate_seconds"
|
|
172
|
+
],
|
|
173
|
+
"properties": {
|
|
174
|
+
"changes": {
|
|
175
|
+
"type": "integer",
|
|
176
|
+
"description": "Applied waves whose first plan was found."
|
|
177
|
+
},
|
|
178
|
+
"median_seconds": {
|
|
179
|
+
"$ref": "#/$defs/seconds"
|
|
180
|
+
},
|
|
181
|
+
"before_gate_seconds": {
|
|
182
|
+
"$ref": "#/$defs/seconds"
|
|
183
|
+
},
|
|
184
|
+
"at_gate_seconds": {
|
|
185
|
+
"$ref": "#/$defs/seconds"
|
|
186
|
+
},
|
|
187
|
+
"after_gate_seconds": {
|
|
188
|
+
"$ref": "#/$defs/seconds"
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"change_failure": {
|
|
193
|
+
"type": "object",
|
|
194
|
+
"required": [
|
|
195
|
+
"applies",
|
|
196
|
+
"failed",
|
|
197
|
+
"drifted",
|
|
198
|
+
"rate"
|
|
199
|
+
],
|
|
200
|
+
"properties": {
|
|
201
|
+
"applies": {
|
|
202
|
+
"type": "integer",
|
|
203
|
+
"description": "Waves that applied or failed. A refused or waiting wave is not an apply."
|
|
204
|
+
},
|
|
205
|
+
"failed": {
|
|
206
|
+
"type": "integer"
|
|
207
|
+
},
|
|
208
|
+
"drifted": {
|
|
209
|
+
"type": "integer",
|
|
210
|
+
"description": "Applied waves whose roots drifted within drift_window_seconds."
|
|
211
|
+
},
|
|
212
|
+
"rate": {
|
|
213
|
+
"type": [
|
|
214
|
+
"number",
|
|
215
|
+
"null"
|
|
216
|
+
],
|
|
217
|
+
"description": "(failed + drifted) / applies; null with no applies."
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
"restore": {
|
|
222
|
+
"type": "object",
|
|
223
|
+
"required": [
|
|
224
|
+
"restored",
|
|
225
|
+
"open",
|
|
226
|
+
"median_seconds",
|
|
227
|
+
"apply_restored",
|
|
228
|
+
"drift_restored"
|
|
229
|
+
],
|
|
230
|
+
"properties": {
|
|
231
|
+
"restored": {
|
|
232
|
+
"type": "integer",
|
|
233
|
+
"description": "Failed applies and drift restored in the window."
|
|
234
|
+
},
|
|
235
|
+
"open": {
|
|
236
|
+
"type": "integer",
|
|
237
|
+
"description": "Failed roots no apply has restored yet, and drift no check has cleared."
|
|
238
|
+
},
|
|
239
|
+
"median_seconds": {
|
|
240
|
+
"$ref": "#/$defs/seconds"
|
|
241
|
+
},
|
|
242
|
+
"apply_restored": {
|
|
243
|
+
"type": "integer"
|
|
244
|
+
},
|
|
245
|
+
"drift_restored": {
|
|
246
|
+
"type": "integer"
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
"trend": {
|
|
251
|
+
"type": "array",
|
|
252
|
+
"description": "One row per week, oldest first.",
|
|
253
|
+
"items": {
|
|
254
|
+
"type": "object",
|
|
255
|
+
"required": [
|
|
256
|
+
"week",
|
|
257
|
+
"deployments",
|
|
258
|
+
"applies",
|
|
259
|
+
"failures",
|
|
260
|
+
"lead_time_seconds",
|
|
261
|
+
"restore_seconds"
|
|
262
|
+
],
|
|
263
|
+
"properties": {
|
|
264
|
+
"week": {
|
|
265
|
+
"type": "string",
|
|
266
|
+
"description": "The Monday the week starts on, YYYY-MM-DD."
|
|
267
|
+
},
|
|
268
|
+
"deployments": {
|
|
269
|
+
"type": "integer"
|
|
270
|
+
},
|
|
271
|
+
"applies": {
|
|
272
|
+
"type": "integer"
|
|
273
|
+
},
|
|
274
|
+
"failures": {
|
|
275
|
+
"type": "integer",
|
|
276
|
+
"description": "Failed applies and applied waves followed by drift."
|
|
277
|
+
},
|
|
278
|
+
"lead_time_seconds": {
|
|
279
|
+
"$ref": "#/$defs/seconds"
|
|
280
|
+
},
|
|
281
|
+
"restore_seconds": {
|
|
282
|
+
"$ref": "#/$defs/seconds"
|
|
283
|
+
},
|
|
284
|
+
"promotes": {
|
|
285
|
+
"type": "integer"
|
|
286
|
+
},
|
|
287
|
+
"rollbacks": {
|
|
288
|
+
"type": "integer"
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
"releases": {
|
|
294
|
+
"type": "object",
|
|
295
|
+
"description": "Deploy records of the release ledger in the window, by the command that wrote them. Absent when the ledger holds no deploy record.",
|
|
296
|
+
"required": [
|
|
297
|
+
"deploys",
|
|
298
|
+
"promotes",
|
|
299
|
+
"rollbacks",
|
|
300
|
+
"redeploys"
|
|
301
|
+
],
|
|
302
|
+
"properties": {
|
|
303
|
+
"deploys": {
|
|
304
|
+
"type": "integer",
|
|
305
|
+
"description": "Deploys no promote, rollback or redeploy wrote."
|
|
306
|
+
},
|
|
307
|
+
"promotes": {
|
|
308
|
+
"type": "integer"
|
|
309
|
+
},
|
|
310
|
+
"rollbacks": {
|
|
311
|
+
"type": "integer"
|
|
312
|
+
},
|
|
313
|
+
"redeploys": {
|
|
314
|
+
"type": "integer"
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
"if": {
|
|
320
|
+
"properties": {
|
|
321
|
+
"schema": {
|
|
322
|
+
"const": "chant.dora/v1"
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
"then": {
|
|
327
|
+
"required": [
|
|
328
|
+
"product"
|
|
329
|
+
]
|
|
330
|
+
}
|
|
331
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://intentius.io/chant/schemas/report-store/v1/estate.schema.json",
|
|
4
|
+
"title": "chant.estate/v1",
|
|
5
|
+
"description": "estate.json in a CI product's report store, beside estate.html and dora.json: a section per member (project) with its waves, what waits at a gate, its newest drift check and its live pull request environments, and the newest runs across the estate. buildEstate in @intentius/chant/ci-estate writes it from the workspace ledger; a product adds its own fields to the same objects. A product-named id (terragucci.estate/v1) is the same document, its product named by the id. Within v1 fields are only added, and an existing field never changes meaning.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["schema", "generated", "totals", "projects", "recent"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schema": { "type": "string", "pattern": "^[a-z][a-z0-9-]*\\.estate/v1$", "description": "chant.estate/v1, or the product-named id <product>.estate/v1." },
|
|
10
|
+
"product": { "type": "string", "description": "The product that wrote it. Required under chant.estate/v1." },
|
|
11
|
+
"generated": { "type": "string", "description": "When it was built, ISO 8601." },
|
|
12
|
+
"source": { "const": "ledger", "description": "Present when it was read from the workspace ledger." },
|
|
13
|
+
"totals": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"required": ["projects", "waiting", "drifted_projects", "drifted_roots", "failed_roots", "unreadable"],
|
|
16
|
+
"properties": {
|
|
17
|
+
"projects": { "type": "integer" },
|
|
18
|
+
"waiting": { "type": "integer", "description": "Waves waiting at a gate." },
|
|
19
|
+
"drifted_projects": { "type": "integer" },
|
|
20
|
+
"drifted_roots": { "type": "integer" },
|
|
21
|
+
"failed_roots": { "type": "integer" },
|
|
22
|
+
"unreadable": { "type": "integer", "description": "Records that could not be read." },
|
|
23
|
+
"overdue": { "type": "integer", "description": "Scheduled drift checks whose window passed." },
|
|
24
|
+
"ephemeral": { "type": "integer", "description": "Live pull request environments." }
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"projects": {
|
|
28
|
+
"type": "array",
|
|
29
|
+
"items": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"required": ["project", "status", "waiting", "drifted", "failed"],
|
|
32
|
+
"properties": {
|
|
33
|
+
"project": { "type": "string", "description": "The member." },
|
|
34
|
+
"status": { "type": "string", "description": "ok, or why nothing could be read for it." },
|
|
35
|
+
"drift": { "$ref": "#/$defs/run" },
|
|
36
|
+
"apply": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"required": ["commit", "waves"],
|
|
39
|
+
"properties": { "commit": { "type": "string" }, "waves": { "type": "array", "items": { "$ref": "#/$defs/run" } } }
|
|
40
|
+
},
|
|
41
|
+
"waiting": {
|
|
42
|
+
"type": "array",
|
|
43
|
+
"items": {
|
|
44
|
+
"type": "object",
|
|
45
|
+
"required": ["project", "wave", "commit", "since", "age_seconds"],
|
|
46
|
+
"properties": {
|
|
47
|
+
"project": { "type": "string" },
|
|
48
|
+
"wave": { "type": "integer" },
|
|
49
|
+
"commit": { "type": "string" },
|
|
50
|
+
"since": { "type": "string" },
|
|
51
|
+
"age_seconds": { "type": "integer" },
|
|
52
|
+
"gate": { "type": "string" }
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"drifted": { "type": "integer" },
|
|
57
|
+
"failed": { "type": "integer" },
|
|
58
|
+
"overdue": { "type": "array" },
|
|
59
|
+
"ephemeral": { "type": "array" }
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"recent": { "type": "array", "description": "The newest runs across every member, newest first.", "items": { "$ref": "#/$defs/run" } },
|
|
64
|
+
"dora": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"required": ["file", "generated", "deployments"],
|
|
67
|
+
"properties": { "file": { "type": "string" }, "generated": { "type": "string" }, "deployments": { "type": "integer" } }
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"if": { "properties": { "schema": { "const": "chant.estate/v1" } } },
|
|
71
|
+
"then": { "required": ["product"] },
|
|
72
|
+
"$defs": {
|
|
73
|
+
"run": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"required": ["project", "commit", "stage", "finished", "roots"],
|
|
76
|
+
"properties": {
|
|
77
|
+
"project": { "type": "string" },
|
|
78
|
+
"commit": { "type": "string" },
|
|
79
|
+
"stage": { "type": "string", "description": "The Op, spec or stage that ran." },
|
|
80
|
+
"wave": { "type": "integer" },
|
|
81
|
+
"share": { "type": "integer" },
|
|
82
|
+
"finished": { "type": "string" },
|
|
83
|
+
"roots": { "type": "integer" },
|
|
84
|
+
"changed": { "type": "integer" },
|
|
85
|
+
"failed": { "type": "integer" },
|
|
86
|
+
"refused": { "type": "integer" },
|
|
87
|
+
"approval": { "type": "string" },
|
|
88
|
+
"waiting_since": { "type": "string" },
|
|
89
|
+
"applied": { "type": "string" },
|
|
90
|
+
"job_url": { "type": "string" },
|
|
91
|
+
"status": { "type": "string" },
|
|
92
|
+
"run": { "type": "string" }
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://intentius.io/chant/schemas/report-store/v1/run.schema.json",
|
|
4
|
+
"title": "chant.run/v1",
|
|
5
|
+
"description": "The head every run report in a CI product's report store shares: a stage's report or a commit's run view. The body is the product's own. A product-named id (terragucci.report/v1, terragucci.run/v1) is read as the same kind, its product named by the id. Within v1 fields are only added, and an existing field never changes meaning.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["schema"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schema": { "type": "string", "pattern": "^(chant\\.run|[a-z][a-z0-9-]*\\.(run|report))/v1$" },
|
|
10
|
+
"product": { "type": "string", "description": "The product that wrote it. Required under chant.run/v1." }
|
|
11
|
+
},
|
|
12
|
+
"if": { "properties": { "schema": { "const": "chant.run/v1" } } },
|
|
13
|
+
"then": { "required": ["schema", "product"] }
|
|
14
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import type { GateAuditEntry } from "./lifecycle/gate-audit.js";
|
|
2
|
+
import type { ReportGet, ReportPut } from "./pr-report-url.js";
|
|
3
|
+
/** The first chant with `@intentius/chant/report-store`: the product-neutral schema ids, the `chant.audit/v1` line and its readers, the published schemas, and `ci-estate`'s `schemas: "neutral"` and promote and rollback counts (#5336). */
|
|
4
|
+
export declare const REPORT_STORE_FLOOR = "0.124.110";
|
|
5
|
+
/** The kinds of document in the report store. A run report is a stage's report or a commit's run view. */
|
|
6
|
+
export type ReportKind = "estate" | "dora" | "run" | "audit";
|
|
7
|
+
/** The product-neutral schema ids. */
|
|
8
|
+
export declare const REPORT_SCHEMAS: Readonly<{
|
|
9
|
+
readonly estate: "chant.estate/v1";
|
|
10
|
+
readonly dora: "chant.dora/v1";
|
|
11
|
+
readonly run: "chant.run/v1";
|
|
12
|
+
readonly audit: "chant.audit/v1";
|
|
13
|
+
}>;
|
|
14
|
+
/** The published JSON Schema of each kind, as a package path. */
|
|
15
|
+
export declare const REPORT_SCHEMA_FILES: Readonly<{
|
|
16
|
+
readonly estate: "@intentius/chant/report-store/estate.schema.json";
|
|
17
|
+
readonly dora: "@intentius/chant/report-store/dora.schema.json";
|
|
18
|
+
readonly run: "@intentius/chant/report-store/run.schema.json";
|
|
19
|
+
readonly audit: "@intentius/chant/report-store/audit.schema.json";
|
|
20
|
+
}>;
|
|
21
|
+
export interface ReportSchema {
|
|
22
|
+
kind: ReportKind;
|
|
23
|
+
/** The product a product-named id names; undefined for a neutral id, whose document names it in `product`. */
|
|
24
|
+
product?: string;
|
|
25
|
+
neutral: boolean;
|
|
26
|
+
}
|
|
27
|
+
/** The kind of a schema id, neutral or product-named, or undefined for an id the report store does not hold. */
|
|
28
|
+
export declare function readReportSchema(id: unknown): ReportSchema | undefined;
|
|
29
|
+
/** The product a document came from: its `product`, else the product its schema id names. */
|
|
30
|
+
export declare function reportProduct(doc: {
|
|
31
|
+
schema?: unknown;
|
|
32
|
+
product?: unknown;
|
|
33
|
+
}): string | undefined;
|
|
34
|
+
/** Which ids a writer uses: the product's own (`<product>.dora/v1`), or the neutral ones with `product`. */
|
|
35
|
+
export type ReportSchemaIds = "product" | "neutral";
|
|
36
|
+
/** `doc` under the neutral id of `kind`, with `product` after `schema`. */
|
|
37
|
+
export declare function neutralReport<T extends {
|
|
38
|
+
schema: string;
|
|
39
|
+
}>(doc: T, kind: ReportKind, product: string): T & {
|
|
40
|
+
product: string;
|
|
41
|
+
};
|
|
42
|
+
export declare const AUDIT_KINDS: readonly ["approval-requested", "approved", "revoked", "override-requested", "override-recorded", "override-spent", "applied", "refused", "hook", "recorded"];
|
|
43
|
+
export type AuditKind = (typeof AUDIT_KINDS)[number];
|
|
44
|
+
/** Where a line was read: a ledger line, a report in the store, a state's versions, a history row, or a run record. */
|
|
45
|
+
export interface AuditEvidence {
|
|
46
|
+
source: "ledger" | "report" | "state" | "history" | "run";
|
|
47
|
+
/** Ledger: the branch, the file, the op and gate, the line and the commit. */
|
|
48
|
+
branch?: string;
|
|
49
|
+
path?: string;
|
|
50
|
+
op?: string;
|
|
51
|
+
gate?: string;
|
|
52
|
+
line?: number;
|
|
53
|
+
commit?: string;
|
|
54
|
+
/** Report: the bucket and the key of the report. */
|
|
55
|
+
bucket?: string;
|
|
56
|
+
key?: string;
|
|
57
|
+
/** A page that shows it. */
|
|
58
|
+
url?: string;
|
|
59
|
+
job_url?: string;
|
|
60
|
+
/** Report: deleted after the line was recorded. */
|
|
61
|
+
deleted?: boolean;
|
|
62
|
+
/** State: where the state is, and the version its store lists. */
|
|
63
|
+
location?: string;
|
|
64
|
+
version_id?: string;
|
|
65
|
+
/** History: the table, the row's seq and its run. */
|
|
66
|
+
table?: string;
|
|
67
|
+
seq?: number;
|
|
68
|
+
run?: string;
|
|
69
|
+
}
|
|
70
|
+
/** One line of `audit.jsonl`, `chant.audit/v1`. */
|
|
71
|
+
export interface AuditLine {
|
|
72
|
+
schema: typeof REPORT_SCHEMAS.audit;
|
|
73
|
+
/** The product that recorded it. */
|
|
74
|
+
product: string;
|
|
75
|
+
/** Over where the line came from; the same records give the same id. */
|
|
76
|
+
id: string;
|
|
77
|
+
kind: AuditKind;
|
|
78
|
+
/** The product's own word for the kind, when it is not `kind`. */
|
|
79
|
+
product_kind?: string;
|
|
80
|
+
/** The repository or member. */
|
|
81
|
+
project: string;
|
|
82
|
+
/** The environment, when the product records one per line. */
|
|
83
|
+
environment?: string;
|
|
84
|
+
at: string;
|
|
85
|
+
/** Who: the approver, the overrider, whoever removed the line, or whoever ran it. Null when nobody did. */
|
|
86
|
+
who: string | null;
|
|
87
|
+
/** The gate, the root, or the migration. */
|
|
88
|
+
what: string;
|
|
89
|
+
digest: string | null;
|
|
90
|
+
/** How it came out: `waiting`, `applied`, `failed`, the seal of an approval, ... */
|
|
91
|
+
result: string;
|
|
92
|
+
evidence: AuditEvidence;
|
|
93
|
+
detail?: Record<string, unknown>;
|
|
94
|
+
/** Top-level fields of a product's line the schema does not name. */
|
|
95
|
+
product_fields?: Record<string, unknown>;
|
|
96
|
+
}
|
|
97
|
+
/** A product's line format: terragucci's (`<product>.audit/v1`), or sql-yodeler's (no `schema`, one `environment` per line). */
|
|
98
|
+
export type ProductAuditFormat = "terragucci" | "sql-yodeler";
|
|
99
|
+
/** The audit kind a product's word names: the kind itself, an alias of one, or `recorded`. */
|
|
100
|
+
export declare function auditKindOf(word: string): AuditKind;
|
|
101
|
+
export interface ReadAuditOptions {
|
|
102
|
+
/** The product of a line whose format does not name one (sql-yodeler's). Default `sql-yodeler`. */
|
|
103
|
+
product?: string;
|
|
104
|
+
/** The project of a line that names none (sql-yodeler's). Default `default`. */
|
|
105
|
+
project?: string;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* One audit line as `chant.audit/v1`: a neutral line as it is, a
|
|
109
|
+
* terragucci-format line (`<product>.audit/v1`) or a sql-yodeler line
|
|
110
|
+
* mapped onto it. Undefined for anything else.
|
|
111
|
+
*/
|
|
112
|
+
export declare function readAuditLine(raw: unknown, options?: ReadAuditOptions): AuditLine | undefined;
|
|
113
|
+
/** Every line of an `audit.jsonl` as `chant.audit/v1`, and the 1-based numbers of the lines that are not audit lines. */
|
|
114
|
+
export declare function readAuditRecord(text: string, options?: ReadAuditOptions): {
|
|
115
|
+
lines: AuditLine[];
|
|
116
|
+
unreadable: number[];
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* A line in a product's own format again, for a product that keeps writing
|
|
120
|
+
* it: a line read from that format comes back as it was read.
|
|
121
|
+
*/
|
|
122
|
+
export declare function toProductAuditLine(line: AuditLine, format: ProductAuditFormat): Record<string, unknown>;
|
|
123
|
+
export interface LedgerAuditOptions {
|
|
124
|
+
/** The product that records the lines. */
|
|
125
|
+
product: string;
|
|
126
|
+
/** The repository or member the ledger belongs to. */
|
|
127
|
+
project: string;
|
|
128
|
+
/** The environment, when the ledger is one environment's. */
|
|
129
|
+
environment?: string;
|
|
130
|
+
/** The ledger's branch, for the evidence. Default `chant/lifecycle`. */
|
|
131
|
+
branch?: string;
|
|
132
|
+
}
|
|
133
|
+
/** The audit lines of the gate ledger's entries (`deriveGateAudit`), for any product. */
|
|
134
|
+
export declare function auditLinesFromLedger(entries: readonly GateAuditEntry[], options: LedgerAuditOptions): AuditLine[];
|
|
135
|
+
/** The record's name at the top of a reports prefix. */
|
|
136
|
+
export declare const AUDIT_RECORD_FILE = "audit.jsonl";
|
|
137
|
+
export interface WriteAuditOptions {
|
|
138
|
+
put: ReportPut;
|
|
139
|
+
get: ReportGet;
|
|
140
|
+
/** The key below the report URL. Default `audit.jsonl`. */
|
|
141
|
+
key?: string;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Append the lines whose id the record lacks to `audit.jsonl` in the report
|
|
145
|
+
* store. Every line already there is kept as it is, whatever its format;
|
|
146
|
+
* nothing is written when nothing is new.
|
|
147
|
+
*/
|
|
148
|
+
export declare function writeAuditRecord(lines: readonly AuditLine[], options: WriteAuditOptions): Promise<{
|
|
149
|
+
key: string;
|
|
150
|
+
added: number;
|
|
151
|
+
}>;
|