@intentius/chant 0.124.28 → 0.124.30
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/build-params.d.ts +34 -1
- package/dist/build-params.d.ts.map +1 -1
- package/dist/build-params.js +31 -1
- package/dist/change-set-graph.d.ts +8 -1
- package/dist/change-set-graph.d.ts.map +1 -1
- package/dist/change-set-graph.js +4 -2
- package/dist/change-set.d.ts +10 -0
- package/dist/change-set.d.ts.map +1 -1
- package/dist/change-set.js +4 -3
- package/dist/cli/build-params-cli.d.ts +7 -1
- package/dist/cli/build-params-cli.d.ts.map +1 -1
- package/dist/cli/build-params-cli.js +17 -8
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/build.js +6 -3
- package/dist/cli/handlers/approve.d.ts.map +1 -1
- package/dist/cli/handlers/approve.js +45 -0
- package/dist/cli/handlers/build.d.ts.map +1 -1
- package/dist/cli/handlers/build.js +18 -4
- package/dist/cli/handlers/fan-out.d.ts +9 -0
- package/dist/cli/handlers/fan-out.d.ts.map +1 -1
- package/dist/cli/handlers/fan-out.js +67 -8
- package/dist/cli/handlers/lifecycle-gc.d.ts +19 -0
- package/dist/cli/handlers/lifecycle-gc.d.ts.map +1 -0
- package/dist/cli/handlers/lifecycle-gc.js +143 -0
- package/dist/cli/handlers/pr.d.ts +11 -3
- package/dist/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/handlers/pr.js +134 -26
- package/dist/cli/handlers/promote.d.ts +7 -0
- package/dist/cli/handlers/promote.d.ts.map +1 -1
- package/dist/cli/handlers/promote.js +210 -33
- package/dist/cli/handlers/release.d.ts +62 -5
- package/dist/cli/handlers/release.d.ts.map +1 -1
- package/dist/cli/handlers/release.js +414 -28
- package/dist/cli/handlers/run.d.ts +11 -1
- package/dist/cli/handlers/run.d.ts.map +1 -1
- package/dist/cli/handlers/run.js +67 -6
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +91 -10
- package/dist/cli/parse-args.d.ts.map +1 -1
- package/dist/cli/parse-args.js +73 -2
- package/dist/cli/registry.d.ts +32 -4
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/cli/run-events.d.ts +3 -2
- package/dist/cli/run-events.d.ts.map +1 -1
- package/dist/cli/run-events.js +5 -3
- package/dist/components/auto-release.d.ts +2 -0
- package/dist/components/auto-release.d.ts.map +1 -1
- package/dist/components/auto-release.js +1 -0
- package/dist/components/capability.d.ts +9 -0
- package/dist/components/capability.d.ts.map +1 -1
- package/dist/components/driver.d.ts +8 -0
- package/dist/components/driver.d.ts.map +1 -1
- package/dist/components/driver.js +35 -0
- package/dist/components/fan-out-inputs.d.ts +69 -0
- package/dist/components/fan-out-inputs.d.ts.map +1 -0
- package/dist/components/fan-out-inputs.js +169 -0
- package/dist/components/fan-out-record.d.ts +13 -0
- package/dist/components/fan-out-record.d.ts.map +1 -1
- package/dist/components/fan-out-record.js +16 -0
- package/dist/components/fan-out-run.d.ts.map +1 -1
- package/dist/components/fan-out-run.js +50 -0
- package/dist/components/fan-out.d.ts +4 -0
- package/dist/components/fan-out.d.ts.map +1 -1
- package/dist/components/pr-pipeline.d.ts +49 -0
- package/dist/components/pr-pipeline.d.ts.map +1 -1
- package/dist/components/pr-pipeline.js +38 -4
- package/dist/components/pr-run.d.ts +20 -2
- package/dist/components/pr-run.d.ts.map +1 -1
- package/dist/components/pr-run.js +26 -13
- package/dist/components/promote.d.ts +23 -0
- package/dist/components/promote.d.ts.map +1 -1
- package/dist/components/promote.js +60 -2
- package/dist/components/release-compile.d.ts +9 -0
- package/dist/components/release-compile.d.ts.map +1 -1
- package/dist/components/release-compile.js +9 -3
- package/dist/components/release-gate.d.ts +11 -1
- package/dist/components/release-gate.d.ts.map +1 -1
- package/dist/components/release-gate.js +10 -4
- package/dist/components/wave-plan.d.ts +16 -0
- package/dist/components/wave-plan.d.ts.map +1 -1
- package/dist/components/wave-plan.js +36 -2
- package/dist/config.d.ts +38 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +2 -0
- package/dist/flag-params.d.ts +54 -0
- package/dist/flag-params.d.ts.map +1 -0
- package/dist/flag-params.js +130 -0
- package/dist/lifecycle/__fixtures__/publish-fakes.d.ts +120 -0
- package/dist/lifecycle/__fixtures__/publish-fakes.d.ts.map +1 -0
- package/dist/lifecycle/__fixtures__/publish-fakes.js +304 -0
- package/dist/lifecycle/change-set-store.d.ts +2 -1
- package/dist/lifecycle/change-set-store.d.ts.map +1 -1
- package/dist/lifecycle/change-set-store.js +2 -1
- package/dist/lifecycle/delivery-metrics.d.ts +139 -0
- package/dist/lifecycle/delivery-metrics.d.ts.map +1 -0
- package/dist/lifecycle/delivery-metrics.js +145 -0
- package/dist/lifecycle/deploy-outcome.d.ts +81 -0
- package/dist/lifecycle/deploy-outcome.d.ts.map +1 -0
- package/dist/lifecycle/deploy-outcome.js +101 -0
- package/dist/lifecycle/gate-change-set.d.ts +10 -1
- package/dist/lifecycle/gate-change-set.d.ts.map +1 -1
- package/dist/lifecycle/gate-change-set.js +35 -3
- package/dist/lifecycle/gate-ledger.d.ts +2 -3
- package/dist/lifecycle/gate-ledger.d.ts.map +1 -1
- package/dist/lifecycle/git.d.ts +30 -1
- package/dist/lifecycle/git.d.ts.map +1 -1
- package/dist/lifecycle/git.js +31 -5
- package/dist/lifecycle/index.d.ts +4 -0
- package/dist/lifecycle/index.d.ts.map +1 -1
- package/dist/lifecycle/index.js +4 -0
- package/dist/lifecycle/mixed-environment.d.ts +95 -0
- package/dist/lifecycle/mixed-environment.d.ts.map +1 -0
- package/dist/lifecycle/mixed-environment.js +154 -0
- package/dist/lifecycle/publish-attachments.d.ts +79 -0
- package/dist/lifecycle/publish-attachments.d.ts.map +1 -0
- package/dist/lifecycle/publish-attachments.js +179 -0
- package/dist/lifecycle/publish-credentials.d.ts +37 -0
- package/dist/lifecycle/publish-credentials.d.ts.map +1 -0
- package/dist/lifecycle/publish-credentials.js +69 -0
- package/dist/lifecycle/publish-declaration.d.ts +97 -0
- package/dist/lifecycle/publish-declaration.d.ts.map +1 -0
- package/dist/lifecycle/publish-declaration.js +83 -0
- package/dist/lifecycle/publish-forge.d.ts +53 -0
- package/dist/lifecycle/publish-forge.d.ts.map +1 -0
- package/dist/lifecycle/publish-forge.js +298 -0
- package/dist/lifecycle/publish-npm.d.ts +61 -0
- package/dist/lifecycle/publish-npm.d.ts.map +1 -0
- package/dist/lifecycle/publish-npm.js +242 -0
- package/dist/lifecycle/publish-oci.d.ts +64 -0
- package/dist/lifecycle/publish-oci.d.ts.map +1 -0
- package/dist/lifecycle/publish-oci.js +383 -0
- package/dist/lifecycle/publish-record.d.ts +66 -0
- package/dist/lifecycle/publish-record.d.ts.map +1 -0
- package/dist/lifecycle/publish-record.js +84 -0
- package/dist/lifecycle/publish-targets.d.ts +45 -0
- package/dist/lifecycle/publish-targets.d.ts.map +1 -0
- package/dist/lifecycle/publish-targets.js +85 -0
- package/dist/lifecycle/release-cut.d.ts +48 -1
- package/dist/lifecycle/release-cut.d.ts.map +1 -1
- package/dist/lifecycle/release-cut.js +116 -23
- package/dist/lifecycle/release-join.d.ts +95 -0
- package/dist/lifecycle/release-join.d.ts.map +1 -0
- package/dist/lifecycle/release-join.js +139 -0
- package/dist/lifecycle/release-ledger.d.ts +8 -3
- package/dist/lifecycle/release-ledger.d.ts.map +1 -1
- package/dist/lifecycle/release-ledger.js +2 -0
- package/dist/lifecycle/release-publish.d.ts +312 -0
- package/dist/lifecycle/release-publish.d.ts.map +1 -0
- package/dist/lifecycle/release-publish.js +335 -0
- package/dist/lifecycle/release-revocation.d.ts +80 -0
- package/dist/lifecycle/release-revocation.d.ts.map +1 -0
- package/dist/lifecycle/release-revocation.js +123 -0
- package/dist/lifecycle/release-store.d.ts +12 -2
- package/dist/lifecycle/release-store.d.ts.map +1 -1
- package/dist/lifecycle/release-store.js +4 -2
- package/dist/lifecycle/release-verify.d.ts +61 -0
- package/dist/lifecycle/release-verify.d.ts.map +1 -0
- package/dist/lifecycle/release-verify.js +92 -0
- package/dist/lifecycle/release-workstation.d.ts +91 -0
- package/dist/lifecycle/release-workstation.d.ts.map +1 -0
- package/dist/lifecycle/release-workstation.js +180 -0
- package/dist/lifecycle/retention-policy.d.ts +45 -0
- package/dist/lifecycle/retention-policy.d.ts.map +1 -0
- package/dist/lifecycle/retention-policy.js +43 -0
- package/dist/lifecycle/retention.d.ts +185 -0
- package/dist/lifecycle/retention.d.ts.map +1 -0
- package/dist/lifecycle/retention.js +400 -0
- package/dist/lifecycle/run-ledger.d.ts +1 -1
- package/dist/lifecycle/run-ledger.d.ts.map +1 -1
- package/dist/lifecycle/run-ledger.js +9 -0
- package/dist/op/activities/activity-contracts.d.ts +1 -0
- package/dist/op/activities/activity-contracts.d.ts.map +1 -1
- package/dist/op/activities/activity-contracts.js +1 -0
- package/dist/op/activities/shell.d.ts +6 -0
- package/dist/op/activities/shell.d.ts.map +1 -1
- package/dist/op/activities/shell.js +1 -1
- package/dist/op/local-executor.d.ts +23 -1
- package/dist/op/local-executor.d.ts.map +1 -1
- package/dist/op/local-executor.js +9 -3
- package/dist/op/runtime.d.ts +27 -0
- package/dist/op/runtime.d.ts.map +1 -1
- package/dist/op/runtime.js +20 -0
- package/dist/plan-summary.d.ts.map +1 -1
- package/dist/plan-summary.js +8 -2
- package/dist/pr-forge.d.ts +23 -0
- package/dist/pr-forge.d.ts.map +1 -1
- package/dist/pr-forge.js +44 -0
- package/dist/pr-loop.d.ts +17 -0
- package/dist/pr-loop.d.ts.map +1 -1
- package/dist/pr-loop.js +30 -4
- package/dist/pr-report-url.d.ts +82 -0
- package/dist/pr-report-url.d.ts.map +1 -0
- package/dist/pr-report-url.js +174 -0
- package/dist/provenance.d.ts +2 -2
- package/dist/provenance.d.ts.map +1 -1
- package/dist/run-event-store.d.ts +29 -2
- package/dist/run-event-store.d.ts.map +1 -1
- package/dist/run-event-store.js +50 -3
- package/dist/run-event-stream.d.ts +4 -3
- package/dist/run-event-stream.d.ts.map +1 -1
- package/dist/run-event-stream.js +7 -3
- package/dist/run-event.d.ts +34 -1
- package/dist/run-event.d.ts.map +1 -1
- package/dist/run-event.js +4 -0
- package/dist/wave-runtime.mjs +260 -229
- package/dist/workspace/__fixtures__/flag-workspace.d.ts +31 -0
- package/dist/workspace/__fixtures__/flag-workspace.d.ts.map +1 -0
- package/dist/workspace/__fixtures__/flag-workspace.js +114 -0
- package/dist/workspace/change-set.schema.json +5 -1
- package/dist/workspace/check.schema.json +4 -2
- package/dist/workspace/checks/records.d.ts +9 -1
- package/dist/workspace/checks/records.d.ts.map +1 -1
- package/dist/workspace/checks/records.js +35 -1
- package/dist/workspace/checks.d.ts +1 -0
- package/dist/workspace/checks.d.ts.map +1 -1
- package/dist/workspace/checks.js +2 -1
- package/dist/workspace/ci-green-forge.d.ts +2 -0
- package/dist/workspace/ci-green-forge.d.ts.map +1 -1
- package/dist/workspace/ci-green.d.ts +10 -0
- package/dist/workspace/ci-green.d.ts.map +1 -1
- package/dist/workspace/ci-green.js +14 -5
- package/dist/workspace/ci-run.d.ts +222 -0
- package/dist/workspace/ci-run.d.ts.map +1 -0
- package/dist/workspace/ci-run.js +464 -0
- package/dist/workspace/ci-serve.d.ts +214 -0
- package/dist/workspace/ci-serve.d.ts.map +1 -0
- package/dist/workspace/ci-serve.js +412 -0
- package/dist/workspace/declaration.d.ts +16 -0
- package/dist/workspace/declaration.d.ts.map +1 -1
- package/dist/workspace/declaration.js +26 -0
- package/dist/workspace/declaration.schema.json +64 -0
- package/dist/workspace/declared-kinds.d.ts +16 -0
- package/dist/workspace/declared-kinds.d.ts.map +1 -1
- package/dist/workspace/declared-kinds.js +25 -0
- package/dist/workspace/delivery-metrics.d.ts +91 -0
- package/dist/workspace/delivery-metrics.d.ts.map +1 -0
- package/dist/workspace/delivery-metrics.js +217 -0
- package/dist/workspace/delivery-metrics.schema.json +519 -0
- package/dist/workspace/flags-read.d.ts +37 -0
- package/dist/workspace/flags-read.d.ts.map +1 -0
- package/dist/workspace/flags-read.js +103 -0
- package/dist/workspace/flags.d.ts +100 -0
- package/dist/workspace/flags.d.ts.map +1 -0
- package/dist/workspace/flags.js +98 -0
- package/dist/workspace/graph-cli.js +1 -1
- package/dist/workspace/intent-cli.d.ts +11 -2
- package/dist/workspace/intent-cli.d.ts.map +1 -1
- package/dist/workspace/intent-cli.js +54 -5
- package/dist/workspace/intent-trace.d.ts +219 -0
- package/dist/workspace/intent-trace.d.ts.map +1 -0
- package/dist/workspace/intent-trace.js +314 -0
- package/dist/workspace/intent.d.ts +30 -6
- package/dist/workspace/intent.d.ts.map +1 -1
- package/dist/workspace/intent.js +141 -21
- package/dist/workspace/intent.schema.json +702 -6
- package/dist/workspace/overlap.d.ts +146 -0
- package/dist/workspace/overlap.d.ts.map +1 -0
- package/dist/workspace/overlap.js +276 -0
- package/dist/workspace/pr-report.schema.json +5 -0
- package/dist/workspace/reason-codes.d.ts +2 -0
- package/dist/workspace/reason-codes.d.ts.map +1 -1
- package/dist/workspace/reason-codes.js +3 -0
- package/dist/workspace/records.d.ts +15 -2
- package/dist/workspace/records.d.ts.map +1 -1
- package/dist/workspace/records.js +32 -0
- package/dist/workspace/records.schema.json +21 -2
- package/dist/workspace/reference-kinds/flag/flag.kind.mjs +32 -0
- package/dist/workspace/reference-kinds/flag/flag.schema.json +53 -0
- package/dist/workspace/releases.d.ts +9 -0
- package/dist/workspace/releases.d.ts.map +1 -1
- package/dist/workspace/releases.js +9 -0
- package/dist/workspace/releases.schema.json +123 -1
- package/dist/workspace/run-event.schema.json +24 -6
- package/dist/workspace/status-gates.d.ts +8 -0
- package/dist/workspace/status-gates.d.ts.map +1 -1
- package/dist/workspace/status-stewards.d.ts +2 -0
- package/dist/workspace/status-stewards.d.ts.map +1 -1
- package/dist/workspace/status-stewards.js +1 -0
- package/dist/workspace/status.d.ts +78 -0
- package/dist/workspace/status.d.ts.map +1 -1
- package/dist/workspace/status.js +170 -3
- package/dist/workspace/status.schema.json +210 -2
- package/dist/workspace/wip.d.ts.map +1 -1
- package/dist/workspace/wip.js +11 -3
- package/package.json +1 -1
- package/src/build-params.test.ts +46 -0
- package/src/build-params.ts +55 -1
- package/src/change-set-graph.ts +10 -2
- package/src/change-set.ts +14 -3
- package/src/cli/build-params-cli.ts +22 -9
- package/src/cli/commands/build.ts +6 -3
- package/src/cli/handlers/approve-release.test.ts +5 -1
- package/src/cli/handlers/approve-revoked.test.ts +155 -0
- package/src/cli/handlers/approve.ts +47 -0
- package/src/cli/handlers/build.test.ts +30 -0
- package/src/cli/handlers/build.ts +20 -4
- package/src/cli/handlers/fan-out.test.ts +262 -1
- package/src/cli/handlers/fan-out.ts +72 -8
- package/src/cli/handlers/intent-trace.e2e.test.ts +201 -0
- package/src/cli/handlers/lifecycle-gc.test.ts +126 -0
- package/src/cli/handlers/lifecycle-gc.ts +146 -0
- package/src/cli/handlers/pr.test.ts +148 -1
- package/src/cli/handlers/pr.ts +144 -28
- package/src/cli/handlers/promote.test.ts +280 -2
- package/src/cli/handlers/promote.ts +210 -34
- package/src/cli/handlers/release-implicit.e2e.test.ts +12 -4
- package/src/cli/handlers/release-join.e2e.test.ts +185 -0
- package/src/cli/handlers/release-publish-targets.e2e.test.ts +295 -0
- package/src/cli/handlers/release-verify.e2e.test.ts +117 -0
- package/src/cli/handlers/release-workstation-ci.e2e.test.ts +135 -0
- package/src/cli/handlers/release.e2e.test.ts +146 -32
- package/src/cli/handlers/release.ts +415 -28
- package/src/cli/handlers/run-auto-release.test.ts +9 -0
- package/src/cli/handlers/run-release.test.ts +55 -0
- package/src/cli/handlers/run.ts +69 -5
- package/src/cli/main.test.ts +1 -0
- package/src/cli/main.ts +91 -10
- package/src/cli/parse-args.ts +54 -2
- package/src/cli/registry.ts +32 -4
- package/src/cli/run-events.ts +5 -2
- package/src/components/auto-release.test.ts +9 -0
- package/src/components/auto-release.ts +3 -0
- package/src/components/capability.ts +9 -0
- package/src/components/driver.test.ts +24 -0
- package/src/components/driver.ts +36 -0
- package/src/components/fan-out-inputs.test.ts +85 -0
- package/src/components/fan-out-inputs.ts +192 -0
- package/src/components/fan-out-record.test.ts +10 -0
- package/src/components/fan-out-record.ts +19 -0
- package/src/components/fan-out-run.ts +48 -0
- package/src/components/fan-out.ts +4 -0
- package/src/components/pr-pipeline.ts +67 -4
- package/src/components/pr-run.test.ts +127 -0
- package/src/components/pr-run.ts +32 -12
- package/src/components/promote.ts +68 -2
- package/src/components/release-compile.ts +17 -3
- package/src/components/release-gate.ts +18 -4
- package/src/components/wave-plan.ts +45 -2
- package/src/config.ts +8 -0
- package/src/flag-params.test.ts +144 -0
- package/src/flag-params.ts +134 -0
- package/src/lifecycle/__fixtures__/publish-fakes.ts +351 -0
- package/src/lifecycle/change-set-store.ts +2 -1
- package/src/lifecycle/delivery-metrics.ts +263 -0
- package/src/lifecycle/deploy-outcome.ts +147 -0
- package/src/lifecycle/gate-change-set.ts +37 -6
- package/src/lifecycle/gate-ledger.ts +2 -2
- package/src/lifecycle/git.ts +61 -8
- package/src/lifecycle/index.ts +4 -0
- package/src/lifecycle/mixed-environment.test.ts +97 -0
- package/src/lifecycle/mixed-environment.ts +204 -0
- package/src/lifecycle/publish-attachments.ts +196 -0
- package/src/lifecycle/publish-credentials.ts +84 -0
- package/src/lifecycle/publish-declaration.ts +95 -0
- package/src/lifecycle/publish-forge.ts +325 -0
- package/src/lifecycle/publish-npm.ts +259 -0
- package/src/lifecycle/publish-oci.ts +396 -0
- package/src/lifecycle/publish-record.ts +113 -0
- package/src/lifecycle/publish-resume.test.ts +168 -0
- package/src/lifecycle/publish-targets.test.ts +494 -0
- package/src/lifecycle/publish-targets.ts +100 -0
- package/src/lifecycle/release-cut.test.ts +74 -2
- package/src/lifecycle/release-cut.ts +158 -22
- package/src/lifecycle/release-flag.test.ts +112 -0
- package/src/lifecycle/release-join.test.ts +68 -0
- package/src/lifecycle/release-join.ts +182 -0
- package/src/lifecycle/release-ledger.ts +9 -3
- package/src/lifecycle/release-publish.test.ts +225 -0
- package/src/lifecycle/release-publish.ts +568 -0
- package/src/lifecycle/release-revocation.ts +147 -0
- package/src/lifecycle/release-store.ts +15 -4
- package/src/lifecycle/release-verify.test.ts +110 -0
- package/src/lifecycle/release-verify.ts +120 -0
- package/src/lifecycle/release-workstation.test.ts +204 -0
- package/src/lifecycle/release-workstation.ts +216 -0
- package/src/lifecycle/retention-growth.e2e.test.ts +279 -0
- package/src/lifecycle/retention-policy.ts +63 -0
- package/src/lifecycle/retention.test.ts +363 -0
- package/src/lifecycle/retention.ts +508 -0
- package/src/lifecycle/run-ledger.ts +7 -1
- package/src/op/activities/activity-contracts.ts +1 -0
- package/src/op/activities/shell.ts +7 -1
- package/src/op/local-executor.ts +27 -4
- package/src/op/runtime.ts +42 -0
- package/src/plan-summary.test.ts +20 -0
- package/src/plan-summary.ts +8 -1
- package/src/pr-forge.test.ts +25 -0
- package/src/pr-forge.ts +62 -0
- package/src/pr-loop.test.ts +13 -1
- package/src/pr-loop.ts +41 -4
- package/src/pr-report-url.test.ts +131 -0
- package/src/pr-report-url.ts +209 -0
- package/src/provenance.ts +2 -2
- package/src/run-event-store.ts +63 -3
- package/src/run-event-stream.ts +8 -4
- package/src/run-event.ts +38 -1
- package/src/workspace/__fixtures__/flag-workspace.ts +132 -0
- package/src/workspace/__fixtures__/older-records/change-set-984534ea9.json +100 -0
- package/src/workspace/__fixtures__/older-records/older-records.json +326 -0
- package/src/workspace/change-set.schema.json +5 -1
- package/src/workspace/check.schema.json +4 -2
- package/src/workspace/checks/records.ts +35 -1
- package/src/workspace/checks.ts +2 -1
- package/src/workspace/ci-green-forge.ts +2 -0
- package/src/workspace/ci-green.ts +20 -5
- package/src/workspace/ci-run.test.ts +416 -0
- package/src/workspace/ci-run.ts +571 -0
- package/src/workspace/ci-serve.test.ts +268 -0
- package/src/workspace/ci-serve.ts +521 -0
- package/src/workspace/declaration.schema.json +64 -0
- package/src/workspace/declaration.test.ts +28 -0
- package/src/workspace/declaration.ts +38 -0
- package/src/workspace/declared-kinds.ts +40 -1
- package/src/workspace/delivery-metrics.schema.json +519 -0
- package/src/workspace/delivery-metrics.test.ts +236 -0
- package/src/workspace/delivery-metrics.ts +286 -0
- package/src/workspace/flags-read.ts +121 -0
- package/src/workspace/flags.test.ts +141 -0
- package/src/workspace/flags.ts +157 -0
- package/src/workspace/graph-cli.ts +1 -1
- package/src/workspace/intent-cli.ts +46 -5
- package/src/workspace/intent-trace.test.ts +173 -0
- package/src/workspace/intent-trace.ts +484 -0
- package/src/workspace/intent.schema.json +702 -6
- package/src/workspace/intent.ts +148 -25
- package/src/workspace/older-records.test.ts +412 -0
- package/src/workspace/overlap.test.ts +165 -0
- package/src/workspace/overlap.ts +340 -0
- package/src/workspace/pr-report.schema.json +5 -0
- package/src/workspace/read-contract.e2e.test.ts +2 -1
- package/src/workspace/reason-codes.test.ts +5 -0
- package/src/workspace/reason-codes.ts +3 -0
- package/src/workspace/record-assets.test.ts +2 -1
- package/src/workspace/records-contract.e2e.test.ts +2 -1
- package/src/workspace/records.schema.json +21 -2
- package/src/workspace/records.ts +36 -2
- package/src/workspace/reference-kinds/flag/flag.kind.mjs +32 -0
- package/src/workspace/reference-kinds/flag/flag.schema.json +53 -0
- package/src/workspace/releases.schema.json +123 -1
- package/src/workspace/releases.ts +11 -0
- package/src/workspace/run-event.schema.json +24 -6
- package/src/workspace/status-contract.test.ts +29 -0
- package/src/workspace/status-gates.ts +8 -0
- package/src/workspace/status-mixed.test.ts +152 -0
- package/src/workspace/status-revoked.test.ts +153 -0
- package/src/workspace/status-stewards.ts +3 -0
- package/src/workspace/status.schema.json +210 -2
- package/src/workspace/status.ts +254 -3
- package/src/workspace/wip.ts +11 -2
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* #4033 (ws-105): a release cut from a revoked commit, read at read time from
|
|
3
|
+
* the `ci/revoked/<sha>` tag. `workspace status` flags an environment that
|
|
4
|
+
* runs it, with the rollback line, and reads its pending gate as superseded;
|
|
5
|
+
* `release list` marks it. Against temp repos; nothing is pushed.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { afterEach, describe, expect, test, vi } from "vitest";
|
|
9
|
+
import { withTestDir } from "@intentius/chant-test-utils";
|
|
10
|
+
import { spawnSync } from "node:child_process";
|
|
11
|
+
import { writeFileSync } from "node:fs";
|
|
12
|
+
import { join } from "node:path";
|
|
13
|
+
import { Ajv2020 } from "ajv/dist/2020";
|
|
14
|
+
import statusSchema from "./status.schema.json";
|
|
15
|
+
import releasesSchema from "./releases.schema.json";
|
|
16
|
+
import { formatStatus, workspaceStatus, type StatusDocument } from "./status";
|
|
17
|
+
import { releasesDocument } from "./releases";
|
|
18
|
+
import { contract } from "./__fixtures__/contract-repo";
|
|
19
|
+
import { appendCut, makeRelease, persistRelease, type Release } from "../lifecycle/release-store";
|
|
20
|
+
import { appendReleaseRecord } from "../lifecycle/release-ledger";
|
|
21
|
+
import { appendPendingGate } from "../lifecycle/gate-ledger";
|
|
22
|
+
import type { CommandContext } from "../cli/registry";
|
|
23
|
+
import { contentDigest } from "../content-digest";
|
|
24
|
+
|
|
25
|
+
const validateStatus = new Ajv2020({ strict: true, allErrors: true }).compile(statusSchema);
|
|
26
|
+
const { expectValid: expectValidReleases } = contract(releasesSchema);
|
|
27
|
+
|
|
28
|
+
function git(cwd: string, ...args: string[]): string {
|
|
29
|
+
const r = spawnSync("git", args, { cwd, encoding: "utf-8" });
|
|
30
|
+
if (r.status !== 0) throw new Error(`git ${args.join(" ")}: ${r.stderr}`);
|
|
31
|
+
return r.stdout.trim();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const DOC = `jcs1-sha256:${"d".repeat(64)}`;
|
|
35
|
+
const NOW = "2026-10-16T14:00:00.000Z";
|
|
36
|
+
|
|
37
|
+
/** A workspace whose root member runs release v1.0.0 in prod and waits at its staging gate, and a second release v1.1.0 from a later commit. */
|
|
38
|
+
async function setup(dir: string): Promise<{ old: string; release: Release; next: Release }> {
|
|
39
|
+
git(dir, "init", "-q", "-b", "main");
|
|
40
|
+
git(dir, "config", "user.email", "t@chant.dev");
|
|
41
|
+
git(dir, "config", "user.name", "T");
|
|
42
|
+
writeFileSync(
|
|
43
|
+
join(dir, "chant.workspace.json"),
|
|
44
|
+
JSON.stringify({ name: "acme", schema: 1, members: [{ name: "root", dir: ".", kind: "other", because: "the fixture" }], ci: { green: { branch: "main", phases: { test: ["test"] }, require: ["test"] } } }, null, 2),
|
|
45
|
+
);
|
|
46
|
+
git(dir, "add", ".");
|
|
47
|
+
git(dir, "commit", "-q", "-m", "init");
|
|
48
|
+
const old = git(dir, "rev-parse", "HEAD");
|
|
49
|
+
git(dir, "commit", "-q", "--allow-empty", "-m", "next");
|
|
50
|
+
const later = git(dir, "rev-parse", "HEAD");
|
|
51
|
+
const at = (commit: string) =>
|
|
52
|
+
makeRelease({ member: null, commit, artifactDigests: [], targets: ["staging", "prod"].map((env) => ({ env, templates: [{ component: "api", path: "t.json", digest: `sha256:${"c".repeat(64)}` }], params: [] })) });
|
|
53
|
+
const release = at(old);
|
|
54
|
+
const next = at(later);
|
|
55
|
+
for (const [r, label, ts] of [[release, "v1.0.0", "10"], [next, "v1.1.0", "11"]] as const) {
|
|
56
|
+
await persistRelease(r, [], { cwd: dir });
|
|
57
|
+
await appendCut({ releaseDigest: r.releaseDigest, label, actor: "alice", timestamp: `2026-10-16T${ts}:00:00.000Z`, runOrigin: null }, { cwd: dir });
|
|
58
|
+
}
|
|
59
|
+
const deploy = { component: "api", digest: contentDigest("api image"), runId: "r", actor: "ci" };
|
|
60
|
+
await appendReleaseRecord({ ...deploy, env: "prod", gitSha: old, timestamp: "2026-10-16T12:00:00.000Z", releaseDigest: release.releaseDigest }, { cwd: dir });
|
|
61
|
+
await appendReleaseRecord({ ...deploy, env: "staging", gitSha: later, timestamp: "2026-10-16T12:00:00.000Z", releaseDigest: next.releaseDigest }, { cwd: dir });
|
|
62
|
+
for (const [r, env] of [[release, "staging"], [next, "prod"]] as const) {
|
|
63
|
+
await appendPendingGate(
|
|
64
|
+
{ op: "release", gate: `${env}-release`, timestamp: "2026-10-16T13:00:00.000Z", expiresAt: "2999-01-01T00:00:00.000Z", planDigest: DOC, environment: env, releaseDigest: r.releaseDigest },
|
|
65
|
+
{ cwd: dir },
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
return { old, release, next };
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function revoke(dir: string, sha: string): void {
|
|
72
|
+
const record = { schema: 1, tag: "revoked", commit: sha, branch: "main", at: "2026-10-16T12:30:00.000Z", phase: "test", run: { name: "test", id: 77, conclusion: "failure", url: "https://example.test/runs/77" } };
|
|
73
|
+
git(dir, "tag", "-a", "-m", `ci: phase test failed in test (failure)\n\n${JSON.stringify(record, null, 2)}\n`, `ci/revoked/${sha}`, sha);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function result(doc: StatusDocument): Extract<StatusDocument, { members: unknown }> {
|
|
77
|
+
if ("error" in doc) throw new Error(`${doc.error.code}: ${doc.error.message}`);
|
|
78
|
+
expect(validateStatus(doc), JSON.stringify(validateStatus.errors, null, 2)).toBe(true);
|
|
79
|
+
return doc;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
describe("a revoked release in workspace status and release list (#4033)", () => {
|
|
83
|
+
test("an environment running a release cut from a revoked commit is flagged with the rollback line, and the release's pending gate is superseded", async () => {
|
|
84
|
+
await withTestDir(async (dir) => {
|
|
85
|
+
const { old, release, next } = await setup(dir);
|
|
86
|
+
|
|
87
|
+
// Before the revocation nothing is flagged.
|
|
88
|
+
const before = result(await workspaceStatus({ cwd: dir, env: "prod", compareTo: "staging", now: NOW }));
|
|
89
|
+
expect(before.members[0].environments[0].releases[0]).not.toHaveProperty("revoked");
|
|
90
|
+
expect(before.members[0].gates.map((g) => [g.name, g.state])).toEqual([["prod-release", "pending"], ["staging-release", "pending"]]);
|
|
91
|
+
|
|
92
|
+
revoke(dir, old);
|
|
93
|
+
const doc = result(await workspaceStatus({ cwd: dir, env: "prod", compareTo: "staging", now: NOW }));
|
|
94
|
+
const [prod, staging] = doc.members[0].environments;
|
|
95
|
+
expect(prod.releases[0].revoked).toEqual({
|
|
96
|
+
commit: old,
|
|
97
|
+
tag: `ci/revoked/${old}`,
|
|
98
|
+
tagged: expect.any(String),
|
|
99
|
+
phase: "test",
|
|
100
|
+
run: { name: "test", id: 77, conclusion: "failure", url: "https://example.test/runs/77" },
|
|
101
|
+
signer: null,
|
|
102
|
+
releaseDigest: release.releaseDigest,
|
|
103
|
+
label: "v1.0.0",
|
|
104
|
+
rollback: "chant components rollback prod --component api",
|
|
105
|
+
});
|
|
106
|
+
// staging runs the later release, which is not revoked.
|
|
107
|
+
expect(staging.releases[0]).not.toHaveProperty("revoked");
|
|
108
|
+
|
|
109
|
+
const [prodGate, stagingGate] = doc.members[0].gates;
|
|
110
|
+
expect(prodGate).toMatchObject({ name: "prod-release", releaseDigest: next.releaseDigest, state: "pending" });
|
|
111
|
+
expect(prodGate).not.toHaveProperty("revoked");
|
|
112
|
+
expect(stagingGate).toMatchObject({ name: "staging-release", releaseDigest: release.releaseDigest, state: "superseded", revoked: { commit: old, tag: `ci/revoked/${old}`, phase: "test" } });
|
|
113
|
+
|
|
114
|
+
expect(formatStatus(doc)).toContain(
|
|
115
|
+
` prod: api runs release v1.0.0, revoked by ci/revoked/${old} (phase test failed in test (run 77)); roll back: chant components rollback prod --component api`,
|
|
116
|
+
);
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
test("release list marks the revoked release, in JSON and in text", async () => {
|
|
121
|
+
await withTestDir(async (dir) => {
|
|
122
|
+
const { old } = await setup(dir);
|
|
123
|
+
revoke(dir, old);
|
|
124
|
+
const doc = await releasesDocument({ cwd: dir });
|
|
125
|
+
expectValidReleases(doc);
|
|
126
|
+
if ("error" in doc) throw new Error(doc.error.message);
|
|
127
|
+
expect(doc.releases.map((r) => [r.label, r.revoked?.tag ?? null])).toEqual([
|
|
128
|
+
["v1.1.0", null],
|
|
129
|
+
["v1.0.0", `ci/revoked/${old}`],
|
|
130
|
+
]);
|
|
131
|
+
|
|
132
|
+
const out: string[] = [];
|
|
133
|
+
const err: string[] = [];
|
|
134
|
+
vi.spyOn(console, "log").mockImplementation((...m: unknown[]) => { out.push(m.join(" ")); });
|
|
135
|
+
vi.spyOn(console, "error").mockImplementation((...m: unknown[]) => { err.push(m.join(" ")); });
|
|
136
|
+
const cwd = process.cwd();
|
|
137
|
+
try {
|
|
138
|
+
process.chdir(dir);
|
|
139
|
+
const { runReleaseList } = await import("../cli/handlers/release");
|
|
140
|
+
expect(await runReleaseList({ args: {} } as unknown as CommandContext)).toBe(0);
|
|
141
|
+
} finally {
|
|
142
|
+
process.chdir(cwd);
|
|
143
|
+
}
|
|
144
|
+
expect(out.find((l) => l.startsWith("v1.0.0"))).toMatch(/ {2}revoked$/);
|
|
145
|
+
expect(out.find((l) => l.startsWith("v1.1.0"))).not.toMatch(/revoked/);
|
|
146
|
+
expect(err).toContain(` v1.0.0: revoked by ci/revoked/${old}, phase test failed in test (run 77)`);
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
afterEach(() => {
|
|
151
|
+
vi.restoreAllMocks();
|
|
152
|
+
});
|
|
153
|
+
});
|
|
@@ -82,6 +82,8 @@ export interface StatusStewardRun {
|
|
|
82
82
|
gitSha?: string;
|
|
83
83
|
/** The CI run the Op ran in (#4020), when it ran in CI: the shape a release's `runOrigin` has. */
|
|
84
84
|
runOrigin?: OpRunRecord["runOrigin"];
|
|
85
|
+
/** Why the run failed (#4094), for a failed run whose record says. Absent otherwise, and on a record written before chant 0.124.30. */
|
|
86
|
+
failure?: OpRunRecord["failure"];
|
|
85
87
|
/**
|
|
86
88
|
* The gate the run stopped at, for a `gated` run: its name, when the run
|
|
87
89
|
* stopped there, the op it is recorded under (the Op's own, or the
|
|
@@ -417,6 +419,7 @@ export async function readMemberStewards(
|
|
|
417
419
|
ended: newest.ended,
|
|
418
420
|
...(newest.gitSha ? { gitSha: newest.gitSha } : {}),
|
|
419
421
|
...(newest.runOrigin ? { runOrigin: newest.runOrigin } : {}),
|
|
422
|
+
...(newest.failure ? { failure: newest.failure } : {}),
|
|
420
423
|
gate: newest.gate ? gateOf(newest.gate, op.name) : null,
|
|
421
424
|
point: point?.wait ?? null,
|
|
422
425
|
phases: newest.phases.map((p) => ({
|
|
@@ -123,6 +123,10 @@
|
|
|
123
123
|
"type": "array",
|
|
124
124
|
"items": { "$ref": "#/$defs/acceptance" }
|
|
125
125
|
},
|
|
126
|
+
"overlap": {
|
|
127
|
+
"description": "Added in contract 1 by #4025, written by chant 0.124.29 and newer; absent from older output, so a reader treats a missing field as unknown. Overlap between in-flight work items: a work item (a current record of a declared work kind) is in flight unless it implements at least one decision and every one is confirmed (in one of its kind's closed states and superseded by nothing, as featureFlags reads it). Its commits are the ones linked to it as #4029 defines linked (a Chant-Record: <work kind>:<id> trailer, or a Chant-Lease trailer that resolves to it), read from every local and remote-tracking branch and HEAD, the chant/ ledger branches left out, merges skipped, and never fetched. Two items overlap when their commits touch the same file, or when one entry of a change set a pending or approved gate binds is attributed to both: an entry is attributed to an item when a commit linked to the item changed the entry's source file (recorded on the stored change set) and that commit is in the history the change set was planned from. A report only: nothing is locked or refused. Null when the workspace declares no work kind, or the work records or history can't be read.",
|
|
128
|
+
"oneOf": [{ "type": "null" }, { "$ref": "#/$defs/overlap" }]
|
|
129
|
+
},
|
|
126
130
|
"summary": {
|
|
127
131
|
"type": "object",
|
|
128
132
|
"required": ["members", "released", "unreadable", "differing"],
|
|
@@ -266,9 +270,97 @@
|
|
|
266
270
|
}
|
|
267
271
|
}
|
|
268
272
|
}
|
|
273
|
+
},
|
|
274
|
+
"featureFlags": {
|
|
275
|
+
"description": "The member's feature flags (#4024): each record of a declared flag kind whose member field names this member, sorted by id. A flag is a workspace record the member's build reads as one build-time parameter, with chant build --env <env>; its value in an environment is recorded on the build, and on a release's target, as a param whose source is flag:<id>. Named featureFlags because a release record's flags already holds legacy-digest. Empty when no flag names the member, and null when the flag records could not be read. Optional: written from chant 0.124.29, absent from older output.",
|
|
276
|
+
"type": ["array", "null"],
|
|
277
|
+
"items": { "$ref": "#/$defs/featureFlag" }
|
|
269
278
|
}
|
|
270
279
|
}
|
|
271
280
|
},
|
|
281
|
+
"overlap": {
|
|
282
|
+
"type": "object",
|
|
283
|
+
"required": ["items", "pairs", "changeSets", "unattributed"],
|
|
284
|
+
"properties": {
|
|
285
|
+
"items": {
|
|
286
|
+
"type": "array",
|
|
287
|
+
"description": "Each in-flight work item with at least one linked commit, sorted by item.",
|
|
288
|
+
"items": {
|
|
289
|
+
"type": "object",
|
|
290
|
+
"required": ["item", "path", "state", "commits"],
|
|
291
|
+
"properties": {
|
|
292
|
+
"item": { "type": "string", "description": "<work kind>:<id>, as a Chant-Record trailer names it." },
|
|
293
|
+
"path": { "type": "string", "description": "The work record file, from the repository root." },
|
|
294
|
+
"state": { "type": ["string", "null"] },
|
|
295
|
+
"commits": { "type": "array", "items": { "type": "string" }, "description": "The commits linked to the item, newest first." }
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
"pairs": {
|
|
300
|
+
"type": "array",
|
|
301
|
+
"description": "Each pair of items that share a file or a change-set entry, sorted by the first item and then the second. Empty when nothing overlaps.",
|
|
302
|
+
"items": {
|
|
303
|
+
"type": "object",
|
|
304
|
+
"required": ["items", "files", "addresses"],
|
|
305
|
+
"properties": {
|
|
306
|
+
"items": { "type": "array", "items": { "type": "string" }, "minItems": 2, "maxItems": 2, "description": "The two items, in sorted order." },
|
|
307
|
+
"files": { "type": "array", "items": { "type": "string" }, "description": "The paths, from the repository root, that both items' linked commits add, change or delete, sorted. A rename counts as a delete and an add." },
|
|
308
|
+
"addresses": {
|
|
309
|
+
"type": "array",
|
|
310
|
+
"description": "The change-set entries attributed to both items, by change set, member and address.",
|
|
311
|
+
"items": {
|
|
312
|
+
"type": "object",
|
|
313
|
+
"required": ["changeSet", "ledgerMember", "member", "address", "node", "source"],
|
|
314
|
+
"properties": {
|
|
315
|
+
"changeSet": { "type": "string", "description": "The change set's digest, for chant change-set show." },
|
|
316
|
+
"ledgerMember": { "type": ["string", "null"], "description": "The workspace member whose ledger stores the change set, or null for the flat ledger." },
|
|
317
|
+
"member": { "type": "string", "description": "The entry's change-set member." },
|
|
318
|
+
"address": { "type": "string", "description": "The entry's planner address." },
|
|
319
|
+
"node": { "type": ["string", "null"], "description": "The entry's graph node." },
|
|
320
|
+
"source": { "type": "string", "description": "The entry's source file, from the repository root, that both items' commits changed." }
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
"changeSets": { "type": "array", "items": { "type": "string" }, "description": "The digests of the stored change sets read: those a pending or approved gate binds, sorted." },
|
|
328
|
+
"unattributed": { "type": "integer", "minimum": 0, "description": "Entries of those change sets with no source (stored by a chant before 0.124.29, or mapped onto no node with a source location), so attributed to no item." }
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
"featureFlag": {
|
|
332
|
+
"type": "object",
|
|
333
|
+
"required": ["id", "param", "owner", "values", "work", "implements", "stale", "kind", "path"],
|
|
334
|
+
"properties": {
|
|
335
|
+
"id": { "type": "string", "description": "The flag's name, its record's id." },
|
|
336
|
+
"param": { "type": "string", "description": "The build parameter of the member the flag sets: a key of buildParams in its chant.config.ts." },
|
|
337
|
+
"owner": { "type": "string", "description": "Who owns the flag, and removes it when its work is settled." },
|
|
338
|
+
"values": {
|
|
339
|
+
"type": "object",
|
|
340
|
+
"description": "The flag's value per environment, as the record writes it. An environment it leaves out builds with the parameter's declared default.",
|
|
341
|
+
"additionalProperties": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }] }
|
|
342
|
+
},
|
|
343
|
+
"work": {
|
|
344
|
+
"description": "The work item the flag hides, with that item's state, which is null when no record of the flag kind's work kind has the id. Null when the record names none.",
|
|
345
|
+
"oneOf": [
|
|
346
|
+
{ "type": "null" },
|
|
347
|
+
{ "type": "object", "required": ["id", "state"], "properties": { "id": { "type": "string" }, "state": { "type": ["string", "null"] } } }
|
|
348
|
+
]
|
|
349
|
+
},
|
|
350
|
+
"implements": {
|
|
351
|
+
"type": "array",
|
|
352
|
+
"description": "Each decision the work item implements, with its state, and confirmed: true when the decision is in one of its kind's closed states and nothing supersedes it.",
|
|
353
|
+
"items": {
|
|
354
|
+
"type": "object",
|
|
355
|
+
"required": ["id", "state", "confirmed"],
|
|
356
|
+
"properties": { "id": { "type": "string" }, "state": { "type": ["string", "null"] }, "confirmed": { "type": "boolean" } }
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
"stale": { "type": "boolean", "description": "True when the work item implements at least one decision and every one is confirmed: the flag is due for removal, and chant workspace check reports it (WSP118)." },
|
|
360
|
+
"kind": { "type": "string", "description": "The flag kind file, from the workspace root." },
|
|
361
|
+
"path": { "type": "string", "description": "The flag record file, from the workspace root." }
|
|
362
|
+
}
|
|
363
|
+
},
|
|
272
364
|
"stewardForm": { "enum": ["local", "fountain"] },
|
|
273
365
|
"steward": {
|
|
274
366
|
"type": "object",
|
|
@@ -357,11 +449,22 @@
|
|
|
357
449
|
"required": ["forge"],
|
|
358
450
|
"description": "Added in contract 1 by #4020, written by chant 0.124.28 and newer. The CI run the Op ran in, the shape a release's runOrigin has: the forge (github for GitHub and Forgejo, gitlab), the repo or project, and a link to the run. Absent outside CI.",
|
|
359
451
|
"properties": {
|
|
360
|
-
"forge": { "enum": ["github", "gitlab", "op", "local"] },
|
|
452
|
+
"forge": { "enum": ["github", "gitlab", "op", "local", "chant"], "description": "chant: a pull-request job the chant runner ran (chant ci run, #4094), added within contract 1 and written by chant 0.124.30 and newer." },
|
|
361
453
|
"repo": { "type": "string" },
|
|
362
454
|
"url": { "type": "string" }
|
|
363
455
|
}
|
|
364
456
|
},
|
|
457
|
+
"failure": {
|
|
458
|
+
"type": "object",
|
|
459
|
+
"required": ["code", "reason"],
|
|
460
|
+
"description": "Added in contract 1 by #4094, written by chant 0.124.30 and newer. Why a failed run failed: code is a pull-request report's refusal or status (not-approved, plan-changed, not-a-reviewer, no-pull-request, plan-failed, failed, refused) or command-failed, setup-failed or build-failed, and a reader keeps a case for a code it does not know. reason is one line for a person, phase the phase that failed, exitCode the failed command's exit code. chant ci run writes it on every failed job; absent otherwise.",
|
|
461
|
+
"properties": {
|
|
462
|
+
"code": { "type": "string", "minLength": 1 },
|
|
463
|
+
"reason": { "type": "string" },
|
|
464
|
+
"phase": { "type": "string" },
|
|
465
|
+
"exitCode": { "type": "integer" }
|
|
466
|
+
}
|
|
467
|
+
},
|
|
365
468
|
"gate": {
|
|
366
469
|
"oneOf": [
|
|
367
470
|
{ "type": "null" },
|
|
@@ -874,13 +977,14 @@
|
|
|
874
977
|
"planDigest": { "type": ["string", "null"], "description": "The plan the run reached the gate with (#2300), or null for a gate that binds no plan. An approval counts only for this plan." },
|
|
875
978
|
"state": {
|
|
876
979
|
"enum": ["pending", "approved", "expired", "superseded"],
|
|
877
|
-
"description": "Read from the newest pending fact for the gate in env, as a run reads it. approved: the approvals recorded since it, for its plan, pass the gate (its quorum, or a policy permit in enforce mode). expired: not approved, and the pending fact is past expiresAt, so the next run records a fresh one. superseded: not approved, and an approval recorded since it names a different plan, so it doesn't count. pending: none of these."
|
|
980
|
+
"description": "Read from the newest pending fact for the gate in env, as a run reads it. approved: the approvals recorded since it, for its plan, pass the gate (its quorum, or a policy permit in enforce mode). expired: not approved, and the pending fact is past expiresAt, so the next run records a fresh one. superseded: not approved, and an approval recorded since it names a different plan, so it doesn't count; or, on a release gate that is not expired, its release was cut from a revoked commit (#4033, ws-105), so chant approve refuses it with release-revoked and revoked is set. pending: none of these."
|
|
878
981
|
},
|
|
879
982
|
"recordedAt": { "type": "string", "description": "When the run recorded the pending fact." },
|
|
880
983
|
"gitSha": { "type": "string", "description": "Added in contract 1 by #4020, written by chant 0.124.28 and newer. The commit the run reached the gate at, from the pending fact. Absent on a fact recorded by an older chant, and when the run knew no commit. It joins the gate to a release's gitSha and to a run's." },
|
|
881
984
|
"runId": { "type": "string", "description": "Added in contract 1 by #4020, written by chant 0.124.28 and newer. The run that reached the gate: an Op run id, or the CI run id for a component gate that ran in CI. Absent when the run had none." },
|
|
882
985
|
"changeSet": { "type": "string", "pattern": "^(?:jcs1-)?sha256:[0-9a-f]{64}$", "description": "Added in contract 1 by #4022, written by chant 0.124.28 and newer. The change set the gate binds: planDigest, when a change-set document is stored under it in the member's _change-sets/ on chant/lifecycle, as a pull-request gate's apply and a release gate (#4045) store it. chant change-set show <changeSet> --json prints it, each entry with its graph node. Absent when none is stored, as for a component gate, which binds a lifecycle-plan digest." },
|
|
883
986
|
"releaseDigest": { "type": "string", "pattern": "^(?:jcs1-)?sha256:[0-9a-f]{64}$", "description": "Added in contract 1 by #4045, written by chant 0.124.28 and newer. The release the gate binds, from the pending fact: set on a release gate, the gate chant components promote --release passes for an environment, whose component is the op release. An approval counts toward it only when it was recorded for this release, environment and planDigest. Absent on every other gate." },
|
|
987
|
+
"revoked": { "$ref": "#/$defs/revocation", "description": "Added in contract 1 by #4033 (ws-105), written by chant 0.124.29 and newer. Set on a release gate whose release was cut from a commit with a ci/revoked/<sha> tag, judged as release cut judges it: the tag. The gate's state is then superseded, or expired when its pending fact has expired. Absent otherwise." },
|
|
884
988
|
"expiresAt": { "type": "string" },
|
|
885
989
|
"approvals": {
|
|
886
990
|
"description": "The approvals that count toward the gate for its plan, oldest first.",
|
|
@@ -957,6 +1061,59 @@
|
|
|
957
1061
|
}
|
|
958
1062
|
}
|
|
959
1063
|
]
|
|
1064
|
+
},
|
|
1065
|
+
"mixed": { "$ref": "#/$defs/mixed" }
|
|
1066
|
+
}
|
|
1067
|
+
},
|
|
1068
|
+
"mixed": {
|
|
1069
|
+
"type": "object",
|
|
1070
|
+
"description": "Added in contract 1 by #4035, written by chant 0.124.29 and newer. Set when the environment runs a mix: a components promote, rollback or redeploy left a component failed or gated (its <env>/outcomes.jsonl on chant/lifecycle says so) and the release ledger has recorded nothing for it since, or the latest records of its components name more than one release, a record of no release counting as one, with at least one naming a release. Derived when read. Absent otherwise.",
|
|
1071
|
+
"required": ["components", "redeploy", "rollback"],
|
|
1072
|
+
"properties": {
|
|
1073
|
+
"components": {
|
|
1074
|
+
"description": "Every component the ledger records in the environment or a run left unsettled, sorted by name.",
|
|
1075
|
+
"type": "array",
|
|
1076
|
+
"items": {
|
|
1077
|
+
"type": "object",
|
|
1078
|
+
"required": ["component", "digest", "releaseDigest", "releaseLabel", "state", "attempt"],
|
|
1079
|
+
"properties": {
|
|
1080
|
+
"component": { "type": "string" },
|
|
1081
|
+
"digest": { "type": ["string", "null"], "description": "The digest the release ledger records the component running, or null when it has no record in the environment." },
|
|
1082
|
+
"releaseDigest": { "type": ["string", "null"], "description": "The release that record names, or null." },
|
|
1083
|
+
"releaseLabel": { "type": ["string", "null"], "description": "That release's label, or null." },
|
|
1084
|
+
"state": {
|
|
1085
|
+
"enum": ["settled", "failed", "gated"],
|
|
1086
|
+
"description": "settled: the record is what the component runs. failed or gated: the newest run that named it failed on it or stopped at its gate after the steps before the gate ran, and nothing has been recorded for it since, so what it runs is not known."
|
|
1087
|
+
},
|
|
1088
|
+
"attempt": {
|
|
1089
|
+
"description": "For an unsettled component, the run that left it so and what it was deploying. Null when settled.",
|
|
1090
|
+
"oneOf": [
|
|
1091
|
+
{ "type": "null" },
|
|
1092
|
+
{
|
|
1093
|
+
"type": "object",
|
|
1094
|
+
"required": ["verb", "runId", "timestamp", "digest", "releaseDigest", "releaseLabel"],
|
|
1095
|
+
"properties": {
|
|
1096
|
+
"verb": { "enum": ["promote", "rollback", "redeploy"] },
|
|
1097
|
+
"runId": { "type": "string" },
|
|
1098
|
+
"timestamp": { "type": "string" },
|
|
1099
|
+
"digest": { "type": "string" },
|
|
1100
|
+
"releaseDigest": { "type": ["string", "null"] },
|
|
1101
|
+
"releaseLabel": { "type": ["string", "null"] }
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
]
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
},
|
|
1109
|
+
"redeploy": {
|
|
1110
|
+
"type": "array",
|
|
1111
|
+
"items": { "type": "string" },
|
|
1112
|
+
"description": "chant components redeploy <env> --component <component> for each unsettled component the ledger records, run in the member's directory: it puts the component's recorded release back. Empty when no component is unsettled."
|
|
1113
|
+
},
|
|
1114
|
+
"rollback": {
|
|
1115
|
+
"type": ["string", "null"],
|
|
1116
|
+
"description": "chant components rollback <env> --release <label|digest>, run in the member's directory: it restores every component of the newest release the environment ran, other than the one it was moving to, that is still kept and not revoked. Null when there is none."
|
|
960
1117
|
}
|
|
961
1118
|
}
|
|
962
1119
|
},
|
|
@@ -987,13 +1144,64 @@
|
|
|
987
1144
|
}
|
|
988
1145
|
]
|
|
989
1146
|
},
|
|
1147
|
+
"releaseDigest": { "type": ["string", "null"], "pattern": "^(?:jcs1-)?sha256:[0-9a-f]{64}$", "description": "Added in contract 1 by #4043, written by chant 0.124.29 and newer. The release this deploy was made from: the releaseDigest of _releases/<releaseDigest>.json. A promote with --release writes it, a run --components with --release writes it, and a rollback or redeploy copies it from the record it restores. Null for a deploy that named no release. With the item's environment it names the release target." },
|
|
1148
|
+
"releaseLabel": { "type": ["string", "null"], "description": "Added in contract 1 by #4043, written by chant 0.124.29 and newer. The label that release was cut with, from _releases/cuts.jsonl. Null when releaseDigest is null, when the release has no label, and when the cuts can't be read." },
|
|
990
1149
|
"flags": { "type": "array", "items": { "enum": ["legacy-digest"] } },
|
|
991
1150
|
"plan": {
|
|
992
1151
|
"type": ["object", "null"],
|
|
993
1152
|
"description": "The release plan digest names, read from _plans/<digest>.json on chant/lifecycle (ws-055, #2733): the work items and evidence this release shipped. Null when this checkout has no plan stored under that digest — most releases carry no plan, and a plan not yet fetched also reads null."
|
|
1153
|
+
},
|
|
1154
|
+
"revoked": {
|
|
1155
|
+
"description": "Added in contract 1 by #4033 (ws-105), written by chant 0.124.29 and newer. Set when the deploy record names a release in releaseDigest and that release was cut from a commit with a ci/revoked/<sha> tag: the environment runs a revoked release. Read from local tags at read time and judged as release cut judges them, so with ci.green.signedSince an unsigned revoked tag is ignored. Absent when the release is not revoked, when the record names no release, and when the ci tags can't be judged.",
|
|
1156
|
+
"allOf": [
|
|
1157
|
+
{ "$ref": "#/$defs/revocation" },
|
|
1158
|
+
{
|
|
1159
|
+
"type": "object",
|
|
1160
|
+
"required": ["releaseDigest", "label", "rollback"],
|
|
1161
|
+
"properties": {
|
|
1162
|
+
"releaseDigest": { "type": "string", "pattern": "^(?:jcs1-)?sha256:[0-9a-f]{64}$", "description": "The revoked release the environment runs." },
|
|
1163
|
+
"label": { "type": ["string", "null"], "description": "The release's label, or null when its cuts gave it none." },
|
|
1164
|
+
"rollback": { "type": "string", "description": "The line that rolls the environment back, run in the member's directory. Since #4035 (chant 0.124.29): chant components rollback <env> --release <label|digest>, naming the newest release the environment ran before this one that is still kept and not revoked. When there is none, and from chant 0.124.28: chant components rollback <env> --component <component>." }
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
]
|
|
994
1168
|
}
|
|
995
1169
|
}
|
|
996
1170
|
},
|
|
1171
|
+
"revocation": {
|
|
1172
|
+
"type": "object",
|
|
1173
|
+
"description": "The ci/revoked/<sha> tag on a release's commit (#4033, ws-105), as chant ci list --json shows a commit's revoked tag, with the commit.",
|
|
1174
|
+
"required": ["commit", "tag", "tagged", "phase", "run", "signer"],
|
|
1175
|
+
"properties": {
|
|
1176
|
+
"commit": { "type": "string", "description": "The release's commit, which the tag names." },
|
|
1177
|
+
"tag": { "type": "string", "description": "ci/revoked/<sha>." },
|
|
1178
|
+
"tagged": { "type": ["string", "null"], "description": "When the tag was made, ISO 8601, or null for a lightweight tag." },
|
|
1179
|
+
"phase": { "type": ["string", "null"], "description": "The phase the annotation names as failed, or null when the annotation can't be read." },
|
|
1180
|
+
"run": {
|
|
1181
|
+
"description": "The run the annotation names as failed, or null.",
|
|
1182
|
+
"oneOf": [
|
|
1183
|
+
{ "type": "null" },
|
|
1184
|
+
{
|
|
1185
|
+
"type": "object",
|
|
1186
|
+
"required": ["name", "id", "conclusion", "url"],
|
|
1187
|
+
"properties": {
|
|
1188
|
+
"name": { "type": "string" },
|
|
1189
|
+
"id": { "type": ["integer", "null"], "description": "The check run's id, or null for a chant Op run." },
|
|
1190
|
+
"conclusion": { "type": ["string", "null"] },
|
|
1191
|
+
"url": { "type": ["string", "null"] },
|
|
1192
|
+
"opRun": {
|
|
1193
|
+
"type": "object",
|
|
1194
|
+
"required": ["id", "env", "signer"],
|
|
1195
|
+
"properties": { "id": { "type": "string" }, "env": { "type": "string" }, "signer": { "type": "string" } },
|
|
1196
|
+
"description": "Present only when the run is a chant Op run (ci.green.source runs, #4044): its id, the env it is recorded under and the runner whose statement it carries. id is then null."
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
]
|
|
1201
|
+
},
|
|
1202
|
+
"signer": { "type": ["string", "null"], "description": "The runner principal whose statement the tag carries, or null when it counts unsigned." }
|
|
1203
|
+
}
|
|
1204
|
+
},
|
|
997
1205
|
"compare": {
|
|
998
1206
|
"type": "object",
|
|
999
1207
|
"required": ["differs", "components"],
|