@intentius/chant 0.124.55 → 0.124.57
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/ci-agent.d.ts.map +1 -1
- package/dist/ci-agent.js +1 -2
- package/dist/ci-audit/attribution.d.ts +111 -0
- package/dist/ci-audit/attribution.d.ts.map +1 -0
- package/dist/ci-audit/attribution.js +194 -0
- package/dist/ci-audit/audit-log.d.ts +144 -0
- package/dist/ci-audit/audit-log.d.ts.map +1 -0
- package/dist/ci-audit/audit-log.js +149 -0
- package/dist/ci-audit/index.d.ts +12 -0
- package/dist/ci-audit/index.d.ts.map +1 -0
- package/dist/ci-audit/index.js +11 -0
- package/dist/ci-audit/unrecorded.d.ts +74 -0
- package/dist/ci-audit/unrecorded.d.ts.map +1 -0
- package/dist/ci-audit/unrecorded.js +95 -0
- package/dist/ci-audit.d.ts +3 -0
- package/dist/ci-audit.d.ts.map +1 -0
- package/dist/ci-audit.js +2 -0
- package/dist/ci-control.d.ts.map +1 -1
- package/dist/ci-control.js +3 -4
- package/dist/ci-estate.d.ts +24 -0
- package/dist/ci-estate.d.ts.map +1 -1
- package/dist/ci-estate.js +1 -2
- package/dist/ci-identity.d.ts.map +1 -1
- package/dist/ci-identity.js +2 -3
- package/dist/ci-job-guard.d.ts +139 -0
- package/dist/ci-job-guard.d.ts.map +1 -0
- package/dist/ci-job-guard.js +287 -0
- package/dist/ci-jobs.d.ts +7 -0
- package/dist/ci-jobs.d.ts.map +1 -1
- package/dist/ci-jobs.js +7 -0
- package/dist/ci-product-words.d.ts +7 -1
- package/dist/ci-product-words.d.ts.map +1 -1
- package/dist/ci-product-words.js +38 -4
- package/dist/ci-product.d.ts +35 -0
- package/dist/ci-product.d.ts.map +1 -1
- package/dist/ci-product.js +38 -4
- package/dist/ci-respond-run.d.ts +73 -0
- package/dist/ci-respond-run.d.ts.map +1 -0
- package/dist/ci-respond-run.js +247 -0
- package/dist/ci-respond.d.ts +189 -0
- package/dist/ci-respond.d.ts.map +1 -0
- package/dist/ci-respond.js +285 -0
- package/dist/cli/handlers/audit-log.d.ts +12 -0
- package/dist/cli/handlers/audit-log.d.ts.map +1 -0
- package/dist/cli/handlers/audit-log.js +81 -0
- package/dist/cli/handlers/build.d.ts +7 -0
- package/dist/cli/handlers/build.d.ts.map +1 -1
- package/dist/cli/handlers/build.js +81 -0
- package/dist/cli/handlers/ci-check-job.d.ts +11 -0
- package/dist/cli/handlers/ci-check-job.d.ts.map +1 -0
- package/dist/cli/handlers/ci-check-job.js +27 -0
- package/dist/cli/handlers/ci-check.d.ts.map +1 -1
- package/dist/cli/handlers/ci-check.js +38 -9
- package/dist/cli/handlers/e2e-safe-run.d.ts +12 -0
- package/dist/cli/handlers/e2e-safe-run.d.ts.map +1 -0
- package/dist/cli/handlers/e2e-safe-run.js +23 -0
- package/dist/cli/handlers/lifecycle.d.ts.map +1 -1
- package/dist/cli/handlers/lifecycle.js +14 -0
- package/dist/cli/handlers/pr.d.ts +5 -0
- package/dist/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/handlers/pr.js +346 -36
- package/dist/cli/handlers/run-wave.js +89 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +56 -2
- package/dist/cli/parse-args.d.ts.map +1 -1
- package/dist/cli/parse-args.js +107 -0
- package/dist/cli/registry.d.ts +38 -0
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/components/adoption.d.ts.map +1 -1
- package/dist/components/adoption.js +1 -2
- package/dist/components/auto-release.d.ts +5 -2
- package/dist/components/auto-release.d.ts.map +1 -1
- package/dist/components/auto-release.js +9 -4
- package/dist/components/capability.d.ts +47 -0
- package/dist/components/capability.d.ts.map +1 -1
- package/dist/components/capability.js +25 -0
- package/dist/components/check-hooks.d.ts +4 -1
- package/dist/components/check-hooks.d.ts.map +1 -1
- package/dist/components/check-steps.d.ts +74 -0
- package/dist/components/check-steps.d.ts.map +1 -0
- package/dist/components/check-steps.js +102 -0
- package/dist/components/ci-services.d.ts.map +1 -1
- package/dist/components/ci-services.js +1 -2
- package/dist/components/deploy-units.d.ts +12 -0
- package/dist/components/deploy-units.d.ts.map +1 -1
- package/dist/components/deploy-units.js +20 -1
- package/dist/components/driver.d.ts +12 -0
- package/dist/components/driver.d.ts.map +1 -1
- package/dist/components/driver.js +35 -1
- package/dist/components/groups.d.ts.map +1 -1
- package/dist/components/groups.js +4 -3
- package/dist/components/pr-env-ledger.d.ts.map +1 -1
- package/dist/components/pr-env-ledger.js +1 -2
- package/dist/components/pr-environment.d.ts +1 -1
- package/dist/components/pr-environment.d.ts.map +1 -1
- package/dist/components/pr-environment.js +1 -1
- package/dist/components/pr-pipeline.d.ts +137 -5
- package/dist/components/pr-pipeline.d.ts.map +1 -1
- package/dist/components/pr-pipeline.js +164 -20
- package/dist/components/pr-run.d.ts +8 -0
- package/dist/components/pr-run.d.ts.map +1 -1
- package/dist/components/pr-run.js +9 -4
- package/dist/components/product-pipeline.d.ts +35 -2
- package/dist/components/product-pipeline.d.ts.map +1 -1
- package/dist/components/product-pipeline.js +24 -5
- package/dist/components/row-lease.d.ts +22 -1
- package/dist/components/row-lease.d.ts.map +1 -1
- package/dist/components/row-lease.js +32 -6
- package/dist/components/wave-plan.d.ts +8 -0
- package/dist/components/wave-plan.d.ts.map +1 -1
- package/dist/components/wave-plan.js +18 -2
- package/dist/e2e-harness/bucket.d.ts +21 -0
- package/dist/e2e-harness/bucket.d.ts.map +1 -0
- package/dist/e2e-harness/bucket.js +61 -0
- package/dist/e2e-harness/claim.d.ts +70 -0
- package/dist/e2e-harness/claim.d.ts.map +1 -0
- package/dist/e2e-harness/claim.js +98 -0
- package/dist/e2e-harness/driver.d.ts +64 -0
- package/dist/e2e-harness/driver.d.ts.map +1 -0
- package/dist/e2e-harness/driver.js +243 -0
- package/dist/e2e-harness/forgejo.d.ts +77 -0
- package/dist/e2e-harness/forgejo.d.ts.map +1 -0
- package/dist/e2e-harness/forgejo.js +205 -0
- package/dist/e2e-harness/git.d.ts +32 -0
- package/dist/e2e-harness/git.d.ts.map +1 -0
- package/dist/e2e-harness/git.js +67 -0
- package/dist/e2e-harness/index.d.ts +22 -0
- package/dist/e2e-harness/index.d.ts.map +1 -0
- package/dist/e2e-harness/index.js +47 -0
- package/dist/e2e-harness/jobs.d.ts +8 -0
- package/dist/e2e-harness/jobs.d.ts.map +1 -0
- package/dist/e2e-harness/jobs.js +34 -0
- package/dist/e2e-harness/pins.d.ts +45 -0
- package/dist/e2e-harness/pins.d.ts.map +1 -0
- package/dist/e2e-harness/pins.js +44 -0
- package/dist/e2e-harness/ports.d.ts +113 -0
- package/dist/e2e-harness/ports.d.ts.map +1 -0
- package/dist/e2e-harness/ports.js +4 -0
- package/dist/e2e-harness/reports.d.ts +45 -0
- package/dist/e2e-harness/reports.d.ts.map +1 -0
- package/dist/e2e-harness/reports.js +57 -0
- package/dist/e2e-harness/safe-run-cli.d.ts +17 -0
- package/dist/e2e-harness/safe-run-cli.d.ts.map +1 -0
- package/dist/e2e-harness/safe-run-cli.js +43 -0
- package/dist/e2e-harness/safe-run.d.ts +61 -0
- package/dist/e2e-harness/safe-run.d.ts.map +1 -0
- package/dist/e2e-harness/safe-run.js +172 -0
- package/dist/e2e-harness/scenario.d.ts +11 -0
- package/dist/e2e-harness/scenario.d.ts.map +1 -0
- package/dist/e2e-harness/scenario.js +89 -0
- package/dist/e2e-harness/schemas/demo-cycle.schema.json +282 -0
- package/dist/e2e-harness/schemas/demo-step.schema.json +245 -0
- package/dist/e2e-harness/schemas/e2e-claim-row.schema.json +33 -0
- package/dist/e2e-harness/schemas/e2e-claims.schema.json +18 -0
- package/dist/e2e-harness/schemas/e2e-scenario.schema.json +150 -0
- package/dist/e2e-harness/schemas/index.d.ts +191 -0
- package/dist/e2e-harness/schemas/index.d.ts.map +1 -0
- package/dist/e2e-harness/schemas/index.js +62 -0
- package/dist/e2e-harness/stack.d.ts +124 -0
- package/dist/e2e-harness/stack.d.ts.map +1 -0
- package/dist/e2e-harness/stack.js +207 -0
- package/dist/e2e-harness/steps.d.ts +11 -0
- package/dist/e2e-harness/steps.d.ts.map +1 -0
- package/dist/e2e-harness/steps.js +22 -0
- package/dist/e2e-harness.d.ts +3 -0
- package/dist/e2e-harness.d.ts.map +1 -0
- package/dist/e2e-harness.js +2 -0
- package/dist/exit-codes.d.ts +7 -1
- package/dist/exit-codes.d.ts.map +1 -1
- package/dist/exit-codes.js +7 -1
- package/dist/lexicon.d.ts +55 -0
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/gate-ledger.d.ts.map +1 -1
- package/dist/lifecycle/gate-ledger.js +2 -3
- package/dist/lifecycle/gated-request.d.ts.map +1 -1
- package/dist/lifecycle/gated-request.js +1 -2
- package/dist/lifecycle/git.d.ts +39 -3
- package/dist/lifecycle/git.d.ts.map +1 -1
- package/dist/lifecycle/git.js +223 -15
- package/dist/lifecycle/lock-rows.d.ts +23 -0
- package/dist/lifecycle/lock-rows.d.ts.map +1 -1
- package/dist/lifecycle/lock-rows.js +47 -8
- package/dist/lifecycle/query.d.ts.map +1 -1
- package/dist/lifecycle/query.js +4 -5
- package/dist/lifecycle/release-catalog.d.ts.map +1 -1
- package/dist/lifecycle/release-catalog.js +1 -1
- package/dist/lifecycle/release-ledger.d.ts.map +1 -1
- package/dist/lifecycle/release-ledger.js +1 -2
- package/dist/lifecycle/release-status.d.ts +20 -0
- package/dist/lifecycle/release-status.d.ts.map +1 -1
- package/dist/lifecycle/release-status.js +1 -22
- package/dist/lifecycle/resource-lock.d.ts +70 -0
- package/dist/lifecycle/resource-lock.d.ts.map +1 -1
- package/dist/lifecycle/resource-lock.js +241 -5
- package/dist/lifecycle/wave-plans.d.ts +23 -7
- package/dist/lifecycle/wave-plans.d.ts.map +1 -1
- package/dist/lifecycle/wave-plans.js +9 -2
- package/dist/op/approval-status.d.ts +103 -0
- package/dist/op/approval-status.d.ts.map +1 -0
- package/dist/op/approval-status.js +197 -0
- package/dist/op/gate.js +21 -4
- package/dist/op/index.d.ts +1 -1
- package/dist/op/index.d.ts.map +1 -1
- package/dist/op/index.js +1 -1
- package/dist/op/op-waves-capability-spec.d.ts +8 -0
- package/dist/op/op-waves-capability-spec.d.ts.map +1 -1
- package/dist/op/op-waves-capability-spec.js +21 -0
- package/dist/op/op-waves-release-port.js +1 -1
- package/dist/op/op-waves-release.d.ts +2 -1
- package/dist/op/op-waves-release.d.ts.map +1 -1
- package/dist/op/op-waves-release.js +1 -2
- package/dist/op/op-waves-run.d.ts +15 -2
- package/dist/op/op-waves-run.d.ts.map +1 -1
- package/dist/op/op-waves-run.js +195 -31
- package/dist/op/op-waves-stand-down.d.ts.map +1 -1
- package/dist/op/op-waves-stand-down.js +1 -2
- package/dist/op/op-waves.d.ts +53 -0
- package/dist/op/op-waves.d.ts.map +1 -1
- package/dist/op/op-waves.js +62 -6
- package/dist/op/runtime.d.ts +4 -0
- package/dist/op/runtime.d.ts.map +1 -1
- package/dist/op/runtime.js +2 -3
- package/dist/otlp.d.ts.map +1 -1
- package/dist/otlp.js +1 -2
- package/dist/parallelism.d.ts +17 -0
- package/dist/parallelism.d.ts.map +1 -0
- package/dist/parallelism.js +33 -0
- package/dist/policy-source.d.ts.map +1 -1
- package/dist/policy-source.js +1 -2
- package/dist/pr-forge.d.ts.map +1 -1
- package/dist/pr-forge.js +56 -39
- package/dist/pr-loop.d.ts +9 -0
- package/dist/pr-loop.d.ts.map +1 -1
- package/dist/pr-loop.js +22 -4
- package/dist/pr-merge.d.ts +64 -0
- package/dist/pr-merge.d.ts.map +1 -0
- package/dist/pr-merge.js +78 -0
- package/dist/pr-post.d.ts +70 -1
- package/dist/pr-post.d.ts.map +1 -1
- package/dist/pr-post.js +116 -5
- package/dist/pr-report-url.d.ts.map +1 -1
- package/dist/pr-report-url.js +1 -2
- package/dist/release-floors.d.ts +1 -1
- package/dist/release-floors.js +1 -1
- package/dist/run-event.d.ts.map +1 -1
- package/dist/run-event.js +1 -2
- package/dist/scheduled-op-cloud.d.ts +32 -0
- package/dist/scheduled-op-cloud.d.ts.map +1 -0
- package/dist/scheduled-op-cloud.js +69 -0
- package/dist/wave-runtime.mjs +351 -328
- package/dist/workspace/ci-lock-grain.d.ts +5 -0
- package/dist/workspace/ci-lock-grain.d.ts.map +1 -1
- package/dist/workspace/ci-lock-grain.js +1 -7
- package/dist/workspace/ci-run.d.ts.map +1 -1
- package/dist/workspace/ci-run.js +5 -1
- package/dist/workspace/pr-report.schema.json +5 -0
- package/package.json +1 -1
- package/src/ci-agent.ts +1 -2
- package/src/ci-audit/__fixtures__/cloudtrail-lookup-bucket.json +37 -0
- package/src/ci-audit/__fixtures__/cloudtrail-writes-window.json +59 -0
- package/src/ci-audit/attribution.ts +260 -0
- package/src/ci-audit/audit-log.ts +220 -0
- package/src/ci-audit/ci-audit.test.ts +175 -0
- package/src/ci-audit/index.ts +14 -0
- package/src/ci-audit/unrecorded.ts +140 -0
- package/src/ci-audit.ts +2 -0
- package/src/ci-control.ts +3 -4
- package/src/ci-estate.ts +1 -2
- package/src/ci-identity-database.test.ts +2 -3
- package/src/ci-identity-targets.test.ts +1 -3
- package/src/ci-identity.ts +2 -3
- package/src/ci-job-guard.test.ts +154 -0
- package/src/ci-job-guard.ts +319 -0
- package/src/ci-jobs.ts +8 -0
- package/src/ci-product-comment-targets.test.ts +45 -0
- package/src/ci-product-words.ts +35 -6
- package/src/ci-product.ts +55 -4
- package/src/ci-respond-run.ts +291 -0
- package/src/ci-respond.test.ts +264 -0
- package/src/ci-respond.ts +412 -0
- package/src/cli/handlers/audit-log.ts +74 -0
- package/src/cli/handlers/build-pr-loop-flags.test.ts +98 -0
- package/src/cli/handlers/build.ts +69 -0
- package/src/cli/handlers/ci-check-job.test.ts +114 -0
- package/src/cli/handlers/ci-check-job.ts +33 -0
- package/src/cli/handlers/ci-check.ts +38 -8
- package/src/cli/handlers/e2e-safe-run.ts +27 -0
- package/src/cli/handlers/lifecycle.ts +13 -0
- package/src/cli/handlers/pr-before-merge.test.ts +1 -1
- package/src/cli/handlers/pr-deploy-inputs.test.ts +1 -1
- package/src/cli/handlers/pr-endpoint.test.ts +1 -1
- package/src/cli/handlers/pr-green.test.ts +1 -1
- package/src/cli/handlers/pr-plan-comment-targets.test.ts +166 -0
- package/src/cli/handlers/pr-plan-flags.test.ts +161 -0
- package/src/cli/handlers/pr-plan-targets.test.ts +1 -1
- package/src/cli/handlers/pr-record.test.ts +34 -2
- package/src/cli/handlers/pr-waves-blocked.test.ts +1 -1
- package/src/cli/handlers/pr-waves.test.ts +1 -1
- package/src/cli/handlers/pr.test.ts +1 -1
- package/src/cli/handlers/pr.ts +311 -32
- package/src/cli/handlers/run-wave.ts +79 -1
- package/src/cli/main.test.ts +1 -1
- package/src/cli/main.ts +56 -2
- package/src/cli/parse-args.ts +77 -0
- package/src/cli/registry.ts +38 -0
- package/src/components/adoption.ts +1 -2
- package/src/components/auto-release.test.ts +4 -2
- package/src/components/auto-release.ts +9 -5
- package/src/components/capability.ts +60 -0
- package/src/components/check-hooks.ts +4 -1
- package/src/components/check-steps.test.ts +70 -0
- package/src/components/check-steps.ts +158 -0
- package/src/components/ci-services.ts +1 -2
- package/src/components/deploy-units.test.ts +18 -1
- package/src/components/deploy-units.ts +26 -1
- package/src/components/driver.ts +35 -1
- package/src/components/groups.ts +4 -2
- package/src/components/plan-flags.test.ts +46 -0
- package/src/components/pr-comment-preview-targets.test.ts +34 -0
- package/src/components/pr-env-ledger.ts +1 -2
- package/src/components/pr-env-run-bundle.test.ts +0 -20
- package/src/components/pr-environment.ts +1 -1
- package/src/components/pr-pipeline-runners.test.ts +80 -0
- package/src/components/pr-pipeline.ts +244 -20
- package/src/components/pr-run.ts +17 -6
- package/src/components/pr-stale-job.test.ts +34 -0
- package/src/components/product-pipeline.ts +50 -8
- package/src/components/row-lease.test.ts +61 -1
- package/src/components/row-lease.ts +48 -7
- package/src/components/wave-plan.ts +18 -2
- package/src/e2e-harness/__project__/chant.config.ts +4 -0
- package/src/e2e-harness/__project__/src/compose.ts +33 -0
- package/src/e2e-harness/bucket.ts +69 -0
- package/src/e2e-harness/claim.test.ts +150 -0
- package/src/e2e-harness/claim.ts +140 -0
- package/src/e2e-harness/driver.test.ts +304 -0
- package/src/e2e-harness/driver.ts +294 -0
- package/src/e2e-harness/forgejo.ts +267 -0
- package/src/e2e-harness/git.ts +96 -0
- package/src/e2e-harness/index.ts +49 -0
- package/src/e2e-harness/jobs.ts +35 -0
- package/src/e2e-harness/pins.ts +52 -0
- package/src/e2e-harness/ports.ts +130 -0
- package/src/e2e-harness/reports.ts +79 -0
- package/src/e2e-harness/safe-run-cli.test.ts +102 -0
- package/src/e2e-harness/safe-run-cli.ts +54 -0
- package/src/e2e-harness/safe-run.ts +198 -0
- package/src/e2e-harness/scenario.ts +89 -0
- package/src/e2e-harness/schemas/README.md +62 -0
- package/src/e2e-harness/schemas/demo-cycle.schema.json +282 -0
- package/src/e2e-harness/schemas/demo-step.schema.json +245 -0
- package/src/e2e-harness/schemas/e2e-claim-row.schema.json +33 -0
- package/src/e2e-harness/schemas/e2e-claims.schema.json +18 -0
- package/src/e2e-harness/schemas/e2e-scenario.schema.json +150 -0
- package/src/e2e-harness/schemas/index.ts +220 -0
- package/src/e2e-harness/schemas.test.ts +145 -0
- package/src/e2e-harness/stack.test.ts +124 -0
- package/src/e2e-harness/stack.ts +306 -0
- package/src/e2e-harness/steps.ts +30 -0
- package/src/e2e-harness.ts +2 -0
- package/src/exit-codes.test.ts +3 -2
- package/src/exit-codes.ts +7 -1
- package/src/gate-decision-bundle.test.ts +0 -2
- package/src/lexicon.ts +57 -0
- package/src/lifecycle/control-entries-ledger.test.ts +2 -3
- package/src/lifecycle/gate-ledger.ts +2 -3
- package/src/lifecycle/gated-request.ts +1 -2
- package/src/lifecycle/git.test.ts +155 -0
- package/src/lifecycle/git.ts +213 -17
- package/src/lifecycle/lock-rows.test.ts +6 -1
- package/src/lifecycle/lock-rows.ts +58 -7
- package/src/lifecycle/query.ts +4 -5
- package/src/lifecycle/release-catalog.test.ts +3 -4
- package/src/lifecycle/release-catalog.ts +1 -1
- package/src/lifecycle/release-ledger.ts +1 -2
- package/src/lifecycle/release-status.test.ts +3 -4
- package/src/lifecycle/release-status.ts +1 -2
- package/src/lifecycle/resource-lock-wait.test.ts +292 -0
- package/src/lifecycle/resource-lock.ts +261 -7
- package/src/lifecycle/wave-plans.ts +33 -5
- package/src/op/approval-status.test.ts +134 -0
- package/src/op/approval-status.ts +235 -0
- package/src/op/gate-review.test.ts +2 -1
- package/src/op/gate.test.ts +7 -5
- package/src/op/gate.ts +20 -4
- package/src/op/index.ts +2 -0
- package/src/op/op-waves-after-plan.test.ts +11 -0
- package/src/op/op-waves-capability-spec.ts +20 -0
- package/src/op/op-waves-ledger-lock.test.ts +208 -0
- package/src/op/op-waves-parallelism.test.ts +89 -0
- package/src/op/op-waves-pull-request.test.ts +78 -1
- package/src/op/op-waves-release-port.ts +1 -1
- package/src/op/op-waves-release.ts +2 -3
- package/src/op/op-waves-run.ts +196 -31
- package/src/op/op-waves-stand-down.ts +1 -2
- package/src/op/op-waves.ts +81 -6
- package/src/op/runtime.ts +6 -3
- package/src/otlp.ts +1 -2
- package/src/parallelism.test.ts +38 -0
- package/src/parallelism.ts +33 -0
- package/src/policy-source.ts +1 -2
- package/src/pr-forge-bundle.test.ts +1 -1
- package/src/pr-forge.ts +54 -35
- package/src/pr-loop-bundle.test.ts +0 -2
- package/src/pr-loop-narrowed.test.ts +63 -0
- package/src/pr-loop.ts +30 -4
- package/src/pr-merge.test.ts +100 -0
- package/src/pr-merge.ts +105 -0
- package/src/pr-post-stale.test.ts +163 -0
- package/src/pr-post.ts +159 -5
- package/src/pr-report-url.ts +1 -2
- package/src/product-subpaths-plain-node.e2e.test.ts +1 -0
- package/src/release-floors.ts +1 -1
- package/src/run-event.ts +1 -2
- package/src/scheduled-op-cloud.ts +68 -0
- package/src/stage-hooks-bundle.test.ts +0 -2
- package/src/workspace/ci-lock-grain.ts +1 -2
- package/src/workspace/ci-run.ts +5 -1
- package/src/workspace/pr-report.schema.json +5 -0
package/src/cli/main.ts
CHANGED
|
@@ -258,6 +258,13 @@ Commands:
|
|
|
258
258
|
(--json) its target, stage (planned/emitted/bridged/
|
|
259
259
|
applied) and path. Read-only.
|
|
260
260
|
|
|
261
|
+
E2E harness:
|
|
262
|
+
e2e safe-run [--scan <dir>]... -- <command...>
|
|
263
|
+
Run <command> with no real cloud in reach (cloud credential
|
|
264
|
+
variables unset, empty CLOUDSDK_CONFIG, file:// Pulumi
|
|
265
|
+
backend), then scan its output and each --scan dir. Prints
|
|
266
|
+
CLEAN, or the rejecting lines and exits 3.
|
|
267
|
+
|
|
261
268
|
CI:
|
|
262
269
|
ci check --base <rev> [<target>...] [--output <dir>] [--json]
|
|
263
270
|
Run the ci.hooks.check hooks the workspace declaration
|
|
@@ -265,6 +272,11 @@ CI:
|
|
|
265
272
|
perRun, with no forge token or cloud credentials in
|
|
266
273
|
their environment. Writes check-hooks.json under
|
|
267
274
|
--output (default .chant/check); exits 1 when one failed.
|
|
275
|
+
ci check-job The apply-job guard: compare the forge environment,
|
|
276
|
+
ref and runner the forge gives this job with the
|
|
277
|
+
expectation in CHANT_JOB_GUARD, which a generated
|
|
278
|
+
op-wave job carries. Exits 1, one line per value
|
|
279
|
+
that differs, before any credential is taken.
|
|
268
280
|
ci forge-check [--env <env>] [--member <name>] [--forge <forge>] [--repo <owner/name>] [--branch <default>] [--require-clouds] [--json]
|
|
269
281
|
Read the forge, each cloud's trust policy and Pulumi
|
|
270
282
|
Cloud's OIDC policies against the pipelines
|
|
@@ -520,6 +532,13 @@ Ops:
|
|
|
520
532
|
--record-plans (no --wave), in a pull request's
|
|
521
533
|
pipeline: plan every wave at its head and record the
|
|
522
534
|
digests a pr-review approval mode compares.
|
|
535
|
+
--approval-status (no --wave) --forge <kind>
|
|
536
|
+
--pr <n> --head <sha> --base <sha>, or --open
|
|
537
|
+
[--branch <b>]: post <product>/approval on an open
|
|
538
|
+
pull request's head, pending while a wave its gate
|
|
539
|
+
will hold has no approval: an approving review for
|
|
540
|
+
pr-review, the pull request's own approval covering
|
|
541
|
+
its change set for pull-request (#4630).
|
|
523
542
|
--waves-outcome (no --wave), after the last wave:
|
|
524
543
|
print how the wave jobs' outcome files add up
|
|
525
544
|
(applied, partial, unchanged, waiting, failed), the
|
|
@@ -629,6 +648,14 @@ Ops:
|
|
|
629
648
|
applies it once, if .chant/overriders at base lists
|
|
630
649
|
--actor
|
|
631
650
|
|
|
651
|
+
audit-log attribute --input <drift.json> [--audit-log aws[:<region>]]
|
|
652
|
+
Name who changed each drifted attribute of a drift
|
|
653
|
+
document: a known write by design, else the cloud
|
|
654
|
+
audit log's last writer (#4632)
|
|
655
|
+
audit-log unrecorded --audit-log aws[:<region>] --op <op>[,...] --since <time>
|
|
656
|
+
Report the audit log's writes no recorded apply on
|
|
657
|
+
the run ledger made; exits 2 when there are some
|
|
658
|
+
(#4632)
|
|
632
659
|
notify relay Serve the relay that approves a waiting gate from a
|
|
633
660
|
Slack button or a Teams reply (#4611): verifies the
|
|
634
661
|
chat signature and the button's notify reference,
|
|
@@ -1180,14 +1207,26 @@ Component release ledger + status:
|
|
|
1180
1207
|
[--forge github|gitlab|forgejo] posts them);
|
|
1181
1208
|
--target <address> narrows every member's plan
|
|
1182
1209
|
to the address, --target <member>:<address>
|
|
1183
|
-
one member's (#4620);
|
|
1210
|
+
one member's (#4620); --comment-targets adds the
|
|
1211
|
+
--target addresses of the preview comment in
|
|
1212
|
+
CHANT_PREVIEW_COMMENT (#4626); --refresh refreshes
|
|
1213
|
+
each step's state first and --target-dependents
|
|
1214
|
+
plans what depends on each target too, refused
|
|
1215
|
+
by name for a step that cannot (#4627);
|
|
1216
|
+
--parallelism <n> plans at
|
|
1217
|
+
most n members of a wave at once (#4625);
|
|
1218
|
+
applies nothing
|
|
1184
1219
|
components pr-post Post the plan note and the chant/plan status
|
|
1185
1220
|
from the report pr-plan --no-status wrote
|
|
1186
1221
|
(--pr <n> --head <sha> --env <env> --forge
|
|
1187
1222
|
<kind>), in a job that runs none of the
|
|
1188
1223
|
change's code (#4295); --open posts every
|
|
1189
1224
|
open merge request's from a GitLab pipeline
|
|
1190
|
-
of the target branch (#4328)
|
|
1225
|
+
of the target branch (#4328); --respond
|
|
1226
|
+
description=check --decide-backend <name>
|
|
1227
|
+
--decide-model <id> asks whether the
|
|
1228
|
+
description leaves out a destroy or a
|
|
1229
|
+
replacement and posts the finding (#4629)
|
|
1191
1230
|
components pr-record On merge (#4168): plan the same members again,
|
|
1192
1231
|
store the change set and write the merge record
|
|
1193
1232
|
_merges/<commit>.json; applies and refuses
|
|
@@ -1234,6 +1273,14 @@ Component release ledger + status:
|
|
|
1234
1273
|
approved, mergeable, undiverged and green;
|
|
1235
1274
|
--requires <list> asks only the checks it
|
|
1236
1275
|
names (approved,mergeable,undiverged,checks);
|
|
1276
|
+
--merge auto --merge-token-env <VAR> merges the
|
|
1277
|
+
pull request once every member applied and the
|
|
1278
|
+
records are pushed, with that token alone and
|
|
1279
|
+
the applied head checked again (#4636);
|
|
1280
|
+
--respond <list> turns the failed apply's
|
|
1281
|
+
triage and the refused apply's diff on or off
|
|
1282
|
+
(wave-refused=diff|off,apply-failed=triage|off,
|
|
1283
|
+
#4629);
|
|
1237
1284
|
--events-json, both commands: the run-event
|
|
1238
1285
|
stream on stdout; --report-url <s3 or file URL>,
|
|
1239
1286
|
both commands: copy the report, the change set
|
|
@@ -1722,6 +1769,9 @@ export const commandRegistry: CommandDef[] = [
|
|
|
1722
1769
|
// renderer replaces its own walk-and-guess discovery with. Read-only.
|
|
1723
1770
|
{ name: "carve status", handler: runCarveStatus },
|
|
1724
1771
|
// #3573 — which commits passed CI, kept as ci/green and ci/revoked tags (ws-103). Imported on first use.
|
|
1772
|
+
// chant#4587 (C1) — the e2e harness's no-real-cloud wrapper as a command, for bash drivers. Imported on first use.
|
|
1773
|
+
{ name: "e2e safe-run", runsNoConfig: true, handler: async (ctx) => (await import("./handlers/e2e-safe-run")).runE2eSafeRun(ctx) },
|
|
1774
|
+
{ name: "e2e", runsNoConfig: true, handler: async (ctx) => (await import("./handlers/e2e-safe-run")).runE2eUnknown(ctx) },
|
|
1725
1775
|
{ name: "ci last-green", runsNoConfig: true, handler: async (ctx) => (await import("../workspace/ci-green-cli")).runCiLastGreen(ctx) },
|
|
1726
1776
|
{ name: "ci list", runsNoConfig: true, handler: async (ctx) => (await import("../workspace/ci-green-cli")).runCiList(ctx) },
|
|
1727
1777
|
{ name: "ci tick", runsNoConfig: true, handler: async (ctx) => (await import("../workspace/ci-green-cli")).runCiTick(ctx) },
|
|
@@ -1730,6 +1780,8 @@ export const commandRegistry: CommandDef[] = [
|
|
|
1730
1780
|
// #4556: the ci.hooks.check hooks at base, for a product's check job.
|
|
1731
1781
|
{ name: "ci check", runsNoConfig: true, handler: async (ctx) => (await import("./handlers/ci-check")).runCiCheck(ctx) },
|
|
1732
1782
|
// #4608: the live forge, cloud trust policies and Pulumi Cloud's OIDC policies against ci.identity.cloud. Read-only.
|
|
1783
|
+
// #4624: the apply-job guard, from the expectation the job carries.
|
|
1784
|
+
{ name: "ci check-job", runsNoConfig: true, handler: async (ctx) => (await import("./handlers/ci-check-job")).runCiCheckJob(ctx) },
|
|
1733
1785
|
{ name: "ci forge-check", runsNoConfig: true, handler: async (ctx) => (await import("./handlers/ci-forge-check")).runCiForgeCheck(ctx) },
|
|
1734
1786
|
// #4094: one pull-request job as a pipeline Op in a fresh checkout, the chant runner's first slice.
|
|
1735
1787
|
{ name: "ci run", runsNoConfig: true, handler: async (ctx) => (await import("../workspace/ci-run")).runCiRun(ctx) },
|
|
@@ -1790,6 +1842,8 @@ export const commandRegistry: CommandDef[] = [
|
|
|
1790
1842
|
{ name: "approve", handler: runApprove },
|
|
1791
1843
|
// #4293 — target locks a pull request holds on chant/lifecycle. Imported on first use.
|
|
1792
1844
|
// #4611 — approve a waiting gate from a chat click. Imported on first use.
|
|
1845
|
+
{ name: "audit-log attribute", runsNoConfig: true, handler: async (ctx) => (await import("./handlers/audit-log")).runAuditLogAttribute(ctx) },
|
|
1846
|
+
{ name: "audit-log unrecorded", runsNoConfig: true, handler: async (ctx) => (await import("./handlers/audit-log")).runAuditLogUnrecorded(ctx) },
|
|
1793
1847
|
{ name: "notify relay", runsNoConfig: true, handler: async (ctx) => (await import("./handlers/notify-relay")).runNotifyRelay(ctx) },
|
|
1794
1848
|
{ name: "lock", runsNoConfig: true, handler: async (ctx) => (await import("./handlers/lock")).runLock(ctx) },
|
|
1795
1849
|
{ name: "unlock", runsNoConfig: true, handler: async (ctx) => (await import("./handlers/lock")).runUnlock(ctx) },
|
package/src/cli/parse-args.ts
CHANGED
|
@@ -97,6 +97,7 @@ const BOOLEAN_FLAGS = new Set([
|
|
|
97
97
|
"--generated",
|
|
98
98
|
"--decide",
|
|
99
99
|
"--record-plans",
|
|
100
|
+
"--approval-status",
|
|
100
101
|
"--waves-outcome",
|
|
101
102
|
"--loopback",
|
|
102
103
|
"--artifacts",
|
|
@@ -239,6 +240,11 @@ export function parseArgs(args: string[]): ParsedArgs {
|
|
|
239
240
|
const v = args[++i];
|
|
240
241
|
if (v !== "source" && v !== "live") throw new Error(`--overlay-anchor must be 'source' or 'live', got '${v}'`);
|
|
241
242
|
result.overlayAnchor = v;
|
|
243
|
+
} else if (arg === "--scan") {
|
|
244
|
+
// `chant e2e safe-run --scan <dir> -- <command...>` (chant#4587), repeatable.
|
|
245
|
+
const v = args[++i];
|
|
246
|
+
if (v === undefined || v === "--" || v.startsWith("--")) throw new Error("--scan needs a directory: --scan <dir>");
|
|
247
|
+
(result.scanDirs ??= []).push(v);
|
|
242
248
|
} else if (arg === "--from") {
|
|
243
249
|
// Shared by `migrate --from <lexicon>`, `import --from <env>`,
|
|
244
250
|
// `components promote --from <env>`, `init --from <repo>@<ref>` and
|
|
@@ -452,6 +458,9 @@ export function parseArgs(args: string[]): ParsedArgs {
|
|
|
452
458
|
result.decide = true;
|
|
453
459
|
} else if (arg === "--record-plans") {
|
|
454
460
|
result.recordPlans = true;
|
|
461
|
+
} else if (arg === "--approval-status") {
|
|
462
|
+
// `chant run wave --spec <file> --approval-status` (#4630): post <product>/approval on an open pull request's head.
|
|
463
|
+
result.approvalStatus = true;
|
|
455
464
|
} else if (arg === "--waves-outcome") {
|
|
456
465
|
result.wavesOutcome = true;
|
|
457
466
|
} else if (arg === "--group") {
|
|
@@ -469,6 +478,21 @@ export function parseArgs(args: string[]): ParsedArgs {
|
|
|
469
478
|
const raw = args[++i];
|
|
470
479
|
if (!raw || raw.startsWith("-")) throw new Error("--target needs an address: --target <component>:<address>, or on pr-plan --target <address>");
|
|
471
480
|
(result.targets ??= []).push(raw);
|
|
481
|
+
} else if (arg === "--refresh") {
|
|
482
|
+
// `chant components pr-plan --refresh` (#4627).
|
|
483
|
+
result.refresh = true;
|
|
484
|
+
} else if (arg === "--target-dependents") {
|
|
485
|
+
// `chant components pr-plan --target-dependents` (#4627).
|
|
486
|
+
result.targetDependents = true;
|
|
487
|
+
} else if (arg === "--comment-targets") {
|
|
488
|
+
// `chant components pr-plan --comment-targets` (#4626): the preview comment's --target addresses.
|
|
489
|
+
result.commentTargets = true;
|
|
490
|
+
} else if (arg === "--parallelism") {
|
|
491
|
+
// `chant components pr-plan --parallelism <n>` (#4625): members of a wave planned at once.
|
|
492
|
+
const raw = args[++i];
|
|
493
|
+
const n = Number(raw);
|
|
494
|
+
if (!Number.isInteger(n) || n < 1) throw new Error(`--parallelism needs a whole number of 1 or more: got "${raw ?? ""}"`);
|
|
495
|
+
result.parallelism = n;
|
|
472
496
|
} else if (arg === "--canary") {
|
|
473
497
|
const raw = args[++i];
|
|
474
498
|
if (!raw || raw.startsWith("-")) throw new Error("--canary needs a component name: --canary <name>[,<name>...]");
|
|
@@ -542,6 +566,28 @@ export function parseArgs(args: string[]): ParsedArgs {
|
|
|
542
566
|
const value = args[++i];
|
|
543
567
|
if (value === undefined || value.startsWith("-")) throw new Error("--requires needs a list of checks: --requires approved,mergeable,undiverged,checks");
|
|
544
568
|
result.requires = value.split(",").map((v) => v.trim()).filter(Boolean);
|
|
569
|
+
} else if (arg === "--respond") {
|
|
570
|
+
// `chant components pr-apply|pr-post --respond wave-refused=off,description=check` (#4629).
|
|
571
|
+
const value = args[++i];
|
|
572
|
+
if (value === undefined || value.startsWith("-")) throw new Error("--respond needs a list of responses: --respond wave-refused=diff,apply-failed=off,description=check");
|
|
573
|
+
result.respond = [...(result.respond ?? []), value];
|
|
574
|
+
} else if (arg === "--decide-backend") {
|
|
575
|
+
// `chant components pr-post --decide-backend <name>` (#4629): the description check's backend.
|
|
576
|
+
const value = args[++i];
|
|
577
|
+
if (value === undefined || value.startsWith("-")) throw new Error("--decide-backend needs the name of a decide.backends entry");
|
|
578
|
+
result.decideBackend = value;
|
|
579
|
+
} else if (arg === "--decide-model") {
|
|
580
|
+
// `chant components pr-post --decide-model <id>` (#4629): the description check's pinned model.
|
|
581
|
+
const value = args[++i];
|
|
582
|
+
if (value === undefined || value.startsWith("-")) throw new Error("--decide-model needs a model id");
|
|
583
|
+
result.decideModel = value;
|
|
584
|
+
} else if (arg === "--merge" || arg === "--merge-token-env" || arg === "--merge-method") {
|
|
585
|
+
// `chant components pr-apply --before-merge --merge auto --merge-token-env <VAR>` (#4636).
|
|
586
|
+
const value = args[++i];
|
|
587
|
+
if (value === undefined || value.startsWith("-")) throw new Error(`${arg} needs a value: --merge manual|auto, --merge-token-env <VAR>, --merge-method merge|squash|rebase`);
|
|
588
|
+
if (arg === "--merge") result.merge = value;
|
|
589
|
+
else if (arg === "--merge-token-env") result.mergeTokenEnv = value;
|
|
590
|
+
else result.mergeMethod = value;
|
|
545
591
|
} else if (arg === "--apply-before-merge") {
|
|
546
592
|
// `chant build --pr-loop --apply-before-merge` and `chant ci run apply --apply-before-merge` (#4301): the job that applies before merge.
|
|
547
593
|
result.applyBeforeMerge = true;
|
|
@@ -554,6 +600,21 @@ export function parseArgs(args: string[]): ParsedArgs {
|
|
|
554
600
|
} else if (arg === "--pr-env") {
|
|
555
601
|
// `chant build --pr-loop --pr-env` (#4298): add the pull request environment's jobs.
|
|
556
602
|
result.prEnv = true;
|
|
603
|
+
} else if (arg === "--pr-runner") {
|
|
604
|
+
// `chant build --pr-loop --pr-runner <stage>=<label>[,<label>...]` (#4625).
|
|
605
|
+
const raw = args[++i] ?? "";
|
|
606
|
+
const m = /^(plan|apply|default)=(.+)$/.exec(raw);
|
|
607
|
+
if (!m) throw new Error(`--pr-runner needs <stage>=<label>[,<label>...], the stage plan, apply or default: got "${raw}"`);
|
|
608
|
+
const labels = m[2]!.split(",").map((l) => l.trim()).filter(Boolean);
|
|
609
|
+
if (labels.length === 0) throw new Error(`--pr-runner ${m[1]} names no label`);
|
|
610
|
+
(result.prRunners ??= {})[m[1] as "plan" | "apply" | "default"] = labels;
|
|
611
|
+
} else if (arg === "--pr-variable" || arg === "--pr-secret") {
|
|
612
|
+
// `chant build --pr-loop --pr-variable <NAME>=<value>` and `--pr-secret <NAME>=<secret>` (#4625).
|
|
613
|
+
const raw = args[++i] ?? "";
|
|
614
|
+
const at = raw.indexOf("=");
|
|
615
|
+
if (at < 1) throw new Error(`${arg} needs <NAME>=<${arg === "--pr-secret" ? "secret" : "value"}>: got "${raw}"`);
|
|
616
|
+
const into = arg === "--pr-secret" ? (result.prSecrets ??= {}) : (result.prVariables ??= {});
|
|
617
|
+
into[raw.slice(0, at)] = raw.slice(at + 1);
|
|
557
618
|
} else if (arg === "--pr-build") {
|
|
558
619
|
// `chant build --pr-loop --pr-build` (#4088), and `chant ci run --pr-build` (#4094).
|
|
559
620
|
result.prBuild = true;
|
|
@@ -776,6 +837,17 @@ export function parseArgs(args: string[]): ParsedArgs {
|
|
|
776
837
|
if (!result.by || result.by.startsWith("-")) throw new Error("--by needs the reviewer: --by <principal>");
|
|
777
838
|
// Repeatable for `workspace points answer` (#2739): each person who answered.
|
|
778
839
|
(result.bys ??= []).push(result.by);
|
|
840
|
+
} else if (arg === "--stale-notes") {
|
|
841
|
+
// `chant build --pr-loop --stale-notes` (#4628).
|
|
842
|
+
result.staleNotes = true;
|
|
843
|
+
} else if (arg === "--stale") {
|
|
844
|
+
// `chant components pr-post --stale` (#4628).
|
|
845
|
+
result.stale = true;
|
|
846
|
+
} else if (arg === "--tip") {
|
|
847
|
+
// `chant components pr-post --tip <sha>` (#4628).
|
|
848
|
+
const raw = args[++i];
|
|
849
|
+
if (!raw || !/^[0-9a-f]{40}$/.test(raw)) throw new Error(`--tip needs the target branch's full commit sha: got "${raw ?? ""}"`);
|
|
850
|
+
result.tip = raw;
|
|
779
851
|
} else if (arg === "--open") {
|
|
780
852
|
// `chant workspace points --open` (#2739): only the questions still open.
|
|
781
853
|
result.open = true;
|
|
@@ -1104,6 +1176,11 @@ export function parseArgs(args: string[]): ParsedArgs {
|
|
|
1104
1176
|
result.resource = value;
|
|
1105
1177
|
} else if (arg === "--since") {
|
|
1106
1178
|
result.since = args[++i];
|
|
1179
|
+
} else if (arg === "--audit-log") {
|
|
1180
|
+
// `chant audit-log attribute|unrecorded --audit-log aws[:<region>]` (#4632).
|
|
1181
|
+
const value = args[++i];
|
|
1182
|
+
if (!value || value.startsWith("-")) throw new Error("--audit-log needs the log: --audit-log aws[:<region>]");
|
|
1183
|
+
result.auditLog = value;
|
|
1107
1184
|
} else if (arg === "--limit") {
|
|
1108
1185
|
// Parsed here, validated by the handler — `parseArgs` reports shape, not
|
|
1109
1186
|
// policy, the same split every other value flag here uses.
|
package/src/cli/registry.ts
CHANGED
|
@@ -89,6 +89,8 @@ export interface ParsedArgs {
|
|
|
89
89
|
kustomize?: string;
|
|
90
90
|
/** `chant import --parser-option key[=value]`, repeatable (#2994): options for the lexicon's template parser */
|
|
91
91
|
parserOption?: string[];
|
|
92
|
+
/** `chant e2e safe-run --scan <dir>`, repeatable (chant#4587): a directory to scan for a real cloud answering, beside the command's output */
|
|
93
|
+
scanDirs?: string[];
|
|
92
94
|
/** `chant carve advise --state <path>` — opt-in .tfstate for accurate instance counts */
|
|
93
95
|
statePath?: string;
|
|
94
96
|
/** Every `--state` value in order (#4461): `chant workspace promote --all --state <member>=<path>`, repeatable. */
|
|
@@ -318,6 +320,8 @@ export interface ParsedArgs {
|
|
|
318
320
|
decide?: boolean;
|
|
319
321
|
/** `chant run wave --record-plans` (#3684) — plan every wave at a pull request's head and record the digests for a `pr-review` gate. */
|
|
320
322
|
recordPlans?: boolean;
|
|
323
|
+
/** `chant run wave --approval-status` (#4630) — post `<product>/approval` on an open pull request's head under `pr-review` or `pull-request`. */
|
|
324
|
+
approvalStatus?: boolean;
|
|
321
325
|
/** `chant run wave --waves-outcome` (#4617) — print how every wave job's outcome file adds up: the outcome a control dispatch carries. */
|
|
322
326
|
wavesOutcome?: boolean;
|
|
323
327
|
/** `chant run wave --share <i>` (#3679) — apply share `i` of a decided wide wave. */
|
|
@@ -333,6 +337,14 @@ export interface ParsedArgs {
|
|
|
333
337
|
* (`prPlanTargets`).
|
|
334
338
|
*/
|
|
335
339
|
targets?: string[];
|
|
340
|
+
/** `chant components pr-plan --comment-targets` (#4626): narrow to the `--target` addresses of the preview comment in CHANT_PREVIEW_COMMENT. */
|
|
341
|
+
commentTargets?: boolean;
|
|
342
|
+
/** `chant components pr-plan --refresh` (#4627): refresh each step's state before it plans. */
|
|
343
|
+
refresh?: boolean;
|
|
344
|
+
/** `chant components pr-plan --target-dependents` (#4627): plan what depends on each --target too. */
|
|
345
|
+
targetDependents?: boolean;
|
|
346
|
+
/** `chant components pr-plan --parallelism <n>` (#4625): how many members of a wave plan at once. */
|
|
347
|
+
parallelism?: number;
|
|
336
348
|
/** `chant components fan-out --canary <component>` (#3049), repeatable — components that form wave 1. */
|
|
337
349
|
canary?: string[];
|
|
338
350
|
/**
|
|
@@ -409,6 +421,18 @@ export interface ParsedArgs {
|
|
|
409
421
|
* and checks. Absent: all four. A check left out passes as "not required".
|
|
410
422
|
*/
|
|
411
423
|
requires?: string[];
|
|
424
|
+
/** `pr-apply --before-merge --merge manual|auto` (#4636): who merges once the update applied. `chant build --pr-loop --apply-before-merge --merge auto` puts it on the generated apply job. */
|
|
425
|
+
merge?: string;
|
|
426
|
+
/** `pr-apply --merge auto --merge-token-env <VAR>` (#4636): the variable holding the only token the merge uses. */
|
|
427
|
+
mergeTokenEnv?: string;
|
|
428
|
+
/** `pr-apply --merge auto --merge-method merge|squash|rebase` (#4636). */
|
|
429
|
+
mergeMethod?: string;
|
|
430
|
+
/** `--respond wave-refused=off,description=check` (#4629): the responses pr-apply, pr-post and the wave jobs post. `chant build --pr-loop --respond` sets them on the generated apply and note jobs as CHANT_RESPOND. */
|
|
431
|
+
respond?: string[];
|
|
432
|
+
/** `pr-post --decide-backend <name>` (#4629): the `decide.backends` entry the description check asks. `chant build --pr-loop` passes it to the note job. */
|
|
433
|
+
decideBackend?: string;
|
|
434
|
+
/** `pr-post --decide-model <id>` (#4629): the pinned model the description check asks. */
|
|
435
|
+
decideModel?: string;
|
|
412
436
|
/**
|
|
413
437
|
* `chant build --pr-loop --apply-before-merge` and `chant ci run apply
|
|
414
438
|
* --apply-before-merge` (#4301): the pipeline's apply job applies an open
|
|
@@ -419,6 +443,12 @@ export interface ParsedArgs {
|
|
|
419
443
|
previewComment?: boolean;
|
|
420
444
|
/** `chant build --pr-loop --pr-build` (#4088) — build and lint before pr-plan and pr-apply. */
|
|
421
445
|
prBuild?: boolean;
|
|
446
|
+
/** `chant build --pr-loop --pr-runner <stage>=<label>[,<label>...]` (#4625), repeatable: a stage's runner, plan, apply or default. */
|
|
447
|
+
prRunners?: Partial<Record<"plan" | "apply" | "default", string[]>>;
|
|
448
|
+
/** `chant build --pr-loop --pr-variable <NAME>=<value>` (#4625), repeatable: a variable of the jobs that plan or apply. */
|
|
449
|
+
prVariables?: Record<string, string>;
|
|
450
|
+
/** `chant build --pr-loop --pr-secret <NAME>=<secret>` (#4625), repeatable: a secret passed to the jobs that plan or apply. */
|
|
451
|
+
prSecrets?: Record<string, string>;
|
|
422
452
|
/** `chant ci serve --build-command <line>` (#4169) — the line that builds a commit a `ci/build/<sha>` tag asks for, in a worktree of it. */
|
|
423
453
|
ciBuildCommand?: string;
|
|
424
454
|
/** `chant ci serve --land` (#4168 4.4) — fast-forward the target branch to each pushed `chant/land/<name>` branch whose `ci.green.preMerge` phases pass on it. */
|
|
@@ -519,6 +549,12 @@ export interface ParsedArgs {
|
|
|
519
549
|
bys?: string[];
|
|
520
550
|
/** `chant workspace points --open` (#2739): only the questions still open. */
|
|
521
551
|
open?: boolean;
|
|
552
|
+
/** `chant build --pr-loop --stale-notes` (#4628): the note carries its target commit, and a push to the target branch marks open notes stale. */
|
|
553
|
+
staleNotes?: boolean;
|
|
554
|
+
/** `chant components pr-post --stale` (#4628): mark the open pull requests' notes stale after the target branch moved. */
|
|
555
|
+
stale?: boolean;
|
|
556
|
+
/** `chant components pr-post --tip <sha>` (#4628): the target branch's commit, which the note carries, or with --stale its commit now. */
|
|
557
|
+
tip?: string;
|
|
522
558
|
/** `chant workspace points ask <point> --inputs <file|-|json>` (#2739): the inputs, as a JSON object. */
|
|
523
559
|
inputs?: string;
|
|
524
560
|
/** `chant workspace points ask <point> --candidates <file|-|json>` (#3403): an ad-hoc point's question and candidates. */
|
|
@@ -867,6 +903,8 @@ export interface ParsedArgs {
|
|
|
867
903
|
op?: string;
|
|
868
904
|
/** `chant operator log --since <iso>` (#2029) — only entries at or after this ISO-8601 instant. `chant workspace records --since <rev>` (#2673) — the revision to compare the records with. `chant workspace metrics --since <date>` (#4039) — the start of the window the metrics count. */
|
|
869
905
|
since?: string;
|
|
906
|
+
/** `chant audit-log attribute|unrecorded --audit-log aws[:<region>]` (#4632): the cloud audit log to read. */
|
|
907
|
+
auditLog?: string;
|
|
870
908
|
/** `chant ledger`, `chant workspace records` and `chant workspace runs --where <field><op><value>` (#4363): typed filters, repeatable, all of which have to hold. */
|
|
871
909
|
where?: string[];
|
|
872
910
|
/** `chant operator log --limit <n>` (#2029) — keep only the newest n entries (still printed oldest-first). */
|
|
@@ -17,13 +17,12 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import { existsSync, readFileSync } from "node:fs";
|
|
19
19
|
import { resolve } from "node:path";
|
|
20
|
-
import { NEXT_RELEASE } from "../release-floors";
|
|
21
20
|
import type { ChangeSetEntry } from "../change-set";
|
|
22
21
|
import { adoptionFileProblems, adoptionFileProblemsAgainst, type AdoptionFile } from "../lifecycle/adoption-file";
|
|
23
22
|
import type { IndexDocument } from "../lifecycle/index-document";
|
|
24
23
|
|
|
25
24
|
/** The first chant whose `run --components` takes `--adopt`. */
|
|
26
|
-
export const DEPLOY_ADOPT_FLOOR =
|
|
25
|
+
export const DEPLOY_ADOPT_FLOOR = "0.124.55";
|
|
27
26
|
|
|
28
27
|
/** One change set the adoption asks to execute. */
|
|
29
28
|
export interface AdoptionReviewRequest {
|
|
@@ -7,8 +7,10 @@ const appendReleaseRecordMock = vi.fn();
|
|
|
7
7
|
|
|
8
8
|
vi.mock("../lifecycle/git", () => ({
|
|
9
9
|
getHeadCommit: (...args: unknown[]) => getHeadCommitMock(...args),
|
|
10
|
-
|
|
10
|
+
// plywood#22 finding 9: the release record pushes with fetch, replay and retry.
|
|
11
|
+
pushLifecycleRebasing: (...args: unknown[]) => pushLifecycleMock(...args),
|
|
11
12
|
StaleLifecycleBranchError: class StaleLifecycleBranchError extends Error {},
|
|
13
|
+
LifecyclePushLostError: class LifecyclePushLostError extends Error {},
|
|
12
14
|
}));
|
|
13
15
|
|
|
14
16
|
vi.mock("../lifecycle/release-ledger", async () => {
|
|
@@ -66,7 +68,7 @@ describe("extractRunDigest", () => {
|
|
|
66
68
|
describe("maybeRecordAutoRelease", () => {
|
|
67
69
|
beforeEach(() => {
|
|
68
70
|
getHeadCommitMock.mockReset().mockResolvedValue("abc123headsha");
|
|
69
|
-
pushLifecycleMock.mockReset().mockResolvedValue(true);
|
|
71
|
+
pushLifecycleMock.mockReset().mockResolvedValue({ pushed: true });
|
|
70
72
|
appendReleaseRecordMock.mockReset();
|
|
71
73
|
delete process.env.GITHUB_ACTOR;
|
|
72
74
|
delete process.env.GITLAB_USER_LOGIN;
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* (`--git-sha` defaults to HEAD, `--run-id`/`--actor` fall back to common CI
|
|
26
26
|
* env vars, timestamp is a real `new Date()` taken at record time).
|
|
27
27
|
*/
|
|
28
|
-
import { getHeadCommit,
|
|
28
|
+
import { getHeadCommit, LifecyclePushLostError, pushLifecycleRebasing, StaleLifecycleBranchError } from "../lifecycle/git";
|
|
29
29
|
import { appendReleaseRecord, InvalidReleaseRecordError, type ReleaseAdmission, type ReleaseDigestKind, type ReleaseRecord, type RunOrigin } from "../lifecycle/release-ledger";
|
|
30
30
|
import { changeSetDigest } from "../change-set";
|
|
31
31
|
import type { DriverComponent, DriverStepRecord } from "./driver";
|
|
@@ -106,7 +106,7 @@ export type AutoReleaseSkipReason =
|
|
|
106
106
|
export type AutoReleaseResult =
|
|
107
107
|
| { recorded: true; commit: string; record: ReleaseRecord }
|
|
108
108
|
| { recorded: false; reason: AutoReleaseSkipReason; detail?: string }
|
|
109
|
-
| { recorded: false; reason: "error"; error: string };
|
|
109
|
+
| { recorded: false; reason: "error"; error: string; lost?: true };
|
|
110
110
|
|
|
111
111
|
/** Input describing one component's completed run. */
|
|
112
112
|
export interface AutoReleaseRunInfo {
|
|
@@ -189,8 +189,10 @@ function resolveActor(override?: string): string | undefined {
|
|
|
189
189
|
* requirement; an unattributed record defeats the ledger's purpose.
|
|
190
190
|
*
|
|
191
191
|
* Git-sha resolution failure and ledger-write failures
|
|
192
|
-
* (`InvalidReleaseRecordError`, `StaleLifecycleBranchError`,
|
|
193
|
-
*
|
|
192
|
+
* (`InvalidReleaseRecordError`, `StaleLifecycleBranchError`,
|
|
193
|
+
* `LifecyclePushLostError` when the push never landed after its replays, or
|
|
194
|
+
* any other error `appendReleaseRecord`/`pushLifecycleRebasing` throw) are
|
|
195
|
+
* reported as `{
|
|
194
196
|
* recorded: false, reason: "error", error }` rather than propagated — an
|
|
195
197
|
* auto-recorded ledger write is a best-effort observability side effect of a
|
|
196
198
|
* successful deploy; it must never turn a successful `chant run --components`
|
|
@@ -250,9 +252,11 @@ export async function maybeRecordAutoRelease(
|
|
|
250
252
|
},
|
|
251
253
|
{ cwd: options.cwd },
|
|
252
254
|
);
|
|
253
|
-
|
|
255
|
+
// plywood#22 finding 9: another writer's push replays this record on its tip and pushes again, in place of a stale refusal.
|
|
256
|
+
await pushLifecycleRebasing({ cwd: options.cwd });
|
|
254
257
|
return { recorded: true, commit, record };
|
|
255
258
|
} catch (err) {
|
|
259
|
+
if (err instanceof LifecyclePushLostError) return { recorded: false, reason: "error", error: err.message, lost: true };
|
|
256
260
|
if (err instanceof InvalidReleaseRecordError || err instanceof StaleLifecycleBranchError) {
|
|
257
261
|
return { recorded: false, reason: "error", error: err.message };
|
|
258
262
|
}
|
|
@@ -86,6 +86,20 @@ export interface DeployContext {
|
|
|
86
86
|
* component refuses before anything plans or runs. Absent: the whole step.
|
|
87
87
|
*/
|
|
88
88
|
targets?: string[];
|
|
89
|
+
/**
|
|
90
|
+
* `pr-plan --refresh` (#4627): refresh the step's state from the live
|
|
91
|
+
* system before it plans, as `pulumi preview --refresh` does. A step's
|
|
92
|
+
* capability must accept it ({@link Capability.planFlags}), or the
|
|
93
|
+
* component refuses before anything plans. Bound into the member's digest.
|
|
94
|
+
*/
|
|
95
|
+
refresh?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* `pr-plan --target-dependents` (#4627): with `targets`, plan the
|
|
98
|
+
* resources that depend on them too, as `pulumi preview
|
|
99
|
+
* --target-dependents` does. Accepted or refused as `refresh` is. Bound
|
|
100
|
+
* into the member's digest.
|
|
101
|
+
*/
|
|
102
|
+
targetDependents?: boolean;
|
|
89
103
|
/**
|
|
90
104
|
* `--adopt <adoption-file>` (#4537): the resources to adopt into this
|
|
91
105
|
* component's stack, the index version they come from, and the review
|
|
@@ -254,6 +268,16 @@ export interface Capability<In = unknown, Out = unknown> {
|
|
|
254
268
|
* ../lifecycle/lock-rows.ts). Absent: the resource grain is refused.
|
|
255
269
|
*/
|
|
256
270
|
lockRows?(input: In, plan: CapabilityPlan): LockRow[] | Promise<LockRow[]>;
|
|
271
|
+
/**
|
|
272
|
+
* Optional (ruling for ci-products 2026-10-28, "Ledger lock"): the row of
|
|
273
|
+
* the whole target an apply on the `target` grain waits for on the
|
|
274
|
+
* ledger, oldest commit first, up to the job's timeout, in place of
|
|
275
|
+
* failing on the engine's own lock. The pulumi lexicon answers
|
|
276
|
+
* `stack <project>/<stack>` for stock Pulumi, the terraform lexicon
|
|
277
|
+
* `root <root>` for Terraform, tofu and Terragrunt. `plan`, when given, is
|
|
278
|
+
* the member's plan. Absent or undefined: the apply takes no row.
|
|
279
|
+
*/
|
|
280
|
+
targetLockRow?(input: In, plan?: CapabilityPlan): LockRow | undefined | Promise<LockRow | undefined>;
|
|
257
281
|
/**
|
|
258
282
|
* Optional: the outputs `run` exposed when it last ran, read without
|
|
259
283
|
* changing anything (#3183). A pull request's plan reads them for each
|
|
@@ -281,6 +305,12 @@ export interface Capability<In = unknown, Out = unknown> {
|
|
|
281
305
|
* why. Unset refuses too, with a reason that names the verb.
|
|
282
306
|
*/
|
|
283
307
|
readonly targets?: TargetSupport;
|
|
308
|
+
/**
|
|
309
|
+
* Whether this verb's plan takes `DeployContext.refresh` and
|
|
310
|
+
* `DeployContext.targetDependents` (#4627), each `"accept"` or `{ refuse
|
|
311
|
+
* }` with why, as {@link targets} is. Unset refuses, naming the verb.
|
|
312
|
+
*/
|
|
313
|
+
readonly planFlags?: Partial<Record<PlanFlag, TargetSupport>>;
|
|
284
314
|
/**
|
|
285
315
|
* Optional (#4435, ws-107): why this capability will not plan and apply
|
|
286
316
|
* `members` as one group, or `undefined` when it will. Core asks before
|
|
@@ -561,6 +591,36 @@ export type RollbackPolicy = "native" | "none-by-design" | "needs-opt-out";
|
|
|
561
591
|
/** Whether a capability accepts `DeployContext.targets` (#4300). See `Capability.targets`. */
|
|
562
592
|
export type TargetSupport = "accept" | { refuse: string };
|
|
563
593
|
|
|
594
|
+
/** A plan flag a capability accepts or refuses (#4627): `refresh` and `targetDependents`. */
|
|
595
|
+
export type PlanFlag = "refresh" | "targetDependents";
|
|
596
|
+
|
|
597
|
+
/** Each plan flag as `pr-plan` spells it (#4627). */
|
|
598
|
+
export const PLAN_FLAG_ARGS: Record<PlanFlag, string> = { refresh: "--refresh", targetDependents: "--target-dependents" };
|
|
599
|
+
|
|
600
|
+
/**
|
|
601
|
+
* A component was asked to plan with a flag (#4627) one of its steps'
|
|
602
|
+
* capabilities refuses. Nothing in the component plans.
|
|
603
|
+
*/
|
|
604
|
+
export class PlanFlagRefusedError extends Error {
|
|
605
|
+
constructor(
|
|
606
|
+
readonly component: string,
|
|
607
|
+
readonly kind: string,
|
|
608
|
+
readonly flag: PlanFlag,
|
|
609
|
+
readonly reason: string,
|
|
610
|
+
) {
|
|
611
|
+
super(`component "${component}": ${kind} refuses ${PLAN_FLAG_ARGS[flag]}: ${reason}`);
|
|
612
|
+
this.name = "PlanFlagRefusedError";
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
/** Why `capability` refuses `flag`, or `undefined` when it accepts it (#4627). */
|
|
617
|
+
export function planFlagRefusal(capability: Pick<Capability<never, unknown>, "kind" | "planFlags">, flag: PlanFlag): string | undefined {
|
|
618
|
+
const t = capability.planFlags?.[flag];
|
|
619
|
+
if (t === "accept") return undefined;
|
|
620
|
+
if (t && typeof t === "object" && typeof t.refuse === "string") return t.refuse;
|
|
621
|
+
return `${capability.kind} does not say it can plan with ${PLAN_FLAG_ARGS[flag]}`;
|
|
622
|
+
}
|
|
623
|
+
|
|
564
624
|
/**
|
|
565
625
|
* A component was asked to narrow to targets (#4300) and one of its steps'
|
|
566
626
|
* capabilities refuses them. Nothing in the component plans or runs.
|
|
@@ -30,6 +30,7 @@ import { setProperty, valueAt } from "../workspace/json-edit";
|
|
|
30
30
|
import { parseJsonText } from "../workspace/jsonc";
|
|
31
31
|
import { memberAtCwd } from "../workspace/security";
|
|
32
32
|
import { locateWorkspace } from "../workspace/which-chant";
|
|
33
|
+
import type { CheckStepOutcome } from "./check-steps";
|
|
33
34
|
|
|
34
35
|
export { CI_CHECK_HOOK_FLOOR } from "../op/op-waves";
|
|
35
36
|
|
|
@@ -134,7 +135,9 @@ export interface CheckHooksReport {
|
|
|
134
135
|
/** `none`: no check hook is declared at base. */
|
|
135
136
|
status: "passed" | "failed" | "none";
|
|
136
137
|
hooks: CheckHookOutcome[];
|
|
137
|
-
/** The
|
|
138
|
+
/** The lexicons' check steps (#4633, `./check-steps.ts`), when any ran. */
|
|
139
|
+
steps?: CheckStepOutcome[];
|
|
140
|
+
/** The first hook that failed, and why; the hooks after it did not run. Or the check steps that failed. */
|
|
138
141
|
failed?: string;
|
|
139
142
|
note?: string;
|
|
140
143
|
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { mkdtempSync, readFileSync } from "node:fs";
|
|
2
|
+
import { tmpdir } from "node:os";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { describe, expect, test } from "vitest";
|
|
5
|
+
import { runCheckStage, runCheckSteps, type CheckStepsAdapter } from "./check-steps";
|
|
6
|
+
|
|
7
|
+
const members = [
|
|
8
|
+
{ name: "web", dir: "/w/web", kind: "pulumi", fields: null },
|
|
9
|
+
{ name: "net", dir: "/w/net", kind: "choudoufu", fields: null },
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
function adapter(outcome: "passed" | "failed", seen: string[] = []): CheckStepsAdapter {
|
|
13
|
+
return {
|
|
14
|
+
lexicon: "fake",
|
|
15
|
+
kinds: ["pulumi"],
|
|
16
|
+
async run(ctx) {
|
|
17
|
+
seen.push(...ctx.members.map((m) => m.name), `env:${Object.keys(ctx.env).sort().join(",")}`);
|
|
18
|
+
return ctx.members.map((m) => ({ lexicon: "fake", step: "install", member: m.name, stack: "dev", exit: outcome === "passed" ? 0 : 2, outcome, ...(outcome === "failed" ? { reason: `install failed for member ${m.name}, stack dev` } : {}) }));
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
describe("lexicon check steps (#4633)", () => {
|
|
24
|
+
test("an adapter runs for the members of its kinds only", async () => {
|
|
25
|
+
const seen: string[] = [];
|
|
26
|
+
const out = await runCheckSteps({ adapters: [adapter("passed", seen)], members, env: { PATH: "/bin" }, log: () => {} });
|
|
27
|
+
expect(seen).toEqual(["web", "env:PATH"]);
|
|
28
|
+
expect(out).toEqual([expect.objectContaining({ member: "web", outcome: "passed" })]);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
test("an adapter that throws fails each of its members, naming the lexicon", async () => {
|
|
32
|
+
const broken: CheckStepsAdapter = { lexicon: "fake", kinds: ["pulumi"], run: async () => { throw new Error("boom"); } };
|
|
33
|
+
const out = await runCheckSteps({ adapters: [broken], members, env: {}, log: () => {} });
|
|
34
|
+
expect(out).toEqual([expect.objectContaining({ member: "web", outcome: "failed", reason: "the fake check steps for web could not run: boom" })]);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
test("the stage runs the steps after passing hooks, and the report carries both", async () => {
|
|
38
|
+
const cwd = mkdtempSync(join(tmpdir(), "chant-check-steps-"));
|
|
39
|
+
const report = await runCheckStage({
|
|
40
|
+
base: "abc123",
|
|
41
|
+
cwd,
|
|
42
|
+
read: { base: "abc123", hooks: [{ name: "fmt", command: ["fmt"] }] },
|
|
43
|
+
exec: () => 0,
|
|
44
|
+
adapters: [adapter("failed")],
|
|
45
|
+
members,
|
|
46
|
+
env: { GITHUB_TOKEN: "t" },
|
|
47
|
+
log: () => {},
|
|
48
|
+
});
|
|
49
|
+
expect(report.status).toBe("failed");
|
|
50
|
+
expect(report.hooks.map((h) => h.outcome)).toEqual(["passed"]);
|
|
51
|
+
expect(report.failed).toBe("a check step failed: install failed for member web, stack dev");
|
|
52
|
+
const written = JSON.parse(readFileSync(join(cwd, ".chant/check/check-hooks.json"), "utf8"));
|
|
53
|
+
expect(written.steps).toHaveLength(1);
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
test("a failed hook stops the stage before the steps", async () => {
|
|
57
|
+
const seen: string[] = [];
|
|
58
|
+
const cwd = mkdtempSync(join(tmpdir(), "chant-check-steps-"));
|
|
59
|
+
const report = await runCheckStage({ base: "abc", cwd, read: { base: "abc", hooks: [{ name: "lint", command: ["lint"] }] }, exec: () => 1, adapters: [adapter("passed", seen)], members, log: () => {} });
|
|
60
|
+
expect(report.status).toBe("failed");
|
|
61
|
+
expect(report.steps).toBeUndefined();
|
|
62
|
+
expect(seen).toEqual([]);
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
test("with no hooks and no members of the adapter's kinds, nothing ran", async () => {
|
|
66
|
+
const cwd = mkdtempSync(join(tmpdir(), "chant-check-steps-"));
|
|
67
|
+
const report = await runCheckStage({ base: "abc", cwd, read: { base: "abc", hooks: [] }, adapters: [adapter("passed")], members: [members[1]!], log: () => {} });
|
|
68
|
+
expect(report.status).toBe("none");
|
|
69
|
+
});
|
|
70
|
+
});
|