@intentius/chant 0.124.88 → 0.124.90
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/actor.d.ts +36 -1
- package/dist/actor.d.ts.map +1 -1
- package/dist/actor.js +39 -1
- package/dist/chant-install.d.ts.map +1 -1
- package/dist/chant-install.js +1 -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 +193 -0
- package/dist/ci-comment-commands.d.ts.map +1 -0
- package/dist/ci-comment-commands.js +353 -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-evidence-from-job.d.ts +25 -0
- package/dist/ci-evidence-from-job.d.ts.map +1 -1
- package/dist/ci-evidence-from-job.js +43 -2
- package/dist/ci-evidence-jobs.d.ts +30 -1
- package/dist/ci-evidence-jobs.d.ts.map +1 -1
- package/dist/ci-evidence-jobs.js +46 -3
- package/dist/ci-image.d.ts +21 -4
- package/dist/ci-image.d.ts.map +1 -1
- package/dist/ci-image.js +62 -10
- package/dist/ci-job-guard.d.ts +42 -45
- package/dist/ci-job-guard.d.ts.map +1 -1
- package/dist/ci-job-guard.js +206 -3
- package/dist/ci-note-commands.d.ts +104 -4
- package/dist/ci-note-commands.d.ts.map +1 -1
- package/dist/ci-note-commands.js +131 -38
- package/dist/ci-product-words.d.ts +42 -0
- package/dist/ci-product-words.d.ts.map +1 -1
- package/dist/ci-product-words.js +25 -0
- package/dist/ci-product.d.ts +72 -1
- package/dist/ci-product.d.ts.map +1 -1
- package/dist/ci-product.js +73 -6
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/build.js +29 -2
- package/dist/cli/handlers/approve.d.ts.map +1 -1
- package/dist/cli/handlers/approve.js +2 -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 +17 -7
- package/dist/cli/handlers/ci-evidence.d.ts.map +1 -1
- package/dist/cli/handlers/ci-evidence.js +33 -7
- 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 +8 -0
- package/dist/cli/handlers/generated-check.d.ts.map +1 -1
- package/dist/cli/handlers/generated-check.js +31 -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 +33 -0
- package/dist/cli/handlers/pr-comment.d.ts.map +1 -0
- package/dist/cli/handlers/pr-comment.js +201 -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-notes.d.ts.map +1 -1
- package/dist/cli/handlers/pr-notes.js +23 -1
- 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 +71 -23
- 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 +180 -4
- 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 +41 -2
- package/dist/cli/parse-args.d.ts.map +1 -1
- package/dist/cli/parse-args.js +31 -0
- package/dist/cli/registry.d.ts +19 -1
- 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/pr-checks.d.ts +97 -6
- package/dist/components/pr-checks.d.ts.map +1 -1
- package/dist/components/pr-checks.js +107 -13
- package/dist/components/pr-pipeline.d.ts +19 -14
- package/dist/components/pr-pipeline.d.ts.map +1 -1
- package/dist/components/pr-pipeline.js +7 -13
- package/dist/components/product-pipeline.d.ts +96 -3
- package/dist/components/product-pipeline.d.ts.map +1 -1
- package/dist/components/product-pipeline.js +120 -14
- package/dist/components/product-plan.d.ts +203 -6
- package/dist/components/product-plan.d.ts.map +1 -1
- package/dist/components/product-plan.js +250 -43
- package/dist/drift-record.d.ts +7 -0
- package/dist/drift-record.d.ts.map +1 -1
- package/dist/drift-record.js +19 -0
- package/dist/floor-table.data.d.ts.map +1 -1
- package/dist/floor-table.data.js +63 -31
- package/dist/forge-check/contract.d.ts +11 -1
- package/dist/forge-check/contract.d.ts.map +1 -1
- package/dist/forge-check/contract.js +4 -1
- package/dist/forge-check/index.d.ts +2 -0
- package/dist/forge-check/index.d.ts.map +1 -1
- package/dist/forge-check/index.js +2 -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 +18 -4
- package/dist/generated-check.d.ts.map +1 -1
- package/dist/generated-check.js +37 -5
- 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 +93 -4
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/gate-applied.d.ts +9 -0
- package/dist/lifecycle/gate-applied.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 +11 -0
- package/dist/lifecycle/publish-npm.d.ts.map +1 -1
- package/dist/lifecycle/publish-npm.js +27 -1
- 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.map +1 -1
- package/dist/lifecycle/release-images.js +1 -2
- 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/apply-status.d.ts +84 -0
- package/dist/op/apply-status.d.ts.map +1 -0
- package/dist/op/apply-status.js +106 -0
- package/dist/op/before-merge-decide.d.ts +102 -0
- package/dist/op/before-merge-decide.d.ts.map +1 -0
- package/dist/op/before-merge-decide.js +142 -0
- package/dist/op/before-merge-done.d.ts +56 -0
- package/dist/op/before-merge-done.d.ts.map +1 -0
- package/dist/op/before-merge-done.js +69 -0
- package/dist/op/before-merge-store.d.ts +20 -0
- package/dist/op/before-merge-store.d.ts.map +1 -0
- package/dist/op/before-merge-store.js +48 -0
- package/dist/op/before-merge.d.ts +150 -0
- package/dist/op/before-merge.d.ts.map +1 -0
- package/dist/op/before-merge.js +207 -0
- package/dist/op/follow-on-run.d.ts +117 -0
- package/dist/op/follow-on-run.d.ts.map +1 -0
- package/dist/op/follow-on-run.js +154 -0
- package/dist/op/follow-on-store.d.ts +17 -0
- package/dist/op/follow-on-store.d.ts.map +1 -0
- package/dist/op/follow-on-store.js +54 -0
- package/dist/op/gate.d.ts +6 -0
- package/dist/op/gate.d.ts.map +1 -1
- package/dist/op/gate.js +10 -1
- package/dist/op/index.d.ts +5 -1
- package/dist/op/index.d.ts.map +1 -1
- package/dist/op/index.js +2 -0
- package/dist/op/op-waves-after-plan.d.ts +13 -0
- package/dist/op/op-waves-after-plan.d.ts.map +1 -1
- package/dist/op/op-waves-evidence-jobs.d.ts +10 -2
- package/dist/op/op-waves-evidence-jobs.d.ts.map +1 -1
- package/dist/op/op-waves-evidence-jobs.js +19 -5
- package/dist/op/op-waves-follow-on.d.ts +162 -0
- package/dist/op/op-waves-follow-on.d.ts.map +1 -0
- package/dist/op/op-waves-follow-on.js +355 -0
- 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 +148 -6
- package/dist/op/op-waves-run.d.ts.map +1 -1
- package/dist/op/op-waves-run.js +873 -100
- package/dist/op/op-waves-split.d.ts +122 -0
- package/dist/op/op-waves-split.d.ts.map +1 -0
- package/dist/op/op-waves-split.js +166 -0
- package/dist/op/op-waves.d.ts +24 -0
- package/dist/op/op-waves.d.ts.map +1 -1
- package/dist/op/op-waves.js +18 -1
- package/dist/op/schedule-overdue.d.ts +15 -1
- package/dist/op/schedule-overdue.d.ts.map +1 -1
- package/dist/op/schedule-overdue.js +77 -5
- package/dist/op/stage-hooks.d.ts +36 -1
- package/dist/op/stage-hooks.d.ts.map +1 -1
- package/dist/op/stage-hooks.js +17 -3
- package/dist/op/wave-stop.d.ts +67 -0
- package/dist/op/wave-stop.d.ts.map +1 -0
- package/dist/op/wave-stop.js +129 -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-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 +97 -0
- package/dist/pr-plan-note.d.ts.map +1 -1
- package/dist/pr-plan-note.js +94 -1
- package/dist/pr-post.d.ts +28 -3
- package/dist/pr-post.d.ts.map +1 -1
- package/dist/pr-post.js +146 -13
- 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 +16 -2
- package/dist/ref-gate-init.d.ts.map +1 -1
- package/dist/ref-gate-init.js +24 -13
- package/dist/release-floors.d.ts +39 -1
- package/dist/release-floors.d.ts.map +1 -1
- package/dist/release-floors.js +63 -25
- 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.map +1 -1
- package/dist/state-migration.js +1 -2
- package/dist/wave-blocked.d.ts +7 -1
- package/dist/wave-blocked.d.ts.map +1 -1
- package/dist/wave-blocked.js +7 -2
- package/dist/wave-runtime.mjs +366 -350
- package/dist/workspace/ci-green-cli.d.ts.map +1 -1
- package/dist/workspace/ci-green-cli.js +3 -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 +4 -3
- package/dist/workspace/release-workflow.d.ts.map +1 -1
- package/dist/workspace/release-workflow.js +10 -7
- package/dist/workspace/trust/check-evidence-report.d.ts +7 -2
- package/dist/workspace/trust/check-evidence-report.d.ts.map +1 -1
- package/dist/workspace/trust/check-evidence-report.js +15 -8
- 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 +30 -10
- 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/actor.test.ts +68 -2
- package/src/actor.ts +61 -1
- package/src/chant-install.test.ts +2 -3
- package/src/chant-install.ts +1 -2
- package/src/ci-base.test.ts +41 -0
- package/src/ci-base.ts +43 -0
- package/src/ci-comment-commands.test.ts +439 -0
- package/src/ci-comment-commands.ts +428 -0
- package/src/ci-comment-replies.ts +78 -0
- package/src/ci-commit.test.ts +2 -3
- package/src/ci-evidence-from-job.test.ts +18 -0
- package/src/ci-evidence-from-job.ts +58 -2
- package/src/ci-evidence-jobs.ts +50 -5
- package/src/ci-image.test.ts +130 -10
- package/src/ci-image.ts +85 -12
- package/src/ci-job-guard.before-merge.test.ts +148 -0
- package/src/ci-job-guard.follow-on-record.test.ts +137 -0
- package/src/ci-job-guard.follow-on.test.ts +144 -0
- package/src/ci-job-guard.ts +221 -3
- package/src/ci-note-commands.test.ts +76 -1
- package/src/ci-note-commands.ts +198 -46
- package/src/ci-product-words.ts +59 -0
- package/src/ci-product.ts +90 -6
- package/src/cli/commands/build.test.ts +41 -0
- package/src/cli/commands/build.ts +27 -2
- package/src/cli/handlers/approve.ts +2 -1
- package/src/cli/handlers/ci-check.ts +19 -7
- package/src/cli/handlers/ci-evidence.ts +29 -8
- package/src/cli/handlers/components.ts +3 -1
- package/src/cli/handlers/generated-check.ts +31 -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 +187 -0
- package/src/cli/handlers/pr-env.ts +6 -3
- package/src/cli/handlers/pr-notes.ts +30 -6
- package/src/cli/handlers/pr-record.test.ts +1 -1
- package/src/cli/handlers/pr.ts +64 -21
- 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 +170 -4
- package/src/cli/handlers/run.ts +2 -1
- package/src/cli/main.ts +41 -2
- package/src/cli/parse-args.ts +23 -0
- package/src/cli/registry.ts +19 -1
- package/src/components/auto-release.ts +2 -1
- package/src/components/pr-checks.ts +165 -17
- package/src/components/pr-pipeline.ts +22 -18
- package/src/components/product-pipeline.apply-status.test.ts +50 -0
- package/src/components/product-pipeline.ts +204 -17
- package/src/components/product-plan.test.ts +60 -4
- package/src/components/product-plan.ts +367 -50
- package/src/drift-record.test.ts +20 -0
- package/src/drift-record.ts +16 -0
- package/src/floor-table.data.ts +63 -31
- package/src/forge-check/contract.ts +12 -1
- package/src/forge-check/forge-check.test.ts +17 -0
- package/src/forge-check/index.ts +2 -0
- package/src/gate-resume-run.ts +27 -3
- package/src/generated-check.e2e.test.ts +21 -1
- package/src/generated-check.test.ts +66 -0
- package/src/generated-check.ts +51 -10
- package/src/image-pins.ts +31 -0
- package/src/lexicon.ts +89 -1
- package/src/lifecycle/gate-applied.ts +7 -0
- package/src/lifecycle/git.test.ts +48 -0
- package/src/lifecycle/git.ts +27 -4
- package/src/lifecycle/publish-npm.ts +31 -1
- package/src/lifecycle/reach-locks.test.ts +87 -0
- package/src/lifecycle/reach-locks.ts +169 -0
- package/src/lifecycle/release-cut.ts +17 -1
- package/src/lifecycle/release-images.test.ts +56 -0
- package/src/lifecycle/release-images.ts +1 -2
- 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/apply-status.test.ts +83 -0
- package/src/op/apply-status.ts +132 -0
- package/src/op/before-merge-decide.ts +190 -0
- package/src/op/before-merge-done.ts +99 -0
- package/src/op/before-merge-store.ts +44 -0
- package/src/op/before-merge.test.ts +201 -0
- package/src/op/before-merge.ts +266 -0
- package/src/op/follow-on-run.ts +206 -0
- package/src/op/follow-on-store.ts +54 -0
- package/src/op/gate-resume.test.ts +27 -0
- package/src/op/gate.ts +16 -1
- package/src/op/index.ts +15 -0
- package/src/op/op-waves-after-plan.ts +13 -0
- package/src/op/op-waves-evidence-jobs.ts +21 -7
- package/src/op/op-waves-follow-on-record.test.ts +152 -0
- package/src/op/op-waves-follow-on.test.ts +247 -0
- package/src/op/op-waves-follow-on.ts +385 -0
- package/src/op/op-waves-notify-words.test.ts +18 -0
- package/src/op/op-waves-render-spec.test.ts +159 -0
- package/src/op/op-waves-render-spec.ts +171 -0
- package/src/op/op-waves-run.ts +973 -94
- package/src/op/op-waves-split-product.test.ts +288 -0
- package/src/op/op-waves-split-step.test.ts +298 -0
- package/src/op/op-waves-split.test.ts +196 -0
- package/src/op/op-waves-split.ts +189 -0
- package/src/op/op-waves.ts +31 -3
- package/src/op/schedule-overdue.test.ts +72 -1
- package/src/op/schedule-overdue.ts +84 -6
- package/src/op/stage-hooks.ts +52 -4
- package/src/op/wave-stop.test.ts +72 -0
- package/src/op/wave-stop.ts +139 -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-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 +155 -3
- package/src/pr-post-replan.test.ts +144 -0
- package/src/pr-post-subject.test.ts +230 -0
- package/src/pr-post.test.ts +2 -1
- package/src/pr-post.ts +151 -15
- package/src/pr-status.ts +91 -0
- package/src/ref-gate-init.ts +30 -11
- package/src/release-floors.ts +81 -25
- package/src/render-module.ts +73 -0
- package/src/state-migration-record.test.ts +2 -3
- package/src/state-migration.ts +1 -2
- package/src/wave-blocked.ts +9 -4
- package/src/workspace/ci-green-cli.ts +3 -2
- package/src/workspace/ci-green-workflow.test.ts +32 -1
- package/src/workspace/release-train.ts +2 -1
- package/src/workspace/release-workflow.test.ts +36 -5
- package/src/workspace/release-workflow.ts +10 -7
- package/src/workspace/trust/check-evidence-report.ts +15 -8
- package/src/workspace/trust/check-evidence.test.ts +5 -0
- package/src/workspace/trust/ref-gate-cli.ts +30 -8
- package/src/workspace/trust/ref-gate-pieces.test.ts +46 -1
- package/src/workspace/trust/ref-gate.test.ts +10 -0
- package/src/workspace/workspace-run.ts +2 -1
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Op waves before merge, split so the change's code never runs beside a
|
|
3
|
+
* write token (#4987).
|
|
4
|
+
*
|
|
5
|
+
* Maintainer decision (2026-11-10): in a pipeline with `beforeMerge` each
|
|
6
|
+
* wave is four jobs.
|
|
7
|
+
*
|
|
8
|
+
* 1. `<wave>-plan` runs the change's code and holds no write token: the
|
|
9
|
+
* checkout keeps no credentials, the job's token can only read (GitHub),
|
|
10
|
+
* and on GitLab its script drops `CHANT_FORGE_TOKEN` and the job token.
|
|
11
|
+
* `chant run wave --phase plan` plans the wave and saves the plan
|
|
12
|
+
* ({@link opWaveSavedPlanPath}, beside the plan files) as an artifact.
|
|
13
|
+
* 2. `<wave>-gate` runs the default branch's code alone, with the token:
|
|
14
|
+
* `--phase gate` reads the rules at base, takes the saved plan, refuses
|
|
15
|
+
* it when its digest is not the one its plan files give, writes the
|
|
16
|
+
* gate's pending fact or spends the approval on `chant/lifecycle`, and
|
|
17
|
+
* keeps the decision record, as a wide wave's deciding job does.
|
|
18
|
+
* 3. `<wave>` (or each share and job group's job) applies the saved plan,
|
|
19
|
+
* with no write token: `--phase apply` checks each plan file's digest
|
|
20
|
+
* against the decision and applies the ones that match. Its run record
|
|
21
|
+
* goes to a file ({@link opWaveRunRecordFileName}) in place of the ledger.
|
|
22
|
+
* 4. `<wave>-record` runs the default branch's code with the token:
|
|
23
|
+
* `--phase record` writes those run records to the run ledger and exits
|
|
24
|
+
* as the wave's applying jobs did.
|
|
25
|
+
*
|
|
26
|
+
* A push run of the same pipeline takes the same four jobs. A pipeline
|
|
27
|
+
* without `beforeMerge` keeps one job per wave (or a deciding job and its
|
|
28
|
+
* shares), since a push runs merged code.
|
|
29
|
+
*
|
|
30
|
+
* A `step` spec (#4992) plans in the plan job's process; the saved plan
|
|
31
|
+
* keeps each run's step plan (its digest, effects and lock rows) without the
|
|
32
|
+
* engine's artifact. The gate job leases the rows the runs wait for and
|
|
33
|
+
* change, with no heartbeat, before it spends the approval, and the
|
|
34
|
+
* decision names the lease. The applying job plans its runs again through
|
|
35
|
+
* the step, as a share job does, and applies each whose plan digest the
|
|
36
|
+
* decision holds; it hands the release records to the record job, which
|
|
37
|
+
* writes them and lets go of the lease. A run whose plan moved is exit 4.
|
|
38
|
+
*
|
|
39
|
+
* A hook that holds the wave on another gate (#4992) in the plan or apply
|
|
40
|
+
* job reads that gate with no write token: approved, the wave goes on; still
|
|
41
|
+
* waiting, the job leaves the gate's pending fact to the gate job (a plan
|
|
42
|
+
* job's hold) or the record job (an apply job's), which records it, and the
|
|
43
|
+
* wave waits. A hold that asks chant to `record` the gate is spent before
|
|
44
|
+
* its hook runs again, so it fails in an applying job once approved.
|
|
45
|
+
*
|
|
46
|
+
* #4994: in the plan job, such a hold once approved waits, and the gate job
|
|
47
|
+
* spends the approval under its own rules at base, for a re-run of the hook
|
|
48
|
+
* at the wave's commit (an applied line with `rerun.head`). The plan job of
|
|
49
|
+
* the next run of that commit finds the line, with no finished line yet, and
|
|
50
|
+
* runs the hook again under it with `CHANT_HOLD_APPROVED`; the wave then
|
|
51
|
+
* plans on what the hook did. Its gate job writes the finished line from the
|
|
52
|
+
* hook's `CHANT_HOLD_FINISHED`, which the saved plan hands on
|
|
53
|
+
* (`holdsFinished`). Any other commit's job, and any job once the line is
|
|
54
|
+
* finished, reads the approval as spent.
|
|
55
|
+
*
|
|
56
|
+
* A product's hooks run in whichever job runs them (#4994): a hook its
|
|
57
|
+
* process serves by name (`inProcessHooks`) is called there in place of its
|
|
58
|
+
* command, and what the plan job's code keeps for the later jobs goes under
|
|
59
|
+
* {@link opWaveProductStateDir}.
|
|
60
|
+
*
|
|
61
|
+
* A `rest` wave (#4992) runs one wave per run: its four jobs run wave N,
|
|
62
|
+
* the last rendered one, or in a follow-on run the wave the run names
|
|
63
|
+
* (`--wave "${CHANT_WAVES_WAVE:-N}"`), and its record job starts the
|
|
64
|
+
* follow-on for the next wave the plan found (./op-waves-follow-on.ts).
|
|
65
|
+
* Its jobs carry `rest: true`.
|
|
66
|
+
*/
|
|
67
|
+
import { type OpWaveJob, type OpWavesSpec } from "./op-waves.js";
|
|
68
|
+
/** The four jobs of a split wave (#4987). */
|
|
69
|
+
export type OpWavePhase = "plan" | "gate" | "apply" | "record";
|
|
70
|
+
export declare const OP_WAVE_PHASES: readonly OpWavePhase[];
|
|
71
|
+
/** One job of a split wave. `kind` is `decide` for the plan and gate jobs, `share` for an applying job and `wave` for the record job. */
|
|
72
|
+
export interface OpWaveSplitJob extends OpWaveJob {
|
|
73
|
+
phase: OpWavePhase;
|
|
74
|
+
/** The job checks out and runs the change's code: the plan and apply jobs. It holds no write token. */
|
|
75
|
+
runsChange: boolean;
|
|
76
|
+
/** A job of the `rest` wave (#4992): it runs the wave `CHANT_WAVES_WAVE` names, its own number by default. */
|
|
77
|
+
rest?: true;
|
|
78
|
+
}
|
|
79
|
+
/** Where a wave's plan job saves its plan, beside the run plan files the apply reads (#4987). */
|
|
80
|
+
export declare function opWaveSavedPlanDir(spec: Pick<OpWavesSpec, "name">, wave: number): string;
|
|
81
|
+
/**
|
|
82
|
+
* Where a product keeps what its own code in a split wave's later jobs reads
|
|
83
|
+
* (#4994): its report rows, the plans it read, a hook's state. It is inside
|
|
84
|
+
* the saved plan's directory, so every forge hands it from the plan job to
|
|
85
|
+
* the gate job and the applying jobs with the saved plan. The plan job runs
|
|
86
|
+
* the change's code, so a gate job reads it as a report, never as a rule.
|
|
87
|
+
*/
|
|
88
|
+
export declare function opWaveProductStateDir(spec: Pick<OpWavesSpec, "name">, wave: number): string;
|
|
89
|
+
/** The saved plan file itself. */
|
|
90
|
+
export declare function opWaveSavedPlanPath(spec: Pick<OpWavesSpec, "name">, wave: number): string;
|
|
91
|
+
/** The file an applying job leaves its run record in, in the outcome directory, for the record job (#4987). */
|
|
92
|
+
export declare function opWaveRunRecordFileName(wave: number, part?: {
|
|
93
|
+
group?: string;
|
|
94
|
+
share?: number;
|
|
95
|
+
}): string;
|
|
96
|
+
/** A run record file's name, as {@link opWaveRunRecordFileName} gives it; group 1 is the wave. */
|
|
97
|
+
export declare const OP_WAVE_RUN_RECORD_FILE: RegExp;
|
|
98
|
+
/**
|
|
99
|
+
* Refuse a spec whose waves cannot run as four jobs each, naming why. A
|
|
100
|
+
* `step` spec splits (#4992), and a `rest` wave runs one wave per run
|
|
101
|
+
* (./op-waves-follow-on.ts), so nothing is refused today.
|
|
102
|
+
*/
|
|
103
|
+
export declare function assertOpWavesSplit(_spec: Pick<OpWavesSpec, "name" | "waves">): void;
|
|
104
|
+
/** The job after which the waves after wave `k` start: its record job. */
|
|
105
|
+
export declare function opWaveRecordJobName(spec: Pick<OpWavesSpec, "waves">, k: number): string;
|
|
106
|
+
/**
|
|
107
|
+
* The split jobs of a before-merge pipeline (#4987), from `opWaveJobs`, in
|
|
108
|
+
* order: for each wave its plan job, its gate job, its applying jobs (the
|
|
109
|
+
* wave's own job, or each share and job group's job) and its record job.
|
|
110
|
+
* The plan job of each wave after the first needs the record job of the
|
|
111
|
+
* wave before; the gate needs the plan, each applying job the gate, and the
|
|
112
|
+
* record job every applying job and the gate, whose decision names the rows
|
|
113
|
+
* it leased (#4992).
|
|
114
|
+
*/
|
|
115
|
+
export declare function opWaveSplitJobs(spec: OpWavesSpec, jobs: readonly OpWaveJob[]): OpWaveSplitJob[];
|
|
116
|
+
/** The jobs a job after the waves needs in a split pipeline: the last wave's record job. */
|
|
117
|
+
export declare function opWaveSplitLastJobs(spec: Pick<OpWavesSpec, "waves">): string[];
|
|
118
|
+
/** What a split job calls itself in its guard's lines: `the plan job of wave 2 (prod) of tf-apply`, `share 1 of wave 2 (prod) of tf-apply`. */
|
|
119
|
+
export declare function opWaveSplitJobLabel(spec: string, job: Pick<OpWaveSplitJob, "phase" | "wave" | "waveName" | "share" | "group">): string;
|
|
120
|
+
/** The split jobs of wave `k`, by name, for a job after it (an apply status). */
|
|
121
|
+
export declare function opWaveSplitWaveJobs(jobs: readonly OpWaveSplitJob[], k: number): string[];
|
|
122
|
+
//# sourceMappingURL=op-waves-split.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"op-waves-split.d.ts","sourceRoot":"","sources":["../../src/op/op-waves-split.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AAGH,OAAO,EAAuC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AO,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAEvF;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,SAAS,EAAE,GAAG,cAAc,EAAE,CAyB/F;AAED,4FAA4F;AAC5F,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,GAAG,MAAM,EAAE,CAE9E;AAED,+IAA+I;AAC/I,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,OAAO,CAAC,GAAG,MAAM,CAMtI;AAED,iFAAiF;AACjF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,SAAS,cAAc,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAExF"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Op waves before merge, split so the change's code never runs beside a
|
|
3
|
+
* write token (#4987).
|
|
4
|
+
*
|
|
5
|
+
* Maintainer decision (2026-11-10): in a pipeline with `beforeMerge` each
|
|
6
|
+
* wave is four jobs.
|
|
7
|
+
*
|
|
8
|
+
* 1. `<wave>-plan` runs the change's code and holds no write token: the
|
|
9
|
+
* checkout keeps no credentials, the job's token can only read (GitHub),
|
|
10
|
+
* and on GitLab its script drops `CHANT_FORGE_TOKEN` and the job token.
|
|
11
|
+
* `chant run wave --phase plan` plans the wave and saves the plan
|
|
12
|
+
* ({@link opWaveSavedPlanPath}, beside the plan files) as an artifact.
|
|
13
|
+
* 2. `<wave>-gate` runs the default branch's code alone, with the token:
|
|
14
|
+
* `--phase gate` reads the rules at base, takes the saved plan, refuses
|
|
15
|
+
* it when its digest is not the one its plan files give, writes the
|
|
16
|
+
* gate's pending fact or spends the approval on `chant/lifecycle`, and
|
|
17
|
+
* keeps the decision record, as a wide wave's deciding job does.
|
|
18
|
+
* 3. `<wave>` (or each share and job group's job) applies the saved plan,
|
|
19
|
+
* with no write token: `--phase apply` checks each plan file's digest
|
|
20
|
+
* against the decision and applies the ones that match. Its run record
|
|
21
|
+
* goes to a file ({@link opWaveRunRecordFileName}) in place of the ledger.
|
|
22
|
+
* 4. `<wave>-record` runs the default branch's code with the token:
|
|
23
|
+
* `--phase record` writes those run records to the run ledger and exits
|
|
24
|
+
* as the wave's applying jobs did.
|
|
25
|
+
*
|
|
26
|
+
* A push run of the same pipeline takes the same four jobs. A pipeline
|
|
27
|
+
* without `beforeMerge` keeps one job per wave (or a deciding job and its
|
|
28
|
+
* shares), since a push runs merged code.
|
|
29
|
+
*
|
|
30
|
+
* A `step` spec (#4992) plans in the plan job's process; the saved plan
|
|
31
|
+
* keeps each run's step plan (its digest, effects and lock rows) without the
|
|
32
|
+
* engine's artifact. The gate job leases the rows the runs wait for and
|
|
33
|
+
* change, with no heartbeat, before it spends the approval, and the
|
|
34
|
+
* decision names the lease. The applying job plans its runs again through
|
|
35
|
+
* the step, as a share job does, and applies each whose plan digest the
|
|
36
|
+
* decision holds; it hands the release records to the record job, which
|
|
37
|
+
* writes them and lets go of the lease. A run whose plan moved is exit 4.
|
|
38
|
+
*
|
|
39
|
+
* A hook that holds the wave on another gate (#4992) in the plan or apply
|
|
40
|
+
* job reads that gate with no write token: approved, the wave goes on; still
|
|
41
|
+
* waiting, the job leaves the gate's pending fact to the gate job (a plan
|
|
42
|
+
* job's hold) or the record job (an apply job's), which records it, and the
|
|
43
|
+
* wave waits. A hold that asks chant to `record` the gate is spent before
|
|
44
|
+
* its hook runs again, so it fails in an applying job once approved.
|
|
45
|
+
*
|
|
46
|
+
* #4994: in the plan job, such a hold once approved waits, and the gate job
|
|
47
|
+
* spends the approval under its own rules at base, for a re-run of the hook
|
|
48
|
+
* at the wave's commit (an applied line with `rerun.head`). The plan job of
|
|
49
|
+
* the next run of that commit finds the line, with no finished line yet, and
|
|
50
|
+
* runs the hook again under it with `CHANT_HOLD_APPROVED`; the wave then
|
|
51
|
+
* plans on what the hook did. Its gate job writes the finished line from the
|
|
52
|
+
* hook's `CHANT_HOLD_FINISHED`, which the saved plan hands on
|
|
53
|
+
* (`holdsFinished`). Any other commit's job, and any job once the line is
|
|
54
|
+
* finished, reads the approval as spent.
|
|
55
|
+
*
|
|
56
|
+
* A product's hooks run in whichever job runs them (#4994): a hook its
|
|
57
|
+
* process serves by name (`inProcessHooks`) is called there in place of its
|
|
58
|
+
* command, and what the plan job's code keeps for the later jobs goes under
|
|
59
|
+
* {@link opWaveProductStateDir}.
|
|
60
|
+
*
|
|
61
|
+
* A `rest` wave (#4992) runs one wave per run: its four jobs run wave N,
|
|
62
|
+
* the last rendered one, or in a follow-on run the wave the run names
|
|
63
|
+
* (`--wave "${CHANT_WAVES_WAVE:-N}"`), and its record job starts the
|
|
64
|
+
* follow-on for the next wave the plan found (./op-waves-follow-on.ts).
|
|
65
|
+
* Its jobs carry `rest: true`.
|
|
66
|
+
*/
|
|
67
|
+
import { OP_WAVES_WAVE_ENV } from "./follow-on-run.js";
|
|
68
|
+
import { opWaveOutcomePath, opWaveRecordPath } from "./op-waves.js";
|
|
69
|
+
export const OP_WAVE_PHASES = ["plan", "gate", "apply", "record"];
|
|
70
|
+
/** Where a wave's plan job saves its plan, beside the run plan files the apply reads (#4987). */
|
|
71
|
+
export function opWaveSavedPlanDir(spec, wave) {
|
|
72
|
+
return `.chant/op-waves/${spec.name}/wave-${wave}`;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Where a product keeps what its own code in a split wave's later jobs reads
|
|
76
|
+
* (#4994): its report rows, the plans it read, a hook's state. It is inside
|
|
77
|
+
* the saved plan's directory, so every forge hands it from the plan job to
|
|
78
|
+
* the gate job and the applying jobs with the saved plan. The plan job runs
|
|
79
|
+
* the change's code, so a gate job reads it as a report, never as a rule.
|
|
80
|
+
*/
|
|
81
|
+
export function opWaveProductStateDir(spec, wave) {
|
|
82
|
+
return `${opWaveSavedPlanDir(spec, wave)}/product`;
|
|
83
|
+
}
|
|
84
|
+
/** The saved plan file itself. */
|
|
85
|
+
export function opWaveSavedPlanPath(spec, wave) {
|
|
86
|
+
return `${opWaveSavedPlanDir(spec, wave)}/saved-plan.json`;
|
|
87
|
+
}
|
|
88
|
+
/** The file an applying job leaves its run record in, in the outcome directory, for the record job (#4987). */
|
|
89
|
+
export function opWaveRunRecordFileName(wave, part = {}) {
|
|
90
|
+
const group = part.group !== undefined ? `-group-${part.group.replace(/[^A-Za-z0-9._-]/g, "_")}` : "";
|
|
91
|
+
const share = part.share !== undefined ? `-share-${part.share}` : "";
|
|
92
|
+
return `run-record-wave-${wave}${group}${share}.json`;
|
|
93
|
+
}
|
|
94
|
+
/** A run record file's name, as {@link opWaveRunRecordFileName} gives it; group 1 is the wave. */
|
|
95
|
+
export const OP_WAVE_RUN_RECORD_FILE = /^run-record-wave-(\d+)(?:-group-[A-Za-z0-9._-]+)?(?:-share-\d+)?\.json$/;
|
|
96
|
+
/**
|
|
97
|
+
* Refuse a spec whose waves cannot run as four jobs each, naming why. A
|
|
98
|
+
* `step` spec splits (#4992), and a `rest` wave runs one wave per run
|
|
99
|
+
* (./op-waves-follow-on.ts), so nothing is refused today.
|
|
100
|
+
*/
|
|
101
|
+
export function assertOpWavesSplit(_spec) { }
|
|
102
|
+
/** A wave job's command without `--decide`, which the plan and gate jobs take the place of; a rest wave's names the wave `CHANT_WAVES_WAVE` gives (#4992). */
|
|
103
|
+
function baseCommand(job, rest = false) {
|
|
104
|
+
const words = job.command.filter((w) => w !== "--decide");
|
|
105
|
+
if (!rest)
|
|
106
|
+
return words;
|
|
107
|
+
const at = words.indexOf("--wave");
|
|
108
|
+
return at < 0 ? words : [...words.slice(0, at + 1), `"\${${OP_WAVES_WAVE_ENV}:-${job.wave}}"`, ...words.slice(at + 2)];
|
|
109
|
+
}
|
|
110
|
+
/** The job after which the waves after wave `k` start: its record job. */
|
|
111
|
+
export function opWaveRecordJobName(spec, k) {
|
|
112
|
+
return `wave-${k}-${spec.waves[k - 1].name}-record`;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* The split jobs of a before-merge pipeline (#4987), from `opWaveJobs`, in
|
|
116
|
+
* order: for each wave its plan job, its gate job, its applying jobs (the
|
|
117
|
+
* wave's own job, or each share and job group's job) and its record job.
|
|
118
|
+
* The plan job of each wave after the first needs the record job of the
|
|
119
|
+
* wave before; the gate needs the plan, each applying job the gate, and the
|
|
120
|
+
* record job every applying job and the gate, whose decision names the rows
|
|
121
|
+
* it leased (#4992).
|
|
122
|
+
*/
|
|
123
|
+
export function opWaveSplitJobs(spec, jobs) {
|
|
124
|
+
assertOpWavesSplit(spec);
|
|
125
|
+
const out = [];
|
|
126
|
+
for (let k = 1; k <= spec.waves.length; k++) {
|
|
127
|
+
const own = jobs.filter((j) => j.wave === k);
|
|
128
|
+
const first = own[0];
|
|
129
|
+
const prefix = `wave-${k}-${first.waveName}`;
|
|
130
|
+
const needs = k === 1 ? [] : [opWaveRecordJobName(spec, k - 1)];
|
|
131
|
+
// #4992: the rest wave's jobs run the wave a follow-on run names.
|
|
132
|
+
const rest = spec.waves[k - 1].rest === true;
|
|
133
|
+
const marks = rest ? { rest: true } : {};
|
|
134
|
+
const base = baseCommand(first, rest);
|
|
135
|
+
const plan = `${prefix}-plan`;
|
|
136
|
+
const gate = `${prefix}-gate`;
|
|
137
|
+
out.push({ jobName: plan, wave: k, waveName: first.waveName, kind: "decide", needs, command: [...base, "--phase", "plan"], outcome: opWaveOutcomePath(spec, k), phase: "plan", runsChange: true, ...marks });
|
|
138
|
+
out.push({ jobName: gate, wave: k, waveName: first.waveName, kind: "decide", needs: [plan], command: [...base, "--phase", "gate"], record: opWaveRecordPath(spec, k), outcome: opWaveOutcomePath(spec, k), phase: "gate", runsChange: false, ...marks });
|
|
139
|
+
const applying = first.kind === "wave" ? [first] : own.filter((j) => j.kind === "share");
|
|
140
|
+
for (const job of applying) {
|
|
141
|
+
// The wave's own applying job writes `-apply`, so it never reads its own outcome as the gate job's.
|
|
142
|
+
const outcome = job.kind === "wave" ? opWaveOutcomePath(spec, k, { apply: true }) : job.outcome;
|
|
143
|
+
out.push({ ...job, kind: "share", needs: [gate], command: [...baseCommand(job, rest), "--phase", "apply"], record: opWaveRecordPath(spec, k), outcome, phase: "apply", runsChange: true, ...marks });
|
|
144
|
+
}
|
|
145
|
+
out.push({ jobName: opWaveRecordJobName(spec, k), wave: k, waveName: first.waveName, kind: "wave", needs: [...applying.map((j) => j.jobName), gate], record: opWaveRecordPath(spec, k), command: [...base, "--phase", "record"], outcome: opWaveOutcomePath(spec, k), phase: "record", runsChange: false, ...marks });
|
|
146
|
+
}
|
|
147
|
+
return out;
|
|
148
|
+
}
|
|
149
|
+
/** The jobs a job after the waves needs in a split pipeline: the last wave's record job. */
|
|
150
|
+
export function opWaveSplitLastJobs(spec) {
|
|
151
|
+
return [opWaveRecordJobName(spec, spec.waves.length)];
|
|
152
|
+
}
|
|
153
|
+
/** What a split job calls itself in its guard's lines: `the plan job of wave 2 (prod) of tf-apply`, `share 1 of wave 2 (prod) of tf-apply`. */
|
|
154
|
+
export function opWaveSplitJobLabel(spec, job) {
|
|
155
|
+
const wave = `wave ${job.wave} (${job.waveName}) of ${spec}`;
|
|
156
|
+
if (job.phase !== "apply")
|
|
157
|
+
return `the ${job.phase} job of ${wave}`;
|
|
158
|
+
const share = job.share !== undefined ? `share ${job.share} of ` : "";
|
|
159
|
+
if (job.group !== undefined)
|
|
160
|
+
return `${share}job group ${job.group} of ${wave}`;
|
|
161
|
+
return share ? `${share}${wave}` : `the apply job of ${wave}`;
|
|
162
|
+
}
|
|
163
|
+
/** The split jobs of wave `k`, by name, for a job after it (an apply status). */
|
|
164
|
+
export function opWaveSplitWaveJobs(jobs, k) {
|
|
165
|
+
return jobs.filter((j) => j.wave === k).map((j) => j.jobName);
|
|
166
|
+
}
|
package/dist/op/op-waves.d.ts
CHANGED
|
@@ -368,6 +368,15 @@ export interface OpWave {
|
|
|
368
368
|
shares?: number;
|
|
369
369
|
/** The forge deployment environment the wave's jobs run in (GitHub and GitLab; Forgejo has none). */
|
|
370
370
|
environment?: OpEnvironment;
|
|
371
|
+
/**
|
|
372
|
+
* Before merge (#4992), the environment of the wave's plan job alone. A
|
|
373
|
+
* split wave's applying job is its deployment and names `environment`, so
|
|
374
|
+
* its reviewers approve the wave once; the plan job names none on GitHub
|
|
375
|
+
* (on GitLab it names `environment` with `action: prepare`, which deploys
|
|
376
|
+
* nothing). Name one here, with no required reviewers, when the plan needs
|
|
377
|
+
* an environment's secrets or its OIDC claim. Forgejo has none.
|
|
378
|
+
*/
|
|
379
|
+
planEnvironment?: OpEnvironment;
|
|
371
380
|
/** Variables for this wave's jobs alone. */
|
|
372
381
|
variables?: Record<string, string>;
|
|
373
382
|
/** Steps this wave's jobs run after the checkout, as `ScheduledOpSpec.setup`. */
|
|
@@ -745,6 +754,10 @@ export declare function opWaveBinArgv(bin?: string): string[];
|
|
|
745
754
|
* so a renamed wave cannot drop its login or report without a word.
|
|
746
755
|
*/
|
|
747
756
|
export declare function opWaveJobInputsByWave(spec: Pick<OpWavesSpec, "name" | "waves">, waveJobs: Readonly<Record<string, OpWaveJobInputs>> | undefined): Array<OpWaveJobInputs | undefined>;
|
|
757
|
+
/** The paths a product's wave job artifact keeps (#4994): `path`, one or a list. */
|
|
758
|
+
export declare function opWaveJobArtifactPaths(artifact: {
|
|
759
|
+
path: string | readonly string[];
|
|
760
|
+
}): string[];
|
|
748
761
|
/** A wave job's artifact name (#4791): `{job}` in `name` is the job's name. */
|
|
749
762
|
export declare function opWaveJobArtifactName(name: string, jobName: string): string;
|
|
750
763
|
/** The command a resume job runs, through the product's bin when it has one (#4607). */
|
|
@@ -811,6 +824,7 @@ export declare function opWaveChecksDir(spec: Pick<OpWavesSpec, "name">): string
|
|
|
811
824
|
export declare function opWaveOutcomePath(spec: Pick<OpWavesSpec, "name">, wave: number, part?: {
|
|
812
825
|
group?: string;
|
|
813
826
|
share?: number;
|
|
827
|
+
apply?: boolean;
|
|
814
828
|
}): string;
|
|
815
829
|
/** Refuse a spec no job could run, naming what is wrong. */
|
|
816
830
|
export declare function assertOpWavesSpec(spec: OpWavesSpec): void;
|
|
@@ -876,12 +890,22 @@ export declare function opWaveShare<T extends {
|
|
|
876
890
|
* The jobs of an Op waves pipeline, in order. `specFile` is the spec's path
|
|
877
891
|
* from the job's working directory, which every command names. `bin` is the
|
|
878
892
|
* product's command in place of `chant` (#4607, {@link opWaveBinArgv}).
|
|
893
|
+
* With `renderSpec` (#4982) every command passes `--render-spec`: the job
|
|
894
|
+
* renders the spec at base through the product's command
|
|
895
|
+
* (`./op-waves-render-spec.ts`), and `spec` is the pipeline's shape.
|
|
896
|
+
* With `beforeMerge` (#4984) every command reads its base from
|
|
897
|
+
* `CHANT_WAVES_BASE` when the run checked out a pull request's decided
|
|
898
|
+
* head, else from the spec's `base` (or `HEAD^1`), as a push run does.
|
|
879
899
|
*/
|
|
880
900
|
export declare function opWaveJobs(spec: OpWavesSpec, specFile: string, options?: {
|
|
881
901
|
bin?: string;
|
|
902
|
+
renderSpec?: boolean;
|
|
903
|
+
beforeMerge?: boolean;
|
|
882
904
|
}): OpWaveJob[];
|
|
883
905
|
/** The job group a job applies (#3914), or undefined for a wave's own jobs. */
|
|
884
906
|
export declare function opWaveGroupOf(spec: OpWavesSpec, job: Pick<OpWaveJob, "wave" | "group">): OpWaveJobGroup | undefined;
|
|
907
|
+
/** Wave `k` of the spec, or past its waves the `rest` wave, which stands for each wave its plan found (#3821, #4992); undefined when there is none. */
|
|
908
|
+
export declare function opWaveAt(spec: Pick<OpWavesSpec, "waves">, k: number): OpWave | undefined;
|
|
885
909
|
/** The wave a job belongs to. */
|
|
886
910
|
export declare function opWaveOf(spec: OpWavesSpec, job: Pick<OpWaveJob, "wave">): OpWave;
|
|
887
911
|
//# sourceMappingURL=op-waves.d.ts.map
|
|
@@ -1 +1 @@
|
|
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AAc,GAAG,SAAS,CAEnH;AAED,uJAAuJ;AACvJ,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAGxF;AAED,iCAAiC;AACjC,wBAAgB,QAAQ,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,GAAG,MAAM,CAEhF"}
|
package/dist/op/op-waves.js
CHANGED
|
@@ -262,6 +262,10 @@ export function opWaveJobInputsByWave(spec, waveJobs) {
|
|
|
262
262
|
}
|
|
263
263
|
return names.map((name) => waveJobs?.[name]);
|
|
264
264
|
}
|
|
265
|
+
/** The paths a product's wave job artifact keeps (#4994): `path`, one or a list. */
|
|
266
|
+
export function opWaveJobArtifactPaths(artifact) {
|
|
267
|
+
return typeof artifact.path === "string" ? [artifact.path] : [...artifact.path];
|
|
268
|
+
}
|
|
265
269
|
/** A wave job's artifact name (#4791): `{job}` in `name` is the job's name. */
|
|
266
270
|
export function opWaveJobArtifactName(name, jobName) {
|
|
267
271
|
return name.split("{job}").join(jobName);
|
|
@@ -928,14 +932,22 @@ export function opWaveShare(runs, share, shares) {
|
|
|
928
932
|
* The jobs of an Op waves pipeline, in order. `specFile` is the spec's path
|
|
929
933
|
* from the job's working directory, which every command names. `bin` is the
|
|
930
934
|
* product's command in place of `chant` (#4607, {@link opWaveBinArgv}).
|
|
935
|
+
* With `renderSpec` (#4982) every command passes `--render-spec`: the job
|
|
936
|
+
* renders the spec at base through the product's command
|
|
937
|
+
* (`./op-waves-render-spec.ts`), and `spec` is the pipeline's shape.
|
|
938
|
+
* With `beforeMerge` (#4984) every command reads its base from
|
|
939
|
+
* `CHANT_WAVES_BASE` when the run checked out a pull request's decided
|
|
940
|
+
* head, else from the spec's `base` (or `HEAD^1`), as a push run does.
|
|
931
941
|
*/
|
|
932
942
|
export function opWaveJobs(spec, specFile, options = {}) {
|
|
933
943
|
assertOpWavesSpec(spec);
|
|
934
944
|
const jobs = [];
|
|
935
945
|
let previous = [];
|
|
946
|
+
// #4984: before merge the base is the default branch's commit the run started at, which the head's checkout step exports.
|
|
947
|
+
const base = options.beforeMerge ? ["--base", `"\${CHANT_WAVES_BASE:-${(spec.base ?? "HEAD^1").replace(/["\\$`]/g, "\\$&")}}"`] : spec.base ? ["--base", spec.base] : [];
|
|
936
948
|
spec.waves.forEach((wave, index) => {
|
|
937
949
|
const k = index + 1;
|
|
938
|
-
const command = [...opWaveBinArgv(options.bin), "run", "wave", "--spec", specFile, "--wave", String(k), ...(
|
|
950
|
+
const command = [...opWaveBinArgv(options.bin), "run", "wave", "--spec", specFile, "--wave", String(k), ...base, ...(options.renderSpec ? ["--render-spec"] : [])];
|
|
939
951
|
const prefix = `wave-${k}-${wave.name}`;
|
|
940
952
|
const shares = wave.shares ?? 1;
|
|
941
953
|
if (shares === 1 && wave.jobs === undefined) {
|
|
@@ -980,6 +992,11 @@ export function opWaveJobs(spec, specFile, options = {}) {
|
|
|
980
992
|
export function opWaveGroupOf(spec, job) {
|
|
981
993
|
return job.group === undefined ? undefined : spec.waves[job.wave - 1]?.jobs?.find((g) => g.name === job.group);
|
|
982
994
|
}
|
|
995
|
+
/** Wave `k` of the spec, or past its waves the `rest` wave, which stands for each wave its plan found (#3821, #4992); undefined when there is none. */
|
|
996
|
+
export function opWaveAt(spec, k) {
|
|
997
|
+
const last = spec.waves[spec.waves.length - 1];
|
|
998
|
+
return spec.waves[k - 1] ?? (k > spec.waves.length && last?.rest === true ? last : undefined);
|
|
999
|
+
}
|
|
983
1000
|
/** The wave a job belongs to. */
|
|
984
1001
|
export function opWaveOf(spec, job) {
|
|
985
1002
|
return spec.waves[job.wave - 1];
|
|
@@ -19,7 +19,19 @@ export interface ScheduledWatch {
|
|
|
19
19
|
* missing schedule's line names it.
|
|
20
20
|
*/
|
|
21
21
|
schedule?: ScheduledRunsQuery["schedule"];
|
|
22
|
+
/**
|
|
23
|
+
* The product plan's targets whose note checks this watch (#4988), such
|
|
24
|
+
* as the environment a drift watch reads. Left out, every target's note
|
|
25
|
+
* does. A note of another target checks neither the watch nor a
|
|
26
|
+
* discovered Op of the same name.
|
|
27
|
+
*/
|
|
28
|
+
targets?: readonly string[];
|
|
22
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* The watches the note of `target` checks (#4988): the ones with no
|
|
32
|
+
* `targets`, and the ones naming it. Without a target, every one.
|
|
33
|
+
*/
|
|
34
|
+
export declare function watchesForTarget(watches: readonly ScheduledWatch[], target: string | undefined): ScheduledWatch[];
|
|
23
35
|
/** An Op the plan note warns about. */
|
|
24
36
|
export interface OverdueOp {
|
|
25
37
|
op: string;
|
|
@@ -135,7 +147,9 @@ export declare function overdueOpsAt(input: {
|
|
|
135
147
|
/**
|
|
136
148
|
* A product's own scheduled watches (#4888), checked beside the
|
|
137
149
|
* discovered Ops; one of the same name takes the discovered Op's place.
|
|
138
|
-
* They are checked even when discovery fails.
|
|
150
|
+
* They are checked even when discovery fails. #4988: with `member`, the
|
|
151
|
+
* product plan's target, a watch whose `targets` leave it out is not
|
|
152
|
+
* checked, and neither is the discovered Op of its name.
|
|
139
153
|
*/
|
|
140
154
|
watches?: readonly ScheduledWatch[];
|
|
141
155
|
} & OverdueWords): Promise<OverdueOp[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schedule-overdue.d.ts","sourceRoot":"","sources":["../../src/op/schedule-overdue.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGzF,+DAA+D;AAC/D,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,SA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G,SAAS,CAexE;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,EAAE,GAAG,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAsB,GAAG,cAAc,EAAE,CAqB5J;AAED;;;;;;;;GAQG;AACH,wBAAsB,YAAY,CAChC,KAAK,EAAE;IACL,KAAK,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5B;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;CACrC,GAAG,YAAY,GACf,OAAO,CAAC,SAAS,EAAE,CAAC,CAkCtB"}
|
|
@@ -19,6 +19,15 @@ import { existsSync, readdirSync, readFileSync, statSync } from "node:fs";
|
|
|
19
19
|
import { join } from "node:path";
|
|
20
20
|
import { cronFiresUtc } from "./cron.js";
|
|
21
21
|
import { parseYAMLDocument, splitYAMLDocuments } from "../yaml.js";
|
|
22
|
+
/**
|
|
23
|
+
* The watches the note of `target` checks (#4988): the ones with no
|
|
24
|
+
* `targets`, and the ones naming it. Without a target, every one.
|
|
25
|
+
*/
|
|
26
|
+
export function watchesForTarget(watches, target) {
|
|
27
|
+
if (target === undefined)
|
|
28
|
+
return [...watches];
|
|
29
|
+
return watches.filter((w) => w.targets === undefined || w.targets.includes(target));
|
|
30
|
+
}
|
|
22
31
|
/**
|
|
23
32
|
* The discovered Ops that are scheduled watch or reconcile Ops: a
|
|
24
33
|
* `schedule`, and the `Watch` label `WatchOp` sets (./composites/watch-op.ts)
|
|
@@ -185,10 +194,64 @@ function yamlDocs(repoRoot, path) {
|
|
|
185
194
|
}
|
|
186
195
|
/** When `path` was first committed (ISO 8601), if the checkout's history has it. */
|
|
187
196
|
export function fileAdded(repoRoot, path) {
|
|
188
|
-
|
|
197
|
+
return addedCommit(repoRoot, path)?.at;
|
|
198
|
+
}
|
|
199
|
+
/** The oldest commit the checkout's history says added `path`, with its commit time. */
|
|
200
|
+
function addedCommit(repoRoot, path) {
|
|
201
|
+
const r = spawnSync("git", ["-C", repoRoot, "log", "--format=%H %cI", "--diff-filter=A", "--", path], { encoding: "utf-8" });
|
|
189
202
|
if (r.status !== 0)
|
|
190
203
|
return undefined;
|
|
191
|
-
|
|
204
|
+
const last = r.stdout.trim().split("\n").filter(Boolean).pop();
|
|
205
|
+
if (!last)
|
|
206
|
+
return undefined;
|
|
207
|
+
const [sha, at] = last.split(" ");
|
|
208
|
+
return sha && at ? { sha, at } : undefined;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* The commits a shallow checkout's history stops at (#4952), from git's
|
|
212
|
+
* `shallow` file. Empty for a full clone.
|
|
213
|
+
*/
|
|
214
|
+
function shallowBoundary(repoRoot) {
|
|
215
|
+
const r = spawnSync("git", ["-C", repoRoot, "rev-parse", "--path-format=absolute", "--git-path", "shallow"], { encoding: "utf-8" });
|
|
216
|
+
if (r.status !== 0)
|
|
217
|
+
return new Set();
|
|
218
|
+
try {
|
|
219
|
+
return new Set(readFileSync(r.stdout.trim(), "utf-8").split("\n").map((l) => l.trim()).filter(Boolean));
|
|
220
|
+
}
|
|
221
|
+
catch {
|
|
222
|
+
return new Set();
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
/** How long the check waits for the fetch that deepens a shallow checkout. */
|
|
226
|
+
const DEEPEN_TIMEOUT_MS = 120000;
|
|
227
|
+
/**
|
|
228
|
+
* When `path` was added, read so a shallow checkout does not under-report
|
|
229
|
+
* (#4952). A CI checkout is often shallow, and its oldest commit lists
|
|
230
|
+
* every file as added, so a job that never ran would count from that
|
|
231
|
+
* commit. When the commit found is at the shallow boundary, the check
|
|
232
|
+
* fetches the rest of the history once per run (`git fetch --unshallow`,
|
|
233
|
+
* with the job's own credentials) and reads the file again. When that fetch
|
|
234
|
+
* fails, the boundary's time is still a lower bound, so the check counts
|
|
235
|
+
* from it and says so in the log.
|
|
236
|
+
*/
|
|
237
|
+
function addedDate(repoRoot, path, op, state, log) {
|
|
238
|
+
let found = addedCommit(repoRoot, path);
|
|
239
|
+
if (!found || !shallowBoundary(repoRoot).has(found.sha))
|
|
240
|
+
return found?.at;
|
|
241
|
+
if (!state.deepened) {
|
|
242
|
+
state.deepened = true;
|
|
243
|
+
const r = spawnSync("git", ["-C", repoRoot, "fetch", "--quiet", "--unshallow"], { encoding: "utf-8", timeout: DEEPEN_TIMEOUT_MS });
|
|
244
|
+
if (r.status !== 0)
|
|
245
|
+
state.failed = (r.stderr || r.error?.message || `git fetch exited ${r.status}`).trim().split("\n")[0];
|
|
246
|
+
// A checkout with no remote answers 0 and stays shallow.
|
|
247
|
+
else if (shallowBoundary(repoRoot).size > 0)
|
|
248
|
+
state.failed = "git fetch --unshallow left it shallow";
|
|
249
|
+
found = addedCommit(repoRoot, path) ?? found;
|
|
250
|
+
}
|
|
251
|
+
if (state.failed !== undefined && shallowBoundary(repoRoot).has(found.sha)) {
|
|
252
|
+
log(`schedule check: the checkout is shallow and its history could not be fetched, so Op ${op} counts from its oldest commit, ${found.at.slice(0, 10)}: ${state.failed}`);
|
|
253
|
+
}
|
|
254
|
+
return found.at;
|
|
192
255
|
}
|
|
193
256
|
const HINT = {
|
|
194
257
|
github: "GitHub turns a scheduled workflow off after 60 days with no activity in the repository. Turn the workflow on again under Actions, or run it by hand",
|
|
@@ -246,6 +309,8 @@ export async function checkOverdueOps(input) {
|
|
|
246
309
|
return [];
|
|
247
310
|
const log = (line) => input.log(`${input.logPrefix ?? ""}${line}`);
|
|
248
311
|
const out = [];
|
|
312
|
+
// One fetch at most per check, however many Ops count from a shallow boundary (#4952).
|
|
313
|
+
const history = {};
|
|
249
314
|
for (const watch of input.watches) {
|
|
250
315
|
const file = opPipelineFile(input.repoRoot, forge.kind, watch, input.member);
|
|
251
316
|
if (!file)
|
|
@@ -258,7 +323,7 @@ export async function checkOverdueOps(input) {
|
|
|
258
323
|
log(`schedule check: ${forge.kind} did not say when Op ${watch.op} last ran, so it is not checked: ${(err instanceof Error ? err.message : String(err)).split("\n")[0]}`);
|
|
259
324
|
continue;
|
|
260
325
|
}
|
|
261
|
-
const found = overdueVerdict(watch, forge.kind, runs, runs.last ? undefined :
|
|
326
|
+
const found = overdueVerdict(watch, forge.kind, runs, runs.last ? undefined : addedDate(input.repoRoot, file, watch.op, history, log), input.now);
|
|
262
327
|
if (found) {
|
|
263
328
|
log(found.message);
|
|
264
329
|
out.push(input.label ? { ...found, message: `${input.label}${found.message}` } : found);
|
|
@@ -276,6 +341,8 @@ export const PLAN_WATCHES_ENV = "CHANT_PLAN_WATCHES";
|
|
|
276
341
|
const OP_NAME = /^[A-Za-z0-9][A-Za-z0-9_.:-]*$/;
|
|
277
342
|
const REL_PATH = /^(?!\/)(?!.*(?:^|\/)\.\.(?:\/|$))[A-Za-z0-9_.\/-]+$/;
|
|
278
343
|
const VAR_NAME = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
344
|
+
/** A product plan target's name, as ../components/product-plan.ts takes it. */
|
|
345
|
+
const WATCH_TARGET = /^[A-Za-z0-9][A-Za-z0-9_-]*$/;
|
|
279
346
|
/**
|
|
280
347
|
* Why `watch` is not a scheduled watch a pipeline may name (#4888), or
|
|
281
348
|
* undefined when it is: an Op name, a cron of five fields, `files` as
|
|
@@ -302,6 +369,9 @@ export function scheduledWatchProblem(watch) {
|
|
|
302
369
|
if (s.not !== undefined && (!Array.isArray(s.not) || !s.not.every(plain)))
|
|
303
370
|
return `watch ${watch.op}'s schedule not is not a list of plain words`;
|
|
304
371
|
}
|
|
372
|
+
// #4988: the targets whose note checks the watch, by name.
|
|
373
|
+
if (watch.targets !== undefined && (!Array.isArray(watch.targets) || watch.targets.length === 0 || watch.targets.some((t) => typeof t !== "string" || !WATCH_TARGET.test(t))))
|
|
374
|
+
return `watch ${watch.op}'s targets are not a list of target names`;
|
|
305
375
|
return undefined;
|
|
306
376
|
}
|
|
307
377
|
/**
|
|
@@ -348,7 +418,9 @@ export async function overdueOpsAt(input) {
|
|
|
348
418
|
const { forge } = input;
|
|
349
419
|
if (!forge?.scheduledRuns)
|
|
350
420
|
return [];
|
|
351
|
-
const
|
|
421
|
+
const all = input.watches ?? [];
|
|
422
|
+
const own = watchesForTarget(all, input.member);
|
|
423
|
+
const elsewhere = all.filter((w) => !own.includes(w));
|
|
352
424
|
let discovered = [];
|
|
353
425
|
try {
|
|
354
426
|
const { discoverOps } = await import("./discover.js");
|
|
@@ -360,7 +432,7 @@ export async function overdueOpsAt(input) {
|
|
|
360
432
|
if (own.length === 0)
|
|
361
433
|
return [];
|
|
362
434
|
}
|
|
363
|
-
const watches = [...discovered.filter((d) => !own.some((w) => w.op === d.op)), ...own];
|
|
435
|
+
const watches = [...discovered.filter((d) => !own.some((w) => w.op === d.op) && !elsewhere.some((w) => w.op === d.op)), ...own];
|
|
364
436
|
if (watches.length === 0)
|
|
365
437
|
return [];
|
|
366
438
|
try {
|