@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
package/dist/ci-product.js
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
* {@link CI_PRODUCT_FLOOR} is its floor: `productPipelineJobs`, `approveLine`
|
|
9
9
|
* and `assertProductWords` present means the rest is too.
|
|
10
10
|
*/
|
|
11
|
-
import { OTLP_EXPORTER_FLOOR } from "./otlp.js";
|
|
12
11
|
import { NEXT_RELEASE } from "./release-floors.js";
|
|
12
|
+
import { OTLP_EXPORTER_FLOOR } from "./otlp.js";
|
|
13
13
|
/**
|
|
14
14
|
* The first chant with the product pipeline (#4550): the words, the
|
|
15
15
|
* `pull-request` op-wave approval source, `runCommandInProcess(argv, {
|
|
@@ -50,22 +50,89 @@ export { planNoteHandoff, PR_PLAN_NOTE_FILE } from "./pr-plan-note.js";
|
|
|
50
50
|
/**
|
|
51
51
|
* The first chant whose product plan carries the plan-job steps beside the plan verb and the note job's own lines (#4899, #4931): `productPlan.login` and a target's `login` (ci-login) with the job's OIDC token, `idTokens`, `pending`, `controlRead`, `setup` steps, job-level `env`, `report`, `concurrency`, the comment re-plan `replan`, and `noteSteps`; a hand-off's `marker` kept under the note words' `productMarker`; and the note job's notices and overdue Ops under a hand-off's counts.
|
|
52
52
|
*/
|
|
53
|
-
export const PRODUCT_PLAN_STEPS_FLOOR =
|
|
53
|
+
export const PRODUCT_PLAN_STEPS_FLOOR = "0.124.88";
|
|
54
54
|
export { PLAN_ARGUMENT_ENV, PLAN_NOTE_NOTICES_ENV } from "./components/product-plan.js";
|
|
55
55
|
/**
|
|
56
56
|
* The first chant whose `parseProductComment` takes `leaveCommit` and that has `commitWordOf` (#4890): a comment job that is not the commit job leaves every comment for a commit word to it, a malformed one included, so the comment gets one reply.
|
|
57
57
|
*/
|
|
58
|
-
export const COMMENT_LEAVES_COMMIT_FLOOR =
|
|
58
|
+
export const COMMENT_LEAVES_COMMIT_FLOOR = "0.124.88";
|
|
59
|
+
/**
|
|
60
|
+
* The first chant with the comment job on GitHub and Forgejo and the replies to commands no job runs (#4946): `commentJob` in the product pipeline (`chant components pr-comment`, `answerProductComment` in `@intentius/chant/ci-comment-commands`), which replies to a refusal and to a command the pipeline runs no job for, and with waves on merge starts a merged pull request's apply again; the words' `replies` and an alias's `refuse`, which the GitLab note poll reads too, as `chantNoteRuns`' `members`; `retryApply`; and `locks: "plan"` in GitHub's and Forgejo's product plan, with the lock, unlock and comment lock jobs.
|
|
61
|
+
*/
|
|
62
|
+
export const COMMENT_COMMANDS_FLOOR = "0.124.89";
|
|
63
|
+
export { answerProductComment, answeredElsewhere, COMMENT_JOBS_ENV, commentRuns, PR_COMMENT_JOB, RERUN_APPLY_JOBS } from "./ci-comment-commands.js";
|
|
64
|
+
export { forkReply, memberReply, notRunReply } from "./ci-comment-replies.js";
|
|
65
|
+
export { productCommentJob } from "./components/product-pipeline.js";
|
|
66
|
+
/**
|
|
67
|
+
* The first chant whose product plan locks what a change reaches (#4979): `productPlan.reach`, a reach line the lock job runs at the target branch's commit with `chant lock --reach` (`@intentius/chant/lifecycle/reach-locks`), on GitHub, Forgejo and GitLab, where the lock job runs in the plan notes pipeline with `--open` beside the comment lock and unlock jobs; and whose comment job answers a re-plan comment with flags the product plan's re-plan cannot take (`noPlanFlags`).
|
|
68
|
+
*/
|
|
69
|
+
export const PRODUCT_PLAN_REACH_LOCKS_FLOOR = "0.124.89";
|
|
70
|
+
export { LOCK_REACH_ENV, reachedTargets, reachOpen } from "./lifecycle/reach-locks.js";
|
|
71
|
+
export { productPlanReachLock } from "./components/product-plan.js";
|
|
72
|
+
export { planFlagsReply } from "./ci-comment-commands.js";
|
|
73
|
+
/**
|
|
74
|
+
* The first chant whose comment job stops a merged pull request's re-run at a wave (#4979): `/<product> apply wave-<n>` writes a stop for the merge commit on `chant/lifecycle` (`_waves/<op>.stops.json`, `@intentius/chant/op/wave-stop`) before GitHub's re-run or Forgejo's dispatch, and `chant run wave` leaves each wave after n waiting (exit 3).
|
|
75
|
+
*/
|
|
76
|
+
export const WAVE_STOP_FLOOR = "0.124.89";
|
|
77
|
+
export { setWaveStop, waveStopAt, waveStopLine } from "./op/wave-stop.js";
|
|
78
|
+
/**
|
|
79
|
+
* The first chant whose Op waves run before merge (#4984): `wavesBeforeMerge` in the product pipeline, where the comment job (GitHub, Forgejo) or the note poll (GitLab) decides `/<product> apply [wave-<n>]` on an open pull request (`decideWavesBeforeMerge`, `@intentius/chant/op/before-merge-decide`), records the head and its digest on `chant/lifecycle` (`_waves/<op>.before-merge.json`) and starts the waves for it; the generators' `beforeMerge`, whose guard admits that head alone, whose jobs check it out and read the base from the default branch, and whose `before-merge-done` job merges and releases the locks (`chant run wave --merge`); `waveJobs.<wave>.prelude`; the GitLab note poll's wave stop (`chantNoteRuns`' `waves`); a re-plan word that never starts with `-`; and the terraform lexicon's reach helpers (`@intentius/chant-lexicon-terraform/reach`).
|
|
80
|
+
*/
|
|
81
|
+
export const WAVES_BEFORE_MERGE_FLOOR = NEXT_RELEASE;
|
|
82
|
+
export { BEFORE_MERGE_DIGEST_ENV, BEFORE_MERGE_DONE_JOB, BEFORE_MERGE_HEAD_ENV, BEFORE_MERGE_PR_ENV, beforeMergeDigest, beforeMergePath, beforeMergeProblems, WAVES_BASE_ENV } from "./op/before-merge.js";
|
|
83
|
+
export { decideWavesBeforeMerge, defaultPipelineFiles } from "./op/before-merge-decide.js";
|
|
84
|
+
/**
|
|
85
|
+
* The first chant whose Op waves post the apply statuses (#4987): the generators' `applyStatus`, a job `apply-status-<n>` after each wave at the default branch's commit that posts `<product>/apply` on the commit the waves applied (a before-merge run's decided head) with `chant run wave --apply-status` (`@intentius/chant/op/apply-status`), and the product pipeline's `applyStatus`; whose product plan takes `staleNotes`, each target's note carrying the target branch's commit and a `stale-notes` job beside wave 1 on a push marking each target's note (`pr-post --stale` with one `--member` per target); whose `productPipelineJobs` returns `waves.pipeline` for the generators; and whose GitLab reach line reaches the lock and note-commands jobs unexpanded (`expand: false`).
|
|
86
|
+
*/
|
|
87
|
+
export const WAVES_APPLY_STATUS_FLOOR = NEXT_RELEASE;
|
|
88
|
+
export { applyStatusJobName, opWaveApplyStatus, postOpWaveApplyStatus } from "./op/apply-status.js";
|
|
89
|
+
/**
|
|
90
|
+
* The first chant whose before-merge waves never run the change's code beside a write token (#4987): with `beforeMerge` each wave is a plan job (the change's code, a checkout with no credentials kept, a read-only token; GitLab drops `CHANT_FORGE_TOKEN` and the job token), a gate job at the default branch with the token, an applying job on the saved plan with no write token, and a record job at the default branch that writes the run records (`chant run wave --phase plan|gate|apply|record`, `@intentius/chant/op/op-waves-split`). A `rest` wave is refused with `beforeMerge`.
|
|
91
|
+
*/
|
|
92
|
+
export const WAVES_BEFORE_MERGE_SPLIT_FLOOR = NEXT_RELEASE;
|
|
93
|
+
export { opWaveSplitJobs } from "./op/op-waves-split.js";
|
|
94
|
+
/**
|
|
95
|
+
* The first chant whose split before-merge waves take a `step` spec, Forgejo's hand-off, holds on other gates and one approval per wave (#4992): the plan job saves each run's step plan, the gate job leases the rows they change (no heartbeat; the decision names the lease) before it spends the approval, the applying job plans its runs again through the step and applies each whose digest the decision holds, and the record job writes the release records and lets go of the rows; a hook in the plan or apply job that holds the wave on another gate reads it with no write token and leaves its pending fact to the gate or record job; on Forgejo the plan and applying jobs hand their files on as job outputs (`packJs`), never through the artifact upload, and the gate and record jobs keep them as the artifacts; the plan job names no environment on GitHub (a wave's `planEnvironment` when set; on GitLab it prepares it), so the environment's reviewers are asked once. A `rest` wave splits from {@link WAVES_BEFORE_MERGE_REST_FLOOR} on.
|
|
96
|
+
*/
|
|
97
|
+
export const WAVES_BEFORE_MERGE_STEP_FLOOR = NEXT_RELEASE;
|
|
98
|
+
/**
|
|
99
|
+
* The first chant whose split waves run a product's own process in every job (#4994): the product wave hook's `hooks` (`runChantInProcess(["run", "wave", ..., "--phase", <phase>], words, { wave: { afterPlan, capabilities, hookExec, runHooks, hooks } })`, `RunOpWaveOptions.inProcessHooks`) serves a spec hook by its name in the process of whichever job runs it, plan, gate or applying job or the one-job shape, in place of a command that called back over a socket; `opWaveProductStateDir` is where the plan job's code keeps what the later jobs read; a `record: true` hold in the plan job is spent by the gate job for a re-run of the hook at the wave's commit (an applied line with `rerun.head`), which the next run's plan job runs and its gate job finishes (`holdsFinished`); and `waveJobs.<wave>.artifact.path` takes a list and `waveJobs.<wave>.gate` gives the gate job a report and an artifact, so a product's own upload steps go through chant's Forgejo hand-off.
|
|
100
|
+
*/
|
|
101
|
+
export const WAVES_PRODUCT_HOOKS_FLOOR = NEXT_RELEASE;
|
|
102
|
+
export { opWaveProductStateDir } from "./op/op-waves-split.js";
|
|
103
|
+
/**
|
|
104
|
+
* The first chant whose split before-merge waves take a `rest` wave (#4992): its four jobs run one wave per run, the wave `CHANT_WAVES_WAVE` names (their own by default), and its record job, once the run applied and the plan found another wave, starts the waves workflow again for it (GitHub and Forgejo: a dispatch with the inputs `wave` and the decision's `pr`, `head` and `digest`, or a push's `commit`; GitLab: a pipeline with the same variables, with `CHANT_FORGE_TOKEN`), whose guard admits it as the same decided head; the jobs of the waves before it do not run in that follow-on; the record job's note (`rest-wave.json` beside the outcomes, `@intentius/chant/op/op-waves-follow-on`) tells `before-merge-done`, the control dispatch and the apply status that a run which started a follow-on is not the last.
|
|
105
|
+
*/
|
|
106
|
+
export const WAVES_BEFORE_MERGE_REST_FLOOR = NEXT_RELEASE;
|
|
107
|
+
/**
|
|
108
|
+
* The first chant whose rest wave's record job records each follow-on it starts on `chant/lifecycle` before it starts it (#4998): `_waves/<op>.follow-on.json` keeps, per decided head or pushed commit, the wave started, the run that started it, the decision (`pr`, `digest`) or the `commit`, and the outcomes of every run of the chain so far; the guard admits a follow-on only for the wave that record names, so a wave started by hand past it is refused; and the last run's control dispatch, apply status and `before-merge-done` add up the outcomes of every run of the chain (the note's `chain`), so a chain whose last wave changed nothing reports `applied`.
|
|
109
|
+
*/
|
|
110
|
+
export const WAVES_FOLLOW_ON_RECORD_FLOOR = NEXT_RELEASE;
|
|
59
111
|
/**
|
|
60
112
|
* The first chant whose product plan takes `watches`, the product's own scheduled jobs the note job's `pr-post` checks for having stopped with the job's token (#4888), and whose `checkOverdueOps` and `overdueOpsAt` take a product's `logPrefix` and `label`.
|
|
61
113
|
*/
|
|
62
|
-
export const PRODUCT_PLAN_WATCHES_FLOOR =
|
|
63
|
-
export { PLAN_WATCHES_ENV } from "./op/schedule-overdue.js";
|
|
114
|
+
export const PRODUCT_PLAN_WATCHES_FLOOR = "0.124.88";
|
|
115
|
+
export { PLAN_WATCHES_ENV, watchesForTarget } from "./op/schedule-overdue.js";
|
|
116
|
+
/**
|
|
117
|
+
* The first chant whose product plan's `watches` take `targets` (#4988): a watch scoped to those targets is checked by their notes alone, and the note of another target checks neither it nor the discovered Op of its name (`watchesForTarget`).
|
|
118
|
+
*/
|
|
119
|
+
export const PRODUCT_PLAN_WATCH_TARGETS_FLOOR = NEXT_RELEASE;
|
|
64
120
|
/**
|
|
65
121
|
* The first chant whose product plan takes `record` (#4899): the plan step writes the plan job's run record into the hand-off, and the note job keeps it as Op `pr-plan` on `chant/lifecycle` with `pr-post --record-run <plan job>` (`--open` on GitLab), as `chant ci run plan --in-place` records `pr-plan`'s.
|
|
66
122
|
*/
|
|
67
|
-
export const PRODUCT_PLAN_RECORD_FLOOR =
|
|
123
|
+
export const PRODUCT_PLAN_RECORD_FLOOR = "0.124.88";
|
|
68
124
|
export { PLAN_RUN_OP, PLAN_RUN_RECORD_FILE, readPlanRunRecord } from "./pr-plan-record.js";
|
|
125
|
+
/**
|
|
126
|
+
* The first chant whose product plan carries what terragucci's and sql-yodeler's plan jobs did themselves (#4963, #4951): `trade` (a plan's or a target's) before the checkout, `replan: { dispatch, reply, notAffected }` (a re-plan from `workflow_dispatch`, a reply to a comment no other job takes, `pr-post --not-affected`), `previousMarker` (`CHANT_PLAN_PREVIOUS_MARKER`), `noteSteps.pullRequest`, a `PrReport`'s `marker`, and a hand-off of the product's own note text (`planBodyHandoff`).
|
|
127
|
+
*/
|
|
128
|
+
export const PRODUCT_PLAN_REPLAN_FLOOR = "0.124.89";
|
|
129
|
+
export { gitlabReplanArgumentLines, PREVIOUS_MARKER_JS, replanDecideJs } from "./components/product-plan.js";
|
|
130
|
+
export { planBodyHandoff, PLAN_BODY_LIMIT } from "./pr-plan-note.js";
|
|
131
|
+
/**
|
|
132
|
+
* The first chant whose note job compares the plan's subject with the previous note's (#4972), on GitHub, Forgejo and GitLab: a plan note hand-off's `subject` (`PrPlanSubject`, an id and named parts) is kept in the note, and `pr-post` adds the note words' `sinceLast` line, naming the parts added, gone and changed (`subjectParts`), when the previous note kept another id. The plan job reads no note, and `previousMarker` is deprecated.
|
|
133
|
+
*/
|
|
134
|
+
export const PRODUCT_PLAN_SUBJECT_FLOOR = "0.124.89";
|
|
135
|
+
export { PLAN_SUBJECT_LIMIT, planSubjectProblem, sinceLastLine, subjectChanges } from "./pr-plan-note.js";
|
|
69
136
|
/**
|
|
70
137
|
* Day-2 actions in the product pipeline (#4654): the `action` comment
|
|
71
138
|
* command counted as answered by the product's own workflow
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/build.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAepC,OAAO,KAAK,EAAE,UAAU,EAAoB,MAAM,kBAAkB,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,KAAK,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAgBrF,OAAO,EAAuC,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAOrG;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,4CAA4C;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oBAAoB;IACpB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,2CAA2C;IAC3C,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,8CAA8C;IAC9C,OAAO,CAAC,EAAE,aAAa,EAAE,CAAC;IAC1B,8BAA8B;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OA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CAAC,EAAE,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC,CAAC,GAC9C,KAAK,CAAC;IAAE,MAAM,EAAE,aAAa,CAAC;IAAC,WAAW,EAAE,mBAAmB,EAAE,CAAA;CAAE,CAAC,CAsBtE;AAED;;GAEG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC,CA2yB9E;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,SAAS;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,MAAM,CAMrF;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAsBpF;AAiDD;;GAEG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAIlD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,CAItD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,YAAY,EACrB,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,GACxC,MAAM,IAAI,CAmCZ"}
|
|
@@ -22,7 +22,7 @@ import { sortedJsonReplacer } from "../../utils.js";
|
|
|
22
22
|
import { rankFoldBlockers, toCollapsedFormat } from "../../discovery/fold-rank.js";
|
|
23
23
|
import { foldExecutionCounts } from "../../discovery/fold-import.js";
|
|
24
24
|
import { formatError, formatWarning, formatSuccess, formatBold, formatInfo } from "../format.js";
|
|
25
|
-
import { writeFileSync, mkdirSync } from "fs";
|
|
25
|
+
import { existsSync, statSync, writeFileSync, mkdirSync } from "fs";
|
|
26
26
|
import { resolve, dirname, join, relative } from "path";
|
|
27
27
|
import { watchDirectory, formatTimestamp, formatChangedFiles } from "../watch.js";
|
|
28
28
|
function writeFileCreatingDir(path, content) {
|
|
@@ -725,7 +725,34 @@ export async function buildCommand(options) {
|
|
|
725
725
|
if (irWritten > 0) {
|
|
726
726
|
console.error(formatInfo(`Wrote ${irWritten} op.json file(s) under ${join(options.path ?? ".", "dist", "ops")}/`));
|
|
727
727
|
}
|
|
728
|
-
|
|
728
|
+
// #4950: `--output <dir>/` (or an existing directory) writes the
|
|
729
|
+
// additional files into that directory and no primary file, so a docker
|
|
730
|
+
// project of Dockerfiles alone renders them where they are committed
|
|
731
|
+
// (`chant build images -o images/`) with no compose file to throw away.
|
|
732
|
+
// A build whose primary output holds anything needs a file to put it in.
|
|
733
|
+
const outputDir = options.output !== undefined && (/[\\/]$/.test(options.output) || (existsSync(options.output) && statSync(options.output).isDirectory()))
|
|
734
|
+
? resolve(options.output)
|
|
735
|
+
: undefined;
|
|
736
|
+
if (outputDir !== undefined) {
|
|
737
|
+
if (output.trim() !== "") {
|
|
738
|
+
errors.push(formatError({
|
|
739
|
+
message: `--output ${options.output} names a directory, which takes a build's additional files (a docker project's Dockerfiles) but not its primary output; this build has one, so name a file for it`,
|
|
740
|
+
}));
|
|
741
|
+
}
|
|
742
|
+
else if (additionalFiles.size === 0) {
|
|
743
|
+
errors.push(formatError({ message: `--output ${options.output} names a directory, but this build has no files to write into it` }));
|
|
744
|
+
}
|
|
745
|
+
else {
|
|
746
|
+
try {
|
|
747
|
+
for (const [filename, entry] of additionalFiles)
|
|
748
|
+
writeOutput(join(outputDir, filename), entry.content);
|
|
749
|
+
}
|
|
750
|
+
catch (err) {
|
|
751
|
+
errors.push(formatError({ message: `Failed to write output file: ${err instanceof Error ? err.message : String(err)}` }));
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
else if (options.output) {
|
|
729
756
|
// Write to file — ensure parent directories exist for both the primary
|
|
730
757
|
// output path and any nested additional-file paths (e.g. ops/<name>/...).
|
|
731
758
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approve.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/approve.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAC3F,OAAO,EACuE,KAAK,UAAU,EAC5F,MAAM,6BAA6B,CAAC;AAOrC,OAAO,EAEuC,KAAK,mBAAmB,EAAE,KAAK,oBAAoB,EAChG,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAiE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAO3H,OAAO,EAA4D,KAAK,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAM9H,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"approve.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/approve.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAC3F,OAAO,EACuE,KAAK,UAAU,EAC5F,MAAM,6BAA6B,CAAC;AAOrC,OAAO,EAEuC,KAAK,mBAAmB,EAAE,KAAK,oBAAoB,EAChG,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAiE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAO3H,OAAO,EAA4D,KAAK,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAM9H,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAwDlD,wBAAsB,UAAU,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAoKrE;AAED,8DAA8D;AAC9D,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,sEAAsE;IACtE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,IAAI,CAAC,EAAE,MAA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M,EAAE,oBAAoB,EAC5B,KAAK,EAAE,oBAAoB,EAAE,EAC7B,QAAQ,EAAE,iBAAiB,GAAG,SAAS,EACvC,OAAO,GAAE,SAAS,iBAAiB,EAA+B,EAClE,KAAK,GAAE,eAAgC,GACtC,MAAM,EAAE,CAuCV"}
|
|
@@ -22,6 +22,7 @@ import { gateBindingProblem, gateStatement, readExternalSignature } from "../../
|
|
|
22
22
|
import { readFileSync } from "node:fs";
|
|
23
23
|
import { resolve as resolvePath } from "node:path";
|
|
24
24
|
import { formatError, formatWarning, formatSuccess, formatInfo } from "../format.js";
|
|
25
|
+
import { actorFromEnv } from "../../actor.js";
|
|
25
26
|
// ── chant approve <op> <gate> ───────────────────────────────────────────────
|
|
26
27
|
/**
|
|
27
28
|
* `chant approve <op> <gate> [--actor <name>] [--note <text>] [--url <url>]
|
|
@@ -480,7 +481,7 @@ async function approveGate(opName, gate, opts, statementOnly) {
|
|
|
480
481
|
// "unattested" reads as what it is; a name the model chose would read in
|
|
481
482
|
// the ledger exactly like a name a person gave.
|
|
482
483
|
? UNATTESTED_APPROVER
|
|
483
|
-
:
|
|
484
|
+
: actorFromEnv());
|
|
484
485
|
// #2508: who this is, as the gate's quorum and policy read it. A model on
|
|
485
486
|
// MCP or ACP is an agent whatever it claims, the same reasoning that gives
|
|
486
487
|
// it `UNATTESTED_APPROVER` for a name.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { CommandContext } from "../registry.js";
|
|
2
|
-
export declare function runCiCheck(ctx: CommandContext): Promise<number>;
|
|
2
|
+
export declare function runCiCheck(ctx: CommandContext, env?: Record<string, string | undefined>): Promise<number>;
|
|
3
3
|
//# sourceMappingURL=ci-check.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci-check.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/ci-check.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ci-check.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/ci-check.ts"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AA8DlD,wBAAsB,UAAU,CAAC,GAAG,EAAE,cAAc,EAAE,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAmD5H"}
|
|
@@ -24,8 +24,13 @@
|
|
|
24
24
|
* #4914: `--summary <file>` appends the report's markdown section
|
|
25
25
|
* (`checkReportSummary`) to the file, as a product's check report keeps it,
|
|
26
26
|
* and a job with `GITHUB_STEP_SUMMARY` set gets it in its summary too.
|
|
27
|
+
*
|
|
28
|
+
* #4966: `--base` defaults to the job's base (`ciBaseRef`,
|
|
29
|
+
* `@intentius/chant/ci-base`), `--branch` naming the default branch on a
|
|
30
|
+
* forge whose job does not carry it.
|
|
27
31
|
*/
|
|
28
32
|
import { resolve } from "node:path";
|
|
33
|
+
import { ciBaseRef } from "../../ci-base.js";
|
|
29
34
|
import { CHANT_EXIT } from "../../exit-codes.js";
|
|
30
35
|
import { formatError } from "../format.js";
|
|
31
36
|
/**
|
|
@@ -46,7 +51,7 @@ async function lexiconCheckSteps(ctx, cwd) {
|
|
|
46
51
|
}
|
|
47
52
|
return plugins.map((p) => p.checkSteps?.()).filter((a) => a !== undefined);
|
|
48
53
|
}
|
|
49
|
-
const USAGE = "chant ci check --base <rev> [<target>...] [--output <dir>] [--summary <file>] [--no-push] [--json]";
|
|
54
|
+
const USAGE = "chant ci check [--base <rev>] [--branch <default branch>] [<target>...] [--output <dir>] [--summary <file>] [--no-push] [--json]";
|
|
50
55
|
/**
|
|
51
56
|
* The check stage's signer (#4870), when the job has a runner identity: a
|
|
52
57
|
* runner key in `CHANT_RUNNER_KEY`, or its OIDC identity with
|
|
@@ -87,10 +92,15 @@ async function localEvidenceAt(base) {
|
|
|
87
92
|
return undefined;
|
|
88
93
|
}
|
|
89
94
|
}
|
|
90
|
-
export async function runCiCheck(ctx) {
|
|
95
|
+
export async function runCiCheck(ctx, env = process.env) {
|
|
91
96
|
const { args } = ctx;
|
|
92
|
-
|
|
93
|
-
|
|
97
|
+
// #4966: with no --base, the job's own (`ciBaseRef`): a pull request's target branch, else the default branch (--branch) for a push to another branch.
|
|
98
|
+
const base = args.base ?? ciBaseRef(env, args.branch ? { defaultBranch: args.branch } : {});
|
|
99
|
+
if (!base) {
|
|
100
|
+
console.error(formatError({
|
|
101
|
+
message: "chant ci check needs --base <rev>, the commit the change is measured from, and the job names no pull request target or default branch to take it from",
|
|
102
|
+
hint: `${USAGE}. The hooks are read at base, so a change cannot remove a required check.`,
|
|
103
|
+
}));
|
|
94
104
|
return 1;
|
|
95
105
|
}
|
|
96
106
|
const targets = (args.positionals ?? []).slice(1);
|
|
@@ -98,10 +108,10 @@ export async function runCiCheck(ctx) {
|
|
|
98
108
|
let report;
|
|
99
109
|
try {
|
|
100
110
|
const adapters = await lexiconCheckSteps(ctx, process.cwd());
|
|
101
|
-
const evidence = await checkEvidenceSigner(
|
|
111
|
+
const evidence = await checkEvidenceSigner(base, args.noPush === true);
|
|
102
112
|
// #4868: a job that signs local evidence runs every hook; any other may skip one on local evidence.
|
|
103
|
-
const local = evidence && "class" in evidence.signer ? undefined : await localEvidenceAt(
|
|
104
|
-
report = await runCheckStage({ base
|
|
113
|
+
const local = evidence && "class" in evidence.signer ? undefined : await localEvidenceAt(base);
|
|
114
|
+
report = await runCheckStage({ base, targets, adapters, ...(args.output ? { dir: args.output } : {}), ...(evidence ? { evidence } : {}), ...(local ? { localEvidence: local } : {}) });
|
|
105
115
|
}
|
|
106
116
|
catch (err) {
|
|
107
117
|
console.error(formatError({ message: err instanceof Error ? err.message : String(err), hint: USAGE }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci-evidence.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/ci-evidence.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ci-evidence.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/ci-evidence.ts"],"names":[],"mappings":"AAyDA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AA+BlD,wBAAsB,aAAa,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAWxE"}
|
|
@@ -14,7 +14,9 @@
|
|
|
14
14
|
* `<dir>`, and `policy` when the policy evaluated inside that plan did not
|
|
15
15
|
* deny it (a `pr-plan.json`'s `policy`, a plan note hand-off's overrides).
|
|
16
16
|
* It writes `evidence.json` in `<dir>`, which `pr-post` reads to say in the
|
|
17
|
-
* note which checks were signed.
|
|
17
|
+
* note which checks were signed. With `--member <name>` (#4964), a
|
|
18
|
+
* workspace member's plan report or (#4978) a product plan target's, the
|
|
19
|
+
* two are `plan:<name>` and `policy:<name>`.
|
|
18
20
|
* - `sign --from-report <dir>` on a check job's report (#4935), a
|
|
19
21
|
* `check-hooks.json` from `chant ci check`, is the `check-evidence` job's
|
|
20
22
|
* form: it signs each hook that passed, by name, with the runs as its
|
|
@@ -50,14 +52,15 @@
|
|
|
50
52
|
import { execFileSync, spawnSync } from "node:child_process";
|
|
51
53
|
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
52
54
|
import { join } from "node:path";
|
|
55
|
+
import { EVIDENCE_MEMBER_NAME } from "../../ci-evidence-jobs.js";
|
|
53
56
|
import { CHANT_EXIT } from "../../exit-codes.js";
|
|
54
57
|
import { formatError } from "../format.js";
|
|
55
58
|
import { gitRoot } from "../../workspace/record-source.js";
|
|
56
59
|
import { resolveBase } from "../../workspace/trust/provenance.js";
|
|
57
60
|
import { CHECK_EVIDENCE_KEY_ENV, noRunnerIdentity, readCheckEvidence, recordChecks, RUNNER_IDENTITY_ENV, runnerEvidenceSigner, signChecks, } from "../../workspace/trust/check-evidence.js";
|
|
58
61
|
import { CHECK_EVIDENCE_FILE, LOCAL_EVIDENCE_KEY_ENV, planReportChecks } from "../../workspace/trust/check-evidence-report.js";
|
|
59
|
-
const USAGE = "chant ci evidence sign (--check-id <id>[,<id>...] | --from-report <dir> --result <result>) [--at <rev>] [--base <rev>] [--key <file>] [--claim <file>] [--no-push] [--json]\n" +
|
|
60
|
-
" chant ci evidence sign --open --job <job> --from-report <dir> -o <out> [--branch <branch>] [--base <rev>] [--key <file>] [--no-push] [--json]\n" +
|
|
62
|
+
const USAGE = "chant ci evidence sign (--check-id <id>[,<id>...] | --from-report <dir> [--member <name>] --result <result>) [--at <rev>] [--base <rev>] [--key <file>] [--claim <file>] [--no-push] [--json]\n" +
|
|
63
|
+
" chant ci evidence sign --open --job <job> --from-report <dir> [--member <name>] -o <out> [--branch <branch>] [--base <rev>] [--key <file>] [--no-push] [--json]\n" +
|
|
61
64
|
" chant ci evidence sign --from-job <job> --check-id <id>[,<id>...] [--claims <dir>] [--at <rev>] [--base <rev>] [--key <file>] [--no-push] [--json]\n" +
|
|
62
65
|
" chant ci evidence sign --local --check-id <id>[,<id>...] [--at <rev>] [--base <rev>] [--key <file>] [--claim <file>] [--no-push] [--json]\n" +
|
|
63
66
|
" chant ci evidence verify [--local] --check-id <id>[,<id>...] [--at <rev>] [--base <rev>] [--json]";
|
|
@@ -174,13 +177,16 @@ async function sign(ctx, repo, base, at) {
|
|
|
174
177
|
const fromReport = args.fromReport;
|
|
175
178
|
if (!fromReport && idsOf(args.checkId).length === 0)
|
|
176
179
|
return usage("sign needs --check-id <id>, or --from-report <dir> in a plan note job");
|
|
180
|
+
const member = memberOf(args.members, Boolean(fromReport));
|
|
181
|
+
if (typeof member === "object")
|
|
182
|
+
return usage(member.usage);
|
|
177
183
|
const pem = args.key ? readFileSync(args.key, "utf-8") : process.env[CHECK_EVIDENCE_KEY_ENV];
|
|
178
184
|
let wanted;
|
|
179
185
|
if (!fromReport) {
|
|
180
186
|
const claim = args.claim ? readFileSync(args.claim) : undefined;
|
|
181
187
|
wanted = idsOf(args.checkId).map((check) => ({ check, ...(claim ? { claim } : {}) }));
|
|
182
188
|
}
|
|
183
|
-
const done = await signChecksOf(repo, base, at, { ...(fromReport ? { fromReport } : {}), ...(wanted ? { wanted } : {}), ...(args.planResult ? { result: args.planResult } : {}), pem, push: !args.noPush });
|
|
189
|
+
const done = await signChecksOf(repo, base, at, { ...(fromReport ? { fromReport } : {}), ...(wanted ? { wanted } : {}), ...(args.planResult ? { result: args.planResult } : {}), ...(member ? { member } : {}), pem, push: !args.noPush });
|
|
184
190
|
if ("usage" in done)
|
|
185
191
|
return usage(done.usage);
|
|
186
192
|
if (fromReport)
|
|
@@ -189,6 +195,21 @@ async function sign(ctx, repo, base, at) {
|
|
|
189
195
|
console.log(JSON.stringify(done.note, null, 2));
|
|
190
196
|
return done.code;
|
|
191
197
|
}
|
|
198
|
+
/**
|
|
199
|
+
* `--member <name>` (#4964): the workspace member whose plan report this is,
|
|
200
|
+
* or (#4978) the product plan target whose plan job wrote it, so `plan` and
|
|
201
|
+
* `policy` are signed as `plan:<name>` and `policy:<name>`. One name, and
|
|
202
|
+
* only with a plan report.
|
|
203
|
+
*/
|
|
204
|
+
function memberOf(members, fromReport) {
|
|
205
|
+
if (!members || members.length === 0)
|
|
206
|
+
return undefined;
|
|
207
|
+
if (!fromReport)
|
|
208
|
+
return { usage: "--member names the member whose plan report --from-report signs; --check-id names its checks in full" };
|
|
209
|
+
if (members.length > 1 || !EVIDENCE_MEMBER_NAME.test(members[0]))
|
|
210
|
+
return { usage: `--member takes one member or target name, letters, digits, - and _, not ${members.join(",")}` };
|
|
211
|
+
return members[0];
|
|
212
|
+
}
|
|
192
213
|
/**
|
|
193
214
|
* Sign the checks of a report directory (`fromReport`) or the named ones
|
|
194
215
|
* (`wanted`) at `at`, against the runner identities at `base`. With
|
|
@@ -202,7 +223,9 @@ async function signChecksOf(repo, base, at, opts) {
|
|
|
202
223
|
const note = { signed: [], skipped: [] };
|
|
203
224
|
let wanted;
|
|
204
225
|
if (fromReport && isCheckReportDir(fromReport)) {
|
|
205
|
-
// #4935: a check job's report, each passed hook signed by name.
|
|
226
|
+
// #4935: a check job's report, each passed hook signed by name; #4964: a hook is the workspace's or the member's by its own name.
|
|
227
|
+
if (opts.member)
|
|
228
|
+
return { usage: `--member names a plan report's member, and ${fromReport} is a check job's report, whose hooks are signed by their own names` };
|
|
206
229
|
const decided = await checkReportChecks(fromReport, opts.result);
|
|
207
230
|
if ("error" in decided)
|
|
208
231
|
return { usage: decided.error };
|
|
@@ -210,7 +233,7 @@ async function signChecksOf(repo, base, at, opts) {
|
|
|
210
233
|
note.skipped.push(...decided.skipped);
|
|
211
234
|
}
|
|
212
235
|
else if (fromReport) {
|
|
213
|
-
const decided = planReportChecks(fromReport, opts.result);
|
|
236
|
+
const decided = planReportChecks(fromReport, opts.result, opts.member);
|
|
214
237
|
wanted = decided.sign;
|
|
215
238
|
note.skipped.push(...decided.skipped);
|
|
216
239
|
}
|
|
@@ -278,6 +301,9 @@ async function signOpen(ctx, repo, base) {
|
|
|
278
301
|
return usage("sign --open needs where to keep each merge request's evidence.json: -o .chant/evidence/<job>");
|
|
279
302
|
if (args.checkId || args.at || args.planResult)
|
|
280
303
|
return usage("sign --open finds each merge request's head and its job's result itself, so it takes no --check-id, --at or --result");
|
|
304
|
+
const member = memberOf(args.members, true);
|
|
305
|
+
if (typeof member === "object")
|
|
306
|
+
return usage(member.usage);
|
|
281
307
|
const branch = args.branch ?? process.env.CI_COMMIT_BRANCH;
|
|
282
308
|
if (!branch)
|
|
283
309
|
return usage("sign --open signs for the merge requests into a branch: run it in a branch pipeline, or pass --branch <branch>");
|
|
@@ -298,7 +324,7 @@ async function signOpen(ctx, repo, base) {
|
|
|
298
324
|
...(args.noForks ? { noForks: true } : {}),
|
|
299
325
|
fetchHead: (pr, head) => fetchMergeRequestHead(repo, pr, head),
|
|
300
326
|
sign: async (dir, head, result) => {
|
|
301
|
-
const r = await signChecksOf(repo, base, head, { fromReport: dir, result, ...(pem ? { pem } : {}), push: !args.noPush, skipCurrent: true });
|
|
327
|
+
const r = await signChecksOf(repo, base, head, { fromReport: dir, result, ...(member ? { member } : {}), ...(pem ? { pem } : {}), push: !args.noPush, skipCurrent: true });
|
|
302
328
|
if ("usage" in r)
|
|
303
329
|
throw new Error(r.usage);
|
|
304
330
|
if (r.code !== CHANT_EXIT.done)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/components.ts"],"names":[],"mappings":"AAuDA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD,OAAO,KAAK,EAAE,KAAK,EAAa,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/components.ts"],"names":[],"mappings":"AAuDA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD,OAAO,KAAK,EAAE,KAAK,EAAa,MAAM,4BAA4B,CAAC;AAMnE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,0BAA0B,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAgHrF;AAYD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAiH9E;AA6DD;;;;;;;;;;;;;;;GAeG;AACH;;;;;;;;6EAQ6E;AAC7E,wBAAgB,eAAe,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,EAAE,CAMzD;AAgHD,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAoT9E;AAED,kEAAkE;AAClE,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAM/E"}
|
|
@@ -47,6 +47,7 @@ import { normalizeObservation, mergeObservations, unobservedAll } from "../../ob
|
|
|
47
47
|
import { deployUnits } from "../../components/deploy-units.js";
|
|
48
48
|
import { sortedJsonReplacer } from "../../utils.js";
|
|
49
49
|
import { withoutReadFlags } from "../../lifecycle/legacy-digest.js";
|
|
50
|
+
import { actorFromEnv } from "../../actor.js";
|
|
50
51
|
/**
|
|
51
52
|
* chant components release <env> --component <name> --digest <sha256:...>
|
|
52
53
|
* [--git-sha <sha>] [--run-id <id>] [--actor <name>]
|
|
@@ -127,7 +128,8 @@ export async function runComponentsReleaseRecord(ctx) {
|
|
|
127
128
|
// Id + origin resolved together from the same environment (#2045), so the
|
|
128
129
|
// recorded runId always says which id space it lives in and how to reach it.
|
|
129
130
|
const { runId, runOrigin } = resolveRunId(args.runId);
|
|
130
|
-
|
|
131
|
+
// #4952: the fallback is actorFromEnv's; an empty answer is no actor, refused below.
|
|
132
|
+
const actor = args.actor ?? (actorFromEnv(process.env, "") || undefined);
|
|
131
133
|
// Who approved a gated change (#1035). Optional — omitted for an ungated
|
|
132
134
|
// change, and never defaulted to `actor`, since recording the approver as the
|
|
133
135
|
// triggerer would defeat the separation-of-duties the field exists to attest.
|
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
import type { CommandContext } from "../registry.js";
|
|
2
2
|
export declare function runDevGeneratedCheck(ctx: CommandContext): Promise<number>;
|
|
3
|
+
/**
|
|
4
|
+
* `chant dev render <module> <export> [--output <root>]` (#4950): import the
|
|
5
|
+
* module, call its export (a `{ path: text }` object, or a function that
|
|
6
|
+
* returns one) and write each file at its path below the root, the working
|
|
7
|
+
* directory unless `--output` names one. Under `chant dev generated-check`
|
|
8
|
+
* a path inside the product goes to the render tree instead.
|
|
9
|
+
*/
|
|
10
|
+
export declare function runDevRender(ctx: CommandContext): Promise<number>;
|
|
3
11
|
//# sourceMappingURL=generated-check.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generated-check.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/generated-check.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generated-check.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/generated-check.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAIlD,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAwB/E;AAID;;;;;;GAMG;AACH,wBAAsB,YAAY,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAkBvE"}
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
* package.json) into a directory under the OS temp directory, compare each
|
|
5
5
|
* with the committed file, and exit 1 naming every one that drifted. The
|
|
6
6
|
* directory is left in place and printed. Exit 2 when the product declares
|
|
7
|
-
* no `chantGenerated`.
|
|
7
|
+
* no `chantGenerated`. Also `chant dev render` (#4950), which writes a
|
|
8
|
+
* module's file-text export in place.
|
|
8
9
|
*/
|
|
9
10
|
import { checkGenerated, readGeneratedCheckConfig } from "../../generated-check.js";
|
|
10
11
|
import { formatError } from "../format.js";
|
|
@@ -39,3 +40,32 @@ export async function runDevGeneratedCheck(ctx) {
|
|
|
39
40
|
}
|
|
40
41
|
return result.ok ? 0 : 1;
|
|
41
42
|
}
|
|
43
|
+
const RENDER_USAGE = "chant dev render <module> <export> [--output <root>]";
|
|
44
|
+
/**
|
|
45
|
+
* `chant dev render <module> <export> [--output <root>]` (#4950): import the
|
|
46
|
+
* module, call its export (a `{ path: text }` object, or a function that
|
|
47
|
+
* returns one) and write each file at its path below the root, the working
|
|
48
|
+
* directory unless `--output` names one. Under `chant dev generated-check`
|
|
49
|
+
* a path inside the product goes to the render tree instead.
|
|
50
|
+
*/
|
|
51
|
+
export async function runDevRender(ctx) {
|
|
52
|
+
const [, modulePath, exportName] = ctx.args.positionals ?? [];
|
|
53
|
+
if (!modulePath || !exportName) {
|
|
54
|
+
console.error(formatError({ message: "name the module and its export that returns the files", hint: RENDER_USAGE }));
|
|
55
|
+
return 2;
|
|
56
|
+
}
|
|
57
|
+
const { resolve } = await import("node:path");
|
|
58
|
+
const { renderPathOf } = await import("../../generated-check.js");
|
|
59
|
+
const { renderModuleFiles, writeRenderedFiles } = await import("../../render-module.js");
|
|
60
|
+
try {
|
|
61
|
+
const files = await renderModuleFiles(modulePath, exportName);
|
|
62
|
+
const root = resolve(ctx.args.output ?? ".");
|
|
63
|
+
for (const path of writeRenderedFiles(root, files, renderPathOf))
|
|
64
|
+
console.error(` wrote ${path}`);
|
|
65
|
+
return 0;
|
|
66
|
+
}
|
|
67
|
+
catch (err) {
|
|
68
|
+
console.error(formatError({ message: `chant dev render: ${err instanceof Error ? err.message : String(err)}`, hint: RENDER_USAGE }));
|
|
69
|
+
return 1;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lock.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/lock.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lock.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/lock.ts"],"names":[],"mappings":"AA8DA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAsBlD,iEAAiE;AACjE,eAAO,MAAM,mBAAmB,eAAe,CAAC;AA4DhD,iBAAiB;AACjB,wBAAsB,OAAO,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAgJlE;AAqED,mBAAmB;AACnB,wBAAsB,SAAS,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAoCpE"}
|