@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
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A wave stop on a re-run (#4979): `/<product> apply wave-<n>` on a merged
|
|
3
|
+
* pull request runs its apply again and stops after wave n.
|
|
4
|
+
*
|
|
5
|
+
* A forge re-run cannot be told where to stop: GitHub's re-run of a run's
|
|
6
|
+
* failed jobs runs every job after them, Forgejo's dispatch runs the whole
|
|
7
|
+
* workflow, and GitLab runs the jobs after a retried one by itself. So the
|
|
8
|
+
* comment's job writes the stop on `chant/lifecycle` before it starts the
|
|
9
|
+
* run, `_waves/<op>.stops.json`, keyed by the commit the run applies, and
|
|
10
|
+
* each wave job of op `<op>` at that commit reads it before it plans: a wave
|
|
11
|
+
* after the stop waits, as a wave whose gate has no approval waits (exit 3),
|
|
12
|
+
* so a later `/<product> apply` runs it. An apply comment without a wave
|
|
13
|
+
* clears the commit's stop. The newest {@link WAVE_STOPS_KEPT} stops are
|
|
14
|
+
* kept.
|
|
15
|
+
*/
|
|
16
|
+
import { fetchLifecycleStatus, getHeadCommit, pushLifecycleStatus, readBlobBySha, readPathSha, writeBlobToPath } from "../lifecycle/git.js";
|
|
17
|
+
/** The directory of the stops on `chant/lifecycle`. */
|
|
18
|
+
export const WAVE_STOPS_DIR = "_waves";
|
|
19
|
+
/** How many commits' stops the file keeps. */
|
|
20
|
+
export const WAVE_STOPS_KEPT = 50;
|
|
21
|
+
/** The stops file of op `op`. */
|
|
22
|
+
export function waveStopsFile(op) {
|
|
23
|
+
return `${op}.stops.json`;
|
|
24
|
+
}
|
|
25
|
+
const SHA = /^(?:[0-9a-f]{40}|[0-9a-f]{64})$/;
|
|
26
|
+
const OP = /^[A-Za-z0-9][A-Za-z0-9_.-]{0,127}$/;
|
|
27
|
+
/** Read a stops file; anything that is not one reads as no stops, and a malformed entry is dropped. */
|
|
28
|
+
export function parseWaveStops(text) {
|
|
29
|
+
let doc;
|
|
30
|
+
try {
|
|
31
|
+
doc = JSON.parse(text ?? "null");
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
return { version: 1, stops: {} };
|
|
35
|
+
}
|
|
36
|
+
const stops = {};
|
|
37
|
+
const given = doc && typeof doc === "object" && doc.version === 1 ? doc.stops : undefined;
|
|
38
|
+
if (given && typeof given === "object") {
|
|
39
|
+
for (const [sha, s] of Object.entries(given)) {
|
|
40
|
+
const v = s;
|
|
41
|
+
if (!SHA.test(sha) || !v || !Number.isInteger(v.through) || v.through < 1 || typeof v.at !== "string")
|
|
42
|
+
continue;
|
|
43
|
+
stops[sha] = { through: v.through, at: v.at, ...(typeof v.by === "string" ? { by: v.by } : {}), ...(Number.isInteger(v.pr) ? { pr: v.pr } : {}) };
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return { version: 1, stops };
|
|
47
|
+
}
|
|
48
|
+
/** The file's text: the newest {@link WAVE_STOPS_KEPT} stops, by commit. */
|
|
49
|
+
export function renderWaveStops(file) {
|
|
50
|
+
const newest = Object.entries(file.stops).sort((a, b) => b[1].at.localeCompare(a[1].at)).slice(0, WAVE_STOPS_KEPT);
|
|
51
|
+
return `${JSON.stringify({ version: 1, stops: Object.fromEntries(newest.sort((a, b) => a[0].localeCompare(b[0]))) }, null, 2)}\n`;
|
|
52
|
+
}
|
|
53
|
+
/** Whether wave `k` waits under `stop`. */
|
|
54
|
+
export function waveStopped(stop, k) {
|
|
55
|
+
return stop !== undefined && k > stop.through;
|
|
56
|
+
}
|
|
57
|
+
/** The stop of op `op` at commit `sha`, from the local `chant/lifecycle` after a fetch. Undefined when there is none or the branch cannot be read. */
|
|
58
|
+
export async function waveStopAt(op, sha, opts = {}) {
|
|
59
|
+
if (!OP.test(op) || !SHA.test(sha))
|
|
60
|
+
return undefined;
|
|
61
|
+
await fetchLifecycleStatus(opts);
|
|
62
|
+
const blob = await readPathSha(WAVE_STOPS_DIR, waveStopsFile(op), opts);
|
|
63
|
+
if (!blob)
|
|
64
|
+
return undefined;
|
|
65
|
+
return parseWaveStops(await readBlobBySha(blob, opts)).stops[sha];
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* What a wave job of op `op` says when wave `k` waits behind a comment's
|
|
69
|
+
* stop at the job's checkout (`git rev-parse HEAD`). Undefined when it runs:
|
|
70
|
+
* no stop, no commit to read, or a branch that cannot be read, so a stop
|
|
71
|
+
* never fails a wave that would have run.
|
|
72
|
+
*/
|
|
73
|
+
export async function waveStopLine(op, k, opts = {}) {
|
|
74
|
+
let sha;
|
|
75
|
+
try {
|
|
76
|
+
sha = await getHeadCommit(opts);
|
|
77
|
+
}
|
|
78
|
+
catch {
|
|
79
|
+
return undefined;
|
|
80
|
+
}
|
|
81
|
+
let stop;
|
|
82
|
+
try {
|
|
83
|
+
stop = await waveStopAt(op, sha, opts);
|
|
84
|
+
}
|
|
85
|
+
catch {
|
|
86
|
+
return undefined;
|
|
87
|
+
}
|
|
88
|
+
if (!waveStopped(stop, k))
|
|
89
|
+
return undefined;
|
|
90
|
+
const who = stop.by ? `${stop.by}'s` : "a";
|
|
91
|
+
const where = stop.pr !== undefined ? ` on pull request ${stop.pr}` : "";
|
|
92
|
+
return `wave ${k} waits: ${who} comment${where} ran ${op} again at ${sha.slice(0, 12)} through wave ${stop.through}; comment the apply again without a wave to run the waves after it`;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Set op `op`'s stop at commit `sha`, or clear it (`stop` null), and push
|
|
96
|
+
* `chant/lifecycle`. Read, written and pushed again when another writer
|
|
97
|
+
* pushed first, up to three times.
|
|
98
|
+
*/
|
|
99
|
+
export async function setWaveStop(op, sha, stop, opts = {}) {
|
|
100
|
+
if (!OP.test(op))
|
|
101
|
+
throw new Error(`the op name ${JSON.stringify(op)} is not a stops file name`);
|
|
102
|
+
if (!SHA.test(sha))
|
|
103
|
+
throw new Error(`${JSON.stringify(sha)} is not a commit sha`);
|
|
104
|
+
for (let attempt = 1; attempt <= 3; attempt++) {
|
|
105
|
+
const fetched = await fetchLifecycleStatus(opts);
|
|
106
|
+
if (fetched.status === "unreachable")
|
|
107
|
+
throw new Error("chant/lifecycle could not be fetched, so the stop was not written");
|
|
108
|
+
const blob = await readPathSha(WAVE_STOPS_DIR, waveStopsFile(op), opts);
|
|
109
|
+
const file = parseWaveStops(blob ? await readBlobBySha(blob, opts) : null);
|
|
110
|
+
const next = { version: 1, stops: { ...file.stops } };
|
|
111
|
+
if (stop)
|
|
112
|
+
next.stops[sha] = stop;
|
|
113
|
+
else
|
|
114
|
+
delete next.stops[sha];
|
|
115
|
+
if (renderWaveStops(next) === renderWaveStops(file))
|
|
116
|
+
return { changed: false, pushed: false };
|
|
117
|
+
const what = stop ? `Stop ${op} after wave ${stop.through} at ${sha.slice(0, 12)}` : `Clear the stop of ${op} at ${sha.slice(0, 12)}`;
|
|
118
|
+
await writeBlobToPath(WAVE_STOPS_DIR, waveStopsFile(op), renderWaveStops(next), what, { ...opts, expectPriorPathSha: blob });
|
|
119
|
+
const pushed = await pushLifecycleStatus(opts);
|
|
120
|
+
if (pushed.status === "stale")
|
|
121
|
+
continue;
|
|
122
|
+
if (pushed.status === "failed")
|
|
123
|
+
throw new Error(`could not push the stop to chant/lifecycle (${pushed.stderr.trim()})`);
|
|
124
|
+
return { changed: true, pushed: pushed.status === "pushed" };
|
|
125
|
+
}
|
|
126
|
+
throw new Error("chant/lifecycle kept moving, so the stop was not written; comment again");
|
|
127
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@intentius/chant/planned-files` (#4966): the files a product's init or
|
|
3
|
+
* render plans, written in one call, and the generated files it no longer
|
|
4
|
+
* renders.
|
|
5
|
+
*
|
|
6
|
+
* Each product carried its own: terragucci's `init.ts` plans a
|
|
7
|
+
* `FileChange` per file and writes or unlinks them in a loop, with a
|
|
8
|
+
* `chmodSync` beside its image recipe's writes; plywood's `init.ts` `put`
|
|
9
|
+
* writes a file when it differs; sql-yodeler's `yodel ci` finds the
|
|
10
|
+
* pipeline files that open with its header and removes the ones it no
|
|
11
|
+
* longer renders (its #348).
|
|
12
|
+
*
|
|
13
|
+
* - {@link planFile} plans one file against what is on disk, its mode
|
|
14
|
+
* included, and writes nothing, so a dry run prints the plan as it is.
|
|
15
|
+
* - {@link planRemoval} plans the removal of a file an earlier run wrote.
|
|
16
|
+
* - {@link writePlannedFiles} writes the plan: each directory made, each
|
|
17
|
+
* file's mode set, each removed file unlinked, an unchanged one left as
|
|
18
|
+
* it is.
|
|
19
|
+
* - {@link staleGeneratedFiles} lists the files under some directories that
|
|
20
|
+
* open with a product's header and that the product no longer renders.
|
|
21
|
+
*
|
|
22
|
+
* `@intentius/chant/ref-gate-init` writes its plan with
|
|
23
|
+
* {@link writePlannedFiles}.
|
|
24
|
+
*
|
|
25
|
+
* This module imports only Node's own modules.
|
|
26
|
+
*/
|
|
27
|
+
/** One planned file. */
|
|
28
|
+
export interface PlannedFile {
|
|
29
|
+
/** Where it is written. Absolute, or relative to the process's directory. */
|
|
30
|
+
path: string;
|
|
31
|
+
/** `removed`: a file an earlier run wrote that this one no longer asks for. */
|
|
32
|
+
status: "created" | "updated" | "unchanged" | "removed";
|
|
33
|
+
/** The text to write; empty for a removal. */
|
|
34
|
+
content: string;
|
|
35
|
+
/** The permission bits to set, such as `0o755` for a script. Unset, a new file gets the process's default and an existing one keeps its own. */
|
|
36
|
+
mode?: number;
|
|
37
|
+
/** In the git directory or otherwise never committed, such as a hook. */
|
|
38
|
+
local?: boolean;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Plan `content` at `path`: `created` when there is no file, `unchanged`
|
|
42
|
+
* when the file holds the content (and, with `mode`, has that mode),
|
|
43
|
+
* `updated` otherwise. Writes nothing.
|
|
44
|
+
*/
|
|
45
|
+
export declare function planFile(path: string, content: string, extra?: Pick<PlannedFile, "mode" | "local">): PlannedFile;
|
|
46
|
+
/** Plan the removal of the file at `path`; undefined when there is nothing there to remove. */
|
|
47
|
+
export declare function planRemoval(path: string): PlannedFile | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Write a plan: each created or updated file written, its directory made
|
|
50
|
+
* and its mode set; each removed file unlinked; an unchanged file not
|
|
51
|
+
* touched. A removed file that is already gone is not an error.
|
|
52
|
+
*/
|
|
53
|
+
export declare function writePlannedFiles(files: readonly Pick<PlannedFile, "path" | "status" | "content" | "mode">[]): void;
|
|
54
|
+
export interface StaleGeneratedOptions {
|
|
55
|
+
/** The directory the paths are relative to: a product's checkout. */
|
|
56
|
+
root: string;
|
|
57
|
+
/** Directories, relative to `root`, whose files (not their subdirectories) may be generated. */
|
|
58
|
+
dirs?: readonly string[];
|
|
59
|
+
/** Single files, relative to `root`, that may be generated, such as `.gitlab-ci.yml`. */
|
|
60
|
+
files?: readonly string[];
|
|
61
|
+
/** The names in `dirs` to look at. Default every file. */
|
|
62
|
+
match?: RegExp;
|
|
63
|
+
/** The product's header: its first line, which a generated file opens with, or a test of the file's text. */
|
|
64
|
+
header: string | ((text: string) => boolean);
|
|
65
|
+
/** The paths, relative to `root` and written with `/`, the product renders now. */
|
|
66
|
+
rendered: Iterable<string>;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* The files under `dirs` and among `files` that open with the product's
|
|
70
|
+
* header and that it does not render now, relative to `root`, in the order
|
|
71
|
+
* found (each directory's names sorted). A file without the header is the
|
|
72
|
+
* person's own and never listed.
|
|
73
|
+
*/
|
|
74
|
+
export declare function staleGeneratedFiles(options: StaleGeneratedOptions): string[];
|
|
75
|
+
export { PLANNED_FILES_FLOOR } from "./release-floors.js";
|
|
76
|
+
//# sourceMappingURL=planned-files.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"planned-files.d.ts","sourceRoot":"","sources":["../src/planned-files.ts"],"names":[],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gB,mBAAmB,CAAC,OAAO,EAAE,qBAAqB,GAAG,MAAM,EAAE,CAsB5E;AAED,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@intentius/chant/planned-files` (#4966): the files a product's init or
|
|
3
|
+
* render plans, written in one call, and the generated files it no longer
|
|
4
|
+
* renders.
|
|
5
|
+
*
|
|
6
|
+
* Each product carried its own: terragucci's `init.ts` plans a
|
|
7
|
+
* `FileChange` per file and writes or unlinks them in a loop, with a
|
|
8
|
+
* `chmodSync` beside its image recipe's writes; plywood's `init.ts` `put`
|
|
9
|
+
* writes a file when it differs; sql-yodeler's `yodel ci` finds the
|
|
10
|
+
* pipeline files that open with its header and removes the ones it no
|
|
11
|
+
* longer renders (its #348).
|
|
12
|
+
*
|
|
13
|
+
* - {@link planFile} plans one file against what is on disk, its mode
|
|
14
|
+
* included, and writes nothing, so a dry run prints the plan as it is.
|
|
15
|
+
* - {@link planRemoval} plans the removal of a file an earlier run wrote.
|
|
16
|
+
* - {@link writePlannedFiles} writes the plan: each directory made, each
|
|
17
|
+
* file's mode set, each removed file unlinked, an unchanged one left as
|
|
18
|
+
* it is.
|
|
19
|
+
* - {@link staleGeneratedFiles} lists the files under some directories that
|
|
20
|
+
* open with a product's header and that the product no longer renders.
|
|
21
|
+
*
|
|
22
|
+
* `@intentius/chant/ref-gate-init` writes its plan with
|
|
23
|
+
* {@link writePlannedFiles}.
|
|
24
|
+
*
|
|
25
|
+
* This module imports only Node's own modules.
|
|
26
|
+
*/
|
|
27
|
+
import { chmodSync, existsSync, mkdirSync, readdirSync, readFileSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
28
|
+
import { dirname, join } from "node:path";
|
|
29
|
+
/** The permission bits of the file at `path`, or undefined when there is none. */
|
|
30
|
+
function modeOf(path) {
|
|
31
|
+
try {
|
|
32
|
+
return statSync(path).mode & 0o777;
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Plan `content` at `path`: `created` when there is no file, `unchanged`
|
|
40
|
+
* when the file holds the content (and, with `mode`, has that mode),
|
|
41
|
+
* `updated` otherwise. Writes nothing.
|
|
42
|
+
*/
|
|
43
|
+
export function planFile(path, content, extra = {}) {
|
|
44
|
+
const own = { ...(extra.mode !== undefined ? { mode: extra.mode } : {}), ...(extra.local ? { local: true } : {}) };
|
|
45
|
+
if (!existsSync(path))
|
|
46
|
+
return { path, status: "created", content, ...own };
|
|
47
|
+
const same = readFileSync(path, "utf-8") === content && (extra.mode === undefined || modeOf(path) === extra.mode);
|
|
48
|
+
return { path, status: same ? "unchanged" : "updated", content, ...own };
|
|
49
|
+
}
|
|
50
|
+
/** Plan the removal of the file at `path`; undefined when there is nothing there to remove. */
|
|
51
|
+
export function planRemoval(path) {
|
|
52
|
+
return existsSync(path) ? { path, status: "removed", content: "" } : undefined;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Write a plan: each created or updated file written, its directory made
|
|
56
|
+
* and its mode set; each removed file unlinked; an unchanged file not
|
|
57
|
+
* touched. A removed file that is already gone is not an error.
|
|
58
|
+
*/
|
|
59
|
+
export function writePlannedFiles(files) {
|
|
60
|
+
for (const f of files) {
|
|
61
|
+
if (f.status === "unchanged")
|
|
62
|
+
continue;
|
|
63
|
+
if (f.status === "removed") {
|
|
64
|
+
if (existsSync(f.path))
|
|
65
|
+
unlinkSync(f.path);
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
mkdirSync(dirname(f.path), { recursive: true });
|
|
69
|
+
writeFileSync(f.path, f.content);
|
|
70
|
+
if (f.mode !== undefined)
|
|
71
|
+
chmodSync(f.path, f.mode);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* The files under `dirs` and among `files` that open with the product's
|
|
76
|
+
* header and that it does not render now, relative to `root`, in the order
|
|
77
|
+
* found (each directory's names sorted). A file without the header is the
|
|
78
|
+
* person's own and never listed.
|
|
79
|
+
*/
|
|
80
|
+
export function staleGeneratedFiles(options) {
|
|
81
|
+
const { root } = options;
|
|
82
|
+
const header = options.header;
|
|
83
|
+
const isGenerated = typeof header === "string" ? (text) => text.split(/\r?\n/, 1)[0] === header : header;
|
|
84
|
+
const candidates = [...(options.files ?? [])];
|
|
85
|
+
for (const d of options.dirs ?? []) {
|
|
86
|
+
const abs = join(root, d);
|
|
87
|
+
if (!existsSync(abs))
|
|
88
|
+
continue;
|
|
89
|
+
const prefix = d.replace(/\/+$/, "");
|
|
90
|
+
for (const e of readdirSync(abs, { withFileTypes: true }).sort((a, b) => (a.name < b.name ? -1 : a.name > b.name ? 1 : 0))) {
|
|
91
|
+
if (e.isFile() && (!options.match || options.match.test(e.name)))
|
|
92
|
+
candidates.push(prefix === "" || prefix === "." ? e.name : `${prefix}/${e.name}`);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
const rendered = new Set(options.rendered);
|
|
96
|
+
const out = [];
|
|
97
|
+
for (const p of candidates) {
|
|
98
|
+
if (rendered.has(p) || out.includes(p))
|
|
99
|
+
continue;
|
|
100
|
+
const abs = join(root, p);
|
|
101
|
+
if (!existsSync(abs) || !statSync(abs).isFile())
|
|
102
|
+
continue;
|
|
103
|
+
if (isGenerated(readFileSync(abs, "utf-8")))
|
|
104
|
+
out.push(p);
|
|
105
|
+
}
|
|
106
|
+
return out;
|
|
107
|
+
}
|
|
108
|
+
export { PLANNED_FILES_FLOOR } from "./release-floors.js";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The forge client a chant command in a CI job posts with (#4964): the
|
|
3
|
+
* pull request loop's {@link forgeFromEnv}, with each commit status for the
|
|
4
|
+
* run's own commit put on the pull request's head.
|
|
5
|
+
*
|
|
6
|
+
* A GitHub `pull_request` run checks out `GITHUB_SHA`, the merge preview
|
|
7
|
+
* (`refs/pull/<n>/merge`), and the loop's jobs plan, check and sign that
|
|
8
|
+
* commit, as a merge would make it. The forge shows no status of that commit
|
|
9
|
+
* on the pull request, and a required status is read from the head, so a
|
|
10
|
+
* status the plan note, the check evidence or the ref gate sets for it goes
|
|
11
|
+
* on `pull_request.head.sha` instead. Forgejo's run is of the head already,
|
|
12
|
+
* and so is a status for any other commit; both are posted as asked. GitLab
|
|
13
|
+
* is left as it is: its merge request pipeline runs on the head.
|
|
14
|
+
*
|
|
15
|
+
* Kept out of ./pr-forge.ts, whose bundle a product posts with.
|
|
16
|
+
*/
|
|
17
|
+
import { forgeFromEnv, type ForgeKind, type PrForge } from "./pr-forge.js";
|
|
18
|
+
/** The pull request's head from a GitHub-style `pull_request` run's event payload, or undefined for any other run. */
|
|
19
|
+
export declare function pullRequestEventHead(env: Record<string, string | undefined>): string | undefined;
|
|
20
|
+
/** {@link forgeFromEnv}, whose statuses for the run's merge preview go on the pull request's head (#4964). */
|
|
21
|
+
export declare function forgeFromJobEnv(kind: ForgeKind, env?: Record<string, string | undefined>, fetchImpl?: Parameters<typeof forgeFromEnv>[2]): PrForge;
|
|
22
|
+
//# sourceMappingURL=pr-forge-job.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pr-forge-job.d.ts","sourceRoot":"","sources":["../src/pr-forge-job.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,YAAY,EAAE,KAAK,SAAS,EAAE,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AAExE,sHAAsH;AACtH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG,MAAM,GAAG,SAAS,CAShG;AAED,8GAA8G;AAC9G,wBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,EAAE,SAAS,CAAC,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAY/J"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The forge client a chant command in a CI job posts with (#4964): the
|
|
3
|
+
* pull request loop's {@link forgeFromEnv}, with each commit status for the
|
|
4
|
+
* run's own commit put on the pull request's head.
|
|
5
|
+
*
|
|
6
|
+
* A GitHub `pull_request` run checks out `GITHUB_SHA`, the merge preview
|
|
7
|
+
* (`refs/pull/<n>/merge`), and the loop's jobs plan, check and sign that
|
|
8
|
+
* commit, as a merge would make it. The forge shows no status of that commit
|
|
9
|
+
* on the pull request, and a required status is read from the head, so a
|
|
10
|
+
* status the plan note, the check evidence or the ref gate sets for it goes
|
|
11
|
+
* on `pull_request.head.sha` instead. Forgejo's run is of the head already,
|
|
12
|
+
* and so is a status for any other commit; both are posted as asked. GitLab
|
|
13
|
+
* is left as it is: its merge request pipeline runs on the head.
|
|
14
|
+
*
|
|
15
|
+
* Kept out of ./pr-forge.ts, whose bundle a product posts with.
|
|
16
|
+
*/
|
|
17
|
+
import { readFileSync } from "node:fs";
|
|
18
|
+
import { forgeFromEnv } from "./pr-forge.js";
|
|
19
|
+
/** The pull request's head from a GitHub-style `pull_request` run's event payload, or undefined for any other run. */
|
|
20
|
+
export function pullRequestEventHead(env) {
|
|
21
|
+
if (!env.GITHUB_EVENT_NAME?.startsWith("pull_request") || !env.GITHUB_EVENT_PATH)
|
|
22
|
+
return undefined;
|
|
23
|
+
try {
|
|
24
|
+
const event = JSON.parse(readFileSync(env.GITHUB_EVENT_PATH, "utf8"));
|
|
25
|
+
const sha = event.pull_request?.head?.sha;
|
|
26
|
+
return typeof sha === "string" && /^[0-9a-f]{40,64}$/.test(sha) ? sha : undefined;
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/** {@link forgeFromEnv}, whose statuses for the run's merge preview go on the pull request's head (#4964). */
|
|
33
|
+
export function forgeFromJobEnv(kind, env = process.env, fetchImpl) {
|
|
34
|
+
const forge = forgeFromEnv(kind, env, fetchImpl);
|
|
35
|
+
const merge = env.GITHUB_SHA;
|
|
36
|
+
const head = kind === "gitlab" ? undefined : pullRequestEventHead(env);
|
|
37
|
+
if (!head || !merge || head === merge)
|
|
38
|
+
return forge;
|
|
39
|
+
const at = (sha) => (sha === merge ? head : sha);
|
|
40
|
+
const { setStatus, setCommitStatus } = forge;
|
|
41
|
+
return {
|
|
42
|
+
...forge,
|
|
43
|
+
setStatus: (sha, status) => setStatus(at(sha), status),
|
|
44
|
+
...(setCommitStatus ? { setCommitStatus: (sha, status) => setCommitStatus(at(sha), status) } : {}),
|
|
45
|
+
};
|
|
46
|
+
}
|
package/dist/pr-forge-reads.d.ts
CHANGED
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
* (GitLab's pipelines), a run, its jobs, and the artifacts it kept, by name in
|
|
9
9
|
* a run or across the repository, as a product's review agent reads them
|
|
10
10
|
* (#4846); the files a head changes since its merge base, a job by id, and
|
|
11
|
-
* a file of a GitLab job's artifacts (#4862)
|
|
11
|
+
* a file of a GitLab job's artifacts (#4862); and the commit each job ran
|
|
12
|
+
* on with, on GitHub and Forgejo, its steps' conclusions, which a wave's
|
|
13
|
+
* evidence job signs from (#4926).
|
|
12
14
|
*
|
|
13
15
|
* They take the same options as the clients in `./pr-forge.ts` and live in
|
|
14
16
|
* their own module, imported only by the products that call them, so the
|
|
@@ -147,6 +149,24 @@ export interface RunJob {
|
|
|
147
149
|
tag?: boolean;
|
|
148
150
|
/** The job's page on the forge. */
|
|
149
151
|
url?: string;
|
|
152
|
+
/** The commit it ran on (#4926): GitHub's and Forgejo's `head_sha`, GitLab's `commit.id` or `pipeline.sha`. */
|
|
153
|
+
headSha?: string;
|
|
154
|
+
/**
|
|
155
|
+
* Its steps as the runner reported them (#4926): GitHub's and Forgejo's
|
|
156
|
+
* `steps[]`, by name, in order. GitLab reports no steps, so it has none,
|
|
157
|
+
* and a check there reads the job's own status.
|
|
158
|
+
*/
|
|
159
|
+
steps?: RunJobStep[];
|
|
160
|
+
}
|
|
161
|
+
/** One step of a {@link RunJob} (#4926). */
|
|
162
|
+
export interface RunJobStep {
|
|
163
|
+
name: string;
|
|
164
|
+
/** 1-based, as the forge numbers it. */
|
|
165
|
+
number?: number;
|
|
166
|
+
/** `queued`, `in_progress`, `completed` (Forgejo: also `success`, `failure`, ...). */
|
|
167
|
+
status: string;
|
|
168
|
+
/** `success`, `failure`, `skipped`, `cancelled`, once it finished. */
|
|
169
|
+
conclusion?: string;
|
|
150
170
|
}
|
|
151
171
|
/** A file a comparison changes, with the path it had before a rename when the forge names it (#4862). */
|
|
152
172
|
export interface ChangedFile {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pr-forge-reads.d.ts","sourceRoot":"","sources":["../src/pr-forge-reads.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"pr-forge-reads.d.ts","sourceRoot":"","sources":["../src/pr-forge-reads.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACrB,MAAM,YAAY,CAAC;AAEpB,iHAAiH;AACjH,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,iFAAiF;AACjF,MAAM,WAAW,iBAAiB;IAChC,6DAA6D;IAC7D,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC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repository, as a product's review agent reads them
|
|
10
10
|
* (#4846); the files a head changes since its merge base, a job by id, and
|
|
11
|
-
* a file of a GitLab job's artifacts (#4862)
|
|
11
|
+
* a file of a GitLab job's artifacts (#4862); and the commit each job ran
|
|
12
|
+
* on with, on GitHub and Forgejo, its steps' conclusions, which a wave's
|
|
13
|
+
* evidence job signs from (#4926).
|
|
12
14
|
*
|
|
13
15
|
* They take the same options as the clients in `./pr-forge.ts` and live in
|
|
14
16
|
* their own module, imported only by the products that call them, so the
|
|
@@ -396,6 +398,9 @@ function jobOf(j) {
|
|
|
396
398
|
const run = num(j.run_id) ?? (isObject(j.pipeline) ? num(j.pipeline.id) : undefined);
|
|
397
399
|
const ref = str(j.head_branch) ?? str(j.ref);
|
|
398
400
|
const url = str(j.html_url) ?? str(j.web_url);
|
|
401
|
+
// #4926: the commit, and on GitHub and Forgejo the steps, which `chant ci evidence sign --from-job` reads.
|
|
402
|
+
const headSha = str(j.head_sha) ?? (isObject(j.commit) ? str(j.commit.id) : undefined) ?? (isObject(j.pipeline) ? str(j.pipeline.sha) : undefined);
|
|
403
|
+
const steps = Array.isArray(j.steps) ? j.steps.map(stepOf).filter(defined) : undefined;
|
|
399
404
|
return {
|
|
400
405
|
id,
|
|
401
406
|
name,
|
|
@@ -406,8 +411,21 @@ function jobOf(j) {
|
|
|
406
411
|
...(ref ? { ref } : {}),
|
|
407
412
|
...(typeof j.tag === "boolean" ? { tag: j.tag } : {}),
|
|
408
413
|
...(url ? { url } : {}),
|
|
414
|
+
...(headSha ? { headSha } : {}),
|
|
415
|
+
...(steps ? { steps } : {}),
|
|
409
416
|
};
|
|
410
417
|
}
|
|
418
|
+
/** A job's step as GitHub or Forgejo answers it (#4926). */
|
|
419
|
+
function stepOf(s) {
|
|
420
|
+
if (!isObject(s))
|
|
421
|
+
return undefined;
|
|
422
|
+
const name = str(s.name);
|
|
423
|
+
if (!name)
|
|
424
|
+
return undefined;
|
|
425
|
+
const number = num(s.number);
|
|
426
|
+
const conclusion = str(s.conclusion);
|
|
427
|
+
return { name, ...(number !== undefined ? { number } : {}), status: str(s.status) ?? "", ...(conclusion ? { conclusion } : {}) };
|
|
428
|
+
}
|
|
411
429
|
/** GitLab's access levels, by the number its API answers. */
|
|
412
430
|
const GITLAB_ROLES = { 5: "minimal", 10: "guest", 15: "planner", 20: "reporter", 30: "developer", 40: "maintainer", 50: "owner" };
|
|
413
431
|
/** The reads for a GitHub client's options. */
|
package/dist/pr-forge.d.ts
CHANGED
|
@@ -443,8 +443,12 @@ export interface PrForge {
|
|
|
443
443
|
* Every status and check reported on `head` passed, and at least one did.
|
|
444
444
|
* Statuses named in `ignore` are left out, such as the apply's own.
|
|
445
445
|
* Pending while one still runs or none has reported.
|
|
446
|
+
*
|
|
447
|
+
* Commit statuses named in `require` (#4913) must have reported as well,
|
|
448
|
+
* such as the ref gate's (`@intentius/chant/ref-gate-rules`), which a job
|
|
449
|
+
* posts later than the others: one not posted yet counts as still running.
|
|
446
450
|
*/
|
|
447
|
-
prChecksPassed?(pr: number, head: string, ignore?: readonly string[]): Promise<PrRequireResult>;
|
|
451
|
+
prChecksPassed?(pr: number, head: string, ignore?: readonly string[], require?: readonly string[]): Promise<PrRequireResult>;
|
|
448
452
|
/**
|
|
449
453
|
* GitLab (#4328): each open merge request into `branch` whose newest
|
|
450
454
|
* pipeline at its head commit, in this project, ran a job named `job`,
|
|
@@ -638,6 +642,8 @@ export interface ForgeTarget {
|
|
|
638
642
|
repo: string;
|
|
639
643
|
/** Lower-cased. */
|
|
640
644
|
host: string;
|
|
645
|
+
/** The web origin, `https://host` or `http://host:port` (#4888). Set by `forgeTargetWith` in `@intentius/chant/forge-flags`. */
|
|
646
|
+
origin?: string;
|
|
641
647
|
token: string;
|
|
642
648
|
/** The variable the token came from, for messages. Never the token itself. */
|
|
643
649
|
tokenSource: string;
|
package/dist/pr-forge.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pr-forge.d.ts","sourceRoot":"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,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,WAAW,EAAE,MAAM,CAAC;IACpB,kFAAkF;IAClF,WAAW,CAAC,EAAE,eAAe,GAAG,WAAW,CAAC;IAC5C,6DAA6D;IAC7D,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,uFAAuF;IACvF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC,kDAAkD;IAClD,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CACrC;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAIlE,CAAC;AAoBF;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,GAAE,GAAiB,EAAE,IAAI,GAAE,kBAAuB,GAAG,WAAW,CAuErG;AAED,8FAA8F;AAC9F,wBAAgB,WAAW,CAAC,MAAM,EAAE,WAAW,EAAE,SAAS,CAAC,EAAE,UAAU,GAAG,OAAO,CAgBhF"}
|
package/dist/pr-forge.js
CHANGED
|
@@ -563,10 +563,11 @@ function githubShaped(kind, opts) {
|
|
|
563
563
|
return refuse(`the forge did not say where ${into} is or where ${short(head)} left it`);
|
|
564
564
|
return base === tip ? pass(`${short(head)} contains ${into} at ${short(tip)}`) : refuse(`${short(head)} does not contain ${into} at ${short(tip)}`);
|
|
565
565
|
},
|
|
566
|
-
async prChecksPassed(_pr, head, ignore = []) {
|
|
566
|
+
async prChecksPassed(_pr, head, ignore = [], need = []) {
|
|
567
567
|
const skip = ignoredStatus(ignore);
|
|
568
568
|
const failing = [];
|
|
569
569
|
const waiting = [];
|
|
570
|
+
const seen = new Set();
|
|
570
571
|
let count = 0;
|
|
571
572
|
// The combined status holds each context's newest status.
|
|
572
573
|
const combined = await api.call("GET", `${repo}/commits/${head}/status`);
|
|
@@ -574,6 +575,7 @@ function githubShaped(kind, opts) {
|
|
|
574
575
|
const context = isObject(st) ? str(st.context) : undefined;
|
|
575
576
|
if (!context)
|
|
576
577
|
continue;
|
|
578
|
+
seen.add(context);
|
|
577
579
|
const state = str(st.state) ?? str(st.status) ?? "";
|
|
578
580
|
// A status left out still shows the checks reported, unless it is what held them back.
|
|
579
581
|
if (skip(context)) {
|
|
@@ -600,6 +602,8 @@ function githubShaped(kind, opts) {
|
|
|
600
602
|
failing.push(name);
|
|
601
603
|
}
|
|
602
604
|
}
|
|
605
|
+
// #4913: a required status not posted yet is waited for.
|
|
606
|
+
waiting.push(...need.filter((n) => !seen.has(n)));
|
|
603
607
|
return checksVerdict(`pull request ${_pr}`, head, failing, waiting, count);
|
|
604
608
|
},
|
|
605
609
|
async pullRequestOpen(pr) {
|
|
@@ -1048,7 +1052,7 @@ export function gitlabForge(opts) {
|
|
|
1048
1052
|
return refuse(`GitLab did not say how far ${short(head)} is behind ${into}`);
|
|
1049
1053
|
return behind === 0 ? pass(`${short(head)} contains ${into}`) : refuse(`${short(head)} is ${behind} commit${behind === 1 ? "" : "s"} behind ${into}`);
|
|
1050
1054
|
},
|
|
1051
|
-
async prChecksPassed(mr, head, ignore = []) {
|
|
1055
|
+
async prChecksPassed(mr, head, ignore = [], need = []) {
|
|
1052
1056
|
const skip = ignoredStatus(ignore);
|
|
1053
1057
|
// Each name's newest status; a job allowed to fail holds nothing back.
|
|
1054
1058
|
const newest = new Map();
|
|
@@ -1077,6 +1081,7 @@ export function gitlabForge(opts) {
|
|
|
1077
1081
|
else if (GITLAB_RUNNING.has(state))
|
|
1078
1082
|
waiting.push(name);
|
|
1079
1083
|
}
|
|
1084
|
+
waiting.push(...need.filter((n) => !newest.has(n)));
|
|
1080
1085
|
return checksVerdict(`merge request !${mr}`, head, failing, waiting, count);
|
|
1081
1086
|
},
|
|
1082
1087
|
async pullRequestOpen(mr) {
|