@intentius/chant 0.124.55 → 0.124.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ci-agent.d.ts.map +1 -1
- package/dist/ci-agent.js +1 -2
- package/dist/ci-audit/attribution.d.ts +111 -0
- package/dist/ci-audit/attribution.d.ts.map +1 -0
- package/dist/ci-audit/attribution.js +194 -0
- package/dist/ci-audit/audit-log.d.ts +144 -0
- package/dist/ci-audit/audit-log.d.ts.map +1 -0
- package/dist/ci-audit/audit-log.js +149 -0
- package/dist/ci-audit/index.d.ts +12 -0
- package/dist/ci-audit/index.d.ts.map +1 -0
- package/dist/ci-audit/index.js +11 -0
- package/dist/ci-audit/unrecorded.d.ts +74 -0
- package/dist/ci-audit/unrecorded.d.ts.map +1 -0
- package/dist/ci-audit/unrecorded.js +95 -0
- package/dist/ci-audit.d.ts +3 -0
- package/dist/ci-audit.d.ts.map +1 -0
- package/dist/ci-audit.js +2 -0
- package/dist/ci-control.d.ts.map +1 -1
- package/dist/ci-control.js +3 -4
- package/dist/ci-estate.d.ts +24 -0
- package/dist/ci-estate.d.ts.map +1 -1
- package/dist/ci-estate.js +1 -2
- package/dist/ci-identity.d.ts.map +1 -1
- package/dist/ci-identity.js +2 -3
- package/dist/ci-job-guard.d.ts +139 -0
- package/dist/ci-job-guard.d.ts.map +1 -0
- package/dist/ci-job-guard.js +287 -0
- package/dist/ci-jobs.d.ts +7 -0
- package/dist/ci-jobs.d.ts.map +1 -1
- package/dist/ci-jobs.js +7 -0
- package/dist/ci-product-words.d.ts +7 -1
- package/dist/ci-product-words.d.ts.map +1 -1
- package/dist/ci-product-words.js +38 -4
- package/dist/ci-product.d.ts +35 -0
- package/dist/ci-product.d.ts.map +1 -1
- package/dist/ci-product.js +38 -4
- package/dist/ci-respond-run.d.ts +73 -0
- package/dist/ci-respond-run.d.ts.map +1 -0
- package/dist/ci-respond-run.js +247 -0
- package/dist/ci-respond.d.ts +189 -0
- package/dist/ci-respond.d.ts.map +1 -0
- package/dist/ci-respond.js +285 -0
- package/dist/cli/handlers/audit-log.d.ts +12 -0
- package/dist/cli/handlers/audit-log.d.ts.map +1 -0
- package/dist/cli/handlers/audit-log.js +81 -0
- package/dist/cli/handlers/build.d.ts +7 -0
- package/dist/cli/handlers/build.d.ts.map +1 -1
- package/dist/cli/handlers/build.js +81 -0
- package/dist/cli/handlers/ci-check-job.d.ts +11 -0
- package/dist/cli/handlers/ci-check-job.d.ts.map +1 -0
- package/dist/cli/handlers/ci-check-job.js +27 -0
- package/dist/cli/handlers/ci-check.d.ts.map +1 -1
- package/dist/cli/handlers/ci-check.js +38 -9
- package/dist/cli/handlers/e2e-safe-run.d.ts +12 -0
- package/dist/cli/handlers/e2e-safe-run.d.ts.map +1 -0
- package/dist/cli/handlers/e2e-safe-run.js +23 -0
- package/dist/cli/handlers/lifecycle.d.ts.map +1 -1
- package/dist/cli/handlers/lifecycle.js +14 -0
- package/dist/cli/handlers/pr.d.ts +5 -0
- package/dist/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/handlers/pr.js +346 -36
- package/dist/cli/handlers/run-wave.js +89 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +56 -2
- package/dist/cli/parse-args.d.ts.map +1 -1
- package/dist/cli/parse-args.js +107 -0
- package/dist/cli/registry.d.ts +38 -0
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/components/adoption.d.ts.map +1 -1
- package/dist/components/adoption.js +1 -2
- package/dist/components/auto-release.d.ts +5 -2
- package/dist/components/auto-release.d.ts.map +1 -1
- package/dist/components/auto-release.js +9 -4
- package/dist/components/capability.d.ts +47 -0
- package/dist/components/capability.d.ts.map +1 -1
- package/dist/components/capability.js +25 -0
- package/dist/components/check-hooks.d.ts +4 -1
- package/dist/components/check-hooks.d.ts.map +1 -1
- package/dist/components/check-steps.d.ts +74 -0
- package/dist/components/check-steps.d.ts.map +1 -0
- package/dist/components/check-steps.js +102 -0
- package/dist/components/ci-services.d.ts.map +1 -1
- package/dist/components/ci-services.js +1 -2
- package/dist/components/deploy-units.d.ts +12 -0
- package/dist/components/deploy-units.d.ts.map +1 -1
- package/dist/components/deploy-units.js +20 -1
- package/dist/components/driver.d.ts +12 -0
- package/dist/components/driver.d.ts.map +1 -1
- package/dist/components/driver.js +35 -1
- package/dist/components/groups.d.ts.map +1 -1
- package/dist/components/groups.js +4 -3
- package/dist/components/pr-env-ledger.d.ts.map +1 -1
- package/dist/components/pr-env-ledger.js +1 -2
- package/dist/components/pr-environment.d.ts +1 -1
- package/dist/components/pr-environment.d.ts.map +1 -1
- package/dist/components/pr-environment.js +1 -1
- package/dist/components/pr-pipeline.d.ts +137 -5
- package/dist/components/pr-pipeline.d.ts.map +1 -1
- package/dist/components/pr-pipeline.js +164 -20
- package/dist/components/pr-run.d.ts +8 -0
- package/dist/components/pr-run.d.ts.map +1 -1
- package/dist/components/pr-run.js +9 -4
- package/dist/components/product-pipeline.d.ts +35 -2
- package/dist/components/product-pipeline.d.ts.map +1 -1
- package/dist/components/product-pipeline.js +24 -5
- package/dist/components/row-lease.d.ts +22 -1
- package/dist/components/row-lease.d.ts.map +1 -1
- package/dist/components/row-lease.js +32 -6
- package/dist/components/wave-plan.d.ts +8 -0
- package/dist/components/wave-plan.d.ts.map +1 -1
- package/dist/components/wave-plan.js +18 -2
- package/dist/e2e-harness/bucket.d.ts +21 -0
- package/dist/e2e-harness/bucket.d.ts.map +1 -0
- package/dist/e2e-harness/bucket.js +61 -0
- package/dist/e2e-harness/claim.d.ts +70 -0
- package/dist/e2e-harness/claim.d.ts.map +1 -0
- package/dist/e2e-harness/claim.js +98 -0
- package/dist/e2e-harness/driver.d.ts +64 -0
- package/dist/e2e-harness/driver.d.ts.map +1 -0
- package/dist/e2e-harness/driver.js +243 -0
- package/dist/e2e-harness/forgejo.d.ts +77 -0
- package/dist/e2e-harness/forgejo.d.ts.map +1 -0
- package/dist/e2e-harness/forgejo.js +205 -0
- package/dist/e2e-harness/git.d.ts +32 -0
- package/dist/e2e-harness/git.d.ts.map +1 -0
- package/dist/e2e-harness/git.js +67 -0
- package/dist/e2e-harness/index.d.ts +22 -0
- package/dist/e2e-harness/index.d.ts.map +1 -0
- package/dist/e2e-harness/index.js +47 -0
- package/dist/e2e-harness/jobs.d.ts +8 -0
- package/dist/e2e-harness/jobs.d.ts.map +1 -0
- package/dist/e2e-harness/jobs.js +34 -0
- package/dist/e2e-harness/pins.d.ts +45 -0
- package/dist/e2e-harness/pins.d.ts.map +1 -0
- package/dist/e2e-harness/pins.js +44 -0
- package/dist/e2e-harness/ports.d.ts +113 -0
- package/dist/e2e-harness/ports.d.ts.map +1 -0
- package/dist/e2e-harness/ports.js +4 -0
- package/dist/e2e-harness/reports.d.ts +45 -0
- package/dist/e2e-harness/reports.d.ts.map +1 -0
- package/dist/e2e-harness/reports.js +57 -0
- package/dist/e2e-harness/safe-run-cli.d.ts +17 -0
- package/dist/e2e-harness/safe-run-cli.d.ts.map +1 -0
- package/dist/e2e-harness/safe-run-cli.js +43 -0
- package/dist/e2e-harness/safe-run.d.ts +61 -0
- package/dist/e2e-harness/safe-run.d.ts.map +1 -0
- package/dist/e2e-harness/safe-run.js +172 -0
- package/dist/e2e-harness/scenario.d.ts +11 -0
- package/dist/e2e-harness/scenario.d.ts.map +1 -0
- package/dist/e2e-harness/scenario.js +89 -0
- package/dist/e2e-harness/schemas/demo-cycle.schema.json +282 -0
- package/dist/e2e-harness/schemas/demo-step.schema.json +245 -0
- package/dist/e2e-harness/schemas/e2e-claim-row.schema.json +33 -0
- package/dist/e2e-harness/schemas/e2e-claims.schema.json +18 -0
- package/dist/e2e-harness/schemas/e2e-scenario.schema.json +150 -0
- package/dist/e2e-harness/schemas/index.d.ts +191 -0
- package/dist/e2e-harness/schemas/index.d.ts.map +1 -0
- package/dist/e2e-harness/schemas/index.js +62 -0
- package/dist/e2e-harness/stack.d.ts +124 -0
- package/dist/e2e-harness/stack.d.ts.map +1 -0
- package/dist/e2e-harness/stack.js +207 -0
- package/dist/e2e-harness/steps.d.ts +11 -0
- package/dist/e2e-harness/steps.d.ts.map +1 -0
- package/dist/e2e-harness/steps.js +22 -0
- package/dist/e2e-harness.d.ts +3 -0
- package/dist/e2e-harness.d.ts.map +1 -0
- package/dist/e2e-harness.js +2 -0
- package/dist/exit-codes.d.ts +7 -1
- package/dist/exit-codes.d.ts.map +1 -1
- package/dist/exit-codes.js +7 -1
- package/dist/lexicon.d.ts +55 -0
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/gate-ledger.d.ts.map +1 -1
- package/dist/lifecycle/gate-ledger.js +2 -3
- package/dist/lifecycle/gated-request.d.ts.map +1 -1
- package/dist/lifecycle/gated-request.js +1 -2
- package/dist/lifecycle/git.d.ts +39 -3
- package/dist/lifecycle/git.d.ts.map +1 -1
- package/dist/lifecycle/git.js +223 -15
- package/dist/lifecycle/lock-rows.d.ts +23 -0
- package/dist/lifecycle/lock-rows.d.ts.map +1 -1
- package/dist/lifecycle/lock-rows.js +47 -8
- package/dist/lifecycle/query.d.ts.map +1 -1
- package/dist/lifecycle/query.js +4 -5
- package/dist/lifecycle/release-catalog.d.ts.map +1 -1
- package/dist/lifecycle/release-catalog.js +1 -1
- package/dist/lifecycle/release-ledger.d.ts.map +1 -1
- package/dist/lifecycle/release-ledger.js +1 -2
- package/dist/lifecycle/release-status.d.ts +20 -0
- package/dist/lifecycle/release-status.d.ts.map +1 -1
- package/dist/lifecycle/release-status.js +1 -22
- package/dist/lifecycle/resource-lock.d.ts +70 -0
- package/dist/lifecycle/resource-lock.d.ts.map +1 -1
- package/dist/lifecycle/resource-lock.js +241 -5
- package/dist/lifecycle/wave-plans.d.ts +23 -7
- package/dist/lifecycle/wave-plans.d.ts.map +1 -1
- package/dist/lifecycle/wave-plans.js +9 -2
- package/dist/op/approval-status.d.ts +103 -0
- package/dist/op/approval-status.d.ts.map +1 -0
- package/dist/op/approval-status.js +197 -0
- package/dist/op/gate.js +21 -4
- package/dist/op/index.d.ts +1 -1
- package/dist/op/index.d.ts.map +1 -1
- package/dist/op/index.js +1 -1
- package/dist/op/op-waves-capability-spec.d.ts +8 -0
- package/dist/op/op-waves-capability-spec.d.ts.map +1 -1
- package/dist/op/op-waves-capability-spec.js +21 -0
- package/dist/op/op-waves-release-port.js +1 -1
- package/dist/op/op-waves-release.d.ts +2 -1
- package/dist/op/op-waves-release.d.ts.map +1 -1
- package/dist/op/op-waves-release.js +1 -2
- package/dist/op/op-waves-run.d.ts +15 -2
- package/dist/op/op-waves-run.d.ts.map +1 -1
- package/dist/op/op-waves-run.js +195 -31
- package/dist/op/op-waves-stand-down.d.ts.map +1 -1
- package/dist/op/op-waves-stand-down.js +1 -2
- package/dist/op/op-waves.d.ts +53 -0
- package/dist/op/op-waves.d.ts.map +1 -1
- package/dist/op/op-waves.js +62 -6
- package/dist/op/runtime.d.ts +4 -0
- package/dist/op/runtime.d.ts.map +1 -1
- package/dist/op/runtime.js +2 -3
- package/dist/otlp.d.ts.map +1 -1
- package/dist/otlp.js +1 -2
- package/dist/parallelism.d.ts +17 -0
- package/dist/parallelism.d.ts.map +1 -0
- package/dist/parallelism.js +33 -0
- package/dist/policy-source.d.ts.map +1 -1
- package/dist/policy-source.js +1 -2
- package/dist/pr-forge.d.ts.map +1 -1
- package/dist/pr-forge.js +56 -39
- package/dist/pr-loop.d.ts +9 -0
- package/dist/pr-loop.d.ts.map +1 -1
- package/dist/pr-loop.js +22 -4
- package/dist/pr-merge.d.ts +64 -0
- package/dist/pr-merge.d.ts.map +1 -0
- package/dist/pr-merge.js +78 -0
- package/dist/pr-post.d.ts +70 -1
- package/dist/pr-post.d.ts.map +1 -1
- package/dist/pr-post.js +116 -5
- package/dist/pr-report-url.d.ts.map +1 -1
- package/dist/pr-report-url.js +1 -2
- package/dist/release-floors.d.ts +1 -1
- package/dist/release-floors.js +1 -1
- package/dist/run-event.d.ts.map +1 -1
- package/dist/run-event.js +1 -2
- package/dist/scheduled-op-cloud.d.ts +32 -0
- package/dist/scheduled-op-cloud.d.ts.map +1 -0
- package/dist/scheduled-op-cloud.js +69 -0
- package/dist/wave-runtime.mjs +351 -328
- package/dist/workspace/ci-lock-grain.d.ts +5 -0
- package/dist/workspace/ci-lock-grain.d.ts.map +1 -1
- package/dist/workspace/ci-lock-grain.js +1 -7
- package/dist/workspace/ci-run.d.ts.map +1 -1
- package/dist/workspace/ci-run.js +5 -1
- package/dist/workspace/pr-report.schema.json +5 -0
- package/package.json +1 -1
- package/src/ci-agent.ts +1 -2
- package/src/ci-audit/__fixtures__/cloudtrail-lookup-bucket.json +37 -0
- package/src/ci-audit/__fixtures__/cloudtrail-writes-window.json +59 -0
- package/src/ci-audit/attribution.ts +260 -0
- package/src/ci-audit/audit-log.ts +220 -0
- package/src/ci-audit/ci-audit.test.ts +175 -0
- package/src/ci-audit/index.ts +14 -0
- package/src/ci-audit/unrecorded.ts +140 -0
- package/src/ci-audit.ts +2 -0
- package/src/ci-control.ts +3 -4
- package/src/ci-estate.ts +1 -2
- package/src/ci-identity-database.test.ts +2 -3
- package/src/ci-identity-targets.test.ts +1 -3
- package/src/ci-identity.ts +2 -3
- package/src/ci-job-guard.test.ts +154 -0
- package/src/ci-job-guard.ts +319 -0
- package/src/ci-jobs.ts +8 -0
- package/src/ci-product-comment-targets.test.ts +45 -0
- package/src/ci-product-words.ts +35 -6
- package/src/ci-product.ts +55 -4
- package/src/ci-respond-run.ts +291 -0
- package/src/ci-respond.test.ts +264 -0
- package/src/ci-respond.ts +412 -0
- package/src/cli/handlers/audit-log.ts +74 -0
- package/src/cli/handlers/build-pr-loop-flags.test.ts +98 -0
- package/src/cli/handlers/build.ts +69 -0
- package/src/cli/handlers/ci-check-job.test.ts +114 -0
- package/src/cli/handlers/ci-check-job.ts +33 -0
- package/src/cli/handlers/ci-check.ts +38 -8
- package/src/cli/handlers/e2e-safe-run.ts +27 -0
- package/src/cli/handlers/lifecycle.ts +13 -0
- package/src/cli/handlers/pr-before-merge.test.ts +1 -1
- package/src/cli/handlers/pr-deploy-inputs.test.ts +1 -1
- package/src/cli/handlers/pr-endpoint.test.ts +1 -1
- package/src/cli/handlers/pr-green.test.ts +1 -1
- package/src/cli/handlers/pr-plan-comment-targets.test.ts +166 -0
- package/src/cli/handlers/pr-plan-flags.test.ts +161 -0
- package/src/cli/handlers/pr-plan-targets.test.ts +1 -1
- package/src/cli/handlers/pr-record.test.ts +34 -2
- package/src/cli/handlers/pr-waves-blocked.test.ts +1 -1
- package/src/cli/handlers/pr-waves.test.ts +1 -1
- package/src/cli/handlers/pr.test.ts +1 -1
- package/src/cli/handlers/pr.ts +311 -32
- package/src/cli/handlers/run-wave.ts +79 -1
- package/src/cli/main.test.ts +1 -1
- package/src/cli/main.ts +56 -2
- package/src/cli/parse-args.ts +77 -0
- package/src/cli/registry.ts +38 -0
- package/src/components/adoption.ts +1 -2
- package/src/components/auto-release.test.ts +4 -2
- package/src/components/auto-release.ts +9 -5
- package/src/components/capability.ts +60 -0
- package/src/components/check-hooks.ts +4 -1
- package/src/components/check-steps.test.ts +70 -0
- package/src/components/check-steps.ts +158 -0
- package/src/components/ci-services.ts +1 -2
- package/src/components/deploy-units.test.ts +18 -1
- package/src/components/deploy-units.ts +26 -1
- package/src/components/driver.ts +35 -1
- package/src/components/groups.ts +4 -2
- package/src/components/plan-flags.test.ts +46 -0
- package/src/components/pr-comment-preview-targets.test.ts +34 -0
- package/src/components/pr-env-ledger.ts +1 -2
- package/src/components/pr-env-run-bundle.test.ts +0 -20
- package/src/components/pr-environment.ts +1 -1
- package/src/components/pr-pipeline-runners.test.ts +80 -0
- package/src/components/pr-pipeline.ts +244 -20
- package/src/components/pr-run.ts +17 -6
- package/src/components/pr-stale-job.test.ts +34 -0
- package/src/components/product-pipeline.ts +50 -8
- package/src/components/row-lease.test.ts +61 -1
- package/src/components/row-lease.ts +48 -7
- package/src/components/wave-plan.ts +18 -2
- package/src/e2e-harness/__project__/chant.config.ts +4 -0
- package/src/e2e-harness/__project__/src/compose.ts +33 -0
- package/src/e2e-harness/bucket.ts +69 -0
- package/src/e2e-harness/claim.test.ts +150 -0
- package/src/e2e-harness/claim.ts +140 -0
- package/src/e2e-harness/driver.test.ts +304 -0
- package/src/e2e-harness/driver.ts +294 -0
- package/src/e2e-harness/forgejo.ts +267 -0
- package/src/e2e-harness/git.ts +96 -0
- package/src/e2e-harness/index.ts +49 -0
- package/src/e2e-harness/jobs.ts +35 -0
- package/src/e2e-harness/pins.ts +52 -0
- package/src/e2e-harness/ports.ts +130 -0
- package/src/e2e-harness/reports.ts +79 -0
- package/src/e2e-harness/safe-run-cli.test.ts +102 -0
- package/src/e2e-harness/safe-run-cli.ts +54 -0
- package/src/e2e-harness/safe-run.ts +198 -0
- package/src/e2e-harness/scenario.ts +89 -0
- package/src/e2e-harness/schemas/README.md +62 -0
- package/src/e2e-harness/schemas/demo-cycle.schema.json +282 -0
- package/src/e2e-harness/schemas/demo-step.schema.json +245 -0
- package/src/e2e-harness/schemas/e2e-claim-row.schema.json +33 -0
- package/src/e2e-harness/schemas/e2e-claims.schema.json +18 -0
- package/src/e2e-harness/schemas/e2e-scenario.schema.json +150 -0
- package/src/e2e-harness/schemas/index.ts +220 -0
- package/src/e2e-harness/schemas.test.ts +145 -0
- package/src/e2e-harness/stack.test.ts +124 -0
- package/src/e2e-harness/stack.ts +306 -0
- package/src/e2e-harness/steps.ts +30 -0
- package/src/e2e-harness.ts +2 -0
- package/src/exit-codes.test.ts +3 -2
- package/src/exit-codes.ts +7 -1
- package/src/gate-decision-bundle.test.ts +0 -2
- package/src/lexicon.ts +57 -0
- package/src/lifecycle/control-entries-ledger.test.ts +2 -3
- package/src/lifecycle/gate-ledger.ts +2 -3
- package/src/lifecycle/gated-request.ts +1 -2
- package/src/lifecycle/git.test.ts +155 -0
- package/src/lifecycle/git.ts +213 -17
- package/src/lifecycle/lock-rows.test.ts +6 -1
- package/src/lifecycle/lock-rows.ts +58 -7
- package/src/lifecycle/query.ts +4 -5
- package/src/lifecycle/release-catalog.test.ts +3 -4
- package/src/lifecycle/release-catalog.ts +1 -1
- package/src/lifecycle/release-ledger.ts +1 -2
- package/src/lifecycle/release-status.test.ts +3 -4
- package/src/lifecycle/release-status.ts +1 -2
- package/src/lifecycle/resource-lock-wait.test.ts +292 -0
- package/src/lifecycle/resource-lock.ts +261 -7
- package/src/lifecycle/wave-plans.ts +33 -5
- package/src/op/approval-status.test.ts +134 -0
- package/src/op/approval-status.ts +235 -0
- package/src/op/gate-review.test.ts +2 -1
- package/src/op/gate.test.ts +7 -5
- package/src/op/gate.ts +20 -4
- package/src/op/index.ts +2 -0
- package/src/op/op-waves-after-plan.test.ts +11 -0
- package/src/op/op-waves-capability-spec.ts +20 -0
- package/src/op/op-waves-ledger-lock.test.ts +208 -0
- package/src/op/op-waves-parallelism.test.ts +89 -0
- package/src/op/op-waves-pull-request.test.ts +78 -1
- package/src/op/op-waves-release-port.ts +1 -1
- package/src/op/op-waves-release.ts +2 -3
- package/src/op/op-waves-run.ts +196 -31
- package/src/op/op-waves-stand-down.ts +1 -2
- package/src/op/op-waves.ts +81 -6
- package/src/op/runtime.ts +6 -3
- package/src/otlp.ts +1 -2
- package/src/parallelism.test.ts +38 -0
- package/src/parallelism.ts +33 -0
- package/src/policy-source.ts +1 -2
- package/src/pr-forge-bundle.test.ts +1 -1
- package/src/pr-forge.ts +54 -35
- package/src/pr-loop-bundle.test.ts +0 -2
- package/src/pr-loop-narrowed.test.ts +63 -0
- package/src/pr-loop.ts +30 -4
- package/src/pr-merge.test.ts +100 -0
- package/src/pr-merge.ts +105 -0
- package/src/pr-post-stale.test.ts +163 -0
- package/src/pr-post.ts +159 -5
- package/src/pr-report-url.ts +1 -2
- package/src/product-subpaths-plain-node.e2e.test.ts +1 -0
- package/src/release-floors.ts +1 -1
- package/src/run-event.ts +1 -2
- package/src/scheduled-op-cloud.ts +68 -0
- package/src/stage-hooks-bundle.test.ts +0 -2
- package/src/workspace/ci-lock-grain.ts +1 -2
- package/src/workspace/ci-run.ts +5 -1
- package/src/workspace/pr-report.schema.json +5 -0
package/src/pr-post.ts
CHANGED
|
@@ -20,15 +20,22 @@
|
|
|
20
20
|
* job there that holds `CHANT_FORGE_TOKEN` runs whatever the change wrote.
|
|
21
21
|
* `pr-post --open` ({@link postOpenPlanReports}) asks GitLab for each open
|
|
22
22
|
* merge request's plan job and reads the report from its artifacts.
|
|
23
|
+
*
|
|
24
|
+
* #4628: the note carries the target branch's commit it was posted against
|
|
25
|
+
* (`baseTip`) in a hidden line, and on GitHub and Forgejo the note job adds
|
|
26
|
+
* the note to the job summary (`GITHUB_STEP_SUMMARY`). When the target
|
|
27
|
+
* branch moves, {@link markStaleNotes}, from a job of the push, marks each
|
|
28
|
+
* open pull request's note stale with a line naming the comment that
|
|
29
|
+
* previews again, and sets its plan status back to pending.
|
|
23
30
|
*/
|
|
24
31
|
|
|
25
|
-
import { existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
32
|
+
import { appendFileSync, existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
26
33
|
import { tmpdir } from "node:os";
|
|
27
34
|
import { join } from "node:path";
|
|
28
35
|
import { prNoteMarker, prStatusContext, prStatusDescription, prStatusState, renderPrNote, type PrOverdue, type PrReport } from "./pr-loop";
|
|
29
36
|
import { forgePrincipalOf, type PrForge } from "./pr-forge";
|
|
30
37
|
import { GITHUB_COMMENT_LIMIT, GITLAB_NOTE_LIMIT } from "./plan-summary";
|
|
31
|
-
import { activeProductWords, type CiProductWords } from "./ci-product-words";
|
|
38
|
+
import { activeProductWords, commentLine, type CiProductWords } from "./ci-product-words";
|
|
32
39
|
import { controlEdgeFactsFromEnv, remarkCrossStackEdges, type ControlEdgeFacts } from "./control/edges";
|
|
33
40
|
|
|
34
41
|
/** The plan report's file under the report directory. */
|
|
@@ -58,6 +65,23 @@ export interface PlanPostInput {
|
|
|
58
65
|
* from the checkout `CHANT_CONTROL_DIR` names, when it names one.
|
|
59
66
|
*/
|
|
60
67
|
controlFacts?: () => Promise<ControlEdgeFacts | undefined>;
|
|
68
|
+
/**
|
|
69
|
+
* The description check (#4629, `../ci-respond-run.ts`), run once the
|
|
70
|
+
* note is posted, on the report's change set. Its finding is a comment of
|
|
71
|
+
* its own; it never changes the status.
|
|
72
|
+
*/
|
|
73
|
+
description?: (report: PrReport) => Promise<void>;
|
|
74
|
+
/**
|
|
75
|
+
* The target branch's commit the pull request's event names (#4628): the
|
|
76
|
+
* note carries it in a hidden line, and {@link markStaleNotes} marks the
|
|
77
|
+
* note stale once the branch has moved past it. Ignored unless a full sha.
|
|
78
|
+
*/
|
|
79
|
+
baseTip?: string;
|
|
80
|
+
/**
|
|
81
|
+
* The job summary file (#4628), `GITHUB_STEP_SUMMARY` on GitHub and
|
|
82
|
+
* Forgejo: the note, without its hidden lines, is added to it.
|
|
83
|
+
*/
|
|
84
|
+
summaryFile?: string;
|
|
61
85
|
}
|
|
62
86
|
|
|
63
87
|
/** What {@link postPlanReport} did. */
|
|
@@ -104,14 +128,39 @@ export function readPlanReport(input: Pick<PlanPostInput, "dir" | "pr" | "head"
|
|
|
104
128
|
* The note for `report`, rendered here, with every `<!--` after the marker
|
|
105
129
|
* line written as `<!--`, so the note carries no hidden marker but its own.
|
|
106
130
|
*/
|
|
107
|
-
export function planNoteFor(report: PrReport, forge: Pick<PrForge, "kind" | "host">, marker: string): string {
|
|
131
|
+
export function planNoteFor(report: PrReport, forge: Pick<PrForge, "kind" | "host">, marker: string, baseTip?: string): string {
|
|
108
132
|
const note = renderPrNote(report, {
|
|
109
133
|
limit: forge.kind === "gitlab" ? GITLAB_NOTE_LIMIT : GITHUB_COMMENT_LIMIT,
|
|
110
134
|
approver: forgePrincipalOf(forge.kind, forge.host, "<your-login>"),
|
|
111
135
|
});
|
|
112
136
|
const at = note.indexOf("\n");
|
|
113
137
|
const rest = (at < 0 ? "" : note.slice(at + 1)).split("<!--").join("<!--");
|
|
114
|
-
|
|
138
|
+
// #4628: the tip line is written after the defusing, from the caller's sha, never the report's.
|
|
139
|
+
const tip = baseTip && SHA.test(baseTip) ? `${rest.endsWith("\n") ? "" : "\n"}${prNoteTipMarker(baseTip)}\n` : "";
|
|
140
|
+
return `${marker}\n${rest}${tip}`;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/** The hidden line a note carries with the target branch's commit it was posted against (#4628). */
|
|
144
|
+
export function prNoteTipMarker(sha: string): string {
|
|
145
|
+
return `<!-- chant-pr-tip:${sha} -->`;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/** The hidden line a note marked stale carries, with the commit it was marked at (#4628). */
|
|
149
|
+
export function prNoteStaleMarker(sha: string): string {
|
|
150
|
+
return `<!-- chant-pr-stale:${sha} -->`;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
const TIP_LINE = /<!-- chant-pr-tip:([0-9a-f]{40}) -->/;
|
|
154
|
+
const STALE_LINE = /<!-- chant-pr-stale:([0-9a-f]{40}) -->/;
|
|
155
|
+
const STALE_PREFIX = "> Stale: ";
|
|
156
|
+
|
|
157
|
+
/** The note as the job summary shows it (#4628): the hidden lines dropped. */
|
|
158
|
+
export function planNoteSummary(note: string): string {
|
|
159
|
+
return note
|
|
160
|
+
.split("\n")
|
|
161
|
+
.filter((l) => !/^<!-- chant-pr[-:]/.test(l.trim()))
|
|
162
|
+
.join("\n")
|
|
163
|
+
.replace(/^\n+/, "");
|
|
115
164
|
}
|
|
116
165
|
|
|
117
166
|
const cut = (text: string, max = 140): string => (text.length > max ? `${text.slice(0, max - 3)}...` : text);
|
|
@@ -150,7 +199,7 @@ export async function postPlanReport(input: PlanPostInput): Promise<PlanPostResu
|
|
|
150
199
|
state = prStatusState(report);
|
|
151
200
|
description = prStatusDescription(report);
|
|
152
201
|
// A member the change does not reach has nothing to say on the pull request (as pr-plan's own publish).
|
|
153
|
-
if (!(input.member && report.status === "nothing" && !report.overdue?.length && !report.migrations?.length)) note = planNoteFor(report, input.forge, prNoteMarker(input.env, input.member));
|
|
202
|
+
if (!(input.member && report.status === "nothing" && !report.overdue?.length && !report.migrations?.length)) note = planNoteFor(report, input.forge, prNoteMarker(input.env, input.member), input.baseTip);
|
|
154
203
|
} catch (err) {
|
|
155
204
|
refused = `the plan report does not render: ${err instanceof Error ? err.message : String(err)}`;
|
|
156
205
|
state = "failure";
|
|
@@ -175,6 +224,21 @@ export async function postPlanReport(input: PlanPostInput): Promise<PlanPostResu
|
|
|
175
224
|
note = undefined;
|
|
176
225
|
}
|
|
177
226
|
}
|
|
227
|
+
// #4628: the note in the job summary, on a forge that keeps one.
|
|
228
|
+
if (input.summaryFile && (note !== undefined || refused !== undefined)) {
|
|
229
|
+
try {
|
|
230
|
+
appendFileSync(input.summaryFile, `${note !== undefined ? planNoteSummary(note) : `${context}: ${description}\n`}\n`);
|
|
231
|
+
} catch (err) {
|
|
232
|
+
warnings.push(`could not write the job summary: ${err instanceof Error ? err.message : String(err)}`);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
if (input.description && "report" in read && !failedJob) {
|
|
236
|
+
try {
|
|
237
|
+
await input.description(read.report);
|
|
238
|
+
} catch (err) {
|
|
239
|
+
warnings.push(`the description check did not run: ${err instanceof Error ? err.message : String(err)}`);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
178
242
|
return { state, description: cut(description), noted: note !== undefined, ...(refused ? { refused } : {}), warnings };
|
|
179
243
|
}
|
|
180
244
|
|
|
@@ -209,6 +273,10 @@ export interface OpenPlanPostInput {
|
|
|
209
273
|
env: string;
|
|
210
274
|
member?: string;
|
|
211
275
|
overdue?: () => Promise<PrOverdue[]>;
|
|
276
|
+
/** The description check, as {@link PlanPostInput.description}. */
|
|
277
|
+
description?: (report: PrReport) => Promise<void>;
|
|
278
|
+
/** The target branch's commit this pipeline runs at (#4628), for each note's tip line. */
|
|
279
|
+
baseTip?: string;
|
|
212
280
|
}
|
|
213
281
|
|
|
214
282
|
/** What {@link postOpenPlanReports} did for one merge request. */
|
|
@@ -265,6 +333,8 @@ export async function postOpenPlanReports(input: OpenPlanPostInput): Promise<{ p
|
|
|
265
333
|
...(input.member ? { member: input.member } : {}),
|
|
266
334
|
result: settled,
|
|
267
335
|
...(overdueOnce ? { overdue: overdueOnce } : {}),
|
|
336
|
+
...(input.description ? { description: input.description } : {}),
|
|
337
|
+
...(input.baseTip ? { baseTip: input.baseTip } : {}),
|
|
268
338
|
});
|
|
269
339
|
posts.push({ pr: job.pr, head: job.head, posted });
|
|
270
340
|
} finally {
|
|
@@ -276,3 +346,87 @@ export async function postOpenPlanReports(input: OpenPlanPostInput): Promise<{ p
|
|
|
276
346
|
}
|
|
277
347
|
return { posts, warnings };
|
|
278
348
|
}
|
|
349
|
+
|
|
350
|
+
/** What {@link markStaleNotes} marks. */
|
|
351
|
+
export interface StaleMarkInput {
|
|
352
|
+
/** A client that lists open pull requests ({@link PrForge.openPullRequests}). */
|
|
353
|
+
forge: PrForge;
|
|
354
|
+
/** The target branch that moved. */
|
|
355
|
+
branch: string;
|
|
356
|
+
/** Its commit now: the push's. */
|
|
357
|
+
tip: string;
|
|
358
|
+
env: string;
|
|
359
|
+
member?: string;
|
|
360
|
+
/** The pipeline answers the plan comment (`--preview-comment`), so the stale line names it. */
|
|
361
|
+
previewComment?: boolean;
|
|
362
|
+
words?: CiProductWords;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
/** What {@link markStaleNotes} did for one pull request. */
|
|
366
|
+
export interface StaleMark {
|
|
367
|
+
pr: number;
|
|
368
|
+
/** Marked stale, and its status set back to pending. */
|
|
369
|
+
marked?: boolean;
|
|
370
|
+
/** Why it was left alone. */
|
|
371
|
+
skipped?: string;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Mark stale each open pull request's note into `branch` that was posted
|
|
376
|
+
* against another commit than `tip` (#4628): a line after the marker says
|
|
377
|
+
* the branch moved and names the comment that previews again (or a push,
|
|
378
|
+
* when the pipeline answers no plan comment), and the plan status on the
|
|
379
|
+
* pull request's head goes back to pending. A note with no tip line (posted
|
|
380
|
+
* before #4628), one at `tip`, or one already marked at `tip` is left alone.
|
|
381
|
+
* A forge that refuses one pull request is a warning, and the others go on.
|
|
382
|
+
*/
|
|
383
|
+
export async function markStaleNotes(input: StaleMarkInput): Promise<{ marks: StaleMark[]; warnings: string[] }> {
|
|
384
|
+
const { forge } = input;
|
|
385
|
+
if (!SHA.test(input.tip)) throw new Error(`the target branch's commit is a full sha, not ${JSON.stringify(input.tip)}`);
|
|
386
|
+
if (!forge.openPullRequests) throw new Error(`marking notes stale lists the open pull requests into ${input.branch}, which this ${forge.kind} client cannot`);
|
|
387
|
+
const words = input.words ?? activeProductWords();
|
|
388
|
+
const marker = prNoteMarker(input.env, input.member);
|
|
389
|
+
const context = prStatusContext("plan", input.member, words);
|
|
390
|
+
const comment = input.previewComment ? commentLine(words, "plan") : undefined;
|
|
391
|
+
const verb = words.verbs.plan[0];
|
|
392
|
+
const again = comment ? `comment \`${comment}\` to ${verb} again` : `push a commit to ${verb} again`;
|
|
393
|
+
const marks: StaleMark[] = [];
|
|
394
|
+
const warnings: string[] = [];
|
|
395
|
+
for (const pr of await forge.openPullRequests(input.branch)) {
|
|
396
|
+
try {
|
|
397
|
+
const found = await forge.findComment(pr.number, marker);
|
|
398
|
+
if (!found) {
|
|
399
|
+
marks.push({ pr: pr.number, skipped: "no note" });
|
|
400
|
+
continue;
|
|
401
|
+
}
|
|
402
|
+
const planned = TIP_LINE.exec(found.body)?.[1];
|
|
403
|
+
if (!planned) {
|
|
404
|
+
marks.push({ pr: pr.number, skipped: "the note names no target branch commit" });
|
|
405
|
+
continue;
|
|
406
|
+
}
|
|
407
|
+
if (planned === input.tip) {
|
|
408
|
+
marks.push({ pr: pr.number, skipped: "the note is current" });
|
|
409
|
+
continue;
|
|
410
|
+
}
|
|
411
|
+
if (STALE_LINE.exec(found.body)?.[1] === input.tip) {
|
|
412
|
+
marks.push({ pr: pr.number, skipped: "already marked" });
|
|
413
|
+
continue;
|
|
414
|
+
}
|
|
415
|
+
const lines = found.body.split("\n");
|
|
416
|
+
const head = lines[0] === marker ? 1 : 0;
|
|
417
|
+
const kept = lines.slice(head).filter((l) => !l.startsWith(STALE_PREFIX) && !STALE_LINE.test(l));
|
|
418
|
+
while (kept[0] === "") kept.shift();
|
|
419
|
+
const line = `${STALE_PREFIX}${input.branch} moved to \`${input.tip.slice(0, 12)}\` since this ${verb} was posted against \`${planned.slice(0, 12)}\`, so it may no longer show what the merge does; ${again}.`;
|
|
420
|
+
await forge.upsertNote(pr.number, marker, [marker, line, prNoteStaleMarker(input.tip), "", ...kept].join("\n"));
|
|
421
|
+
try {
|
|
422
|
+
await forge.setStatus(pr.headSha, { context, state: "pending", description: cut(`stale: ${input.branch} moved; ${again.replace(/`/g, "")}`) });
|
|
423
|
+
} catch (err) {
|
|
424
|
+
warnings.push(`#${pr.number}: could not set the ${context} status back to pending: ${err instanceof Error ? err.message : String(err)}`);
|
|
425
|
+
}
|
|
426
|
+
marks.push({ pr: pr.number, marked: true });
|
|
427
|
+
} catch (err) {
|
|
428
|
+
warnings.push(`#${pr.number}: ${err instanceof Error ? err.message : String(err)}`);
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
return { marks, warnings };
|
|
432
|
+
}
|
package/src/pr-report-url.ts
CHANGED
|
@@ -47,11 +47,10 @@ import { spawn } from "node:child_process";
|
|
|
47
47
|
import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
48
48
|
import { dirname, isAbsolute, join } from "node:path";
|
|
49
49
|
import { fileURLToPath } from "node:url";
|
|
50
|
-
import { NEXT_RELEASE } from "./release-floors";
|
|
51
50
|
import type { ObjectStore } from "./object-store/common";
|
|
52
51
|
|
|
53
52
|
/** The first chant that reads a `gs://` or `az://` report URL (#4554). */
|
|
54
|
-
export const REPORT_URL_CLOUDS_FLOOR =
|
|
53
|
+
export const REPORT_URL_CLOUDS_FLOOR = "0.124.55";
|
|
55
54
|
|
|
56
55
|
/** Where `--report-url` points. */
|
|
57
56
|
export type ReportTarget =
|
package/src/release-floors.ts
CHANGED
package/src/run-event.ts
CHANGED
|
@@ -29,7 +29,6 @@ import type { RunProgressEvent } from "./components/run-progress";
|
|
|
29
29
|
import type { RunOrigin } from "./lifecycle/release-ledger";
|
|
30
30
|
import type { StepRecord } from "./op/local-executor";
|
|
31
31
|
import { CHANT_VERSION } from "./chant-version";
|
|
32
|
-
import { NEXT_RELEASE } from "./release-floors";
|
|
33
32
|
|
|
34
33
|
/** The schema's `$id`, which every event carries as `$schema`. */
|
|
35
34
|
export const RUN_EVENT_SCHEMA_ID = "https://intentius.io/chant/schemas/workspace/run-event/v1/run-event.schema.json";
|
|
@@ -243,7 +242,7 @@ export interface RunEventResource {
|
|
|
243
242
|
}
|
|
244
243
|
|
|
245
244
|
/** The first chant that writes `resources` on `step-settle` (#4615). */
|
|
246
|
-
export const RUN_EVENT_RESOURCES_FLOOR =
|
|
245
|
+
export const RUN_EVENT_RESOURCES_FLOOR = "0.124.55";
|
|
247
246
|
|
|
248
247
|
/** The run stopped at a gate nobody has approved, or a decision point nobody has answered. */
|
|
249
248
|
export interface RunEventGateWaiting {
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cloud identities on scheduled Op jobs (#4631), as op waves have them
|
|
3
|
+
* (#4332, #4549): what the github, forgejo and gitlab Op generators share.
|
|
4
|
+
*
|
|
5
|
+
* A scheduled Op with `cloud` trades its job's OIDC token for those
|
|
6
|
+
* identities before the checkout, and every later step drops the variables
|
|
7
|
+
* a token is requested with. A drift Op with `update` gets a second job
|
|
8
|
+
* after its own, started only when the run exits with chant's drift code,
|
|
9
|
+
* which trades for the update's identity and runs the update. The drift
|
|
10
|
+
* check never holds the update's identity.
|
|
11
|
+
*
|
|
12
|
+
* The update job holds `contents: read`, and `update.permissions` adds
|
|
13
|
+
* scopes to it. It may raise `contents` to `write` (2026-10-28 ruling), so
|
|
14
|
+
* an update such as `plywood up` can push its records to `chant/lifecycle`
|
|
15
|
+
* with the job token. The drift check's job keeps the finding-mode's
|
|
16
|
+
* scopes whatever the update asks for.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import { OIDC_REQUEST_VARS } from "./ci-identity";
|
|
20
|
+
import type { ScheduledOpSpec } from "./lexicon";
|
|
21
|
+
import { resolveOpTrigger } from "./lexicon";
|
|
22
|
+
import { assertOpWaveCloud } from "./op/op-waves";
|
|
23
|
+
|
|
24
|
+
/** The update job's name beside the Op's job `jobName`. */
|
|
25
|
+
export function scheduledOpUpdateJobName(jobName: string): string {
|
|
26
|
+
return `${jobName}-update`;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** The shell line that drops the token request variables, which a step after the trade starts with. */
|
|
30
|
+
export function dropTokenRequestLine(): string {
|
|
31
|
+
return `unset ${OIDC_REQUEST_VARS.join(" ")}`;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** `line` with the token request variables dropped first. */
|
|
35
|
+
export function withoutTokenRequestLine(line: string): string {
|
|
36
|
+
return `${dropTokenRequestLine()}\n${line}`;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Refuse a `cloud` or `update` a generator could not render: a malformed
|
|
41
|
+
* trade spec, an update with no command, an update on a push trigger or a
|
|
42
|
+
* review split, or one beside a comment agent, and an `update.permissions`
|
|
43
|
+
* that restates `contents` at anything but `write`.
|
|
44
|
+
*/
|
|
45
|
+
export function assertScheduledOpCloud(spec: ScheduledOpSpec): void {
|
|
46
|
+
const where = `Scheduled Op "${spec.name}"`;
|
|
47
|
+
if (spec.cloud !== undefined) {
|
|
48
|
+
assertOpWaveCloud(where, "cloud", spec.cloud);
|
|
49
|
+
if (spec.reviewAgent === true) throw new Error(`${where}: a reviewAgent Op's review job runs the change's code beside a model, so it takes no cloud identity.`);
|
|
50
|
+
if (spec.agent?.on === "comment") throw new Error(`${where}: a comment agent's jobs take no cloud identity.`);
|
|
51
|
+
}
|
|
52
|
+
const update = spec.update;
|
|
53
|
+
if (update === undefined) return;
|
|
54
|
+
if (update === null || typeof update !== "object" || typeof update.command !== "string" || update.command.trim() === "") {
|
|
55
|
+
throw new Error(`${where}: update must give the command its job runs: { "command": "<line>", "cloud"?: {...} }.`);
|
|
56
|
+
}
|
|
57
|
+
if (update.cloud !== undefined) assertOpWaveCloud(where, "update.cloud", update.cloud);
|
|
58
|
+
if (spec.reviewAgent === true) throw new Error(`${where}: update follows a drift check's run, and a reviewAgent Op runs a review; give it to a drift Op.`);
|
|
59
|
+
if (spec.agent?.on === "comment") throw new Error(`${where}: update follows a drift check's run, and a comment agent's workflow has none.`);
|
|
60
|
+
const trigger = resolveOpTrigger(spec);
|
|
61
|
+
if (trigger.kind === "push") throw new Error(`${where}: update follows a drift check's run; give it a cron or pull_request trigger.`);
|
|
62
|
+
for (const [scope, value] of Object.entries(update.permissions ?? {})) {
|
|
63
|
+
// 2026-10-28 ruling: contents may be raised to write, so the update can record on chant/lifecycle.
|
|
64
|
+
if (scope === "contents" && value !== "write") {
|
|
65
|
+
throw new Error(`${where}: update.permissions names contents: ${String(value)}, which the update job holds already; contents may only be raised to write, for an update that records on chant/lifecycle.`);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -37,8 +37,6 @@ describe("the stage-hooks bundle", () => {
|
|
|
37
37
|
"packages/core/src/op/op-waves-release.ts",
|
|
38
38
|
"packages/core/src/op/op-waves.ts",
|
|
39
39
|
"packages/core/src/op/stage-hooks.ts",
|
|
40
|
-
// The next-release floor constant (#4480): no imports.
|
|
41
|
-
"packages/core/src/release-floors.ts",
|
|
42
40
|
"packages/core/src/wave-blocked.ts",
|
|
43
41
|
"packages/core/src/wave-layout.ts",
|
|
44
42
|
]);
|
|
@@ -3,13 +3,12 @@
|
|
|
3
3
|
* `ci.workflow` (./ci-workflow-at.ts) are: the target branch's tip, so a
|
|
4
4
|
* pull request cannot widen what its own apply may run beside.
|
|
5
5
|
*/
|
|
6
|
-
import { NEXT_RELEASE } from "../release-floors";
|
|
7
6
|
import type { CiLockGrain, Declaration } from "./declaration";
|
|
8
7
|
import { memberAtCwd } from "./security";
|
|
9
8
|
import { scopeSource } from "./write-scope";
|
|
10
9
|
|
|
11
10
|
/** The first chant that reads `ci.lockGrain`; a declaration that sets it needs this `minReader`. */
|
|
12
|
-
export const CI_LOCK_GRAIN_FLOOR =
|
|
11
|
+
export const CI_LOCK_GRAIN_FLOOR = "0.124.55";
|
|
13
12
|
|
|
14
13
|
/** The grain a member takes from the declaration: its own `ci.lockGrain`, else the top level's, else null. */
|
|
15
14
|
export function lockGrainOf(declaration: Pick<Declaration, "ci" | "members">, member: string | null | undefined): CiLockGrain | null {
|
package/src/workspace/ci-run.ts
CHANGED
|
@@ -1187,13 +1187,17 @@ export function ciLoopOptions(args: CommandContext["args"]): PrLoopPipelineOptio
|
|
|
1187
1187
|
...(args.requireReview === true ? { requireReview: true } : {}),
|
|
1188
1188
|
...(args.applyBeforeMerge ? { applyBeforeMerge: true } : {}),
|
|
1189
1189
|
...(args.requires ? { applyRequires: args.requires } : {}),
|
|
1190
|
+
...(args.merge === "auto" && args.mergeTokenEnv ? { applyMerge: { tokenEnv: args.mergeTokenEnv, ...(args.mergeMethod ? { method: args.mergeMethod as "merge" | "squash" | "rebase" } : {}) } } : {}),
|
|
1191
|
+
...(args.parallelism !== undefined ? { parallelism: args.parallelism } : {}),
|
|
1192
|
+
...(args.commentTargets ? { commentTargets: true } : {}),
|
|
1193
|
+
...(args.refresh ? { refresh: true } : {}),
|
|
1190
1194
|
};
|
|
1191
1195
|
}
|
|
1192
1196
|
|
|
1193
1197
|
const USAGE =
|
|
1194
1198
|
"chant ci run plan|record|apply|env-up|env-post|env-down|env-sweep --env <env> --base <sha> [--pr <n>] [--commit <sha>] [--head <sha>] [--result <r>] [--forge github|gitlab|forgejo] " +
|
|
1195
1199
|
"[--gate <name>] [--wave-gate <name>] [--wave <k>] [--branch <name>] [--events-json] [--report-url <url>] [--run-index-limit <n>] [--image <image>] [--before-script <line>]... " +
|
|
1196
|
-
"[--pr-build] [--pr-build-command <line>] [--require-review] [--apply-before-merge [--requires <list>]] [--no-status] [--status-url <url template>] " +
|
|
1200
|
+
"[--pr-build] [--pr-build-command <line>] [--parallelism <n>] [--comment-targets] [--refresh] [--require-review] [--apply-before-merge [--requires <list>] [--merge auto --merge-token-env <VAR> [--merge-method <m>]]] [--no-status] [--status-url <url template>] " +
|
|
1197
1201
|
"[--chant <command>] [--pass-env <NAME>]... [--secrets <file>] [--key <runner key.pem>] [-o <dir>] [--in-place | --local] [--no-push] [--verbose] | chant ci run --at <sha> | chant ci run --setup-key [--trust [--principal <name>]] [--state <dir>] [--branch <name>]";
|
|
1198
1202
|
|
|
1199
1203
|
const ENV_NAME = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
@@ -332,6 +332,11 @@
|
|
|
332
332
|
"items": { "type": "string", "minLength": 1 },
|
|
333
333
|
"description": "Added within contract version 1 by #4552, written by chant 0.124.55 and newer. The names the pull request's target locks take under ci.locks when any member is on the resource lock grain, sorted: each such member's row keys (estate <e> <address>, root <r> <address>, urn <urn>, stack <project>/<stack>, object <id>), and the component name of every component with a member on another grain. chant lock --from-report locks these in place of selection.waves. Absent when no member is on the resource grain."
|
|
334
334
|
},
|
|
335
|
+
"narrowed": {
|
|
336
|
+
"type": "object",
|
|
337
|
+
"additionalProperties": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
338
|
+
"description": "Added within contract version 1 by #4626, written by chant 0.124.55 and newer. Plan stage: the addresses each component's plan was narrowed to with pr-plan --target, from the command line or the preview comment, by component. Absent when nothing was narrowed."
|
|
339
|
+
},
|
|
335
340
|
"crossStackEdges": {
|
|
336
341
|
"type": "array",
|
|
337
342
|
"description": "Added within contract version 1 by #4617, written by chant 0.124.55 and newer. Each stack outside the workspace a member reads (a Pulumi StackReference no step applies), marked stale, current or unknown from the control repo's entries and apply records. The plan job marks each one unknown; the job that posts the note marks them again from a checkout of the control repo. Absent when no member reads one.",
|