@intentius/chant 0.124.87 → 0.124.89
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/action-pins.d.ts +1 -0
- package/dist/action-pins.d.ts.map +1 -1
- package/dist/action-pins.js +2 -0
- package/dist/actor.d.ts +47 -0
- package/dist/actor.d.ts.map +1 -0
- package/dist/actor.js +56 -0
- package/dist/bundle-check.d.ts +20 -5
- package/dist/bundle-check.d.ts.map +1 -1
- package/dist/bundle-check.js +20 -5
- package/dist/chant-install.d.ts +98 -0
- package/dist/chant-install.d.ts.map +1 -1
- package/dist/chant-install.js +203 -2
- package/dist/ci-base.d.ts +30 -0
- package/dist/ci-base.d.ts.map +1 -0
- package/dist/ci-base.js +33 -0
- package/dist/ci-comment-commands.d.ts +177 -0
- package/dist/ci-comment-commands.d.ts.map +1 -0
- package/dist/ci-comment-commands.js +325 -0
- package/dist/ci-comment-replies.d.ts +40 -0
- package/dist/ci-comment-replies.d.ts.map +1 -0
- package/dist/ci-comment-replies.js +59 -0
- package/dist/ci-commit.d.ts +1 -1
- package/dist/ci-commit.d.ts.map +1 -1
- package/dist/ci-commit.js +1 -2
- package/dist/ci-control.d.ts +1 -1
- package/dist/ci-control.d.ts.map +1 -1
- package/dist/ci-control.js +1 -1
- package/dist/ci-evidence-claims.d.ts +59 -0
- package/dist/ci-evidence-claims.d.ts.map +1 -0
- package/dist/ci-evidence-claims.js +87 -0
- package/dist/ci-evidence-from-job.d.ts +128 -0
- package/dist/ci-evidence-from-job.d.ts.map +1 -0
- package/dist/ci-evidence-from-job.js +203 -0
- package/dist/ci-evidence-jobs.d.ts +68 -4
- package/dist/ci-evidence-jobs.d.ts.map +1 -1
- package/dist/ci-evidence-jobs.js +82 -5
- package/dist/ci-handover.d.ts +12 -0
- package/dist/ci-handover.d.ts.map +1 -1
- package/dist/ci-handover.js +15 -3
- package/dist/ci-identity.d.ts +32 -6
- package/dist/ci-identity.d.ts.map +1 -1
- package/dist/ci-identity.js +40 -8
- package/dist/ci-image.d.ts +65 -10
- package/dist/ci-image.d.ts.map +1 -1
- package/dist/ci-image.js +101 -22
- package/dist/ci-jobs.d.ts +1 -1
- package/dist/ci-jobs.d.ts.map +1 -1
- package/dist/ci-jobs.js +7 -2
- package/dist/ci-login.d.ts +75 -13
- package/dist/ci-login.d.ts.map +1 -1
- package/dist/ci-login.js +89 -37
- package/dist/ci-note-commands.d.ts +63 -3
- package/dist/ci-note-commands.d.ts.map +1 -1
- package/dist/ci-note-commands.js +69 -35
- package/dist/ci-product-words.d.ts +62 -1
- package/dist/ci-product-words.d.ts.map +1 -1
- package/dist/ci-product-words.js +52 -1
- package/dist/ci-product.d.ts +52 -2
- package/dist/ci-product.d.ts.map +1 -1
- package/dist/ci-product.js +51 -2
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/build.js +29 -2
- package/dist/cli/handlers/approve-confirm.d.ts +14 -0
- package/dist/cli/handlers/approve-confirm.d.ts.map +1 -1
- package/dist/cli/handlers/approve-confirm.js +46 -0
- package/dist/cli/handlers/approve.d.ts.map +1 -1
- package/dist/cli/handlers/approve.js +2 -1
- package/dist/cli/handlers/build.d.ts +1 -1
- package/dist/cli/handlers/build.d.ts.map +1 -1
- package/dist/cli/handlers/build.js +22 -1
- package/dist/cli/handlers/ci-check.d.ts +1 -1
- package/dist/cli/handlers/ci-check.d.ts.map +1 -1
- package/dist/cli/handlers/ci-check.js +37 -7
- package/dist/cli/handlers/ci-evidence.d.ts.map +1 -1
- package/dist/cli/handlers/ci-evidence.js +255 -20
- package/dist/cli/handlers/ci-forge-check.d.ts.map +1 -1
- package/dist/cli/handlers/ci-forge-check.js +34 -17
- package/dist/cli/handlers/components.d.ts.map +1 -1
- package/dist/cli/handlers/components.js +3 -1
- package/dist/cli/handlers/generated-check.d.ts +11 -0
- package/dist/cli/handlers/generated-check.d.ts.map +1 -0
- package/dist/cli/handlers/generated-check.js +71 -0
- package/dist/cli/handlers/lifecycle.d.ts.map +1 -1
- package/dist/cli/handlers/lifecycle.js +3 -0
- package/dist/cli/handlers/local-chant.d.ts +13 -0
- package/dist/cli/handlers/local-chant.d.ts.map +1 -1
- package/dist/cli/handlers/local-chant.js +42 -1
- package/dist/cli/handlers/lock.d.ts.map +1 -1
- package/dist/cli/handlers/lock.js +121 -4
- package/dist/cli/handlers/pr-comment.d.ts +21 -0
- package/dist/cli/handlers/pr-comment.d.ts.map +1 -0
- package/dist/cli/handlers/pr-comment.js +112 -0
- package/dist/cli/handlers/pr-env.d.ts.map +1 -1
- package/dist/cli/handlers/pr-env.js +6 -3
- package/dist/cli/handlers/pr.d.ts +23 -1
- package/dist/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/handlers/pr.js +97 -14
- package/dist/cli/handlers/promote.d.ts.map +1 -1
- package/dist/cli/handlers/promote.js +2 -1
- package/dist/cli/handlers/release.d.ts.map +1 -1
- package/dist/cli/handlers/release.js +11 -2
- package/dist/cli/handlers/run-wave.d.ts.map +1 -1
- package/dist/cli/handlers/run-wave.js +36 -2
- package/dist/cli/handlers/run.d.ts.map +1 -1
- package/dist/cli/handlers/run.js +2 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +60 -4
- package/dist/cli/parse-args.d.ts.map +1 -1
- package/dist/cli/parse-args.js +82 -0
- package/dist/cli/registry.d.ts +35 -0
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/components/auto-release.d.ts.map +1 -1
- package/dist/components/auto-release.js +2 -1
- package/dist/components/check-hooks.d.ts +10 -0
- package/dist/components/check-hooks.d.ts.map +1 -1
- package/dist/components/check-hooks.js +18 -0
- package/dist/components/pr-checks.d.ts +169 -0
- package/dist/components/pr-checks.d.ts.map +1 -0
- package/dist/components/pr-checks.js +180 -0
- package/dist/components/pr-pipeline.d.ts +38 -0
- package/dist/components/pr-pipeline.d.ts.map +1 -1
- package/dist/components/pr-pipeline.js +6 -1
- package/dist/components/product-pipeline.d.ts +58 -2
- package/dist/components/product-pipeline.d.ts.map +1 -1
- package/dist/components/product-pipeline.js +76 -9
- package/dist/components/product-plan.d.ts +445 -7
- package/dist/components/product-plan.d.ts.map +1 -1
- package/dist/components/product-plan.js +426 -15
- package/dist/config.d.ts +10 -6
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +11 -6
- package/dist/control/consumers.d.ts +6 -0
- package/dist/control/consumers.d.ts.map +1 -1
- package/dist/control/consumers.js +6 -0
- package/dist/dead-guards.d.ts.map +1 -1
- package/dist/dead-guards.js +9 -6
- package/dist/discovery/files.d.ts +1 -1
- package/dist/discovery/files.js +1 -1
- package/dist/drift-issue.d.ts +20 -3
- package/dist/drift-issue.d.ts.map +1 -1
- package/dist/drift-issue.js +16 -0
- package/dist/drift-record.d.ts +52 -5
- package/dist/drift-record.d.ts.map +1 -1
- package/dist/drift-record.js +46 -6
- package/dist/floor-table.d.ts +6 -6
- package/dist/floor-table.d.ts.map +1 -1
- package/dist/floor-table.data.d.ts.map +1 -1
- package/dist/floor-table.data.js +81 -21
- package/dist/floor-table.js +10 -7
- package/dist/forge-check/contract.d.ts +19 -1
- package/dist/forge-check/contract.d.ts.map +1 -1
- package/dist/forge-check/contract.js +8 -2
- package/dist/forge-check/index.d.ts +4 -0
- package/dist/forge-check/index.d.ts.map +1 -1
- package/dist/forge-check/index.js +4 -0
- package/dist/forge-flags.d.ts +10 -0
- package/dist/forge-flags.d.ts.map +1 -1
- package/dist/forge-flags.js +31 -0
- package/dist/forge-remote.d.ts +47 -0
- package/dist/forge-remote.d.ts.map +1 -0
- package/dist/forge-remote.js +69 -0
- package/dist/gate-resume-run.d.ts +9 -1
- package/dist/gate-resume-run.d.ts.map +1 -1
- package/dist/gate-resume-run.js +26 -3
- package/dist/generated-check.d.ts +88 -0
- package/dist/generated-check.d.ts.map +1 -0
- package/dist/generated-check.js +248 -0
- package/dist/image-pins.d.ts +26 -0
- package/dist/image-pins.d.ts.map +1 -0
- package/dist/image-pins.js +19 -0
- package/dist/lexicon.d.ts +27 -0
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/git.d.ts +11 -0
- package/dist/lifecycle/git.d.ts.map +1 -1
- package/dist/lifecycle/git.js +30 -3
- package/dist/lifecycle/publish-npm.d.ts +26 -0
- package/dist/lifecycle/publish-npm.d.ts.map +1 -1
- package/dist/lifecycle/publish-npm.js +76 -4
- package/dist/lifecycle/reach-locks.d.ts +131 -0
- package/dist/lifecycle/reach-locks.d.ts.map +1 -0
- package/dist/lifecycle/reach-locks.js +118 -0
- package/dist/lifecycle/release-cut.d.ts +3 -1
- package/dist/lifecycle/release-cut.d.ts.map +1 -1
- package/dist/lifecycle/release-cut.js +15 -0
- package/dist/lifecycle/release-images.d.ts +22 -1
- package/dist/lifecycle/release-images.d.ts.map +1 -1
- package/dist/lifecycle/release-images.js +26 -3
- package/dist/lifecycle/release-ledger.d.ts +4 -3
- package/dist/lifecycle/release-ledger.d.ts.map +1 -1
- package/dist/lifecycle/release-ledger.js +3 -2
- package/dist/local-chant.d.ts +57 -3
- package/dist/local-chant.d.ts.map +1 -1
- package/dist/local-chant.js +122 -13
- package/dist/notify-product.d.ts +12 -3
- package/dist/notify-product.d.ts.map +1 -1
- package/dist/notify-product.js +10 -6
- package/dist/op/activities/source-release.d.ts.map +1 -1
- package/dist/op/activities/source-release.js +2 -1
- package/dist/op/activities/source-rollback.d.ts.map +1 -1
- package/dist/op/activities/source-rollback.js +2 -1
- package/dist/op/index.d.ts +2 -0
- package/dist/op/index.d.ts.map +1 -1
- package/dist/op/index.js +1 -0
- package/dist/op/op-waves-evidence-jobs.d.ts +97 -0
- package/dist/op/op-waves-evidence-jobs.d.ts.map +1 -0
- package/dist/op/op-waves-evidence-jobs.js +118 -0
- package/dist/op/op-waves-evidence.d.ts +12 -1
- package/dist/op/op-waves-evidence.d.ts.map +1 -1
- package/dist/op/op-waves-evidence.js +23 -2
- package/dist/op/op-waves-render-spec.d.ts +100 -0
- package/dist/op/op-waves-render-spec.d.ts.map +1 -0
- package/dist/op/op-waves-render-spec.js +162 -0
- package/dist/op/op-waves-run.d.ts +14 -1
- package/dist/op/op-waves-run.d.ts.map +1 -1
- package/dist/op/op-waves-run.js +56 -4
- package/dist/op/op-waves.d.ts +12 -0
- package/dist/op/op-waves.d.ts.map +1 -1
- package/dist/op/op-waves.js +14 -1
- package/dist/op/schedule-overdue.d.ts +39 -2
- package/dist/op/schedule-overdue.d.ts.map +1 -1
- package/dist/op/schedule-overdue.js +148 -10
- package/dist/op/wave-stop.d.ts +64 -0
- package/dist/op/wave-stop.d.ts.map +1 -0
- package/dist/op/wave-stop.js +127 -0
- package/dist/planned-files.d.ts +76 -0
- package/dist/planned-files.d.ts.map +1 -0
- package/dist/planned-files.js +108 -0
- package/dist/pr-forge-job.d.ts +22 -0
- package/dist/pr-forge-job.d.ts.map +1 -0
- package/dist/pr-forge-job.js +46 -0
- package/dist/pr-forge-reads.d.ts +21 -1
- package/dist/pr-forge-reads.d.ts.map +1 -1
- package/dist/pr-forge-reads.js +19 -1
- package/dist/pr-forge.d.ts +7 -1
- package/dist/pr-forge.d.ts.map +1 -1
- package/dist/pr-forge.js +7 -2
- package/dist/pr-loop.d.ts +3 -6
- package/dist/pr-loop.d.ts.map +1 -1
- package/dist/pr-loop.js +4 -81
- package/dist/pr-plan-note.d.ts +121 -0
- package/dist/pr-plan-note.d.ts.map +1 -1
- package/dist/pr-plan-note.js +104 -1
- package/dist/pr-plan-record.d.ts +47 -0
- package/dist/pr-plan-record.d.ts.map +1 -0
- package/dist/pr-plan-record.js +89 -0
- package/dist/pr-post.d.ts +68 -3
- package/dist/pr-post.d.ts.map +1 -1
- package/dist/pr-post.js +218 -13
- package/dist/pr-requires.d.ts +8 -0
- package/dist/pr-requires.d.ts.map +1 -1
- package/dist/pr-requires.js +3 -1
- package/dist/pr-status.d.ts +16 -0
- package/dist/pr-status.d.ts.map +1 -0
- package/dist/pr-status.js +90 -0
- package/dist/ref-gate-init.d.ts +90 -0
- package/dist/ref-gate-init.d.ts.map +1 -0
- package/dist/ref-gate-init.js +155 -0
- package/dist/ref-gate-rules.d.ts +19 -0
- package/dist/ref-gate-rules.d.ts.map +1 -0
- package/dist/ref-gate-rules.js +17 -0
- package/dist/release-floors.d.ts +100 -16
- package/dist/release-floors.d.ts.map +1 -1
- package/dist/release-floors.js +101 -17
- package/dist/render-module.d.ts +15 -0
- package/dist/render-module.d.ts.map +1 -0
- package/dist/render-module.js +73 -0
- package/dist/state-migration.d.ts +24 -1
- package/dist/state-migration.d.ts.map +1 -1
- package/dist/state-migration.js +39 -4
- package/dist/state-unlock.d.ts +32 -1
- package/dist/state-unlock.d.ts.map +1 -1
- package/dist/state-unlock.js +31 -0
- package/dist/wave-runtime.mjs +307 -297
- package/dist/workspace/ci-green-cli.d.ts.map +1 -1
- package/dist/workspace/ci-green-cli.js +15 -8
- package/dist/workspace/drift-cli.d.ts +1 -1
- package/dist/workspace/drift-cli.d.ts.map +1 -1
- package/dist/workspace/drift-cli.js +5 -12
- package/dist/workspace/forge-work.d.ts +3 -2
- package/dist/workspace/forge-work.d.ts.map +1 -1
- package/dist/workspace/forge-work.js +7 -17
- package/dist/workspace/lexicon-outputs.js +2 -2
- package/dist/workspace/release-train.d.ts.map +1 -1
- package/dist/workspace/release-train.js +2 -1
- package/dist/workspace/release-workflow.d.ts +27 -3
- package/dist/workspace/release-workflow.d.ts.map +1 -1
- package/dist/workspace/release-workflow.js +52 -7
- package/dist/workspace/trust/check-evidence-report.d.ts +25 -2
- package/dist/workspace/trust/check-evidence-report.d.ts.map +1 -1
- package/dist/workspace/trust/check-evidence-report.js +28 -8
- package/dist/workspace/trust/check-evidence.d.ts +13 -1
- package/dist/workspace/trust/check-evidence.d.ts.map +1 -1
- package/dist/workspace/trust/check-evidence.js +8 -3
- package/dist/workspace/trust/evidence.d.ts +5 -0
- package/dist/workspace/trust/evidence.d.ts.map +1 -1
- package/dist/workspace/trust/evidence.js +5 -0
- package/dist/workspace/trust/open-evidence.d.ts +67 -0
- package/dist/workspace/trust/open-evidence.d.ts.map +1 -0
- package/dist/workspace/trust/open-evidence.js +92 -0
- package/dist/workspace/trust/ref-gate-cli.d.ts +10 -1
- package/dist/workspace/trust/ref-gate-cli.d.ts.map +1 -1
- package/dist/workspace/trust/ref-gate-cli.js +93 -11
- package/dist/workspace/trust/ref-gate.d.ts +61 -2
- package/dist/workspace/trust/ref-gate.d.ts.map +1 -1
- package/dist/workspace/trust/ref-gate.js +72 -7
- package/dist/workspace/workspace-run.d.ts.map +1 -1
- package/dist/workspace/workspace-run.js +2 -1
- package/package.json +1 -1
- package/src/action-pins.ts +2 -0
- package/src/actor.test.ts +78 -0
- package/src/actor.ts +79 -0
- package/src/bundle-check.test.ts +22 -0
- package/src/bundle-check.ts +33 -5
- package/src/chant-install.test.ts +108 -1
- package/src/chant-install.ts +242 -2
- package/src/ci-base.test.ts +41 -0
- package/src/ci-base.ts +43 -0
- package/src/ci-comment-commands.test.ts +376 -0
- package/src/ci-comment-commands.ts +389 -0
- package/src/ci-comment-replies.ts +78 -0
- package/src/ci-commit.test.ts +51 -6
- package/src/ci-commit.ts +1 -2
- package/src/ci-control.ts +1 -0
- package/src/ci-evidence-claims.ts +102 -0
- package/src/ci-evidence-from-job.test.ts +165 -0
- package/src/ci-evidence-from-job.ts +251 -0
- package/src/ci-evidence-jobs.ts +88 -6
- package/src/ci-handover.ts +16 -3
- package/src/ci-identity.test.ts +3 -3
- package/src/ci-identity.ts +51 -11
- package/src/ci-image.test.ts +187 -16
- package/src/ci-image.ts +157 -25
- package/src/ci-jobs.ts +7 -2
- package/src/ci-login.test.ts +131 -3
- package/src/ci-login.token-drop.test.ts +204 -0
- package/src/ci-login.ts +137 -39
- package/src/ci-note-commands.ts +104 -41
- package/src/ci-product-words.ts +89 -0
- package/src/ci-product.ts +62 -1
- package/src/cli/commands/__fixtures__/source-dir-root/migrations/0001-init/backfill.ts +3 -0
- package/src/cli/commands/build.test.ts +41 -0
- package/src/cli/commands/build.ts +27 -2
- package/src/cli/handlers/approve-confirm.test.ts +35 -0
- package/src/cli/handlers/approve-confirm.ts +44 -0
- package/src/cli/handlers/approve.ts +2 -1
- package/src/cli/handlers/build-source-dir.test.ts +4 -0
- package/src/cli/handlers/build.ts +20 -2
- package/src/cli/handlers/ci-check.ts +37 -7
- package/src/cli/handlers/ci-evidence-open.test.ts +164 -0
- package/src/cli/handlers/ci-evidence.ts +233 -18
- package/src/cli/handlers/ci-forge-check.ts +22 -9
- package/src/cli/handlers/components.ts +3 -1
- package/src/cli/handlers/generated-check.ts +69 -0
- package/src/cli/handlers/lifecycle.test.ts +20 -0
- package/src/cli/handlers/lifecycle.ts +4 -0
- package/src/cli/handlers/local-chant.ts +39 -1
- package/src/cli/handlers/lock-reach.test.ts +103 -0
- package/src/cli/handlers/lock.ts +100 -4
- package/src/cli/handlers/pr-comment.ts +104 -0
- package/src/cli/handlers/pr-env.ts +6 -3
- package/src/cli/handlers/pr-record.test.ts +1 -1
- package/src/cli/handlers/pr.ts +93 -15
- package/src/cli/handlers/promote.ts +2 -1
- package/src/cli/handlers/release.e2e.test.ts +35 -0
- package/src/cli/handlers/release.ts +14 -2
- package/src/cli/handlers/run-wave.ts +35 -2
- package/src/cli/handlers/run.ts +2 -1
- package/src/cli/main.ts +60 -4
- package/src/cli/parse-args.ts +58 -0
- package/src/cli/registry.ts +35 -0
- package/src/components/auto-release.ts +2 -1
- package/src/components/check-hooks.ts +22 -0
- package/src/components/check-report-summary.test.ts +78 -0
- package/src/components/pr-checks.ts +254 -0
- package/src/components/pr-pipeline.ts +43 -1
- package/src/components/product-pipeline.ts +113 -9
- package/src/components/product-plan.test.ts +140 -1
- package/src/components/product-plan.ts +707 -20
- package/src/config.ts +13 -8
- package/src/control/consumers.ts +7 -0
- package/src/dead-guards.test.ts +27 -5
- package/src/dead-guards.ts +9 -6
- package/src/discovery/files.ts +1 -1
- package/src/drift-issue.test.ts +29 -1
- package/src/drift-issue.ts +28 -3
- package/src/drift-record.test.ts +45 -0
- package/src/drift-record.ts +71 -6
- package/src/floor-table.data.ts +81 -21
- package/src/floor-table.ts +12 -9
- package/src/forge-check/contract.ts +23 -2
- package/src/forge-check/forge-check.test.ts +25 -0
- package/src/forge-check/index.ts +4 -0
- package/src/forge-flags.test.ts +25 -1
- package/src/forge-flags.ts +34 -0
- package/src/forge-remote.test.ts +37 -0
- package/src/forge-remote.ts +79 -0
- package/src/gate-resume-run.ts +27 -3
- package/src/generated-check.e2e.test.ts +118 -0
- package/src/generated-check.test.ts +170 -0
- package/src/generated-check.ts +310 -0
- package/src/image-pins.ts +31 -0
- package/src/lexicon.ts +28 -0
- package/src/lifecycle/git.test.ts +48 -0
- package/src/lifecycle/git.ts +27 -4
- package/src/lifecycle/publish-npm.ts +87 -4
- package/src/lifecycle/reach-locks.test.ts +87 -0
- package/src/lifecycle/reach-locks.ts +169 -0
- package/src/lifecycle/release-catalog.test.ts +2 -2
- package/src/lifecycle/release-cut.ts +17 -1
- package/src/lifecycle/release-images-dockerfile.test.ts +20 -0
- package/src/lifecycle/release-images.test.ts +100 -0
- package/src/lifecycle/release-images.ts +38 -3
- package/src/lifecycle/release-ledger.ts +4 -3
- package/src/local-chant.e2e.test.ts +81 -6
- package/src/local-chant.test.ts +22 -3
- package/src/local-chant.ts +130 -13
- package/src/notify-product.ts +19 -8
- package/src/op/activities/source-release.ts +2 -1
- package/src/op/activities/source-rollback.ts +2 -1
- package/src/op/gate-resume.test.ts +27 -0
- package/src/op/index.ts +10 -0
- package/src/op/op-waves-evidence-jobs.ts +140 -0
- package/src/op/op-waves-evidence.test.ts +36 -3
- package/src/op/op-waves-evidence.ts +23 -3
- package/src/op/op-waves-notify-words.test.ts +18 -0
- package/src/op/op-waves-render-spec.test.ts +160 -0
- package/src/op/op-waves-render-spec.ts +171 -0
- package/src/op/op-waves-run.ts +59 -3
- package/src/op/op-waves.ts +16 -2
- package/src/op/schedule-overdue.test.ts +126 -1
- package/src/op/schedule-overdue.ts +164 -12
- package/src/op/wave-stop.test.ts +72 -0
- package/src/op/wave-stop.ts +137 -0
- package/src/planned-files.test.ts +80 -0
- package/src/planned-files.ts +134 -0
- package/src/pr-forge-job.test.ts +53 -0
- package/src/pr-forge-job.ts +46 -0
- package/src/pr-forge-reads-compare.test.ts +2 -1
- package/src/pr-forge-reads.ts +37 -1
- package/src/pr-forge.ts +14 -3
- package/src/pr-loop-narrowed.test.ts +2 -1
- package/src/pr-loop-words.test.ts +2 -1
- package/src/pr-loop.test.ts +1 -2
- package/src/pr-loop.ts +4 -80
- package/src/pr-plan-note.ts +184 -3
- package/src/pr-plan-record.test.ts +75 -0
- package/src/pr-plan-record.ts +101 -0
- package/src/pr-post-plan-note.test.ts +60 -0
- package/src/pr-post-replan.test.ts +144 -0
- package/src/pr-post-subject.test.ts +230 -0
- package/src/pr-post.test.ts +32 -1
- package/src/pr-post.ts +254 -15
- package/src/pr-requires.test.ts +20 -0
- package/src/pr-requires.ts +10 -1
- package/src/pr-status.ts +91 -0
- package/src/ref-gate-init.ts +208 -0
- package/src/ref-gate-rules.ts +26 -0
- package/src/release-floors.ts +139 -17
- package/src/render-module.ts +73 -0
- package/src/state-migration-record.test.ts +89 -0
- package/src/state-migration.test.ts +1 -1
- package/src/state-migration.ts +52 -4
- package/src/state-unlock.test.ts +33 -1
- package/src/state-unlock.ts +49 -1
- package/src/workspace/ci-green-cli.ts +14 -7
- package/src/workspace/ci-green-workflow.test.ts +32 -1
- package/src/workspace/drift-cli.ts +6 -18
- package/src/workspace/forge-work.ts +7 -14
- package/src/workspace/lexicon-outputs.ts +2 -2
- package/src/workspace/release-train.ts +2 -1
- package/src/workspace/release-workflow.test.ts +104 -3
- package/src/workspace/release-workflow.ts +60 -9
- package/src/workspace/trust/check-evidence-report.ts +39 -8
- package/src/workspace/trust/check-evidence.test.ts +5 -0
- package/src/workspace/trust/check-evidence.ts +17 -5
- package/src/workspace/trust/evidence.ts +5 -0
- package/src/workspace/trust/open-evidence.ts +129 -0
- package/src/workspace/trust/ref-gate-cli.ts +88 -10
- package/src/workspace/trust/ref-gate-pieces.test.ts +220 -0
- package/src/workspace/trust/ref-gate.e2e.test.ts +17 -0
- package/src/workspace/trust/ref-gate.test.ts +10 -0
- package/src/workspace/trust/ref-gate.ts +87 -6
- package/src/workspace/workspace-run.ts +2 -1
package/dist/cli/handlers/pr.js
CHANGED
|
@@ -82,8 +82,11 @@ import { evaluateGate, gateIsSealed, gitGateLedgerPort } from "../../op/gate.js"
|
|
|
82
82
|
import { emitGateStep, gateEventsOf, GATE_PHASE } from "../../run-event-stream.js";
|
|
83
83
|
import { openCliRunEvents, refusesEventsWithJson } from "../run-events.js";
|
|
84
84
|
import { openPrReportUpload, parseReportUrl, reportKey } from "../../pr-report-url.js";
|
|
85
|
-
import { describePlanChanged, PR_APPLY_GATE, prApproveCommand, prApproveCommands, prNoteMarker, prOp,
|
|
85
|
+
import { describePlanChanged, PR_APPLY_GATE, prApproveCommand, prApproveCommands, prNoteMarker, prOp, prStatusContext, renderPrNote, } from "../../pr-loop.js";
|
|
86
|
+
import { prStatusDescription, prStatusState } from "../../pr-status.js";
|
|
86
87
|
import { FORGE_KINDS, forgeFromEnv, forgePrincipalOf } from "../../pr-forge.js";
|
|
88
|
+
// #4964: a status for a pull_request run's merge preview goes on the pull request's head.
|
|
89
|
+
import { forgeFromJobEnv } from "../../pr-forge-job.js";
|
|
87
90
|
import { GITHUB_COMMENT_LIMIT, GITLAB_NOTE_LIMIT } from "../../plan-summary.js";
|
|
88
91
|
import { upsertPlanNote } from "../../pr-post.js";
|
|
89
92
|
import { activeProductWords, commandWord, parseProductComment, productContext } from "../../ci-product-words.js";
|
|
@@ -104,6 +107,7 @@ import { PREVIEW_COMMENT_ENV } from "../../components/pr-pipeline.js";
|
|
|
104
107
|
import { prLoopHooksAt, runPrHooks } from "../../components/pr-hooks.js";
|
|
105
108
|
import { decidePrPolicyOverride, policyReviewOf, prLoopPolicyAt, preparePrPolicyEngine, prPolicyReport, runPrPolicy, spendPrPolicyOverride } from "../../components/pr-policy.js";
|
|
106
109
|
import { lexiconNames } from "../../lexicon-module.js";
|
|
110
|
+
import { actorFromEnv } from "../../actor.js";
|
|
107
111
|
/** Where the reports land unless `--output` says. */
|
|
108
112
|
export const PR_REPORT_DIR = ".chant/pr";
|
|
109
113
|
const fail = (message, hint) => {
|
|
@@ -151,7 +155,7 @@ export async function prepare(ctx, stage) {
|
|
|
151
155
|
let forge;
|
|
152
156
|
if (args.forge && !(stage === "plan" && args.noStatus)) {
|
|
153
157
|
try {
|
|
154
|
-
forge =
|
|
158
|
+
forge = forgeFromJobEnv(args.forge);
|
|
155
159
|
}
|
|
156
160
|
catch (err) {
|
|
157
161
|
return fail(err instanceof Error ? err.message : String(err));
|
|
@@ -961,10 +965,14 @@ async function newMigrations(p) {
|
|
|
961
965
|
* the Ops cannot be read, nothing is checked and the plan goes on. The
|
|
962
966
|
* generated plan holds no forge token (#4295), so there the plan-note job's
|
|
963
967
|
* `pr-post` asks instead, reading the Ops at the target branch's commit.
|
|
968
|
+
* A product plan's own watches (#4888) come from `CHANT_PLAN_WATCHES`, which
|
|
969
|
+
* the generated note job sets from the pipeline.
|
|
964
970
|
*/
|
|
965
971
|
async function overdueOps(forge, member) {
|
|
966
|
-
const { overdueOpsAt } = await import("../../op/schedule-overdue.js");
|
|
967
|
-
|
|
972
|
+
const { overdueOpsAt, plannedWatchesFromEnv } = await import("../../op/schedule-overdue.js");
|
|
973
|
+
const log = (line) => console.error(formatWarning({ message: line }));
|
|
974
|
+
const watches = plannedWatchesFromEnv(process.env, log);
|
|
975
|
+
return overdueOpsAt({ forge, cwd: resolve("."), ...(member ? { member } : {}), ...(watches.length > 0 ? { watches } : {}), log });
|
|
968
976
|
}
|
|
969
977
|
/** chant components pr-apply --base <ref> [--pr <n>] [--env <env>] [--gate <name>] [--forge <kind>] [--require-review] [--before-merge [--requires <list>]] [--output <dir>] [--json] [--events-json] [--report-url <url>] */
|
|
970
978
|
export function runComponentsPrApply(ctx) {
|
|
@@ -1341,7 +1349,7 @@ async function mergeAfterUpdate(ctx, p, pr) {
|
|
|
1341
1349
|
}
|
|
1342
1350
|
let forge;
|
|
1343
1351
|
try {
|
|
1344
|
-
forge =
|
|
1352
|
+
forge = forgeFromJobEnv(kind, env);
|
|
1345
1353
|
}
|
|
1346
1354
|
catch (err) {
|
|
1347
1355
|
console.error(formatWarning({ message: `the pull request was not merged: ${err instanceof Error ? err.message : String(err)}` }));
|
|
@@ -1427,7 +1435,7 @@ async function beforeMergeChecks(ctx) {
|
|
|
1427
1435
|
let head;
|
|
1428
1436
|
let base;
|
|
1429
1437
|
try {
|
|
1430
|
-
forge =
|
|
1438
|
+
forge = forgeFromJobEnv(args.forge);
|
|
1431
1439
|
head = await resolveCommit(cwd, args.head ?? "HEAD");
|
|
1432
1440
|
base = await resolveMergeBase(cwd, args.base, head);
|
|
1433
1441
|
}
|
|
@@ -1449,8 +1457,14 @@ async function beforeMergeChecks(ctx) {
|
|
|
1449
1457
|
// plywood#66: the forge also reports the pull-request pipeline's plan job, `chant-pr.<member>.<env> / plan (<event>)`, which a denial fails too.
|
|
1450
1458
|
const planJob = [`chant-pr.${member ?? "*"}.${ctx.args.env ?? "*"} / plan*`];
|
|
1451
1459
|
const ignore = [...new Set([productContext(activeProductWords(), gate), productContext(activeProductWords(), PR_APPLY_GATE), `chant/${gate}`, `chant/${PR_APPLY_GATE}`, prStatusContext("apply", member), prStatusContext("plan"), `${prStatusContext("plan")}/`, ...planJob])];
|
|
1460
|
+
// #4966: the `checks` require waits for the ref gate's status too, when the policy at base has a rule for the target branch.
|
|
1461
|
+
const refGate = await beforeMergeRefGate(cwd, args.base, args.branch);
|
|
1462
|
+
if ("problem" in refGate)
|
|
1463
|
+
return fail(refGate.problem);
|
|
1464
|
+
if (refGate.note)
|
|
1465
|
+
console.error(formatInfo(refGate.note));
|
|
1452
1466
|
// ws-106 gives the declaration no way to leave a check out, so with no --requires all four are asked (#4336, #4607).
|
|
1453
|
-
const requires = await checkPrRequires(forge, args.pr, head, { ignore, ...(only ? { only: only.checks } : {}) });
|
|
1467
|
+
const requires = await checkPrRequires(forge, args.pr, head, { ignore, ...(only ? { only: only.checks } : {}), ...(refGate.require.length > 0 ? { require: refGate.require } : {}) });
|
|
1454
1468
|
for (const r of requires)
|
|
1455
1469
|
console.error(formatInfo(`${r.name}: ${r.passed ? "passed" : r.pending ? "pending" : "unmet"}, ${r.reason}`));
|
|
1456
1470
|
const unmet = unmetRequires(requires);
|
|
@@ -1459,6 +1473,40 @@ async function beforeMergeChecks(ctx) {
|
|
|
1459
1473
|
}
|
|
1460
1474
|
return { requires };
|
|
1461
1475
|
}
|
|
1476
|
+
/**
|
|
1477
|
+
* The branch an apply before merge lands on (#4966): `--branch`, else the
|
|
1478
|
+
* pull request's target as its job names it, else the branch the job runs
|
|
1479
|
+
* on, which for the generated apply job is the target branch (an
|
|
1480
|
+
* `issue_comment` run on GitHub and Forgejo, a target-branch pipeline on
|
|
1481
|
+
* GitLab).
|
|
1482
|
+
*/
|
|
1483
|
+
export function beforeMergeBranch(explicit, env = process.env) {
|
|
1484
|
+
for (const v of [explicit, env.GITHUB_BASE_REF, env.CI_MERGE_REQUEST_TARGET_BRANCH_NAME, env.CI_COMMIT_BRANCH, env.GITHUB_REF_NAME]) {
|
|
1485
|
+
if (v && v.trim())
|
|
1486
|
+
return v.trim();
|
|
1487
|
+
}
|
|
1488
|
+
return undefined;
|
|
1489
|
+
}
|
|
1490
|
+
/**
|
|
1491
|
+
* The statuses an apply before merge waits for beside the forge's own
|
|
1492
|
+
* (#4966): the ref gate's status for the target branch, as the policy at
|
|
1493
|
+
* `base` sets it (`refGateRulesAt`), passed as `require` to the `checks`
|
|
1494
|
+
* require, so `checks` does not pass before the `ref-gate` job posted it.
|
|
1495
|
+
* No rule for the branch requires nothing; a policy that can't be read is
|
|
1496
|
+
* a problem, and the apply stops.
|
|
1497
|
+
*/
|
|
1498
|
+
export async function beforeMergeRefGate(cwd, base, branch, env = process.env) {
|
|
1499
|
+
const target = beforeMergeBranch(branch, env);
|
|
1500
|
+
if (!target)
|
|
1501
|
+
return { require: [], note: "the job names no target branch (--branch), so the ref gate's status is not waited for" };
|
|
1502
|
+
const { refGateRulesAt } = await import("../../ref-gate-rules.js");
|
|
1503
|
+
const rules = refGateRulesAt(cwd, { ref: `refs/heads/${target}`, base });
|
|
1504
|
+
if (rules.problems.length > 0)
|
|
1505
|
+
return { problem: `the trust policy at base can't be read, so the apply before merge can't tell which ref gate status to wait for: ${rules.problems.join("; ")}. Nothing was applied.` };
|
|
1506
|
+
if (!rules.matched || !rules.status)
|
|
1507
|
+
return { require: [] };
|
|
1508
|
+
return { require: [rules.status], note: `the checks require waits for ${rules.status}, the ref gate's status for refs/heads/${target}` };
|
|
1509
|
+
}
|
|
1462
1510
|
/** The refusal report of an apply before merge stopped before it planned (#4301): nothing selected, nothing planned. */
|
|
1463
1511
|
function earlyStop(ctx, forge, at) {
|
|
1464
1512
|
return async (beforeMerge, refusal, message, code) => {
|
|
@@ -1479,7 +1527,7 @@ function earlyStop(ctx, forge, at) {
|
|
|
1479
1527
|
async function takeApplyLocks(p, pr, targets = p.plan.order) {
|
|
1480
1528
|
const { takeTargetLocks, describeHeldTargetLocks } = await import("../../lifecycle/target-lock.js");
|
|
1481
1529
|
const isOpen = p.forge?.pullRequestOpen?.bind(p.forge);
|
|
1482
|
-
const by =
|
|
1530
|
+
const by = actorFromEnv();
|
|
1483
1531
|
let result;
|
|
1484
1532
|
try {
|
|
1485
1533
|
result = await takeTargetLocks(p.gate, targets, { pr, by, at: new Date().toISOString(), stage: "apply", head: p.head }, { ...(isOpen ? { isOpen } : {}) });
|
|
@@ -2685,7 +2733,7 @@ function writeWaveChangeSet(ctx, wave, doc, upload) {
|
|
|
2685
2733
|
upload?.file(name, body);
|
|
2686
2734
|
}
|
|
2687
2735
|
/**
|
|
2688
|
-
* chant components pr-post --pr <n> --head <sha> --env <env> --forge <kind> [--member <name>] [--output <dir>] [--result <result>] (#4295)
|
|
2736
|
+
* chant components pr-post --pr <n> --head <sha> --env <env> --forge <kind> [--member <name>] [--output <dir>] [--result <result>] [--not-affected <argument>] (#4295, #4963)
|
|
2689
2737
|
* chant components pr-post --open --env <env> --forge gitlab [--branch <branch>] [--member <name>] [--output <dir>] (#4328)
|
|
2690
2738
|
*
|
|
2691
2739
|
* Post the plan note and the `chant/plan` status from the report a plan job
|
|
@@ -2713,7 +2761,7 @@ export async function runComponentsPrPost(ctx) {
|
|
|
2713
2761
|
return fail(`pr-post takes one --member, not ${args.members.join(", ")}`);
|
|
2714
2762
|
let forge;
|
|
2715
2763
|
try {
|
|
2716
|
-
forge =
|
|
2764
|
+
forge = forgeFromJobEnv(args.forge);
|
|
2717
2765
|
}
|
|
2718
2766
|
catch (err) {
|
|
2719
2767
|
return fail(err instanceof Error ? err.message : String(err));
|
|
@@ -2737,14 +2785,43 @@ export async function runComponentsPrPost(ctx) {
|
|
|
2737
2785
|
// #4628: the target branch's commit for the note's tip line, and the job summary where the forge keeps one.
|
|
2738
2786
|
...(args.tip ? { baseTip: args.tip } : {}),
|
|
2739
2787
|
...(args.forge !== "gitlab" && process.env.GITHUB_STEP_SUMMARY ? { summaryFile: process.env.GITHUB_STEP_SUMMARY } : {}),
|
|
2788
|
+
// #4899: the product plan job's run record, kept on chant/lifecycle with the note.
|
|
2789
|
+
...(args.recordRun ? { recordRun: await planRunRecorder(args.forge, args.recordRun) } : {}),
|
|
2790
|
+
// #4963: a re-plan narrowed to an argument the change does not reach gets a reply in place of the note.
|
|
2791
|
+
...(args.notAffected ? { notAffected: args.notAffected } : {}),
|
|
2740
2792
|
});
|
|
2741
2793
|
for (const message of posted.warnings)
|
|
2742
2794
|
console.error(formatWarning({ message }));
|
|
2743
2795
|
if (posted.refused)
|
|
2744
2796
|
console.error(formatWarning({ message: `the plan report was not used: ${posted.refused}` }));
|
|
2745
|
-
console.error(formatInfo(`pr-post: ${prStatusContext("plan", member)} ${posted.state}: ${posted.description}${posted.noted ? "; note posted" : ""}`));
|
|
2797
|
+
console.error(formatInfo(`pr-post: ${prStatusContext("plan", member)} ${posted.state}: ${posted.description}${posted.noted ? "; note posted" : ""}${posted.recorded ? `; run ${posted.recorded} recorded` : ""}`));
|
|
2746
2798
|
return 0;
|
|
2747
2799
|
}
|
|
2800
|
+
/**
|
|
2801
|
+
* How `pr-post --record-run <plan job>` keeps a product plan job's run
|
|
2802
|
+
* record (#4899): its run is this run on GitHub and Forgejo, named by the
|
|
2803
|
+
* plan job's key, and this pipeline on GitLab, where a re-plan's note job
|
|
2804
|
+
* runs in the re-plan's own pipeline. The record is appended to the run
|
|
2805
|
+
* ledger once, by its id, and `chant/lifecycle` is pushed.
|
|
2806
|
+
*/
|
|
2807
|
+
async function planRunRecorder(forge, job) {
|
|
2808
|
+
const { resolveCiJob, resolveCiRun } = await import("../../lifecycle/release-ledger.js");
|
|
2809
|
+
const ci = forge === "gitlab" ? resolveCiRun(process.env) : resolveCiJob(process.env);
|
|
2810
|
+
const origin = ci ? (forge === "gitlab" ? ci.runOrigin : { ...ci.runOrigin, jobId: job }) : undefined;
|
|
2811
|
+
return { ...(origin ? { origin } : {}), keep: keepPlanRunRecord };
|
|
2812
|
+
}
|
|
2813
|
+
/** Append `record` to the run ledger unless a record with its id is there, and push `chant/lifecycle` (#4899). Returns a warning when the push did not land. */
|
|
2814
|
+
async function keepPlanRunRecord(record) {
|
|
2815
|
+
const { fetchLifecycleStatus, pushLifecycleReport } = await import("../../lifecycle/git.js");
|
|
2816
|
+
const { appendRunRecord, readRunLedger } = await import("../../lifecycle/run-ledger.js");
|
|
2817
|
+
await fetchLifecycleStatus().catch(() => undefined);
|
|
2818
|
+
const { records } = await readRunLedger(record.env, record.op);
|
|
2819
|
+
if (records.some((r) => r.id === record.id))
|
|
2820
|
+
return undefined;
|
|
2821
|
+
await appendRunRecord(record);
|
|
2822
|
+
const pushed = await pushLifecycleReport();
|
|
2823
|
+
return pushed.pushed ? undefined : `the plan job's run record is on this job's chant/lifecycle only: ${pushed.pushWarning ?? "the push did not land"}`;
|
|
2824
|
+
}
|
|
2748
2825
|
/**
|
|
2749
2826
|
* The description check pr-post runs after the note (#4629), when the
|
|
2750
2827
|
* responses turn it on (`--respond description=check`, or `CHANT_RESPOND`):
|
|
@@ -2807,7 +2884,7 @@ async function runComponentsPrPostStale(ctx) {
|
|
|
2807
2884
|
return fail("pr-post --stale marks the notes of the pull requests into a branch: run it in a job of a push, or pass --branch <branch>");
|
|
2808
2885
|
let forge;
|
|
2809
2886
|
try {
|
|
2810
|
-
forge =
|
|
2887
|
+
forge = forgeFromJobEnv(args.forge);
|
|
2811
2888
|
}
|
|
2812
2889
|
catch (err) {
|
|
2813
2890
|
return fail(err instanceof Error ? err.message : String(err));
|
|
@@ -2834,7 +2911,9 @@ async function runComponentsPrPostStale(ctx) {
|
|
|
2834
2911
|
* (`postOpenPlanReports`, ../../pr-post.ts). The branch is `--branch`, else
|
|
2835
2912
|
* the pipeline's own (`CI_COMMIT_BRANCH`). The plan job is `plan`, or
|
|
2836
2913
|
* `<member>-plan` with `--member`, as the gitlab lexicon names it, and the
|
|
2837
|
-
* artifact path is `--output` from the repository root.
|
|
2914
|
+
* artifact path is `--output` from the repository root. With
|
|
2915
|
+
* `--evidence-dir <dir>` (#4914) each note ends with the checks the
|
|
2916
|
+
* pipeline's signing job signed for that head. It exits 0 once it
|
|
2838
2917
|
* has posted, as `pr-post` does.
|
|
2839
2918
|
*/
|
|
2840
2919
|
async function runComponentsPrPostOpen(ctx) {
|
|
@@ -2881,6 +2960,10 @@ async function runComponentsPrPostOpen(ctx) {
|
|
|
2881
2960
|
...(description ? { description } : {}),
|
|
2882
2961
|
// #4628: the target branch's commit this pipeline runs at, which each note's tip line names.
|
|
2883
2962
|
...(args.tip ? { baseTip: args.tip } : {}),
|
|
2963
|
+
// #4899: each product plan job's run record, from its artifacts.
|
|
2964
|
+
...(args.recordRun ? { recordRun: { ...(process.env.CI_PROJECT_PATH ? { repo: process.env.CI_PROJECT_PATH } : {}), keep: keepPlanRunRecord } } : {}),
|
|
2965
|
+
// #4914: each merge request's evidence.json from this pipeline's signing job, for the note's checks line.
|
|
2966
|
+
...(args.evidenceDir ? { evidenceDir: resolve(args.evidenceDir) } : {}),
|
|
2884
2967
|
});
|
|
2885
2968
|
}
|
|
2886
2969
|
catch (err) {
|
|
@@ -2898,7 +2981,7 @@ async function runComponentsPrPostOpen(ctx) {
|
|
|
2898
2981
|
console.error(formatWarning({ message: `!${p.pr}: ${message}` }));
|
|
2899
2982
|
if (posted.refused)
|
|
2900
2983
|
console.error(formatWarning({ message: `!${p.pr}: the plan report was not used: ${posted.refused}` }));
|
|
2901
|
-
console.error(formatInfo(`pr-post: !${p.pr} ${prStatusContext("plan", member)} ${posted.state}: ${posted.description}${posted.noted ? "; note posted" : ""}`));
|
|
2984
|
+
console.error(formatInfo(`pr-post: !${p.pr} ${prStatusContext("plan", member)} ${posted.state}: ${posted.description}${posted.noted ? "; note posted" : ""}${posted.recorded ? `; run ${posted.recorded} recorded` : ""}`));
|
|
2902
2985
|
}
|
|
2903
2986
|
if (done.posts.length === 0)
|
|
2904
2987
|
console.error(formatInfo(`pr-post: no open merge request into ${branch} has a ${gitlabPlanJobName(member)} job`));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promote.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/promote.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAkDH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"promote.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/promote.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAkDH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AA24BlD,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAmF/E;AAED,wBAAsB,qBAAqB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAiDhF;AAsCD,wBAAsB,qBAAqB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA6BhF"}
|
|
@@ -45,6 +45,7 @@ import { formatError, formatWarning, formatSuccess, formatBold, formatInfo } fro
|
|
|
45
45
|
import { GATED_EXIT_CODE } from "./run.js";
|
|
46
46
|
import { withComponentEndpoint } from "../component-endpoint.js";
|
|
47
47
|
import { redeployLine, releaseRollbackLine, rollbackTarget, unsettledComponents } from "../../lifecycle/mixed-environment.js";
|
|
48
|
+
import { actorFromEnv } from "../../actor.js";
|
|
48
49
|
const PROMOTE_USAGE = "chant components promote --to <env> [--from <env>] [--allow-skip] [--release <label|digest>] [--component <name> [--digest <sha256:...>] | --digest <component>=<sha256:...> ...] [--wave-gate <gate>] [--resume <file>] [--dry-run] [--json]";
|
|
49
50
|
const ROLLBACK_USAGE = "chant components rollback <env> (--component <name> [--digest <sha256:...>] | --release <label|digest>) [--dry-run] [--json]";
|
|
50
51
|
const REDEPLOY_USAGE = "chant components redeploy <env> --component <name> [--digest <sha256:...>] [--dry-run] [--json]";
|
|
@@ -75,7 +76,7 @@ function planJson(plan, removed) {
|
|
|
75
76
|
};
|
|
76
77
|
}
|
|
77
78
|
function resolveActor(ctx) {
|
|
78
|
-
return ctx.args.actor ?? process.env
|
|
79
|
+
return ctx.args.actor ?? (actorFromEnv(process.env, "") || undefined);
|
|
79
80
|
}
|
|
80
81
|
/**
|
|
81
82
|
* Config, params and the declared components, or the exit code of a refusal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/release.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAQH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAyBlD,0HAA0H;AAC1H,wBAAgB,YAAY,CAAC,G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B,iBAAiB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAG5E;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAsD5E"}
|
|
@@ -278,7 +278,7 @@ export async function runReleaseCut(ctx) {
|
|
|
278
278
|
const { spawnTargetCompiler, ReleaseCompileError } = await import("../../components/release-compile.js");
|
|
279
279
|
const { cutRelease, planRelease, ReleaseCutError } = await import("../../lifecycle/release-cut.js");
|
|
280
280
|
const { ReleaseLabelError } = await import("../../lifecycle/release-store.js");
|
|
281
|
-
const {
|
|
281
|
+
const { pushLifecycleRebasing, getHeadCommit } = await import("../../lifecycle/git.js");
|
|
282
282
|
const { resolveCiRun } = await import("../../lifecycle/release-ledger.js");
|
|
283
283
|
const ws = await import("../../lifecycle/release-workstation.js");
|
|
284
284
|
const { detectProvenance, releasePublishTargets } = await import("../../lifecycle/release-publish.js");
|
|
@@ -533,7 +533,16 @@ export async function runReleaseCut(ctx) {
|
|
|
533
533
|
// publish job) finds them.
|
|
534
534
|
if (checkout && declaredImages.length > 0)
|
|
535
535
|
copyImageArchives((await import("../../lifecycle/release-images.js")).resolveReleaseImages(declaredImages), cutCwd, cwd);
|
|
536
|
-
|
|
536
|
+
// #4965: the record must be on the remote before the release is tagged. The release workflow pushes the tag
|
|
537
|
+
// right after the cut, and a tag whose record never landed spends the label: the publish job finds no release.
|
|
538
|
+
// A refused push is tried again; one that never lands stops the cut here, untagged and non-zero.
|
|
539
|
+
let push;
|
|
540
|
+
try {
|
|
541
|
+
push = await pushLifecycleRebasing({ cwd, requireLanded: true });
|
|
542
|
+
}
|
|
543
|
+
catch (err) {
|
|
544
|
+
return fail("release-record-not-pushed", `the release was cut and its record did not reach the remote, so the commit was not tagged: ${err instanceof Error ? err.message : String(err)}`, "Nothing was tagged, so the label is not spent. Run the cut again (in CI, run the release workflow again) once the remote takes pushes to chant/lifecycle.");
|
|
545
|
+
}
|
|
537
546
|
// The tag names the release's label, which a re-cut with no label reads from the earlier cut.
|
|
538
547
|
let tagged = null;
|
|
539
548
|
let tagWarning;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-wave.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/run-wave.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"run-wave.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/run-wave.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAIlD;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAkB3E"}
|
|
@@ -5,10 +5,12 @@
|
|
|
5
5
|
import { readFileSync } from "node:fs";
|
|
6
6
|
import { relative, resolve } from "node:path";
|
|
7
7
|
import { notifyOpWave } from "../../op/op-waves-notify.js";
|
|
8
|
-
import { parseOpWavesSpec, recordOpWaveHeadPlans, runOpWave } from "../../op/op-waves-run.js";
|
|
8
|
+
import { gitShowAtBase, parseOpWavesSpec, recordOpWaveHeadPlans, runOpWave } from "../../op/op-waves-run.js";
|
|
9
9
|
import { activeProductWaveHook } from "../../op/op-waves-after-plan.js";
|
|
10
10
|
import { formatError, formatWarning } from "../format.js";
|
|
11
11
|
import { ledgerRecordingOff, NO_RECORD_ENV, noRecordEndNote, noRecordStartNote, resetNoRecordLedger } from "../../lifecycle/no-record.js";
|
|
12
|
+
import { waveStopLine } from "../../op/wave-stop.js";
|
|
13
|
+
import { CHANT_EXIT } from "../../exit-codes.js";
|
|
12
14
|
/**
|
|
13
15
|
* `chant run wave`, with recording off under `--no-record` or
|
|
14
16
|
* `CHANT_NO_RECORD` (#4551), as `chant run` does (`./run.ts`): the flag sets
|
|
@@ -95,6 +97,10 @@ async function runOpWaveJobCommand(ctx) {
|
|
|
95
97
|
console.error(formatError({ message: `--decide and --${args.share !== undefined ? "share" : "group"} are two different jobs; pass one` }));
|
|
96
98
|
return 1;
|
|
97
99
|
}
|
|
100
|
+
if (args.policyOnly && (args.share !== undefined || args.group !== undefined)) {
|
|
101
|
+
console.error(formatError({ message: `--policy-only runs a wave's policy in its own or its deciding job; a --${args.share !== undefined ? "share" : "group"} job has none of its own` }));
|
|
102
|
+
return 1;
|
|
103
|
+
}
|
|
98
104
|
let spec;
|
|
99
105
|
const job = { ...(args.share !== undefined ? { share: args.share } : {}), ...(args.group !== undefined ? { group: args.group } : {}) };
|
|
100
106
|
if (args.eventsJson && args.json) {
|
|
@@ -103,7 +109,30 @@ async function runOpWaveJobCommand(ctx) {
|
|
|
103
109
|
}
|
|
104
110
|
try {
|
|
105
111
|
const path = resolve(specFile);
|
|
106
|
-
spec
|
|
112
|
+
// #4982: --render-spec has the product's command print the spec at base, and reads the rules from it there too.
|
|
113
|
+
let show;
|
|
114
|
+
if (args.renderSpec) {
|
|
115
|
+
const at = await import("../../op/op-waves-render-spec.js");
|
|
116
|
+
const file = relative(process.cwd(), path);
|
|
117
|
+
show = at.renderedSpecShow(file, at.commandSpecRender(at.opWavesSpecCommandFromEnv(), file, process.cwd()), gitShowAtBase);
|
|
118
|
+
spec = at.renderOpWavesSpecFile({ specFile: file, base: args.base ?? "HEAD^1", cwd: process.cwd(), show, parse: parseOpWavesSpec }).spec;
|
|
119
|
+
const missing = at.renderedJobMissing(spec, args.wave, job);
|
|
120
|
+
if (missing) {
|
|
121
|
+
console.error(`${missing}, so this job has nothing to apply`);
|
|
122
|
+
return 0;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
spec = parseOpWavesSpec(readFileSync(path, "utf-8"), `--spec ${specFile}`);
|
|
127
|
+
}
|
|
128
|
+
// #4979: a comment that ran the apply again through wave n leaves the waves after it waiting, as a gate does.
|
|
129
|
+
if (!args.policyOnly) {
|
|
130
|
+
const stopped = await waveStopLine(spec.name, args.wave);
|
|
131
|
+
if (stopped) {
|
|
132
|
+
console.error(stopped);
|
|
133
|
+
return CHANT_EXIT.waiting;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
107
136
|
// #4555: --events-json streams the job's run events, a phase per wave and a step per run target.
|
|
108
137
|
const stream = args.eventsJson
|
|
109
138
|
? await (await import("../run-events.js")).openCliRunEvents(args, { kind: "op", name: spec.name, cwd: process.cwd() })
|
|
@@ -120,12 +149,17 @@ async function runOpWaveJobCommand(ctx) {
|
|
|
120
149
|
specFile: relative(process.cwd(), path),
|
|
121
150
|
wave: args.wave,
|
|
122
151
|
...(args.decide ? { decide: true } : {}),
|
|
152
|
+
...(args.policyOnly ? { policyOnly: true } : {}),
|
|
123
153
|
...(args.share !== undefined ? { share: args.share } : {}),
|
|
124
154
|
...(args.group !== undefined ? { group: args.group } : {}),
|
|
125
155
|
...(args.base ? { base: args.base } : {}),
|
|
156
|
+
...(show ? { show } : {}),
|
|
126
157
|
});
|
|
127
158
|
if (args.json)
|
|
128
159
|
console.log(JSON.stringify(result, null, 2));
|
|
160
|
+
// #4926: the policy step applied nothing; the wave's own step tells people how it went.
|
|
161
|
+
if (args.policyOnly)
|
|
162
|
+
return result.exitCode;
|
|
129
163
|
// #3761: tell people, when the spec says where. Delivery never changes the exit code.
|
|
130
164
|
await notifyOpWave(spec, args.wave, { result }, job);
|
|
131
165
|
// #4629: a refused wave's diff and a failed apply's triage, on the pull request or a tracking issue.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/run.ts"],"names":[],"mappings":"AAOA,OAAO,EAAmB,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAEhE,OAAO,EAAkD,KAAK,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAI1G,OAAO,KAAK,EAAqB,WAAW,EAAe,MAAM,kBAAkB,CAAC;AAMpF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CA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BAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAW7G;AAsCD;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAEnE;AA0PD,wBAAgB,YAAY,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAMjE;AAKD;;;;;;;;;GASG;AACH,wBAAsB,YAAY,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,CAAC,CAAC,MAAM,EAAE,WAAW,KAAK,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC,CAkCpJ"}
|
package/dist/cli/handlers/run.js
CHANGED
|
@@ -36,6 +36,7 @@ import { adoptionReview, loadDeployAdoption } from "../../components/adoption.js
|
|
|
36
36
|
import { isApplyRecord, resolveCiRun } from "../../lifecycle/release-ledger.js";
|
|
37
37
|
import { gateAdmission, gateApprover } from "../../components/promote.js";
|
|
38
38
|
import { runOpGenerate } from "./run-generate.js";
|
|
39
|
+
import { actorFromEnv } from "../../actor.js";
|
|
39
40
|
/**
|
|
40
41
|
* The exit code a run that stopped at an unapproved gate uses (#2119).
|
|
41
42
|
* Deliberately not 1: a gate is a standing fact waiting on a human, and a CI
|
|
@@ -1014,7 +1015,7 @@ export async function recordSkips(skipped, releaseDigest, run, cwd) {
|
|
|
1014
1015
|
const fresh = [...skipped.values()].filter((v) => !v.recorded);
|
|
1015
1016
|
if (fresh.length === 0)
|
|
1016
1017
|
return [];
|
|
1017
|
-
const actor = process.env
|
|
1018
|
+
const actor = actorFromEnv(process.env, "");
|
|
1018
1019
|
if (!actor) {
|
|
1019
1020
|
console.error(formatWarning({ message: `the skips of ${fresh.map((v) => v.since.component).join(", ")} were not recorded: no actor (GITHUB_ACTOR, GITLAB_USER_LOGIN or USER)` }));
|
|
1020
1021
|
return [];
|
package/dist/cli/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":";AAEA,OAAO,EAAoB,KAAK,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAItG,OAAO,EAAkB,KAAK,UAAU,EAAmB,MAAM,YAAY,CAAC;AAa9E,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAgB,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAG3D,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":";AAEA,OAAO,EAAoB,KAAK,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAItG,OAAO,EAAkB,KAAK,UAAU,EAAmB,MAAM,YAAY,CAAC;AAa9E,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAgB,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAG3D,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;AA+yDzC;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,mBAAmB,GAAG,cAAc,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,qBAAqB,EAAE,cAAc,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,2BAA2B,EAAE,eAAe,CAAA;CAAO,GAC7K,OAAO,CAAC,MAAM,CAAC,CAuCjB;AAID;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAAE,UAAU,EA0RvC,CAAC"}
|
package/dist/cli/main.js
CHANGED
|
@@ -254,18 +254,30 @@ E2E harness:
|
|
|
254
254
|
CLEAN, or the rejecting lines and exits 3.
|
|
255
255
|
|
|
256
256
|
CI:
|
|
257
|
-
ci check --base <rev> [<target>...] [--output <dir>] [--json]
|
|
257
|
+
ci check [--base <rev>] [<target>...] [--output <dir>] [--summary <file>] [--json]
|
|
258
258
|
Run the ci.hooks.check hooks the workspace declaration
|
|
259
259
|
at --base names, once each, or once per target with
|
|
260
260
|
perRun, with no forge token or cloud credentials in
|
|
261
261
|
their environment. Writes check-hooks.json under
|
|
262
|
-
--output (default .chant/check)
|
|
262
|
+
--output (default .chant/check), and with --summary
|
|
263
|
+
appends the report's markdown section to the file;
|
|
264
|
+
exits 1 when one failed. With no --base, a pull
|
|
265
|
+
request's target branch, else origin/<default> for a
|
|
266
|
+
push to another branch (--branch names the default
|
|
267
|
+
branch where the job does not).
|
|
263
268
|
ci evidence sign --check-id <id>[,<id>...] [--at <rev>] [--base <rev>] [--no-push]
|
|
264
269
|
Sign that each named check passed at --at, with the
|
|
265
270
|
runner key in CHANT_RUNNER_KEY or --key, and keep it on
|
|
266
271
|
chant/lifecycle by the commit's tree. With --from-report
|
|
267
272
|
<dir> --result <result>, sign plan and policy from the
|
|
268
273
|
plan job's report, as a generated plan note job does.
|
|
274
|
+
With --open --job <job> --from-report <dir> -o <out>,
|
|
275
|
+
in a GitLab pipeline of the target branch, sign each
|
|
276
|
+
open merge request's settled <job> from its artifact.
|
|
277
|
+
With --from-job <job> [--claims <dir>], sign each
|
|
278
|
+
named check whose step in that job of this run and
|
|
279
|
+
commit the forge reports as passed, as a wave's
|
|
280
|
+
evidence job does (#4926).
|
|
269
281
|
ci evidence verify --check-id <id>[,<id>...] [--at <rev>] [--base <rev>] [--json]
|
|
270
282
|
Verify the kept evidence for --at's tree against the
|
|
271
283
|
runner keys at --base; exits 1 when one is not current.
|
|
@@ -274,12 +286,13 @@ CI:
|
|
|
274
286
|
expectation in CHANT_JOB_GUARD, which a generated
|
|
275
287
|
op-wave job carries. Exits 1, one line per value
|
|
276
288
|
that differs, before any credential is taken.
|
|
277
|
-
ci forge-check [--env <env>] [--member <name>] [--forge <forge>] [--repo <owner/name>] [--branch <default>] [--require-clouds] [--json]
|
|
289
|
+
ci forge-check [--env <env>] [--member <name>] [--forge <forge>] [--repo <owner/name>] [--branch <default>] [--require-clouds] [--ref-gate-status] [--json]
|
|
278
290
|
Read the forge, each cloud's trust policy and Pulumi
|
|
279
291
|
Cloud's OIDC policies against the pipelines
|
|
280
292
|
ci.identity.cloud gives --env (default production):
|
|
281
293
|
apply environments, branch protection, required
|
|
282
294
|
statuses, and each identity trusted to its own jobs.
|
|
295
|
+
--ref-gate-status requires the ref gate's status too.
|
|
283
296
|
Read-only; exits 1 on a mismatch, and with
|
|
284
297
|
--require-clouds on a cloud it had no credentials for.
|
|
285
298
|
ci last-green [--json] [--lane <name>] [--from <rev>] The newest first-parent commit of
|
|
@@ -585,6 +598,14 @@ Ops:
|
|
|
585
598
|
pipeline runs. --decide plans and decides only;
|
|
586
599
|
--share <i> applies one share of a decided wave;
|
|
587
600
|
--group <name> applies one job group's runs.
|
|
601
|
+
--policy-only plans the wave and runs its policy
|
|
602
|
+
hold, applying nothing, and exits 0 only when the
|
|
603
|
+
policy ran and denied nothing: the wave job's
|
|
604
|
+
policy step, whose result its evidence job reads (#4926).
|
|
605
|
+
--render-spec runs the command CHANT_WAVES_SPEC_COMMAND
|
|
606
|
+
names (a JSON argv) with CHANT_WAVES_SPEC_AT set to
|
|
607
|
+
the base, writes the spec it prints over --spec, and
|
|
608
|
+
reads the rules at base from it (#4982).
|
|
588
609
|
--record-plans (no --wave), in a pull request's
|
|
589
610
|
pipeline: plan every wave at its head and record the
|
|
590
611
|
digests a pr-review approval mode compares.
|
|
@@ -749,6 +770,8 @@ Ops:
|
|
|
749
770
|
(--pr <n>, --stage plan|apply|lock, --head <sha>,
|
|
750
771
|
--by <who>, --gate <name>, --json). --from-report
|
|
751
772
|
<pr-plan.json> locks the components a plan selected.
|
|
773
|
+
--reach locks what the line in CHANT_LOCK_REACH prints
|
|
774
|
+
for --base..--head (--open: every open merge request).
|
|
752
775
|
--forge <kind> reads which holders are still open and
|
|
753
776
|
posts chant/lock on --head. Exits 3 when another open
|
|
754
777
|
pull request holds a target. --list prints the locks
|
|
@@ -1044,7 +1067,8 @@ Workspace (level 1, #2524):
|
|
|
1044
1067
|
workspace ref-gate check|status --ref <ref> [--at <rev>] [--base <rev>] [--json]
|
|
1045
1068
|
Decide a ref update against the checks .chant/trust.json
|
|
1046
1069
|
at base requires for the ref; status sets the commit
|
|
1047
|
-
status a forge requires
|
|
1070
|
+
status a forge requires; status --open sets it on
|
|
1071
|
+
every open pull request into the branch (#4935)
|
|
1048
1072
|
workspace ref-gate install --hook pre-receive|pre-push [--git-dir <dir>]
|
|
1049
1073
|
Write the git hook that refuses an update whose commit
|
|
1050
1074
|
lacks current evidence for a blocking check
|
|
@@ -1322,6 +1346,12 @@ Component release ledger + status:
|
|
|
1322
1346
|
[--preview-comment] [--apply-before-merge]
|
|
1323
1347
|
[--apply-on-merge] [--locks]); each answered
|
|
1324
1348
|
note is recorded on chant/lifecycle
|
|
1349
|
+
components pr-comment GitHub and Forgejo (#4946): answer a comment
|
|
1350
|
+
command no other job of the pipeline takes:
|
|
1351
|
+
a refusal, a command the pipeline runs no job
|
|
1352
|
+
for, or a merged pull request's apply run
|
|
1353
|
+
again (--forge github|forgejo [--branch <b>];
|
|
1354
|
+
the jobs from CHANT_COMMENT_JOBS)
|
|
1325
1355
|
components pr-record On merge (#4168): plan the same members again,
|
|
1326
1356
|
store the change set and write the merge record
|
|
1327
1357
|
_merges/<commit>.json; applies and refuses
|
|
@@ -1463,6 +1493,17 @@ Lexicon development:
|
|
|
1463
1493
|
Check a bundle against its package.json chantBundleCheck: imports
|
|
1464
1494
|
only Node, its dependencies and chant served as compiled JS, the
|
|
1465
1495
|
dependencies on the root's chant pin, size ceilings, denied inputs
|
|
1496
|
+
dev local-image [--with <package>]... [-- <docker build args>]
|
|
1497
|
+
Print the chant an image installs (the pin, or local-<commit>
|
|
1498
|
+
after dev local), or run docker build with CHANT_VERSION and,
|
|
1499
|
+
for a local build, the chant-local build context
|
|
1500
|
+
dev generated-check [<render>...]
|
|
1501
|
+
Render the files package.json's chantGenerated declares into a
|
|
1502
|
+
directory under the OS temp dir, compare each with the committed
|
|
1503
|
+
file, and fail naming the ones that drifted
|
|
1504
|
+
dev render <module> <export> [--output <root>]
|
|
1505
|
+
Import the module and write the { path: text } files its export
|
|
1506
|
+
returns below the root (the working directory by default)
|
|
1466
1507
|
dev dead-guards [<product-dir>]
|
|
1467
1508
|
Fail naming each feature-detect on a chant floor (a floor read off
|
|
1468
1509
|
a lazily loaded module, a subpath loaded behind a catch, the
|
|
@@ -1568,6 +1609,15 @@ Options:
|
|
|
1568
1609
|
apply on merge tells it. With --control-setting
|
|
1569
1610
|
<key>=<value> (repeatable) for op, member,
|
|
1570
1611
|
readTokenSecret and the other control settings
|
|
1612
|
+
--evidence-runner-key-secret <NAME>, --evidence-identity oidc [--evidence-audience <aud>]
|
|
1613
|
+
(build --pr-loop) The runner identity the note job
|
|
1614
|
+
signs plan and policy with (#4935)
|
|
1615
|
+
--check-job (build --pr-loop) A check job that runs ci check on
|
|
1616
|
+
the pull request's commit, and with evidence a job
|
|
1617
|
+
that signs each passed hook (#4935)
|
|
1618
|
+
--ref-gate-status (build --pr-loop) A job that sets the ref gate's
|
|
1619
|
+
status on the pull request's commit (#4935); (ci
|
|
1620
|
+
forge-check) the default branch requires it (#4913)
|
|
1571
1621
|
--no-release-record Skip auto-emitting a release-ledger record after a
|
|
1572
1622
|
successful \`run --components\` deploy (default: on;
|
|
1573
1623
|
also settable via chant.config.ts's
|
|
@@ -1964,6 +2014,10 @@ export const commandRegistry = [
|
|
|
1964
2014
|
// #4787: build a product against a chant checkout, and check its bundle. Imported on first use.
|
|
1965
2015
|
{ name: "dev local", runsNoConfig: true, handler: async (ctx) => (await import("./handlers/local-chant.js")).runDevLocal(ctx) },
|
|
1966
2016
|
{ name: "dev bundle-check", runsNoConfig: true, handler: async (ctx) => (await import("./handlers/local-chant.js")).runDevBundleCheck(ctx) },
|
|
2017
|
+
{ name: "dev local-image", runsNoConfig: true, handler: async (ctx) => (await import("./handlers/local-chant.js")).runDevLocalImage(ctx) },
|
|
2018
|
+
{ name: "dev generated-check", runsNoConfig: true, handler: async (ctx) => (await import("./handlers/generated-check.js")).runDevGeneratedCheck(ctx) },
|
|
2019
|
+
// #4950: a module's { path: text } export, written in place.
|
|
2020
|
+
{ name: "dev render", runsNoConfig: true, handler: async (ctx) => (await import("./handlers/generated-check.js")).runDevRender(ctx) },
|
|
1967
2021
|
// #4792: the feature-detects on a chant floor the product's pin already meets.
|
|
1968
2022
|
{ name: "dev dead-guards", runsNoConfig: true, handler: async (ctx) => (await import("./handlers/dead-guards.js")).runDevDeadGuards(ctx) },
|
|
1969
2023
|
// Op / run subcommands
|
|
@@ -2095,6 +2149,8 @@ export const commandRegistry = [
|
|
|
2095
2149
|
{ name: "components pr-post", handler: async (ctx) => (await import("./handlers/pr.js")).runComponentsPrPost(ctx) },
|
|
2096
2150
|
// #4785: GitLab's comment commands, polled from the notes in a job that runs none of the change's code, so it loads no plugins.
|
|
2097
2151
|
{ name: "components pr-notes", handler: async (ctx) => (await import("./handlers/pr-notes.js")).runComponentsPrNotes(ctx) },
|
|
2152
|
+
// #4946: GitHub's and Forgejo's comment job, at the target branch's commit, so it loads no plugins.
|
|
2153
|
+
{ name: "components pr-comment", handler: async (ctx) => (await import("./handlers/pr-comment.js")).runComponentsPrComment(ctx) },
|
|
2098
2154
|
{ name: "components pr-record", requiresPlugins: true, handler: async (ctx) => (await import("./handlers/pr.js")).runComponentsPrRecord(ctx) },
|
|
2099
2155
|
// #4616: the agent jobs' three steps. Imported on first use; none loads plugins.
|
|
2100
2156
|
{ name: "agent prepare", handler: async (ctx) => (await import("./handlers/agent.js")).runAgentCommandLine(ctx) },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-args.d.ts","sourceRoot":"","sources":["../../src/cli/parse-args.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"parse-args.d.ts","sourceRoot":"","sources":["../../src/cli/parse-args.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAkH7C;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,CAsyCpD"}
|