@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,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a promote, rollback or redeploy left behind when it did not deploy
|
|
3
|
+
* every component it planned (#4035).
|
|
4
|
+
*
|
|
5
|
+
* The release ledger records a component only once its deploy succeeded, so
|
|
6
|
+
* after a run that applied partly it still names the earlier release for
|
|
7
|
+
* every component that failed, and nothing says that component may be
|
|
8
|
+
* running part of the new one. A deploy outcome is the record of that run:
|
|
9
|
+
* one line per run in `<env>/outcomes.jsonl` on `chant/lifecycle`, beside
|
|
10
|
+
* the environment's `releases.jsonl` and under the same member prefix,
|
|
11
|
+
* naming each planned component and what happened to it.
|
|
12
|
+
*
|
|
13
|
+
* It is written only when the run ended with some components deployed and
|
|
14
|
+
* others not, or with a component that failed. A run that stopped at a gate
|
|
15
|
+
* before deploying anything changed nothing in the environment; its pending
|
|
16
|
+
* gate is what `workspace status` shows for it.
|
|
17
|
+
*
|
|
18
|
+
* The file is append-only, like the release ledger. Whether the environment
|
|
19
|
+
* is still mixed is derived when it is read ({@link ./mixed-environment.ts}):
|
|
20
|
+
* a component the outcome names as failed or gated stays unsettled until the
|
|
21
|
+
* release ledger has a newer record of it, which a redeploy, a rollback or
|
|
22
|
+
* the same promote run again writes.
|
|
23
|
+
*/
|
|
24
|
+
import type { PromotionPlan } from "../components/promote.js";
|
|
25
|
+
import type { DriverRunResult } from "../components/driver.js";
|
|
26
|
+
/** The file a deploy outcome is appended to, under the environment's directory. */
|
|
27
|
+
export declare const OUTCOMES_FILE = "outcomes.jsonl";
|
|
28
|
+
/** What a run did to one component it planned. */
|
|
29
|
+
export type DeployOutcomeState = "deployed" | "failed" | "gated" | "not-run";
|
|
30
|
+
export interface DeployOutcomeComponent {
|
|
31
|
+
component: string;
|
|
32
|
+
/** `deployed` (a release record was written), `failed`, `gated` (stopped at a gate after the steps before it ran), or `not-run`. */
|
|
33
|
+
outcome: DeployOutcomeState;
|
|
34
|
+
/** The artifact digest the run was deploying. */
|
|
35
|
+
digest: string;
|
|
36
|
+
/** The release the run was deploying for this component, or null when it named none. */
|
|
37
|
+
releaseDigest: string | null;
|
|
38
|
+
}
|
|
39
|
+
/** One line of `<env>/outcomes.jsonl`. */
|
|
40
|
+
export interface DeployOutcome {
|
|
41
|
+
version: 1;
|
|
42
|
+
env: string;
|
|
43
|
+
verb: "promote" | "rollback" | "redeploy";
|
|
44
|
+
/** The run id the run's release records carry. */
|
|
45
|
+
runId: string;
|
|
46
|
+
/** The timestamp the run's release records carry. */
|
|
47
|
+
timestamp: string;
|
|
48
|
+
actor: string;
|
|
49
|
+
/** The release the run deployed under (`--release`), or null. */
|
|
50
|
+
releaseDigest: string | null;
|
|
51
|
+
/** How the run ended. */
|
|
52
|
+
status: "fail" | "gated";
|
|
53
|
+
components: DeployOutcomeComponent[];
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The outcome to record for a run, or null when there is nothing to record:
|
|
57
|
+
* every planned component deployed, or the run stopped at a gate with
|
|
58
|
+
* nothing deployed and nothing failed.
|
|
59
|
+
*/
|
|
60
|
+
export declare function deployOutcomeOf(input: {
|
|
61
|
+
verb: DeployOutcome["verb"];
|
|
62
|
+
plan: PromotionPlan;
|
|
63
|
+
run: Pick<DriverRunResult, "status" | "results">;
|
|
64
|
+
/** The release the run deployed under, if any. */
|
|
65
|
+
releaseDigest: string | null;
|
|
66
|
+
runId: string;
|
|
67
|
+
timestamp: string;
|
|
68
|
+
actor: string;
|
|
69
|
+
}): DeployOutcome | null;
|
|
70
|
+
/** Parse the lines of an `outcomes.jsonl`, oldest first. A line that is not an outcome is counted and skipped. */
|
|
71
|
+
export declare function parseDeployOutcomes(text: string | null): {
|
|
72
|
+
outcomes: DeployOutcome[];
|
|
73
|
+
malformed: number;
|
|
74
|
+
};
|
|
75
|
+
/** Append one outcome to `<env>/outcomes.jsonl`. Does not push; the caller pushes with the release records. */
|
|
76
|
+
export declare function appendDeployOutcome(outcome: DeployOutcome, opts?: {
|
|
77
|
+
cwd?: string;
|
|
78
|
+
}): Promise<string>;
|
|
79
|
+
/** Every outcome recorded for `env`, oldest first, read where `readReleaseLedger` reads; `[]` when none is. */
|
|
80
|
+
export declare function readDeployOutcomes(env: string, opts?: import("./git.js").LedgerLocation): Promise<DeployOutcome[]>;
|
|
81
|
+
//# sourceMappingURL=deploy-outcome.d.ts.map
|
|
@@ -0,0 +1 @@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SAAS,CAAC,CAAC;IACjD,kDAAkD;IAClD,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,aAAa,GAAG,IAAI,CA2BvB;AAkBD,kHAAkH;AAClH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG;IAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAazG;AAED,+GAA+G;AAC/G,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,aAAa,EAAE,IAAI,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAG1G;AAED,+GAA+G;AAC/G,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CAGrH"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a promote, rollback or redeploy left behind when it did not deploy
|
|
3
|
+
* every component it planned (#4035).
|
|
4
|
+
*
|
|
5
|
+
* The release ledger records a component only once its deploy succeeded, so
|
|
6
|
+
* after a run that applied partly it still names the earlier release for
|
|
7
|
+
* every component that failed, and nothing says that component may be
|
|
8
|
+
* running part of the new one. A deploy outcome is the record of that run:
|
|
9
|
+
* one line per run in `<env>/outcomes.jsonl` on `chant/lifecycle`, beside
|
|
10
|
+
* the environment's `releases.jsonl` and under the same member prefix,
|
|
11
|
+
* naming each planned component and what happened to it.
|
|
12
|
+
*
|
|
13
|
+
* It is written only when the run ended with some components deployed and
|
|
14
|
+
* others not, or with a component that failed. A run that stopped at a gate
|
|
15
|
+
* before deploying anything changed nothing in the environment; its pending
|
|
16
|
+
* gate is what `workspace status` shows for it.
|
|
17
|
+
*
|
|
18
|
+
* The file is append-only, like the release ledger. Whether the environment
|
|
19
|
+
* is still mixed is derived when it is read ({@link ./mixed-environment.ts}):
|
|
20
|
+
* a component the outcome names as failed or gated stays unsettled until the
|
|
21
|
+
* release ledger has a newer record of it, which a redeploy, a rollback or
|
|
22
|
+
* the same promote run again writes.
|
|
23
|
+
*/
|
|
24
|
+
import { sortedJsonReplacer } from "../utils.js";
|
|
25
|
+
/** The file a deploy outcome is appended to, under the environment's directory. */
|
|
26
|
+
export const OUTCOMES_FILE = "outcomes.jsonl";
|
|
27
|
+
/**
|
|
28
|
+
* The outcome to record for a run, or null when there is nothing to record:
|
|
29
|
+
* every planned component deployed, or the run stopped at a gate with
|
|
30
|
+
* nothing deployed and nothing failed.
|
|
31
|
+
*/
|
|
32
|
+
export function deployOutcomeOf(input) {
|
|
33
|
+
const { plan, run } = input;
|
|
34
|
+
if (run.status === "ok")
|
|
35
|
+
return null;
|
|
36
|
+
const components = plan.items.map((item) => {
|
|
37
|
+
const result = run.results.find((r) => r.component === item.component);
|
|
38
|
+
const outcome = !result ? "not-run" : result.status === "ok" ? "deployed" : result.status === "gated" ? "gated" : "failed";
|
|
39
|
+
return {
|
|
40
|
+
component: item.component,
|
|
41
|
+
outcome,
|
|
42
|
+
digest: item.digest,
|
|
43
|
+
releaseDigest: input.releaseDigest ?? item.source.releaseDigest ?? null,
|
|
44
|
+
};
|
|
45
|
+
});
|
|
46
|
+
const deployed = components.some((c) => c.outcome === "deployed");
|
|
47
|
+
const failed = components.some((c) => c.outcome === "failed");
|
|
48
|
+
if (!deployed && !failed)
|
|
49
|
+
return null;
|
|
50
|
+
return {
|
|
51
|
+
version: 1,
|
|
52
|
+
env: plan.to,
|
|
53
|
+
verb: input.verb,
|
|
54
|
+
runId: input.runId,
|
|
55
|
+
timestamp: input.timestamp,
|
|
56
|
+
actor: input.actor,
|
|
57
|
+
releaseDigest: input.releaseDigest,
|
|
58
|
+
status: run.status,
|
|
59
|
+
components,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
const STATES = ["deployed", "failed", "gated", "not-run"];
|
|
63
|
+
function isOutcome(v) {
|
|
64
|
+
const o = v;
|
|
65
|
+
return (o !== null &&
|
|
66
|
+
typeof o === "object" &&
|
|
67
|
+
o.version === 1 &&
|
|
68
|
+
typeof o.env === "string" &&
|
|
69
|
+
typeof o.runId === "string" &&
|
|
70
|
+
typeof o.timestamp === "string" &&
|
|
71
|
+
Array.isArray(o.components) &&
|
|
72
|
+
o.components.every((c) => c && typeof c.component === "string" && STATES.includes(c.outcome) && typeof c.digest === "string"));
|
|
73
|
+
}
|
|
74
|
+
/** Parse the lines of an `outcomes.jsonl`, oldest first. A line that is not an outcome is counted and skipped. */
|
|
75
|
+
export function parseDeployOutcomes(text) {
|
|
76
|
+
const outcomes = [];
|
|
77
|
+
let malformed = 0;
|
|
78
|
+
for (const line of (text ?? "").split("\n").map((l) => l.trim()).filter(Boolean)) {
|
|
79
|
+
try {
|
|
80
|
+
const parsed = JSON.parse(line);
|
|
81
|
+
if (isOutcome(parsed))
|
|
82
|
+
outcomes.push(parsed);
|
|
83
|
+
else
|
|
84
|
+
malformed++;
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
malformed++;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return { outcomes, malformed };
|
|
91
|
+
}
|
|
92
|
+
/** Append one outcome to `<env>/outcomes.jsonl`. Does not push; the caller pushes with the release records. */
|
|
93
|
+
export async function appendDeployOutcome(outcome, opts) {
|
|
94
|
+
const { appendLedgerLine } = await import("./git.js");
|
|
95
|
+
return appendLedgerLine(outcome.env, OUTCOMES_FILE, JSON.stringify(outcome, sortedJsonReplacer), "Deploy outcome", opts);
|
|
96
|
+
}
|
|
97
|
+
/** Every outcome recorded for `env`, oldest first, read where `readReleaseLedger` reads; `[]` when none is. */
|
|
98
|
+
export async function readDeployOutcomes(env, opts) {
|
|
99
|
+
const { readBlobFromPath } = await import("./git.js");
|
|
100
|
+
return parseDeployOutcomes(await readBlobFromPath(env, OUTCOMES_FILE, opts)).outcomes;
|
|
101
|
+
}
|
|
@@ -10,14 +10,22 @@
|
|
|
10
10
|
* (`../change-set-graph.ts`), and stores the document under its digest
|
|
11
11
|
* (`./change-set-store.ts`).
|
|
12
12
|
*
|
|
13
|
+
* Each entry mapped onto a node that has a source location also records that
|
|
14
|
+
* file from the repository root as `source` (#4025), which the overlap report
|
|
15
|
+
* in `workspace status` attributes the entry to work items by.
|
|
16
|
+
*
|
|
13
17
|
* The graph is read only when the digest is not stored yet. A graph that
|
|
14
18
|
* can't be read never stops the gate: the document is stored with `graph:
|
|
15
19
|
* null` and every `node` null, and the caller gets a warning to print.
|
|
16
20
|
*/
|
|
17
21
|
import type { ChangeSetDocument, ChangeSetGraph } from "../change-set.js";
|
|
18
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* Reads the node ids of the graph of the project at `projectDir`, with each
|
|
24
|
+
* node's source file (relative to `projectDir`) when the graph gives one.
|
|
25
|
+
*/
|
|
19
26
|
export type GraphIdReader = (projectDir: string) => Promise<{
|
|
20
27
|
ids: string[];
|
|
28
|
+
sources?: Record<string, string>;
|
|
21
29
|
} | {
|
|
22
30
|
error: string;
|
|
23
31
|
}>;
|
|
@@ -29,6 +37,7 @@ export type GraphIdReader = (projectDir: string) => Promise<{
|
|
|
29
37
|
*/
|
|
30
38
|
export declare function readGraphIds(projectDir: string, args?: readonly string[]): Promise<{
|
|
31
39
|
ids: string[];
|
|
40
|
+
sources: Record<string, string>;
|
|
32
41
|
} | {
|
|
33
42
|
error: string;
|
|
34
43
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gate-change-set.d.ts","sourceRoot":"","sources":["../../src/lifecycle/gate-change-set.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"gate-change-set.d.ts","sourceRoot":"","sources":["../../src/lifecycle/gate-change-set.ts"],"names":[],"mappings":"AAAA;;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C,EAAE,MAAM,CAAC;CAClB;AAuBD;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAuB1G"}
|
|
@@ -10,11 +10,16 @@
|
|
|
10
10
|
* (`../change-set-graph.ts`), and stores the document under its digest
|
|
11
11
|
* (`./change-set-store.ts`).
|
|
12
12
|
*
|
|
13
|
+
* Each entry mapped onto a node that has a source location also records that
|
|
14
|
+
* file from the repository root as `source` (#4025), which the overlap report
|
|
15
|
+
* in `workspace status` attributes the entry to work items by.
|
|
16
|
+
*
|
|
13
17
|
* The graph is read only when the digest is not stored yet. A graph that
|
|
14
18
|
* can't be read never stops the gate: the document is stored with `graph:
|
|
15
19
|
* null` and every `node` null, and the caller gets a warning to print.
|
|
16
20
|
*/
|
|
17
|
-
import { spawn } from "node:child_process";
|
|
21
|
+
import { execFileSync, spawn } from "node:child_process";
|
|
22
|
+
import { posix } from "node:path";
|
|
18
23
|
import { mapChangeSetToGraph } from "../change-set-graph.js";
|
|
19
24
|
import { persistChangeSet, readStoredChangeSet } from "./change-set-store.js";
|
|
20
25
|
import { resolveMemberLedger } from "./member-ledger.js";
|
|
@@ -55,7 +60,11 @@ export async function readGraphIds(projectDir, args = []) {
|
|
|
55
60
|
const read = readMemberIr(out.stdout);
|
|
56
61
|
if ("reason" in read)
|
|
57
62
|
return { error: read.reason.message };
|
|
58
|
-
|
|
63
|
+
const sources = {};
|
|
64
|
+
for (const n of read.ir.nodes)
|
|
65
|
+
if (n.sourceLoc?.file)
|
|
66
|
+
sources[n.id] = n.sourceLoc.file;
|
|
67
|
+
return { ids: read.ir.nodes.map((n) => n.id), sources };
|
|
59
68
|
}
|
|
60
69
|
let graphReaderOverride;
|
|
61
70
|
/**
|
|
@@ -71,6 +80,29 @@ export function setGraphIdReader(reader) {
|
|
|
71
80
|
export function gateGraphReader(args = []) {
|
|
72
81
|
return graphReaderOverride ?? ((dir) => readGraphIds(dir, args));
|
|
73
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* Each node's source file as a path from the repository root (#4025): the
|
|
85
|
+
* graph gives it relative to the member's directory at `cwd`. Undefined when
|
|
86
|
+
* the graph gives none or `cwd` is in no git repository.
|
|
87
|
+
*/
|
|
88
|
+
function repoSources(cwd, sources) {
|
|
89
|
+
if (!sources || Object.keys(sources).length === 0)
|
|
90
|
+
return undefined;
|
|
91
|
+
let prefix;
|
|
92
|
+
try {
|
|
93
|
+
prefix = execFileSync("git", ["rev-parse", "--show-prefix"], { cwd, encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"] }).trim();
|
|
94
|
+
}
|
|
95
|
+
catch {
|
|
96
|
+
return undefined;
|
|
97
|
+
}
|
|
98
|
+
const out = new Map();
|
|
99
|
+
for (const [id, file] of Object.entries(sources)) {
|
|
100
|
+
const path = posix.normalize(posix.join(prefix, file.split("\\").join("/")));
|
|
101
|
+
if (!path.startsWith("../") && path !== "..")
|
|
102
|
+
out.set(id, path);
|
|
103
|
+
}
|
|
104
|
+
return out;
|
|
105
|
+
}
|
|
74
106
|
/**
|
|
75
107
|
* Store `doc` under its digest in the member's ledger at `cwd`, mapped onto
|
|
76
108
|
* the member's graph, unless it is stored already. Does not push; the gate's
|
|
@@ -90,7 +122,7 @@ export async function storeGateChangeSet(input) {
|
|
|
90
122
|
if ("error" in read)
|
|
91
123
|
warning = read.error;
|
|
92
124
|
else
|
|
93
|
-
nodes = { member, at: input.at ?? null, ids: read.ids };
|
|
125
|
+
nodes = { member, at: input.at ?? null, ids: read.ids, sources: repoSources(cwd, read.sources) };
|
|
94
126
|
}
|
|
95
127
|
catch (err) {
|
|
96
128
|
warning = err instanceof Error ? err.message : String(err);
|
|
@@ -2,6 +2,7 @@ import { type GateOrigin } from "./gate-origin.js";
|
|
|
2
2
|
import type { GateApprover, GatePolicyDecision, ResolvedGateApproval } from "../op/gate-approval.js";
|
|
3
3
|
import type { GateApprovalSource } from "../op/op-waves.js";
|
|
4
4
|
import type { GateRunLocator } from "../op/gate-run-locator.js";
|
|
5
|
+
import { type LedgerLocation } from "./git.js";
|
|
5
6
|
export { DEFAULT_GATE_EXPIRY, isApprovalUrl, resolveApprovalUrl } from "./gate-pending.js";
|
|
6
7
|
export { isPendingGateExpired, latestPendingGate, latestResolutionForPlan, latestResolutionSince, type PlanBoundResolution, } from "./gate-ledger-select.js";
|
|
7
8
|
/** The directory on the `chant/lifecycle` branch that holds gate ledgers, under a member's prefix when it has one. */
|
|
@@ -390,9 +391,7 @@ export declare function appendPendingGate(input: PendingGateInput, opts?: {
|
|
|
390
391
|
* graceful-degradation stance `readConvergeLedger` takes. Returns empty arrays
|
|
391
392
|
* (never throws) when `op` has nothing recorded yet.
|
|
392
393
|
*/
|
|
393
|
-
export declare function readGateLedger(op: string, opts?: {
|
|
394
|
-
cwd?: string;
|
|
395
|
-
}): Promise<{
|
|
394
|
+
export declare function readGateLedger(op: string, opts?: LedgerLocation): Promise<{
|
|
396
395
|
resolutions: GateResolutionRecord[];
|
|
397
396
|
pending: PendingGateRecord[];
|
|
398
397
|
malformed: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gate-ledger.d.ts","sourceRoot":"","sources":["../../src/lifecycle/gate-ledger.ts"],"names":[],"mappings":"AA6CA,OAAO,EAAqB,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAClG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"gate-ledger.d.ts","sourceRoot":"","sources":["../../src/lifecycle/gate-ledger.ts"],"names":[],"mappings":"AA6CA,OAAO,EAAqB,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,kB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2BD;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,EAAE,EAAE,MAAM,EACV,IAAI,CAAC,EAAE,cAAc,GACpB,OAAO,CAAC;IAAE,WAAW,EAAE,oBAAoB,EAAE,CAAC;IAAC,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAInG;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,GACd;IAAE,WAAW,EAAE,oBAAoB,EAAE,CAAC;IAAC,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAsF1F;AAED,oNAAoN;AACpN,wBAAsB,mBAAmB,CACvC,EAAE,EAAE,MAAM,EACV,IAAI,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GACtB,OAAO,CAAC;IAAE,OAAO,EAAE,oBAAoB,EAAE,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAGjE"}
|
package/dist/lifecycle/git.d.ts
CHANGED
|
@@ -61,6 +61,18 @@ export interface LedgerFileWrite {
|
|
|
61
61
|
*/
|
|
62
62
|
expectPriorSha?: string | null;
|
|
63
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* One file for {@link writeLedgerFiles} to remove (#4036): retention's
|
|
66
|
+
* garbage collection takes a stored change set, release or template out of
|
|
67
|
+
* the tree in a new commit. The history keeps it.
|
|
68
|
+
*/
|
|
69
|
+
export interface LedgerFileRemoval {
|
|
70
|
+
/** The file's full path on the branch. No prefix is added. */
|
|
71
|
+
path: string;
|
|
72
|
+
remove: true;
|
|
73
|
+
/** The blob sha the caller saw at the path; a different sha, or no file, is a conflict. */
|
|
74
|
+
expectPriorSha?: string | null;
|
|
75
|
+
}
|
|
64
76
|
/**
|
|
65
77
|
* Write several files to the branch in one commit (#2538). Paths are full
|
|
66
78
|
* branch paths, so one commit can write the ledgers of several members, for
|
|
@@ -74,8 +86,15 @@ export interface LedgerFileWrite {
|
|
|
74
86
|
* Every entry the write does not touch is carried over as it is, so the tree
|
|
75
87
|
* of an unchanged directory keeps its sha.
|
|
76
88
|
*/
|
|
77
|
-
export declare function writeLedgerFiles(files: LedgerFileWrite
|
|
89
|
+
export declare function writeLedgerFiles(files: Array<LedgerFileWrite | LedgerFileRemoval>, commitMessage: string, opts?: {
|
|
78
90
|
cwd?: string;
|
|
91
|
+
/**
|
|
92
|
+
* The branch tip the caller read before deciding what to write (#4036).
|
|
93
|
+
* A different tip is a conflict, thrown at once and never retried here,
|
|
94
|
+
* so a caller whose choice depends on files it does not write (garbage
|
|
95
|
+
* collection reading the gate ledgers) reads again.
|
|
96
|
+
*/
|
|
97
|
+
expectTip?: string;
|
|
79
98
|
}): Promise<string>;
|
|
80
99
|
/**
|
|
81
100
|
* Read a blob from an arbitrary `<environment>/<filename>` path on the orphan
|
|
@@ -162,6 +181,16 @@ export declare function readSnapshotAt(environment: string, lexicon: string, ref
|
|
|
162
181
|
export declare function appendReleaseRecordLine(environment: string, recordJson: string, opts?: {
|
|
163
182
|
cwd?: string;
|
|
164
183
|
}): Promise<string>;
|
|
184
|
+
/**
|
|
185
|
+
* Append one line to `<environment>/<filename>` on the orphan branch, with
|
|
186
|
+
* the same read, append and compare-and-swap retry as
|
|
187
|
+
* {@link appendReleaseRecordLine}. The deploy outcomes of
|
|
188
|
+
* ../lifecycle/deploy-outcome.ts (#4035) are appended through here, beside
|
|
189
|
+
* the environment's `releases.jsonl`.
|
|
190
|
+
*/
|
|
191
|
+
export declare function appendLedgerLine(environment: string, filename: string, recordJson: string, commitMessage: string, opts?: {
|
|
192
|
+
cwd?: string;
|
|
193
|
+
}): Promise<string>;
|
|
165
194
|
/**
|
|
166
195
|
* Read every release record line for `environment` from the orphan branch,
|
|
167
196
|
* oldest first, as raw JSON strings. Returns `[]` when no ledger exists yet
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../src/lifecycle/git.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAIpD;;;;;;;GAOG;AACH,wBAAsB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAEnF;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,yHAAyH;IACzH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC;IACpC,yFAAyF;IACzF,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAmFD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,eAAe,CACnC,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,EACrB,IAAI,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAC1D,OAAO,CAAC,MAAM,CAAC,CAOjB;AAED,6CAA6C;AAC7C,MAAM,WAAW,eAAe;IAC9B,0GAA0G;IAC1G,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,gBAAgB,CACpC,KAAK,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../src/lifecycle/git.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAIpD;;;;;;;GAOG;AACH,wBAAsB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,cAAc,GA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AkB,CACtC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,IAAI,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GACtB,OAAO,CAAC,cAAc,CAAC,CAQzB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAErF;AAED;;GAEG;AACH,wBAAsB,aAAa,CAAC,IAAI,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAO5E;AAyBD;;;;;GAKG;AACH,wBAAsB,cAAc,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAGlE;AA0DD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,CAAC,EAAE,cAAc,GAAG,cAAc,CAMvE"}
|
package/dist/lifecycle/git.js
CHANGED
|
@@ -125,6 +125,7 @@ export async function writeBlobToPath(environment, filename, content, commitMess
|
|
|
125
125
|
const dir = await ledgerDir(environment, opts);
|
|
126
126
|
return writeLedgerFiles([{ path: `${dir}/${filename}`, content, ...(opts?.expectPriorPathSha !== undefined ? { expectPriorSha: opts.expectPriorPathSha } : {}) }], commitMessage, opts);
|
|
127
127
|
}
|
|
128
|
+
const isRemoval = (f) => f.remove === true;
|
|
128
129
|
/**
|
|
129
130
|
* Write several files to the branch in one commit (#2538). Paths are full
|
|
130
131
|
* branch paths, so one commit can write the ledgers of several members, for
|
|
@@ -158,8 +159,13 @@ export async function writeLedgerFiles(files, commitMessage, opts) {
|
|
|
158
159
|
// kubectl.kubernetes.io/last-applied-configuration annotation) and no
|
|
159
160
|
// shell-quoting dance around embedded single quotes. Content-addressed
|
|
160
161
|
// and idempotent, so this stays outside the retry loop below.
|
|
162
|
+
// A removal has no blob: its sha is null, and step 3 deletes the entry.
|
|
161
163
|
const blobs = [];
|
|
162
164
|
for (const f of files) {
|
|
165
|
+
if (isRemoval(f)) {
|
|
166
|
+
blobs.push({ path: f.path, sha: null });
|
|
167
|
+
continue;
|
|
168
|
+
}
|
|
163
169
|
const blobResult = await rt.spawn(["git", "hash-object", "-w", "--stdin"], { cwd, stdin: f.content });
|
|
164
170
|
if (blobResult.exitCode !== 0) {
|
|
165
171
|
throw ledgerWriteError("git hash-object", f.path, blobResult.stderr);
|
|
@@ -230,6 +236,9 @@ export async function writeLedgerFiles(files, commitMessage, opts) {
|
|
|
230
236
|
// there instead can observe a newer tip than the listings reflect, which
|
|
231
237
|
// makes the CAS succeed against a tree built from a stale read.
|
|
232
238
|
const tip = await getStateBranchTip(cwd);
|
|
239
|
+
if (opts?.expectTip !== undefined && tip !== opts.expectTip) {
|
|
240
|
+
throw new RefCASConflictError(`refs/heads/${STATE_BRANCH}`, opts.expectTip, `the branch moved to ${tip ?? "(none)"} since it was read`);
|
|
241
|
+
}
|
|
233
242
|
const trees = new Map();
|
|
234
243
|
const listing = async (dir) => {
|
|
235
244
|
let entries = trees.get(dir);
|
|
@@ -257,16 +266,24 @@ export async function writeLedgerFiles(files, commitMessage, opts) {
|
|
|
257
266
|
// rebuild below has each parent in hand.
|
|
258
267
|
for (const b of blobs) {
|
|
259
268
|
const { dir, name } = splitPath(b.path);
|
|
260
|
-
|
|
269
|
+
if (b.sha === null)
|
|
270
|
+
(await listing(dir)).delete(name);
|
|
271
|
+
else
|
|
272
|
+
(await listing(dir)).set(name, { mode: "100644", type: "blob", sha: b.sha });
|
|
261
273
|
for (let d = dir; d !== ""; d = parentDir(d))
|
|
262
274
|
await listing(parentDir(d));
|
|
263
275
|
}
|
|
264
|
-
// 4. Rebuild the touched trees, deepest first, then the root.
|
|
276
|
+
// 4. Rebuild the touched trees, deepest first, then the root. A directory
|
|
277
|
+
// a removal left empty is dropped from its parent, as git itself would.
|
|
265
278
|
const touched = [...trees.keys()].sort((a, b) => depth(b) - depth(a) || (a < b ? -1 : 1));
|
|
266
279
|
let rootTreeSha = "";
|
|
267
280
|
for (const dir of touched) {
|
|
281
|
+
if (dir !== "" && trees.get(dir).size === 0) {
|
|
282
|
+
trees.get(parentDir(dir)).delete(baseName(dir));
|
|
283
|
+
continue;
|
|
284
|
+
}
|
|
268
285
|
const lines = [...trees.get(dir)].map(([name, e]) => `${e.mode} ${e.type} ${e.sha}\t${name}`).join("\n");
|
|
269
|
-
const result = await rt.spawn(["git", "mktree"], { cwd, stdin: `${lines}\n` });
|
|
286
|
+
const result = await rt.spawn(["git", "mktree"], { cwd, stdin: lines === "" ? "" : `${lines}\n` });
|
|
270
287
|
if (result.exitCode !== 0) {
|
|
271
288
|
throw ledgerWriteError(`git mktree (${dir === "" ? "root" : dir})`, path, result.stderr);
|
|
272
289
|
}
|
|
@@ -422,14 +439,23 @@ export async function readSnapshotAt(environment, lexicon, ref, opts) {
|
|
|
422
439
|
* `expectPriorPathSha`. See `writeBlobToPath` for the race that closes.
|
|
423
440
|
*/
|
|
424
441
|
export async function appendReleaseRecordLine(environment, recordJson, opts) {
|
|
425
|
-
|
|
442
|
+
return appendLedgerLine(environment, "releases.jsonl", recordJson, "Release record", opts);
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* Append one line to `<environment>/<filename>` on the orphan branch, with
|
|
446
|
+
* the same read, append and compare-and-swap retry as
|
|
447
|
+
* {@link appendReleaseRecordLine}. The deploy outcomes of
|
|
448
|
+
* ../lifecycle/deploy-outcome.ts (#4035) are appended through here, beside
|
|
449
|
+
* the environment's `releases.jsonl`.
|
|
450
|
+
*/
|
|
451
|
+
export async function appendLedgerLine(environment, filename, recordJson, commitMessage, opts) {
|
|
426
452
|
let lastErr;
|
|
427
453
|
for (let attempt = 1; attempt <= WRITE_BLOB_RETRY_ATTEMPTS; attempt++) {
|
|
428
454
|
try {
|
|
429
455
|
const priorSha = await readPathSha(environment, filename, opts);
|
|
430
456
|
const existing = priorSha ? await readBlobBySha(priorSha, opts) : null;
|
|
431
457
|
const content = `${existing ? `${existing.replace(/\n$/, "")}\n` : ""}${recordJson}\n`;
|
|
432
|
-
return await writeBlobToPath(environment, filename, content,
|
|
458
|
+
return await writeBlobToPath(environment, filename, content, commitMessage, {
|
|
433
459
|
...opts,
|
|
434
460
|
expectPriorPathSha: priorSha,
|
|
435
461
|
});
|
|
@@ -12,6 +12,10 @@ export * from "./unobserved-gate.js";
|
|
|
12
12
|
export * from "./receipt-plan.js";
|
|
13
13
|
export * from "./affected.js";
|
|
14
14
|
export * from "./release-ledger.js";
|
|
15
|
+
export * from "./release-join.js";
|
|
16
|
+
export * from "./retention-policy.js";
|
|
17
|
+
export * from "./delivery-metrics.js";
|
|
18
|
+
export { planLifecycleGc, runLifecycleGc, type GcFile, type GcKept, type GcKeepCode, type GcKeepReason, type GcKind, type GcReport, type LifecycleGcPlan } from "./retention.js";
|
|
15
19
|
export * from "./build-ledger.js";
|
|
16
20
|
export * from "./build-ledger-store.js";
|
|
17
21
|
export * from "./oras-referrer-lookup.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lifecycle/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,c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,CAAC"}
|
package/dist/lifecycle/index.js
CHANGED
|
@@ -12,6 +12,10 @@ export * from "./unobserved-gate.js";
|
|
|
12
12
|
export * from "./receipt-plan.js";
|
|
13
13
|
export * from "./affected.js";
|
|
14
14
|
export * from "./release-ledger.js";
|
|
15
|
+
export * from "./release-join.js";
|
|
16
|
+
export * from "./retention-policy.js";
|
|
17
|
+
export * from "./delivery-metrics.js";
|
|
18
|
+
export { planLifecycleGc, runLifecycleGc } from "./retention.js";
|
|
15
19
|
export * from "./build-ledger.js";
|
|
16
20
|
export * from "./build-ledger-store.js";
|
|
17
21
|
export * from "./oras-referrer-lookup.js";
|