@intentius/chant 0.124.54 → 0.124.56
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/__fixtures__/estate-ledger.d.ts +13 -0
- package/dist/__fixtures__/estate-ledger.d.ts.map +1 -0
- package/dist/__fixtures__/estate-ledger.js +67 -0
- package/dist/__fixtures__/oidc-emulator.d.ts +11 -1
- package/dist/__fixtures__/oidc-emulator.d.ts.map +1 -1
- package/dist/__fixtures__/oidc-emulator.js +26 -2
- package/dist/__fixtures__/product-words.d.ts +78 -0
- package/dist/__fixtures__/product-words.d.ts.map +1 -0
- package/dist/__fixtures__/product-words.js +43 -0
- package/dist/__golden__/wave-loop/op-by-apply-after-fails.json +10 -2
- package/dist/__golden__/wave-loop/op-by-apply-hold.json +20 -4
- package/dist/__golden__/wave-loop/op-by-apply-ignored.json +10 -2
- package/dist/__golden__/wave-loop/op-by-apply-pass.json +10 -2
- package/dist/__golden__/wave-loop/op-by-apply-skip.json +10 -2
- package/dist/__golden__/wave-loop/op-discover-rest-stops.json +22 -6
- package/dist/__golden__/wave-loop/op-discover-rest.json +44 -12
- package/dist/__golden__/wave-loop/op-discover-wide.json +12 -3
- package/dist/__golden__/wave-loop/op-held-on.json +28 -7
- package/dist/__golden__/wave-loop/op-hooks-apply-fails.json +22 -6
- package/dist/__golden__/wave-loop/op-hooks-fail-after-apply.json +22 -6
- package/dist/__golden__/wave-loop/op-hooks-fail-before-apply.json +4 -2
- package/dist/__golden__/wave-loop/op-hooks-held.json +26 -8
- package/dist/__golden__/wave-loop/op-hooks-hold-before-apply.json +18 -4
- package/dist/__golden__/wave-loop/op-hooks-pass.json +22 -6
- package/dist/__golden__/wave-loop/op-hooks-share.json +20 -7
- package/dist/__golden__/wave-loop/op-outcome-held.json +12 -3
- package/dist/__golden__/wave-loop/op-outcome-replan-approved.json +16 -5
- package/dist/__golden__/wave-loop/op-outcome-replan-forever.json +48 -21
- package/dist/__golden__/wave-loop/op-outcome-replan.json +16 -5
- package/dist/__golden__/wave-loop/op-outcome-stood-down.json +12 -3
- package/dist/__golden__/wave-loop/op-outcome-unreadable.json +12 -3
- package/dist/__golden__/wave-loop/op-overridden.json +28 -7
- package/dist/__golden__/wave-loop/op-per-run.json +20 -4
- package/dist/__golden__/wave-loop/op-point.json +18 -4
- package/dist/__golden__/wave-loop/op-pr-review.json +10 -2
- package/dist/__golden__/wave-loop/op-spend-change-only.json +10 -2
- package/dist/__golden__/wave-loop/op-spend.json +10 -2
- package/dist/__golden__/wave-loop/op-wave-commands.json +56 -13
- package/dist/__golden__/wave-loop/op-wide.json +20 -4
- package/dist/bucket-check/azure.d.ts +108 -0
- package/dist/bucket-check/azure.d.ts.map +1 -0
- package/dist/bucket-check/azure.js +258 -0
- package/dist/bucket-check/fixtures/azure.json +153 -0
- package/dist/bucket-check/fixtures/gcs.json +148 -0
- package/dist/bucket-check/fixtures/s3.json +277 -0
- package/dist/bucket-check/gcs.d.ts +77 -0
- package/dist/bucket-check/gcs.d.ts.map +1 -0
- package/dist/bucket-check/gcs.js +202 -0
- package/dist/bucket-check/index.d.ts +48 -0
- package/dist/bucket-check/index.d.ts.map +1 -0
- package/dist/bucket-check/index.js +44 -0
- package/dist/bucket-check/s3.d.ts +116 -0
- package/dist/bucket-check/s3.d.ts.map +1 -0
- package/dist/bucket-check/s3.js +362 -0
- package/dist/bucket-check/types.d.ts +66 -0
- package/dist/bucket-check/types.d.ts.map +1 -0
- package/dist/bucket-check/types.js +31 -0
- package/dist/bucket-check/wire.d.ts +27 -0
- package/dist/bucket-check/wire.d.ts.map +1 -0
- package/dist/bucket-check/wire.js +32 -0
- package/dist/bucket-check.d.ts +6 -0
- package/dist/bucket-check.d.ts.map +1 -0
- package/dist/bucket-check.js +5 -0
- package/dist/capabilities/templates.d.ts.map +1 -1
- package/dist/capabilities/templates.js +1 -2
- package/dist/change-set.d.ts.map +1 -1
- package/dist/change-set.js +2 -3
- package/dist/ci-agent.d.ts +381 -0
- package/dist/ci-agent.d.ts.map +1 -0
- package/dist/ci-agent.js +832 -0
- 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 +12 -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 +42 -0
- package/dist/ci-control.d.ts.map +1 -0
- package/dist/ci-control.js +41 -0
- package/dist/ci-estate/delivery.d.ts +137 -0
- package/dist/ci-estate/delivery.d.ts.map +1 -0
- package/dist/ci-estate/delivery.js +311 -0
- package/dist/ci-estate/overdue.d.ts +34 -0
- package/dist/ci-estate/overdue.d.ts.map +1 -0
- package/dist/ci-estate/overdue.js +58 -0
- package/dist/ci-estate/page.d.ts +134 -0
- package/dist/ci-estate/page.d.ts.map +1 -0
- package/dist/ci-estate/page.js +233 -0
- package/dist/ci-estate/rows.d.ts +118 -0
- package/dist/ci-estate/rows.d.ts.map +1 -0
- package/dist/ci-estate/rows.js +126 -0
- package/dist/ci-estate.d.ts +92 -0
- package/dist/ci-estate.d.ts.map +1 -0
- package/dist/ci-estate.js +82 -0
- package/dist/ci-handover.d.ts +29 -5
- package/dist/ci-handover.d.ts.map +1 -1
- package/dist/ci-handover.js +50 -16
- package/dist/ci-identity.d.ts +82 -7
- package/dist/ci-identity.d.ts.map +1 -1
- package/dist/ci-identity.js +86 -15
- 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 +296 -0
- package/dist/ci-product-words.d.ts.map +1 -0
- package/dist/ci-product-words.js +407 -0
- package/dist/ci-product.d.ts +117 -0
- package/dist/ci-product.d.ts.map +1 -0
- package/dist/ci-product.js +113 -0
- 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/commands/audit.d.ts +2 -2
- package/dist/cli/commands/audit.d.ts.map +1 -1
- package/dist/cli/commands/audit.js +3 -2
- package/dist/cli/commands/carve.js +2 -2
- package/dist/cli/commands/init.d.ts +2 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +1 -1
- package/dist/cli/handlers/agent.d.ts +17 -0
- package/dist/cli/handlers/agent.d.ts.map +1 -0
- package/dist/cli/handlers/agent.js +114 -0
- package/dist/cli/handlers/approve-confirm.d.ts +84 -0
- package/dist/cli/handlers/approve-confirm.d.ts.map +1 -0
- package/dist/cli/handlers/approve-confirm.js +142 -0
- package/dist/cli/handlers/approve.d.ts.map +1 -1
- package/dist/cli/handlers/approve.js +19 -1
- 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 +124 -1
- 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 +3 -0
- package/dist/cli/handlers/ci-check.d.ts.map +1 -0
- package/dist/cli/handlers/ci-check.js +63 -0
- package/dist/cli/handlers/ci-forge-check.d.ts +3 -0
- package/dist/cli/handlers/ci-forge-check.d.ts.map +1 -0
- package/dist/cli/handlers/ci-forge-check.js +89 -0
- 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/fan-out.js +4 -0
- package/dist/cli/handlers/gate-pending.d.ts +11 -0
- package/dist/cli/handlers/gate-pending.d.ts.map +1 -0
- package/dist/cli/handlers/gate-pending.js +44 -0
- package/dist/cli/handlers/init.d.ts.map +1 -1
- package/dist/cli/handlers/init.js +1 -0
- package/dist/cli/handlers/ledger.js +1 -1
- package/dist/cli/handlers/lifecycle-drift.d.ts +6 -2
- package/dist/cli/handlers/lifecycle-drift.d.ts.map +1 -1
- package/dist/cli/handlers/lifecycle-drift.js +7 -2
- package/dist/cli/handlers/lock.d.ts.map +1 -1
- package/dist/cli/handlers/lock.js +64 -5
- package/dist/cli/handlers/notify-relay.d.ts +15 -0
- package/dist/cli/handlers/notify-relay.d.ts.map +1 -0
- package/dist/cli/handlers/notify-relay.js +130 -0
- package/dist/cli/handlers/pr-env.d.ts.map +1 -1
- package/dist/cli/handlers/pr-env.js +42 -11
- package/dist/cli/handlers/pr.d.ts +43 -3
- package/dist/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/handlers/pr.js +908 -205
- package/dist/cli/handlers/promote.d.ts.map +1 -1
- package/dist/cli/handlers/promote.js +21 -2
- package/dist/cli/handlers/release.d.ts.map +1 -1
- package/dist/cli/handlers/release.js +3 -0
- package/dist/cli/handlers/run-wave.d.ts +8 -0
- package/dist/cli/handlers/run-wave.d.ts.map +1 -1
- package/dist/cli/handlers/run-wave.js +160 -2
- package/dist/cli/handlers/run.d.ts +6 -1
- package/dist/cli/handlers/run.d.ts.map +1 -1
- package/dist/cli/handlers/run.js +86 -1
- package/dist/cli/handlers/serve.d.ts.map +1 -1
- package/dist/cli/handlers/serve.js +10 -1
- package/dist/cli/main.d.ts +11 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +178 -13
- package/dist/cli/mcp/ledger-tools.d.ts +36 -0
- package/dist/cli/mcp/ledger-tools.d.ts.map +1 -0
- package/dist/cli/mcp/ledger-tools.js +122 -0
- package/dist/cli/mcp/product-tools.d.ts +78 -0
- package/dist/cli/mcp/product-tools.d.ts.map +1 -0
- package/dist/cli/mcp/product-tools.js +93 -0
- package/dist/cli/mcp/read-only.d.ts +34 -0
- package/dist/cli/mcp/read-only.d.ts.map +1 -0
- package/dist/cli/mcp/read-only.js +61 -0
- package/dist/cli/mcp/report-tools.d.ts +48 -0
- package/dist/cli/mcp/report-tools.d.ts.map +1 -0
- package/dist/cli/mcp/report-tools.js +128 -0
- package/dist/cli/mcp/server.d.ts +28 -1
- package/dist/cli/mcp/server.d.ts.map +1 -1
- package/dist/cli/mcp/server.js +86 -15
- package/dist/cli/mcp-config.d.ts +9 -2
- package/dist/cli/mcp-config.d.ts.map +1 -1
- package/dist/cli/mcp-config.js +8 -3
- package/dist/cli/parse-args.d.ts.map +1 -1
- package/dist/cli/parse-args.js +164 -3
- package/dist/cli/registry.d.ts +73 -0
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/cloud-lister/sigv4.d.ts +42 -7
- package/dist/cloud-lister/sigv4.d.ts.map +1 -1
- package/dist/cloud-lister/sigv4.js +72 -22
- package/dist/components/adoption.d.ts +69 -0
- package/dist/components/adoption.d.ts.map +1 -0
- package/dist/components/adoption.js +92 -0
- package/dist/components/apply-lease.d.ts +19 -0
- package/dist/components/apply-lease.d.ts.map +1 -0
- package/dist/components/apply-lease.js +41 -0
- package/dist/components/capability.d.ts +159 -5
- package/dist/components/capability.d.ts.map +1 -1
- package/dist/components/capability.js +39 -6
- package/dist/components/check-hooks.d.ts +116 -0
- package/dist/components/check-hooks.d.ts.map +1 -0
- package/dist/components/check-hooks.js +192 -0
- 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 +57 -0
- package/dist/components/ci-services.d.ts.map +1 -0
- package/dist/components/ci-services.js +60 -0
- package/dist/components/cli-support.d.ts +13 -0
- package/dist/components/cli-support.d.ts.map +1 -1
- package/dist/components/cli-support.js +10 -2
- package/dist/components/driver.d.ts +32 -3
- package/dist/components/driver.d.ts.map +1 -1
- package/dist/components/driver.js +59 -5
- package/dist/components/fan-out-run.d.ts +12 -0
- package/dist/components/fan-out-run.d.ts.map +1 -1
- package/dist/components/fan-out-run.js +56 -16
- package/dist/components/groups.d.ts.map +1 -1
- package/dist/components/groups.js +23 -5
- package/dist/components/pr-env-ledger.d.ts +32 -0
- package/dist/components/pr-env-ledger.d.ts.map +1 -0
- package/dist/components/pr-env-ledger.js +38 -0
- package/dist/components/pr-env-ports.d.ts +12 -0
- package/dist/components/pr-env-ports.d.ts.map +1 -1
- package/dist/components/pr-env-ports.js +13 -3
- package/dist/components/pr-env-run.d.ts +6 -0
- package/dist/components/pr-env-run.d.ts.map +1 -1
- package/dist/components/pr-env-run.js +3 -2
- package/dist/components/pr-environment.d.ts +32 -4
- package/dist/components/pr-environment.d.ts.map +1 -1
- package/dist/components/pr-environment.js +26 -8
- package/dist/components/pr-pipeline.d.ts +297 -5
- package/dist/components/pr-pipeline.d.ts.map +1 -1
- package/dist/components/pr-pipeline.js +329 -18
- package/dist/components/pr-policy.d.ts +26 -2
- package/dist/components/pr-policy.d.ts.map +1 -1
- package/dist/components/pr-policy.js +41 -7
- package/dist/components/pr-run.d.ts +71 -0
- package/dist/components/pr-run.d.ts.map +1 -1
- package/dist/components/pr-run.js +91 -7
- package/dist/components/pr-targets.d.ts +24 -0
- package/dist/components/pr-targets.d.ts.map +1 -0
- package/dist/components/pr-targets.js +48 -0
- package/dist/components/product-pipeline.d.ts +250 -0
- package/dist/components/product-pipeline.d.ts.map +1 -0
- package/dist/components/product-pipeline.js +212 -0
- package/dist/components/promote.d.ts +6 -0
- package/dist/components/promote.d.ts.map +1 -1
- package/dist/components/promote.js +4 -1
- package/dist/components/release-compile.d.ts +22 -1
- package/dist/components/release-compile.d.ts.map +1 -1
- package/dist/components/release-compile.js +85 -0
- package/dist/components/release-promote.d.ts +15 -1
- package/dist/components/release-promote.d.ts.map +1 -1
- package/dist/components/release-promote.js +67 -2
- package/dist/components/repo-lock.d.ts +27 -0
- package/dist/components/repo-lock.d.ts.map +1 -0
- package/dist/components/repo-lock.js +49 -0
- package/dist/components/row-lease.d.ts +84 -0
- package/dist/components/row-lease.d.ts.map +1 -0
- package/dist/components/row-lease.js +110 -0
- package/dist/components/wave-plan.d.ts +42 -0
- package/dist/components/wave-plan.d.ts.map +1 -1
- package/dist/components/wave-plan.js +72 -4
- package/dist/control/applied.d.ts +89 -0
- package/dist/control/applied.d.ts.map +1 -0
- package/dist/control/applied.js +175 -0
- package/dist/control/consumers.d.ts +78 -0
- package/dist/control/consumers.d.ts.map +1 -0
- package/dist/control/consumers.js +172 -0
- package/dist/control/dispatch.d.ts +334 -0
- package/dist/control/dispatch.d.ts.map +1 -0
- package/dist/control/dispatch.js +519 -0
- package/dist/control/edges.d.ts +75 -0
- package/dist/control/edges.d.ts.map +1 -0
- package/dist/control/edges.js +133 -0
- package/dist/control/reconcile.d.ts +120 -0
- package/dist/control/reconcile.d.ts.map +1 -0
- package/dist/control/reconcile.js +178 -0
- package/dist/control/records.d.ts +187 -0
- package/dist/control/records.d.ts.map +1 -0
- package/dist/control/records.js +307 -0
- package/dist/discovery/sandbox/bundle.d.ts.map +1 -1
- package/dist/discovery/sandbox/bundle.js +25 -1
- 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 +48 -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/engine-facts.d.ts.map +1 -1
- package/dist/engine-facts.js +1 -2
- package/dist/exit-codes.d.ts +54 -0
- package/dist/exit-codes.d.ts.map +1 -0
- package/dist/exit-codes.js +55 -0
- package/dist/forge-check/check.d.ts +63 -0
- package/dist/forge-check/check.d.ts.map +1 -0
- package/dist/forge-check/check.js +139 -0
- package/dist/forge-check/contract.d.ts +152 -0
- package/dist/forge-check/contract.d.ts.map +1 -0
- package/dist/forge-check/contract.js +118 -0
- package/dist/forge-check/forge.d.ts +42 -0
- package/dist/forge-check/forge.d.ts.map +1 -0
- package/dist/forge-check/forge.js +338 -0
- package/dist/forge-check/index.d.ts +24 -0
- package/dist/forge-check/index.d.ts.map +1 -0
- package/dist/forge-check/index.js +23 -0
- package/dist/forge-check/pulumi.d.ts +44 -0
- package/dist/forge-check/pulumi.d.ts.map +1 -0
- package/dist/forge-check/pulumi.js +184 -0
- package/dist/forge-check/read-only.d.ts +26 -0
- package/dist/forge-check/read-only.d.ts.map +1 -0
- package/dist/forge-check/read-only.js +53 -0
- package/dist/forge-check/trust.d.ts +94 -0
- package/dist/forge-check/trust.d.ts.map +1 -0
- package/dist/forge-check/trust.js +532 -0
- package/dist/forge-check/types.d.ts +80 -0
- package/dist/forge-check/types.d.ts.map +1 -0
- package/dist/forge-check/types.js +18 -0
- package/dist/forge-check.d.ts +6 -0
- package/dist/forge-check.d.ts.map +1 -0
- package/dist/forge-check.js +5 -0
- package/dist/gate-decision.d.ts +1 -0
- package/dist/gate-decision.d.ts.map +1 -1
- package/dist/gate-decision.js +2 -0
- package/dist/gate-policy.d.ts +47 -1
- package/dist/gate-policy.d.ts.map +1 -1
- package/dist/gate-policy.js +50 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/lexicon.d.ts +152 -6
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/adoption-file.d.ts +24 -0
- package/dist/lifecycle/adoption-file.d.ts.map +1 -1
- package/dist/lifecycle/adoption-file.js +1 -2
- package/dist/lifecycle/cloud-index.d.ts.map +1 -1
- package/dist/lifecycle/cloud-index.js +1 -2
- package/dist/lifecycle/gate-applied.d.ts +6 -0
- package/dist/lifecycle/gate-applied.d.ts.map +1 -1
- package/dist/lifecycle/gate-ledger.d.ts +29 -0
- package/dist/lifecycle/gate-ledger.d.ts.map +1 -1
- package/dist/lifecycle/gate-ledger.js +10 -1
- package/dist/lifecycle/gate-pending-by-plan.d.ts +75 -0
- package/dist/lifecycle/gate-pending-by-plan.d.ts.map +1 -0
- package/dist/lifecycle/gate-pending-by-plan.js +96 -0
- package/dist/lifecycle/gated-request-digest.d.ts +28 -0
- package/dist/lifecycle/gated-request-digest.d.ts.map +1 -0
- package/dist/lifecycle/gated-request-digest.js +35 -0
- package/dist/lifecycle/gated-request.d.ts +126 -0
- package/dist/lifecycle/gated-request.d.ts.map +1 -0
- package/dist/lifecycle/gated-request.js +204 -0
- package/dist/lifecycle/identity-match.d.ts +15 -0
- package/dist/lifecycle/identity-match.d.ts.map +1 -1
- package/dist/lifecycle/identity-match.js +11 -6
- package/dist/lifecycle/index-diff.d.ts +40 -0
- package/dist/lifecycle/index-diff.d.ts.map +1 -1
- package/dist/lifecycle/index-diff.js +1 -2
- package/dist/lifecycle/index-document.d.ts.map +1 -1
- package/dist/lifecycle/index-document.js +1 -2
- package/dist/lifecycle/index-import.d.ts +4 -1
- package/dist/lifecycle/index-import.d.ts.map +1 -1
- package/dist/lifecycle/index-import.js +29 -32
- package/dist/lifecycle/ledger-read.d.ts.map +1 -1
- package/dist/lifecycle/ledger-read.js +7 -3
- package/dist/lifecycle/lock-rows.d.ts +76 -0
- package/dist/lifecycle/lock-rows.d.ts.map +1 -0
- package/dist/lifecycle/lock-rows.js +140 -0
- package/dist/lifecycle/query.d.ts +50 -3
- package/dist/lifecycle/query.d.ts.map +1 -1
- package/dist/lifecycle/query.js +97 -7
- package/dist/lifecycle/release-catalog-site.d.ts +66 -0
- package/dist/lifecycle/release-catalog-site.d.ts.map +1 -0
- package/dist/lifecycle/release-catalog-site.js +232 -0
- package/dist/lifecycle/release-catalog.d.ts +201 -0
- package/dist/lifecycle/release-catalog.d.ts.map +1 -0
- package/dist/lifecycle/release-catalog.js +198 -0
- package/dist/lifecycle/release-changelog.d.ts +41 -0
- package/dist/lifecycle/release-changelog.d.ts.map +1 -0
- package/dist/lifecycle/release-changelog.js +38 -0
- package/dist/lifecycle/release-cut.d.ts +1 -0
- package/dist/lifecycle/release-cut.d.ts.map +1 -1
- package/dist/lifecycle/release-cut.js +1 -1
- package/dist/lifecycle/release-ledger.d.ts +16 -0
- package/dist/lifecycle/release-ledger.d.ts.map +1 -1
- package/dist/lifecycle/release-ledger.js +9 -0
- package/dist/lifecycle/release-publish.d.ts +43 -22
- package/dist/lifecycle/release-publish.d.ts.map +1 -1
- package/dist/lifecycle/release-read.d.ts.map +1 -1
- package/dist/lifecycle/release-read.js +3 -0
- package/dist/lifecycle/release-status.d.ts +106 -0
- package/dist/lifecycle/release-status.d.ts.map +1 -0
- package/dist/lifecycle/release-status.js +115 -0
- package/dist/lifecycle/resource-lock.d.ts +120 -0
- package/dist/lifecycle/resource-lock.d.ts.map +1 -0
- package/dist/lifecycle/resource-lock.js +317 -0
- package/dist/lifecycle/retention.d.ts.map +1 -1
- package/dist/lifecycle/retention.js +3 -0
- package/dist/lifecycle/run-ledger.d.ts.map +1 -1
- package/dist/lifecycle/run-ledger.js +9 -1
- package/dist/lifecycle/snapshot-store-s3.d.ts +36 -3
- package/dist/lifecycle/snapshot-store-s3.d.ts.map +1 -1
- package/dist/lifecycle/snapshot-store-s3.js +9 -44
- package/dist/lifecycle/snapshot-store.d.ts.map +1 -1
- package/dist/lifecycle/snapshot-store.js +1 -2
- package/dist/lifecycle/target-lock.d.ts +15 -0
- package/dist/lifecycle/target-lock.d.ts.map +1 -1
- package/dist/lifecycle/target-lock.js +25 -10
- 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/mcp/types.d.ts +7 -0
- package/dist/mcp/types.d.ts.map +1 -1
- package/dist/notify-product.d.ts +43 -0
- package/dist/notify-product.d.ts.map +1 -0
- package/dist/notify-product.js +58 -0
- package/dist/notify-relay.d.ts +197 -0
- package/dist/notify-relay.d.ts.map +1 -0
- package/dist/notify-relay.js +321 -0
- package/dist/notify.d.ts +44 -4
- package/dist/notify.d.ts.map +1 -1
- package/dist/notify.js +77 -14
- package/dist/object-store/azure-blob.d.ts +129 -0
- package/dist/object-store/azure-blob.d.ts.map +1 -0
- package/dist/object-store/azure-blob.js +341 -0
- package/dist/object-store/common.d.ts +108 -0
- package/dist/object-store/common.d.ts.map +1 -0
- package/dist/object-store/common.js +80 -0
- package/dist/object-store/errors.d.ts +28 -0
- package/dist/object-store/errors.d.ts.map +1 -0
- package/dist/object-store/errors.js +21 -0
- package/dist/object-store/from-env.d.ts +18 -0
- package/dist/object-store/from-env.d.ts.map +1 -0
- package/dist/object-store/from-env.js +22 -0
- package/dist/object-store/gcs.d.ts +106 -0
- package/dist/object-store/gcs.d.ts.map +1 -0
- package/dist/object-store/gcs.js +393 -0
- package/dist/object-store/index.d.ts +9 -0
- package/dist/object-store/index.d.ts.map +1 -0
- package/dist/object-store/index.js +8 -0
- package/dist/object-store/s3.d.ts +146 -0
- package/dist/object-store/s3.d.ts.map +1 -0
- package/dist/object-store/s3.js +306 -0
- package/dist/op/activities/converge.d.ts.map +1 -1
- package/dist/op/activities/converge.js +2 -1
- package/dist/op/activities/index.d.ts +1 -1
- package/dist/op/activities/index.d.ts.map +1 -1
- package/dist/op/activities/index.js +1 -1
- package/dist/op/activities/review-agent.d.ts +55 -2
- package/dist/op/activities/review-agent.d.ts.map +1 -1
- package/dist/op/activities/review-agent.js +65 -5
- 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.d.ts +29 -1
- package/dist/op/gate.d.ts.map +1 -1
- package/dist/op/gate.js +59 -23
- package/dist/op/generate-pipeline.d.ts.map +1 -1
- package/dist/op/generate-pipeline.js +7 -1
- package/dist/op/index.d.ts +12 -1
- package/dist/op/index.d.ts.map +1 -1
- package/dist/op/index.js +7 -1
- package/dist/op/op-waves-after-plan.d.ts +137 -0
- package/dist/op/op-waves-after-plan.d.ts.map +1 -0
- package/dist/op/op-waves-after-plan.js +163 -0
- package/dist/op/op-waves-capability-spec.d.ts +63 -0
- package/dist/op/op-waves-capability-spec.d.ts.map +1 -0
- package/dist/op/op-waves-capability-spec.js +115 -0
- package/dist/op/op-waves-capability.d.ts +197 -0
- package/dist/op/op-waves-capability.d.ts.map +1 -0
- package/dist/op/op-waves-capability.js +311 -0
- package/dist/op/op-waves-events.d.ts +54 -0
- package/dist/op/op-waves-events.d.ts.map +1 -0
- package/dist/op/op-waves-events.js +122 -0
- package/dist/op/op-waves-notify.d.ts +7 -1
- package/dist/op/op-waves-notify.d.ts.map +1 -1
- package/dist/op/op-waves-notify.js +35 -16
- package/dist/op/op-waves-release-port.d.ts +18 -0
- package/dist/op/op-waves-release-port.d.ts.map +1 -0
- package/dist/op/op-waves-release-port.js +61 -0
- package/dist/op/op-waves-release.d.ts +92 -0
- package/dist/op/op-waves-release.d.ts.map +1 -0
- package/dist/op/op-waves-release.js +96 -0
- package/dist/op/op-waves-run.d.ts +182 -6
- package/dist/op/op-waves-run.d.ts.map +1 -1
- package/dist/op/op-waves-run.js +1076 -44
- package/dist/op/op-waves-stand-down.d.ts +60 -0
- package/dist/op/op-waves-stand-down.d.ts.map +1 -0
- package/dist/op/op-waves-stand-down.js +96 -0
- package/dist/op/op-waves.d.ts +187 -8
- package/dist/op/op-waves.d.ts.map +1 -1
- package/dist/op/op-waves.js +203 -19
- package/dist/op/runtime.d.ts +95 -0
- package/dist/op/runtime.d.ts.map +1 -1
- package/dist/op/runtime.js +18 -0
- package/dist/op/stage-hooks.d.ts +45 -7
- package/dist/op/stage-hooks.d.ts.map +1 -1
- package/dist/op/stage-hooks.js +61 -3
- package/dist/op/steward-beside.d.ts.map +1 -1
- package/dist/op/steward-beside.js +2 -1
- package/dist/op/types.d.ts +2 -2
- package/dist/op/types.d.ts.map +1 -1
- package/dist/op/types.js +3 -2
- package/dist/otlp-metrics.d.ts +38 -0
- package/dist/otlp-metrics.d.ts.map +1 -0
- package/dist/otlp-metrics.js +82 -0
- package/dist/otlp.d.ts +249 -0
- package/dist/otlp.d.ts.map +1 -0
- package/dist/otlp.js +425 -0
- package/dist/override-gate.d.ts.map +1 -1
- package/dist/override-gate.js +5 -0
- package/dist/parallelism.d.ts +17 -0
- package/dist/parallelism.d.ts.map +1 -0
- package/dist/parallelism.js +33 -0
- package/dist/policy-packs.d.ts +69 -0
- package/dist/policy-packs.d.ts.map +1 -0
- package/dist/policy-packs.js +205 -0
- package/dist/policy-source.d.ts +51 -0
- package/dist/policy-source.d.ts.map +1 -0
- package/dist/policy-source.js +102 -0
- package/dist/pr-forge.d.ts +40 -0
- package/dist/pr-forge.d.ts.map +1 -1
- package/dist/pr-forge.js +146 -37
- package/dist/pr-loop.d.ts +158 -11
- package/dist/pr-loop.d.ts.map +1 -1
- package/dist/pr-loop.js +302 -44
- 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 +86 -1
- package/dist/pr-post.d.ts.map +1 -1
- package/dist/pr-post.js +141 -5
- package/dist/pr-report-url.d.ts +32 -4
- package/dist/pr-report-url.d.ts.map +1 -1
- package/dist/pr-report-url.js +45 -5
- package/dist/pr-requires.d.ts +13 -2
- package/dist/pr-requires.d.ts.map +1 -1
- package/dist/pr-requires.js +14 -0
- package/dist/release-floors.d.ts +1 -1
- package/dist/release-floors.js +1 -1
- package/dist/run-event.d.ts +26 -1
- package/dist/run-event.d.ts.map +1 -1
- package/dist/run-event.js +3 -1
- 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/sorted-json.d.ts +10 -0
- package/dist/sorted-json.d.ts.map +1 -0
- package/dist/sorted-json.js +14 -0
- package/dist/terraform/credentials.d.ts +59 -0
- package/dist/terraform/credentials.d.ts.map +1 -0
- package/dist/terraform/credentials.js +149 -0
- package/dist/utils.d.ts +1 -4
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +1 -9
- package/dist/wave-runtime.d.ts +1 -1
- package/dist/wave-runtime.js +2 -2
- package/dist/wave-runtime.mjs +405 -287
- package/dist/workspace/chant-migrations/chud-lexicon-exit.d.ts.map +1 -1
- package/dist/workspace/chant-migrations/chud-lexicon-exit.js +4 -1
- package/dist/workspace/ci-lock-grain.d.ts +17 -0
- package/dist/workspace/ci-lock-grain.d.ts.map +1 -0
- package/dist/workspace/ci-lock-grain.js +21 -0
- package/dist/workspace/ci-run.d.ts +2 -1
- package/dist/workspace/ci-run.d.ts.map +1 -1
- package/dist/workspace/ci-run.js +10 -3
- package/dist/workspace/declaration.d.ts +16 -4
- package/dist/workspace/declaration.d.ts.map +1 -1
- package/dist/workspace/declaration.js +5 -2
- package/dist/workspace/declaration.schema.json +27 -3
- package/dist/workspace/drift-cli.d.ts.map +1 -1
- package/dist/workspace/drift-cli.js +8 -3
- package/dist/workspace/exit-cli.d.ts +1 -1
- package/dist/workspace/exit-cli.d.ts.map +1 -1
- package/dist/workspace/exit-cli.js +2 -1
- package/dist/workspace/import-fetch.d.ts +4 -2
- package/dist/workspace/import-fetch.d.ts.map +1 -1
- package/dist/workspace/import-fetch.js +4 -2
- package/dist/workspace/import-init.d.ts.map +1 -1
- package/dist/workspace/import-init.js +4 -2
- package/dist/workspace/ledger.schema.json +7 -3
- package/dist/workspace/lineage-upgrade-cli.d.ts +1 -1
- package/dist/workspace/lineage-upgrade-cli.d.ts.map +1 -1
- package/dist/workspace/lineage-upgrade-cli.js +2 -1
- package/dist/workspace/pr-report.schema.json +79 -3
- package/dist/workspace/promote.d.ts +1 -1
- package/dist/workspace/promote.d.ts.map +1 -1
- package/dist/workspace/promote.js +2 -1
- package/dist/workspace/records-cli.d.ts +2 -2
- package/dist/workspace/records-cli.d.ts.map +1 -1
- package/dist/workspace/records-cli.js +3 -2
- package/dist/workspace/release-catalog.schema.json +277 -0
- package/dist/workspace/run-event.schema.json +18 -1
- package/dist/workspace/work-cli.d.ts +3 -1
- package/dist/workspace/work-cli.d.ts.map +1 -1
- package/dist/workspace/work-cli.js +7 -2
- package/dist/workspace/workspace-run.d.ts.map +1 -1
- package/dist/workspace/workspace-run.js +2 -1
- package/package.json +21 -1
- package/src/__fixtures__/estate-ledger.ts +101 -0
- package/src/__fixtures__/oidc-emulator.ts +31 -2
- package/src/__fixtures__/product-words.ts +44 -0
- package/src/__golden__/wave-loop/op-by-apply-after-fails.json +10 -2
- package/src/__golden__/wave-loop/op-by-apply-hold.json +20 -4
- package/src/__golden__/wave-loop/op-by-apply-ignored.json +10 -2
- package/src/__golden__/wave-loop/op-by-apply-pass.json +10 -2
- package/src/__golden__/wave-loop/op-by-apply-skip.json +10 -2
- package/src/__golden__/wave-loop/op-discover-rest-stops.json +22 -6
- package/src/__golden__/wave-loop/op-discover-rest.json +44 -12
- package/src/__golden__/wave-loop/op-discover-wide.json +12 -3
- package/src/__golden__/wave-loop/op-held-on.json +28 -7
- package/src/__golden__/wave-loop/op-hooks-apply-fails.json +22 -6
- package/src/__golden__/wave-loop/op-hooks-fail-after-apply.json +22 -6
- package/src/__golden__/wave-loop/op-hooks-fail-before-apply.json +4 -2
- package/src/__golden__/wave-loop/op-hooks-held.json +26 -8
- package/src/__golden__/wave-loop/op-hooks-hold-before-apply.json +18 -4
- package/src/__golden__/wave-loop/op-hooks-pass.json +22 -6
- package/src/__golden__/wave-loop/op-hooks-share.json +20 -7
- package/src/__golden__/wave-loop/op-outcome-held.json +12 -3
- package/src/__golden__/wave-loop/op-outcome-replan-approved.json +16 -5
- package/src/__golden__/wave-loop/op-outcome-replan-forever.json +48 -21
- package/src/__golden__/wave-loop/op-outcome-replan.json +16 -5
- package/src/__golden__/wave-loop/op-outcome-stood-down.json +12 -3
- package/src/__golden__/wave-loop/op-outcome-unreadable.json +12 -3
- package/src/__golden__/wave-loop/op-overridden.json +28 -7
- package/src/__golden__/wave-loop/op-per-run.json +20 -4
- package/src/__golden__/wave-loop/op-point.json +18 -4
- package/src/__golden__/wave-loop/op-pr-review.json +10 -2
- package/src/__golden__/wave-loop/op-spend-change-only.json +10 -2
- package/src/__golden__/wave-loop/op-spend.json +10 -2
- package/src/__golden__/wave-loop/op-wave-commands.json +56 -13
- package/src/__golden__/wave-loop/op-wide.json +20 -4
- package/src/bucket-check/azure.ts +307 -0
- package/src/bucket-check/bucket-check.test.ts +210 -0
- package/src/bucket-check/fixtures/azure.json +153 -0
- package/src/bucket-check/fixtures/gcs.json +148 -0
- package/src/bucket-check/fixtures/s3.json +277 -0
- package/src/bucket-check/gcs.ts +257 -0
- package/src/bucket-check/index.ts +61 -0
- package/src/bucket-check/s3.ts +433 -0
- package/src/bucket-check/types.ts +75 -0
- package/src/bucket-check/wire.ts +50 -0
- package/src/bucket-check.ts +5 -0
- package/src/capabilities/templates.test.ts +2 -3
- package/src/capabilities/templates.ts +1 -2
- package/src/cdk/advise.test.ts +1 -1
- package/src/change-set-bundle.test.ts +0 -1
- package/src/change-set.ts +2 -3
- package/src/ci-agent.test.ts +348 -0
- package/src/ci-agent.ts +1025 -0
- 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 +15 -0
- package/src/ci-audit/unrecorded.ts +140 -0
- package/src/ci-audit.ts +2 -0
- package/src/ci-control.ts +173 -0
- package/src/ci-estate/delivery.ts +433 -0
- package/src/ci-estate/overdue.ts +81 -0
- package/src/ci-estate/page.ts +343 -0
- package/src/ci-estate/rows.ts +251 -0
- package/src/ci-estate.test.ts +281 -0
- package/src/ci-estate.ts +175 -0
- package/src/ci-handover.ts +67 -16
- package/src/ci-identity-database.test.ts +54 -0
- package/src/ci-identity-pulumi.test.ts +163 -0
- package/src/ci-identity-targets.test.ts +3 -1
- package/src/ci-identity.ts +123 -22
- 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.test.ts +101 -0
- package/src/ci-product-words.ts +565 -0
- package/src/ci-product.ts +226 -0
- 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/ci-shared-reads.test.ts +145 -0
- package/src/cli/commands/audit.test.ts +1 -1
- package/src/cli/commands/audit.ts +3 -2
- package/src/cli/commands/carve.test.ts +1 -1
- package/src/cli/commands/carve.ts +2 -2
- package/src/cli/commands/init.ts +3 -1
- package/src/cli/component-wave-args.test.ts +16 -0
- package/src/cli/handlers/agent.ts +126 -0
- package/src/cli/handlers/approve-confirm.test.ts +276 -0
- package/src/cli/handlers/approve-confirm.ts +200 -0
- package/src/cli/handlers/approve.ts +18 -1
- 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.test.ts +7 -0
- package/src/cli/handlers/build.ts +113 -1
- 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 +63 -0
- package/src/cli/handlers/ci-forge-check.ts +91 -0
- package/src/cli/handlers/e2e-safe-run.ts +27 -0
- package/src/cli/handlers/fan-out.test.ts +10 -10
- package/src/cli/handlers/fan-out.ts +5 -0
- package/src/cli/handlers/gate-pending.ts +46 -0
- package/src/cli/handlers/init.ts +1 -0
- package/src/cli/handlers/ledger.ts +1 -1
- package/src/cli/handlers/lifecycle-drift.ts +7 -2
- package/src/cli/handlers/lock.test.ts +29 -2
- package/src/cli/handlers/lock.ts +66 -6
- package/src/cli/handlers/notify-relay.ts +130 -0
- package/src/cli/handlers/pr-before-merge.test.ts +2 -1
- package/src/cli/handlers/pr-deploy-inputs.test.ts +7 -7
- package/src/cli/handlers/pr-env.ts +48 -11
- 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 +155 -0
- package/src/cli/handlers/pr-waves-blocked.test.ts +5 -0
- package/src/cli/handlers/pr-waves.test.ts +8 -2
- package/src/cli/handlers/pr.test.ts +8 -8
- package/src/cli/handlers/pr.ts +879 -205
- package/src/cli/handlers/promote.test.ts +5 -5
- package/src/cli/handlers/promote.ts +22 -2
- package/src/cli/handlers/release.ts +2 -0
- package/src/cli/handlers/run-components-exit.test.ts +7 -7
- package/src/cli/handlers/run-wave.ts +144 -2
- package/src/cli/handlers/run.test.ts +6 -4
- package/src/cli/handlers/run.ts +86 -1
- package/src/cli/handlers/serve.ts +10 -1
- package/src/cli/main.test.ts +1 -1
- package/src/cli/main.ts +180 -13
- package/src/cli/mcp/ledger-tools.ts +126 -0
- package/src/cli/mcp/product-tools.test.ts +123 -0
- package/src/cli/mcp/product-tools.ts +129 -0
- package/src/cli/mcp/read-only.test.ts +134 -0
- package/src/cli/mcp/read-only.ts +68 -0
- package/src/cli/mcp/report-tools.ts +135 -0
- package/src/cli/mcp/server.test.ts +5 -4
- package/src/cli/mcp/server.ts +90 -16
- package/src/cli/mcp-config.ts +8 -3
- package/src/cli/parse-args.ts +119 -2
- package/src/cli/registry.ts +73 -0
- package/src/cloud-lister/sigv4.ts +80 -23
- package/src/components/adoption.test.ts +140 -0
- package/src/components/adoption.ts +140 -0
- package/src/components/apply-lease.ts +49 -0
- package/src/components/capability.ts +180 -6
- package/src/components/check-hooks.test.ts +66 -0
- package/src/components/check-hooks.ts +255 -0
- package/src/components/check-steps.test.ts +70 -0
- package/src/components/check-steps.ts +158 -0
- package/src/components/ci-services.test.ts +51 -0
- package/src/components/ci-services.ts +82 -0
- package/src/components/cli-support.ts +23 -2
- package/src/components/driver.test.ts +3 -3
- package/src/components/driver.ts +73 -6
- package/src/components/fan-out-run.ts +68 -18
- package/src/components/groups.ts +21 -4
- package/src/components/plan-flags.test.ts +46 -0
- package/src/components/pr-comment-preview-targets.test.ts +34 -0
- package/src/components/pr-comment-preview.test.ts +54 -0
- package/src/components/pr-env-ledger.test.ts +9 -0
- package/src/components/pr-env-ledger.ts +42 -0
- package/src/components/pr-env-ports.ts +29 -4
- package/src/components/pr-env-run-bundle.test.ts +2 -14
- package/src/components/pr-env-run.test.ts +19 -0
- package/src/components/pr-env-run.ts +12 -2
- package/src/components/pr-environment.test.ts +29 -0
- package/src/components/pr-environment.ts +40 -8
- package/src/components/pr-pipeline-runners.test.ts +80 -0
- package/src/components/pr-pipeline.test.ts +15 -0
- package/src/components/pr-pipeline.ts +498 -18
- package/src/components/pr-policy.ts +45 -7
- package/src/components/pr-run.test.ts +1 -1
- package/src/components/pr-run.ts +138 -11
- package/src/components/pr-stale-job.test.ts +34 -0
- package/src/components/pr-targets.test.ts +35 -0
- package/src/components/pr-targets.ts +45 -0
- package/src/components/product-pipeline.test.ts +200 -0
- package/src/components/product-pipeline.ts +383 -0
- package/src/components/promote.ts +10 -1
- package/src/components/release-compile.ts +87 -1
- package/src/components/release-promote.ts +65 -1
- package/src/components/repo-lock.ts +52 -0
- package/src/components/row-lease.test.ts +490 -0
- package/src/components/row-lease.ts +167 -0
- package/src/components/wave-plan-policy.test.ts +19 -0
- package/src/components/wave-plan.ts +96 -6
- package/src/control/__fixtures__/consumers/apps/consumers.json +15 -0
- package/src/control/__fixtures__/consumers/infra/consumers.json +23 -0
- package/src/control/applied.test.ts +148 -0
- package/src/control/applied.ts +191 -0
- package/src/control/consumers.test.ts +129 -0
- package/src/control/consumers.ts +192 -0
- package/src/control/control.test.ts +302 -0
- package/src/control/dispatch.ts +699 -0
- package/src/control/edges.test.ts +112 -0
- package/src/control/edges.ts +164 -0
- package/src/control/note-checkout.test.ts +91 -0
- package/src/control/reconcile.ts +250 -0
- package/src/control/records.ts +395 -0
- package/src/discovery/sandbox/bundle.ts +25 -1
- 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 +50 -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/engine-facts.test.ts +2 -3
- package/src/engine-facts.ts +1 -2
- package/src/exit-codes.test.ts +32 -0
- package/src/exit-codes.ts +61 -0
- package/src/forge-check/check.ts +155 -0
- package/src/forge-check/contract.ts +215 -0
- package/src/forge-check/forge-check.test.ts +427 -0
- package/src/forge-check/forge.ts +318 -0
- package/src/forge-check/index.ts +43 -0
- package/src/forge-check/pulumi.ts +192 -0
- package/src/forge-check/read-only.ts +56 -0
- package/src/forge-check/trust.ts +527 -0
- package/src/forge-check/types.ts +78 -0
- package/src/forge-check.ts +5 -0
- package/src/gate-decision-bundle.test.ts +11 -0
- package/src/gate-decision.ts +3 -0
- package/src/gate-policy.ts +92 -3
- package/src/gated-waves-bundle.test.ts +0 -1
- package/src/index.ts +2 -0
- package/src/lexicon.ts +143 -6
- package/src/lifecycle/adoption-file.ts +1 -2
- package/src/lifecycle/cloud-index.test.ts +2 -3
- package/src/lifecycle/cloud-index.ts +1 -2
- package/src/lifecycle/control-entries-ledger.test.ts +69 -0
- package/src/lifecycle/gate-applied.ts +6 -0
- package/src/lifecycle/gate-ledger.ts +35 -1
- package/src/lifecycle/gate-pending-by-plan.test.ts +69 -0
- package/src/lifecycle/gate-pending-by-plan.ts +133 -0
- package/src/lifecycle/gated-request-digest.ts +49 -0
- package/src/lifecycle/gated-request-ledger.test.ts +53 -0
- package/src/lifecycle/gated-request.ts +279 -0
- package/src/lifecycle/identity-match.ts +25 -6
- package/src/lifecycle/index-diff.ts +1 -2
- package/src/lifecycle/index-document.ts +1 -2
- package/src/lifecycle/index-import.test.ts +14 -0
- package/src/lifecycle/index-import.ts +54 -34
- package/src/lifecycle/ledger-read.ts +7 -3
- package/src/lifecycle/lock-rows.test.ts +109 -0
- package/src/lifecycle/lock-rows.ts +167 -0
- package/src/lifecycle/publish-target-context.test.ts +108 -0
- package/src/lifecycle/query.test.ts +2 -3
- package/src/lifecycle/query.ts +109 -8
- package/src/lifecycle/release-catalog-site.test.ts +142 -0
- package/src/lifecycle/release-catalog-site.ts +291 -0
- package/src/lifecycle/release-catalog.test.ts +192 -0
- package/src/lifecycle/release-catalog.ts +353 -0
- package/src/lifecycle/release-changelog.test.ts +70 -0
- package/src/lifecycle/release-changelog.ts +71 -0
- package/src/lifecycle/release-cut.ts +2 -2
- package/src/lifecycle/release-ledger.ts +19 -0
- package/src/lifecycle/release-publish.ts +45 -22
- package/src/lifecycle/release-read.ts +2 -0
- package/src/lifecycle/release-status.test.ts +185 -0
- package/src/lifecycle/release-status.ts +175 -0
- package/src/lifecycle/resource-lock.test.ts +175 -0
- package/src/lifecycle/resource-lock.ts +354 -0
- package/src/lifecycle/retention.ts +2 -0
- package/src/lifecycle/run-ledger.ts +7 -1
- package/src/lifecycle/snapshot-store-s3.ts +9 -45
- package/src/lifecycle/snapshot-store.ts +1 -2
- package/src/lifecycle/target-lock.ts +24 -9
- package/src/lifecycle/wave-plans.ts +33 -5
- package/src/mcp/types.ts +7 -0
- package/src/notify-product.ts +76 -0
- package/src/notify-relay.test.ts +213 -0
- package/src/notify-relay.ts +407 -0
- package/src/notify.ts +95 -14
- package/src/object-store/azure-blob.ts +374 -0
- package/src/object-store/common.ts +133 -0
- package/src/object-store/errors.ts +26 -0
- package/src/object-store/from-env.ts +36 -0
- package/src/object-store/gcs.ts +436 -0
- package/src/object-store/index.ts +8 -0
- package/src/object-store/object-store.test.ts +130 -0
- package/src/object-store/s3.ts +350 -0
- package/src/op/activities/converge.ts +2 -1
- package/src/op/activities/index.ts +1 -1
- package/src/op/activities/review-agent.open.test.ts +78 -0
- package/src/op/activities/review-agent.test.ts +13 -0
- package/src/op/activities/review-agent.ts +89 -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.ts +81 -22
- package/src/op/generate-pipeline.ts +7 -1
- package/src/op/index.ts +23 -0
- package/src/op/op-waves-after-plan.test.ts +288 -0
- package/src/op/op-waves-after-plan.ts +238 -0
- package/src/op/op-waves-capability-spec.ts +133 -0
- package/src/op/op-waves-capability.test.ts +217 -0
- package/src/op/op-waves-capability.ts +370 -0
- package/src/op/op-waves-events.ts +135 -0
- package/src/op/op-waves-notify-words.test.ts +149 -0
- package/src/op/op-waves-notify.ts +41 -16
- package/src/op/op-waves-parallelism.test.ts +89 -0
- package/src/op/op-waves-pull-request.test.ts +219 -0
- package/src/op/op-waves-release-port.ts +64 -0
- package/src/op/op-waves-release.test.ts +209 -0
- package/src/op/op-waves-release.ts +132 -0
- package/src/op/op-waves-run-record.test.ts +32 -0
- package/src/op/op-waves-run.ts +1235 -52
- package/src/op/op-waves-stand-down.test.ts +240 -0
- package/src/op/op-waves-stand-down.ts +107 -0
- package/src/op/op-waves-trace.test.ts +205 -0
- package/src/op/op-waves.test.ts +112 -0
- package/src/op/op-waves.ts +320 -22
- package/src/op/runtime.ts +107 -0
- package/src/op/stage-hooks-hold-record.test.ts +41 -0
- package/src/op/stage-hooks.ts +91 -12
- package/src/op/steward-beside.ts +2 -1
- package/src/op/types.ts +3 -2
- package/src/otlp-metrics.ts +96 -0
- package/src/otlp.test.ts +243 -0
- package/src/otlp.ts +543 -0
- package/src/override-gate-bundle.test.ts +2 -0
- package/src/override-gate.ts +4 -0
- package/src/parallelism.test.ts +38 -0
- package/src/parallelism.ts +33 -0
- package/src/policy-packs.ts +230 -0
- package/src/policy-source.test.ts +256 -0
- package/src/policy-source.ts +111 -0
- package/src/pr-forge-bundle.test.ts +1 -1
- package/src/pr-forge.ts +175 -33
- package/src/pr-loop-bundle.test.ts +7 -3
- package/src/pr-loop-narrowed.test.ts +63 -0
- package/src/pr-loop-words.test.ts +155 -0
- package/src/pr-loop.ts +398 -52
- 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 +190 -5
- package/src/pr-report-url.ts +61 -6
- package/src/pr-requires.test.ts +37 -1
- package/src/pr-requires.ts +16 -2
- package/src/product-subpaths-plain-node.e2e.test.ts +212 -0
- package/src/release-floors.ts +1 -1
- package/src/run-event.ts +28 -1
- package/src/scheduled-op-cloud.ts +68 -0
- package/src/sorted-json.ts +17 -0
- package/src/stage-hooks-bundle.test.ts +6 -0
- package/src/terraform/credentials.test.ts +77 -0
- package/src/terraform/credentials.ts +162 -0
- package/src/utils.ts +2 -11
- package/src/wave-loop-golden.test.ts +2 -1
- package/src/wave-runtime.ts +2 -2
- package/src/workspace/chant-migrations/chud-lexicon-exit.ts +4 -1
- package/src/workspace/ci-lock-grain.test.ts +31 -0
- package/src/workspace/ci-lock-grain.ts +29 -0
- package/src/workspace/ci-report-url.test.ts +1 -1
- package/src/workspace/ci-run.test.ts +1 -1
- package/src/workspace/ci-run.ts +10 -3
- package/src/workspace/declaration.schema.json +27 -3
- package/src/workspace/declaration.test.ts +1 -1
- package/src/workspace/declaration.ts +26 -10
- package/src/workspace/drift-cli.ts +8 -3
- package/src/workspace/exit-cli.ts +2 -1
- package/src/workspace/import-fetch.ts +4 -2
- package/src/workspace/import-init.ts +4 -2
- package/src/workspace/ledger.schema.json +7 -3
- package/src/workspace/lineage-upgrade-cli.ts +2 -1
- package/src/workspace/pr-report.schema.json +79 -3
- package/src/workspace/promote.ts +2 -1
- package/src/workspace/records-cli.ts +3 -2
- package/src/workspace/release-catalog.schema.json +277 -0
- package/src/workspace/run-event.schema.json +18 -1
- package/src/workspace/work-cli.ts +8 -2
- package/src/workspace/workspace-run.ts +2 -1
package/src/pr-forge.ts
CHANGED
|
@@ -71,6 +71,21 @@ export interface CommitStatus {
|
|
|
71
71
|
targetUrl?: string;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
/**
|
|
75
|
+
* One commit status as the forge reports it (#4554): each context's newest,
|
|
76
|
+
* read back by {@link PrForge.commitStatuses}. `state` is the forge's own
|
|
77
|
+
* word (`success`, `failure`, `pending`, `error` on GitHub and Forgejo;
|
|
78
|
+
* GitLab's `success`, `failed`, `running`, `canceled` and the rest).
|
|
79
|
+
*/
|
|
80
|
+
export interface ReadCommitStatus {
|
|
81
|
+
context: string;
|
|
82
|
+
state: string;
|
|
83
|
+
description?: string;
|
|
84
|
+
targetUrl?: string;
|
|
85
|
+
/** GitLab: whether a failed job was allowed to fail. */
|
|
86
|
+
allowFailure?: boolean;
|
|
87
|
+
}
|
|
88
|
+
|
|
74
89
|
/** A commit status's state, as a caller names it. */
|
|
75
90
|
export type ForgeStatusState = "pending" | "running" | "success" | "failed" | "failure" | "canceled" | "error";
|
|
76
91
|
|
|
@@ -222,6 +237,15 @@ export interface PullRequest {
|
|
|
222
237
|
base?: string;
|
|
223
238
|
}
|
|
224
239
|
|
|
240
|
+
/** A pull request's head, as {@link PrForge.pullRequestHead} reads it (#4616). */
|
|
241
|
+
export interface PullRequestHead {
|
|
242
|
+
sha: string;
|
|
243
|
+
branch: string;
|
|
244
|
+
open: boolean;
|
|
245
|
+
/** The branch lives in this repository, not a fork. */
|
|
246
|
+
sameRepo: boolean;
|
|
247
|
+
}
|
|
248
|
+
|
|
225
249
|
/** An open pull request as `chant ci serve` polls it (#4095). */
|
|
226
250
|
/** A merge request's job in its newest pipeline at its head (#4328), as {@link PrForge.mergeRequestJobs} finds it. */
|
|
227
251
|
export interface MergeRequestJob {
|
|
@@ -416,6 +440,14 @@ export interface PrForge {
|
|
|
416
440
|
openPullRequests?(base: string): Promise<OpenPullRequest[]>;
|
|
417
441
|
/** GitHub and Forgejo (#4095): the commit `branch` points at, or undefined when there is no such branch. */
|
|
418
442
|
branchHead?(branch: string): Promise<string | undefined>;
|
|
443
|
+
/**
|
|
444
|
+
* The head of pull request `pr` (#4616): its commit and branch, whether it
|
|
445
|
+
* is open, and whether the branch lives in this repository rather than a
|
|
446
|
+
* fork. Undefined when the forge does not know the pull request.
|
|
447
|
+
*/
|
|
448
|
+
pullRequestHead?(pr: number): Promise<PullRequestHead | undefined>;
|
|
449
|
+
/** GitHub and Forgejo (#4616): whether `login` may push to this repository (write, maintain or admin). */
|
|
450
|
+
userCanWrite?(login: string): Promise<boolean>;
|
|
419
451
|
/**
|
|
420
452
|
* When a scheduled Op's generated job last ran from its schedule or by hand
|
|
421
453
|
* (#4289). GitHub reads the workflow `workflow` names and its `schedule` and
|
|
@@ -465,6 +497,39 @@ export interface PrForge {
|
|
|
465
497
|
jobArtifact?(id: number, path: string): Promise<string | undefined>;
|
|
466
498
|
/** GitLab (#4328): the target URL of the newest commit status named `context` on `sha`, or undefined when there is none or it has no URL. */
|
|
467
499
|
statusUrl?(sha: string, context: string): Promise<string | undefined>;
|
|
500
|
+
/** The repository's default branch (#4554). `main` when the forge names none. */
|
|
501
|
+
defaultBranch?(): Promise<string>;
|
|
502
|
+
/**
|
|
503
|
+
* The commit statuses on `sha` (#4554): each context's newest, newest
|
|
504
|
+
* first. Commit statuses only; GitHub's check runs are not among them.
|
|
505
|
+
* `ref` (#4584) keeps the statuses reported for that branch: GitLab
|
|
506
|
+
* scopes statuses to a ref and filters on it. GitHub and Forgejo statuses
|
|
507
|
+
* belong to the commit alone, so they read the same with or without it.
|
|
508
|
+
*/
|
|
509
|
+
commitStatuses?(sha: string, ref?: string): Promise<ReadCommitStatus[]>;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
/** Each context's newest status, newest first, from statuses in any order with a numeric `id` (GitLab) or newest first (GitHub, Forgejo). */
|
|
513
|
+
function newestStatuses(items: unknown[], name: "context" | "name"): ReadCommitStatus[] {
|
|
514
|
+
const ordered = items.filter(isObject).map((st, i) => ({ st, at: num(st.id) ?? -i }));
|
|
515
|
+
if (name === "name") ordered.sort((a, b) => b.at - a.at);
|
|
516
|
+
const seen = new Set<string>();
|
|
517
|
+
const out: ReadCommitStatus[] = [];
|
|
518
|
+
for (const { st } of ordered) {
|
|
519
|
+
const context = str(st[name]);
|
|
520
|
+
if (!context || seen.has(context)) continue;
|
|
521
|
+
seen.add(context);
|
|
522
|
+
const description = str(st.description);
|
|
523
|
+
const targetUrl = str(st.target_url);
|
|
524
|
+
out.push({
|
|
525
|
+
context,
|
|
526
|
+
state: str(st.state) ?? str(st.status) ?? "",
|
|
527
|
+
...(description ? { description } : {}),
|
|
528
|
+
...(targetUrl ? { targetUrl } : {}),
|
|
529
|
+
...(typeof st.allow_failure === "boolean" ? { allowFailure: st.allow_failure } : {}),
|
|
530
|
+
});
|
|
531
|
+
}
|
|
532
|
+
return out;
|
|
468
533
|
}
|
|
469
534
|
|
|
470
535
|
/**
|
|
@@ -610,6 +675,11 @@ export class ForgeApiError extends Error {
|
|
|
610
675
|
}
|
|
611
676
|
}
|
|
612
677
|
|
|
678
|
+
/** The forge answered 404. */
|
|
679
|
+
const notFound = (err: unknown): boolean => err instanceof ForgeApiError && err.status === 404;
|
|
680
|
+
|
|
681
|
+
const byNumber = (a: { number: number }, b: { number: number }): number => a.number - b.number;
|
|
682
|
+
|
|
613
683
|
const DEFAULT_HOST: Record<ForgeKind, string | null> = { github: "github.com", gitlab: "gitlab.com", forgejo: null };
|
|
614
684
|
|
|
615
685
|
/** `<forge>:<login>` on the forge's default host, `<forge>@<host>:<login>` elsewhere, lower-cased (#3163's form). */
|
|
@@ -835,6 +905,22 @@ function githubShaped(kind: "github" | "forgejo", opts: GithubForgeOptions): Git
|
|
|
835
905
|
const url = str(v.html_url);
|
|
836
906
|
return { number, title: str(v.title) ?? "", body: str(v.body) ?? "", head: head ?? "", ...(base ? { base } : {}), ...(url ? { url } : {}) };
|
|
837
907
|
};
|
|
908
|
+
/**
|
|
909
|
+
* The open pull requests; GitHub takes `filter` server-side, Forgejo's list
|
|
910
|
+
* takes none and is matched by the caller. Forgejo answers the list with
|
|
911
|
+
* 404 while it still counts the repository as empty (just after the first
|
|
912
|
+
* push). That is no pull request; a repository that is really missing 404s
|
|
913
|
+
* on its own read too.
|
|
914
|
+
*/
|
|
915
|
+
const openPulls = async (filter: string): Promise<unknown[]> => {
|
|
916
|
+
try {
|
|
917
|
+
return await api.list(`${repo}/pulls?state=open${kind === "github" ? filter : ""}`, pageParams, pageSize);
|
|
918
|
+
} catch (err) {
|
|
919
|
+
if (kind !== "forgejo" || !notFound(err)) throw err;
|
|
920
|
+
await api.call("GET", repo);
|
|
921
|
+
return [];
|
|
922
|
+
}
|
|
923
|
+
};
|
|
838
924
|
/** A pull request whose head branch lives in this repository, not a fork. */
|
|
839
925
|
const fromHere = (v: unknown, head: string): boolean => {
|
|
840
926
|
if (!isObject(v) || !isObject(v.head) || v.head.ref !== head) return false;
|
|
@@ -885,7 +971,7 @@ function githubShaped(kind: "github" | "forgejo", opts: GithubForgeOptions): Git
|
|
|
885
971
|
try {
|
|
886
972
|
b = await api.call("GET", `${repo}/branches/${branch.split("/").map(encodeURIComponent).join("/")}`);
|
|
887
973
|
} catch (err) {
|
|
888
|
-
if (err
|
|
974
|
+
if (notFound(err)) return undefined;
|
|
889
975
|
throw err;
|
|
890
976
|
}
|
|
891
977
|
// GitHub names the commit `sha`, Forgejo `id`.
|
|
@@ -1019,7 +1105,7 @@ function githubShaped(kind: "github" | "forgejo", opts: GithubForgeOptions): Git
|
|
|
1019
1105
|
const got = await api.call("GET", `${repo}/pulls/${pr}`);
|
|
1020
1106
|
return isObject(got) && got.state === "open" && got.merged !== true;
|
|
1021
1107
|
} catch (err) {
|
|
1022
|
-
if (err
|
|
1108
|
+
if (notFound(err)) return false;
|
|
1023
1109
|
throw err;
|
|
1024
1110
|
}
|
|
1025
1111
|
},
|
|
@@ -1029,7 +1115,7 @@ function githubShaped(kind: "github" | "forgejo", opts: GithubForgeOptions): Git
|
|
|
1029
1115
|
const pr = await api.call("GET", `${repo}/commits/${sha}/pull`);
|
|
1030
1116
|
return isObject(pr) && typeof pr.number === "number" ? pr.number : null;
|
|
1031
1117
|
} catch (err) {
|
|
1032
|
-
if (err
|
|
1118
|
+
if (notFound(err)) return null;
|
|
1033
1119
|
throw err;
|
|
1034
1120
|
}
|
|
1035
1121
|
}
|
|
@@ -1056,33 +1142,12 @@ function githubShaped(kind: "github" | "forgejo", opts: GithubForgeOptions): Git
|
|
|
1056
1142
|
// GitHub filters by `owner:branch` server-side; Forgejo's list takes no
|
|
1057
1143
|
// head filter, so every open page is read and matched here.
|
|
1058
1144
|
const owner = opts.repo.split("/")[0];
|
|
1059
|
-
const
|
|
1060
|
-
|
|
1061
|
-
try {
|
|
1062
|
-
listed = await api.list(`${repo}/pulls${query}`, pageParams, pageSize);
|
|
1063
|
-
} catch (err) {
|
|
1064
|
-
// Forgejo answers the list with 404 while it still counts the repository
|
|
1065
|
-
// as empty (just after the first push). That is no pull request; a
|
|
1066
|
-
// repository that is really missing 404s on its own read too.
|
|
1067
|
-
if (kind !== "forgejo" || !(err instanceof ForgeApiError) || err.status !== 404) throw err;
|
|
1068
|
-
await api.call("GET", repo);
|
|
1069
|
-
return undefined;
|
|
1070
|
-
}
|
|
1071
|
-
const open = listed.filter((p) => fromHere(p, head));
|
|
1072
|
-
return open.map(pull).filter((p): p is PullRequest => p !== undefined).sort((a, b) => a.number - b.number)[0];
|
|
1145
|
+
const open = (await openPulls(`&head=${encodeURIComponent(`${owner}:${head}`)}`)).filter((p) => fromHere(p, head));
|
|
1146
|
+
return open.map(pull).filter((p): p is PullRequest => p !== undefined).sort(byNumber)[0];
|
|
1073
1147
|
},
|
|
1074
1148
|
async openPullRequests(base) {
|
|
1075
1149
|
// GitHub filters by base server-side; Forgejo's list is matched here.
|
|
1076
|
-
const
|
|
1077
|
-
let listed: unknown[];
|
|
1078
|
-
try {
|
|
1079
|
-
listed = await api.list(`${repo}/pulls${query}`, pageParams, pageSize);
|
|
1080
|
-
} catch (err) {
|
|
1081
|
-
// Forgejo answers 404 while it counts the repository as empty, as findPullRequest notes.
|
|
1082
|
-
if (kind !== "forgejo" || !(err instanceof ForgeApiError) || err.status !== 404) throw err;
|
|
1083
|
-
await api.call("GET", repo);
|
|
1084
|
-
return [];
|
|
1085
|
-
}
|
|
1150
|
+
const listed = await openPulls(`&base=${encodeURIComponent(base)}`);
|
|
1086
1151
|
const out: OpenPullRequest[] = [];
|
|
1087
1152
|
for (const v of listed) {
|
|
1088
1153
|
if (!isObject(v) || !isObject(v.head) || !isObject(v.base)) continue;
|
|
@@ -1095,9 +1160,44 @@ function githubShaped(kind: "github" | "forgejo", opts: GithubForgeOptions): Git
|
|
|
1095
1160
|
const author = isObject(v.user) ? str(v.user.login) : undefined;
|
|
1096
1161
|
out.push({ number, head, headSha, base: into, ...(baseSha ? { baseSha } : {}), ...(author ? { author } : {}), fork: !fromHere(v, head) });
|
|
1097
1162
|
}
|
|
1098
|
-
return out.sort(
|
|
1163
|
+
return out.sort(byNumber);
|
|
1099
1164
|
},
|
|
1100
1165
|
branchHead: branchTip,
|
|
1166
|
+
async pullRequestHead(pr) {
|
|
1167
|
+
let got: unknown;
|
|
1168
|
+
try {
|
|
1169
|
+
got = await api.call("GET", `${repo}/pulls/${pr}`);
|
|
1170
|
+
} catch (err) {
|
|
1171
|
+
if (notFound(err)) return undefined;
|
|
1172
|
+
throw err;
|
|
1173
|
+
}
|
|
1174
|
+
if (!isObject(got) || !isObject(got.head)) return undefined;
|
|
1175
|
+
const sha = str(got.head.sha);
|
|
1176
|
+
const branch = str(got.head.ref);
|
|
1177
|
+
if (!sha || !branch) return undefined;
|
|
1178
|
+
const open = got.state === "open" && got.merged !== true;
|
|
1179
|
+
return { sha, branch, open, sameRepo: fromHere(got, branch) };
|
|
1180
|
+
},
|
|
1181
|
+
async userCanWrite(login) {
|
|
1182
|
+
let got: unknown;
|
|
1183
|
+
try {
|
|
1184
|
+
got = await api.call("GET", `${repo}/collaborators/${encodeURIComponent(login)}/permission`);
|
|
1185
|
+
} catch (err) {
|
|
1186
|
+
if (err instanceof ForgeApiError && (err.status === 404 || err.status === 403)) return false;
|
|
1187
|
+
throw err;
|
|
1188
|
+
}
|
|
1189
|
+
// GitHub says admin, maintain, write, triage, read or none; Forgejo owner, admin, write, read or none.
|
|
1190
|
+
const level = isObject(got) ? str(got.permission) : undefined;
|
|
1191
|
+
return level === "admin" || level === "maintain" || level === "write" || level === "owner";
|
|
1192
|
+
},
|
|
1193
|
+
async defaultBranch() {
|
|
1194
|
+
const got = await api.call("GET", repo);
|
|
1195
|
+
return (isObject(got) ? str(got.default_branch) : undefined) ?? "main";
|
|
1196
|
+
},
|
|
1197
|
+
async commitStatuses(sha) {
|
|
1198
|
+
// Statuses on GitHub and Forgejo belong to the commit; there is no ref to filter by (#4584).
|
|
1199
|
+
return newestStatuses(await api.list(`${repo}/commits/${sha}/statuses`, pageParams, pageSize), "context");
|
|
1200
|
+
},
|
|
1101
1201
|
async scheduledRuns(q) {
|
|
1102
1202
|
const file = encodeURIComponent(q.workflow);
|
|
1103
1203
|
if (kind === "github") {
|
|
@@ -1236,6 +1336,8 @@ export function gitlabForge(opts: GitlabForgeOptions): PrForge {
|
|
|
1236
1336
|
return { id, body: str(v.description) ?? "", ...(created ? { created } : {}), ...(str(v.title) !== undefined ? { title: str(v.title) } : {}), ...(author ? { author } : {}), ...(url ? { url } : {}) };
|
|
1237
1337
|
};
|
|
1238
1338
|
const notes = `${project}/merge_requests`;
|
|
1339
|
+
/** The open merge requests from (`source`) or into (`target`) `branch`. */
|
|
1340
|
+
const openMrs = (end: "source" | "target", branch: string): Promise<unknown[]> => api.list(`${notes}?state=opened&${end}_branch=${encodeURIComponent(branch)}`, pageParams, 100);
|
|
1239
1341
|
const mergeRequest = (v: unknown): PullRequest | undefined => {
|
|
1240
1342
|
if (!isObject(v)) return undefined;
|
|
1241
1343
|
const number = num(v.iid);
|
|
@@ -1357,7 +1459,7 @@ export function gitlabForge(opts: GitlabForgeOptions): PrForge {
|
|
|
1357
1459
|
try {
|
|
1358
1460
|
member = await api.call("GET", `${project}/members/all/${id}`);
|
|
1359
1461
|
} catch (err) {
|
|
1360
|
-
if (err
|
|
1462
|
+
if (notFound(err)) return `${login} is not a member`;
|
|
1361
1463
|
return `could not read ${login}'s access (${err instanceof Error ? err.message : String(err)})`;
|
|
1362
1464
|
}
|
|
1363
1465
|
const level = isObject(member) ? (num(member.access_level) ?? 0) : 0;
|
|
@@ -1410,7 +1512,7 @@ export function gitlabForge(opts: GitlabForgeOptions): PrForge {
|
|
|
1410
1512
|
const got = await api.call("GET", `${notes}/${mr}`);
|
|
1411
1513
|
return isObject(got) && got.state === "opened";
|
|
1412
1514
|
} catch (err) {
|
|
1413
|
-
if (err
|
|
1515
|
+
if (notFound(err)) return false;
|
|
1414
1516
|
throw err;
|
|
1415
1517
|
}
|
|
1416
1518
|
},
|
|
@@ -1428,13 +1530,13 @@ export function gitlabForge(opts: GitlabForgeOptions): PrForge {
|
|
|
1428
1530
|
return mergeRequest(made) ?? { number: 0, title, body: spec.body, head: spec.head, base };
|
|
1429
1531
|
},
|
|
1430
1532
|
async findPullRequest(head) {
|
|
1431
|
-
const open = await
|
|
1533
|
+
const open = await openMrs("source", head);
|
|
1432
1534
|
return open
|
|
1433
1535
|
// A fork's merge request into this project has another source project.
|
|
1434
1536
|
.filter((m) => isObject(m) && m.source_branch === head && (m.source_project_id === undefined || m.source_project_id === m.project_id))
|
|
1435
1537
|
.map(mergeRequest)
|
|
1436
1538
|
.filter((m): m is PullRequest => m !== undefined)
|
|
1437
|
-
.sort(
|
|
1539
|
+
.sort(byNumber)[0];
|
|
1438
1540
|
},
|
|
1439
1541
|
async scheduledRuns(q) {
|
|
1440
1542
|
// The variable the gitlab lexicon's generated Op file selects a scheduled job by.
|
|
@@ -1449,9 +1551,26 @@ export function gitlabForge(opts: GitlabForgeOptions): PrForge {
|
|
|
1449
1551
|
const last = newestTime(pipelines.map((p) => (isObject(p) ? str(p.created_at) : undefined)));
|
|
1450
1552
|
return { ...(last ? { last } : {}), ...(ours.length === 0 ? { noSchedule: true } : {}) };
|
|
1451
1553
|
},
|
|
1554
|
+
// #4628: the open merge requests into `base`, for the stale marking a push to it runs.
|
|
1555
|
+
async openPullRequests(base) {
|
|
1556
|
+
const out: OpenPullRequest[] = [];
|
|
1557
|
+
for (const m of await openMrs("target", base)) {
|
|
1558
|
+
if (!isObject(m)) continue;
|
|
1559
|
+
const number = num(m.iid);
|
|
1560
|
+
const head = str(m.source_branch);
|
|
1561
|
+
const headSha = str(m.sha);
|
|
1562
|
+
if (number === undefined || !head || !headSha || str(m.target_branch) !== base) continue;
|
|
1563
|
+
const refs = isObject(m.diff_refs) ? m.diff_refs : undefined;
|
|
1564
|
+
const baseSha = refs ? str(refs.base_sha) : undefined;
|
|
1565
|
+
const author = isObject(m.author) ? str(m.author.username) : undefined;
|
|
1566
|
+
const fork = num(m.source_project_id) !== undefined && num(m.source_project_id) !== num(m.target_project_id);
|
|
1567
|
+
out.push({ number, head, headSha, base, ...(baseSha ? { baseSha } : {}), ...(author ? { author } : {}), fork });
|
|
1568
|
+
}
|
|
1569
|
+
return out.sort(byNumber);
|
|
1570
|
+
},
|
|
1452
1571
|
async mergeRequestJobs(branch, job) {
|
|
1453
1572
|
const out: MergeRequestJob[] = [];
|
|
1454
|
-
const open = await
|
|
1573
|
+
const open = await openMrs("target", branch);
|
|
1455
1574
|
for (const m of open) {
|
|
1456
1575
|
if (!isObject(m)) continue;
|
|
1457
1576
|
const iid = num(m.iid);
|
|
@@ -1474,9 +1593,32 @@ export function gitlabForge(opts: GitlabForgeOptions): PrForge {
|
|
|
1474
1593
|
}
|
|
1475
1594
|
return out.sort((a, b) => a.pr - b.pr);
|
|
1476
1595
|
},
|
|
1596
|
+
async pullRequestHead(mr) {
|
|
1597
|
+
let got: unknown;
|
|
1598
|
+
try {
|
|
1599
|
+
got = await api.call("GET", `${notes}/${mr}`);
|
|
1600
|
+
} catch (err) {
|
|
1601
|
+
if (notFound(err)) return undefined;
|
|
1602
|
+
throw err;
|
|
1603
|
+
}
|
|
1604
|
+
if (!isObject(got)) return undefined;
|
|
1605
|
+
const sha = str(got.sha);
|
|
1606
|
+
const branch = str(got.source_branch);
|
|
1607
|
+
if (!sha || !branch) return undefined;
|
|
1608
|
+
const own = num(got.source_project_id) === undefined || num(got.source_project_id) === num(got.target_project_id);
|
|
1609
|
+
return { sha, branch, open: got.state === "opened", sameRepo: own };
|
|
1610
|
+
},
|
|
1477
1611
|
async jobArtifact(id, path) {
|
|
1478
1612
|
return api.text(`${project}/jobs/${id}/artifacts/${path.split("/").map(encodeURIComponent).join("/")}`);
|
|
1479
1613
|
},
|
|
1614
|
+
async defaultBranch() {
|
|
1615
|
+
const got = await api.call("GET", project);
|
|
1616
|
+
return (isObject(got) ? str(got.default_branch) : undefined) ?? "main";
|
|
1617
|
+
},
|
|
1618
|
+
async commitStatuses(sha, ref) {
|
|
1619
|
+
const only = ref ? `&ref=${encodeURIComponent(ref)}` : "";
|
|
1620
|
+
return newestStatuses(await api.list(`${project}/repository/commits/${sha}/statuses?all=true${only}`, pageParams, 100), "name");
|
|
1621
|
+
},
|
|
1480
1622
|
async statusUrl(sha, context) {
|
|
1481
1623
|
const statuses = await api.list(`${project}/repository/commits/${sha}/statuses?all=true&name=${encodeURIComponent(context)}`, pageParams, 100);
|
|
1482
1624
|
const newest = statuses.filter((st): st is Record<string, unknown> => isObject(st) && st.name === context).sort((a, b) => (num(b.id) ?? 0) - (num(a.id) ?? 0))[0];
|
|
@@ -32,6 +32,8 @@ describe("the pull-request loop bundle", () => {
|
|
|
32
32
|
expect(inputs.filter((i) => pattern.test(i)), String(pattern)).toEqual([]);
|
|
33
33
|
}
|
|
34
34
|
expect(inputs.map((i) => i.replace(/^.*?packages\//, "packages/")).sort()).toEqual([
|
|
35
|
+
// The product's words (#4550): no imports.
|
|
36
|
+
"packages/core/src/ci-product-words.ts",
|
|
35
37
|
"packages/core/src/content-digest.ts",
|
|
36
38
|
"packages/core/src/declarable.ts",
|
|
37
39
|
"packages/core/src/effect-receipt.ts",
|
|
@@ -41,11 +43,13 @@ describe("the pull-request loop bundle", () => {
|
|
|
41
43
|
"packages/core/src/pr-forge.ts",
|
|
42
44
|
"packages/core/src/pr-loop.ts",
|
|
43
45
|
"packages/core/src/pr-migrations.ts",
|
|
44
|
-
// The
|
|
46
|
+
// The Pulumi URN rule (#4548, the may-appear rows): no imports.
|
|
47
|
+
"packages/core/src/pulumi-urn.ts",
|
|
48
|
+
// The next-release floor constant (#4480, #4626's narrowed floor): no imports.
|
|
45
49
|
"packages/core/src/release-floors.ts",
|
|
46
50
|
]);
|
|
47
51
|
// About 89 KB today, after the hooks line (#4288), the blocked set (#4291), the scheduled-run reads (#4289) the requires checks (#4301) and the migration notes (#4407), about 97 KB; with the group lines (#4446), about 100 KB.
|
|
48
|
-
//
|
|
49
|
-
expect(result.outputFiles.reduce((n, f) => n + f.contents.byteLength, 0)).toBeLessThan(
|
|
52
|
+
// 120 KB (122,880 bytes) is the ruled ceiling: raised from 110 KB by the maintainer ruling of 2026-10-27 on #4481. It is not a figure to lower by trimming note text.
|
|
53
|
+
expect(result.outputFiles.reduce((n, f) => n + f.contents.byteLength, 0)).toBeLessThan(122_880);
|
|
50
54
|
});
|
|
51
55
|
});
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A narrowed plan in the note and the status (#4626): each narrowed
|
|
3
|
+
* member's row lists its addresses, a line says the plan on merge is of
|
|
4
|
+
* each member whole, and the status counts the narrowed members, in the
|
|
5
|
+
* product's words. Written for the ci-products post-merge pass.
|
|
6
|
+
*/
|
|
7
|
+
import { describe, expect, test } from "vitest";
|
|
8
|
+
import { composeChangeSet } from "./change-set";
|
|
9
|
+
import { memberCounts, PR_REPORT_SCHEMA_ID, prStatusDescription, renderPrNote, type PrReport } from "./pr-loop";
|
|
10
|
+
import { assertProductWords } from "./ci-product-words";
|
|
11
|
+
import { PLYWOOD } from "./__fixtures__/product-words";
|
|
12
|
+
|
|
13
|
+
const hex = (n: number) => n.toString(16).padStart(64, "0");
|
|
14
|
+
const URN = "urn:pulumi:dev::shop::aws:s3/bucket:Bucket::site";
|
|
15
|
+
const doc = composeChangeSet([
|
|
16
|
+
{
|
|
17
|
+
member: { member: "shop-dev", lexicon: "pulumi", planner: "pulumi", status: "planned", planDigest: `jcs1-sha256:${hex(1)}`, holes: [] },
|
|
18
|
+
entries: [{ member: "shop-dev", lexicon: "pulumi", planner: "pulumi", address: URN, type: "aws:s3/bucket:Bucket", action: "create", attributes: [] }],
|
|
19
|
+
},
|
|
20
|
+
]);
|
|
21
|
+
const report: PrReport = {
|
|
22
|
+
$schema: PR_REPORT_SCHEMA_ID,
|
|
23
|
+
contract: 1,
|
|
24
|
+
stage: "plan",
|
|
25
|
+
pr: 12,
|
|
26
|
+
env: "dev",
|
|
27
|
+
base: "1".repeat(40),
|
|
28
|
+
head: "2".repeat(40),
|
|
29
|
+
op: "pulumi-up",
|
|
30
|
+
gate: "up",
|
|
31
|
+
digest: doc.digest,
|
|
32
|
+
status: "planned",
|
|
33
|
+
approval: { status: "pending" },
|
|
34
|
+
selection: { changed: ["shop"], dependents: [], unclaimed: [], indeterminate: [], waves: [["shop"]] },
|
|
35
|
+
members: [{ member: "shop-dev", component: "shop", planDigest: `jcs1-sha256:${hex(1)}`, status: "planned", counts: memberCounts(doc, "shop-dev") }],
|
|
36
|
+
changeSet: doc,
|
|
37
|
+
};
|
|
38
|
+
const plywood = assertProductWords(PLYWOOD);
|
|
39
|
+
|
|
40
|
+
describe("a narrowed plan (#4626)", () => {
|
|
41
|
+
const narrowed: PrReport = { ...report, narrowed: { shop: [URN] } };
|
|
42
|
+
|
|
43
|
+
test("the member's row lists the addresses", () => {
|
|
44
|
+
const note = renderPrNote(narrowed, { words: plywood });
|
|
45
|
+
const row = note.split("\n").find((l) => l.startsWith("| `shop-dev`"))!;
|
|
46
|
+
expect(row).toContain(`narrowed to \`${URN}\``);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
test("a line says so in the product's words, and that the update on merge plans each stack whole", () => {
|
|
50
|
+
const note = renderPrNote(narrowed, { words: plywood });
|
|
51
|
+
expect(note).toContain(`This preview was narrowed with \`--target\`: \`shop\` to \`${URN}\`. The approval binds the narrowed plan. On merge each stack is previewed whole.`);
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
test("the status counts the narrowed members", () => {
|
|
55
|
+
expect(prStatusDescription(narrowed, plywood)).toMatch(/^1 stack \(1 narrowed with --target\): /);
|
|
56
|
+
expect(prStatusDescription(narrowed, plywood).length).toBeLessThanOrEqual(140);
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
test("a plan that was not narrowed says nothing of it", () => {
|
|
60
|
+
expect(renderPrNote(report, { words: plywood })).not.toContain("narrowed");
|
|
61
|
+
expect(prStatusDescription(report, plywood)).not.toContain("narrowed");
|
|
62
|
+
});
|
|
63
|
+
});
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The pull request note and statuses in a product's words (#4550, ruling D:
|
|
3
|
+
* fixed slots filled into chant's sentences), and the member detail sections
|
|
4
|
+
* a lexicon renders (#4573).
|
|
5
|
+
*/
|
|
6
|
+
import { describe, expect, test } from "vitest";
|
|
7
|
+
import { composeChangeSet } from "./change-set";
|
|
8
|
+
import { memberCounts, PR_REPORT_SCHEMA_ID, prApproveCommand, prApproveCommands, prMergeSentence, prStatusContext, prStatusDescription, renderPrNote, type PrReport } from "./pr-loop";
|
|
9
|
+
import { assertProductWords, CHANT_WORDS } from "./ci-product-words";
|
|
10
|
+
import { PLYWOOD, TERRAGUCCI, YODEL } from "./__fixtures__/product-words";
|
|
11
|
+
|
|
12
|
+
const hex = (n: number) => n.toString(16).padStart(64, "0");
|
|
13
|
+
const doc = composeChangeSet([
|
|
14
|
+
{
|
|
15
|
+
member: { member: "shop-dev", lexicon: "pulumi", planner: "pulumi", status: "planned", planDigest: `jcs1-sha256:${hex(1)}`, holes: [] },
|
|
16
|
+
entries: [{ member: "shop-dev", lexicon: "pulumi", planner: "pulumi", address: "urn:pulumi:dev::shop::aws:s3/bucket:Bucket::site", type: "aws:s3/bucket:Bucket", action: "create", attributes: [] }],
|
|
17
|
+
},
|
|
18
|
+
]);
|
|
19
|
+
const report: PrReport = {
|
|
20
|
+
$schema: PR_REPORT_SCHEMA_ID,
|
|
21
|
+
contract: 1,
|
|
22
|
+
stage: "plan",
|
|
23
|
+
pr: 12,
|
|
24
|
+
env: "dev",
|
|
25
|
+
base: "1".repeat(40),
|
|
26
|
+
head: "2".repeat(40),
|
|
27
|
+
op: "pulumi-up",
|
|
28
|
+
gate: "up",
|
|
29
|
+
digest: doc.digest,
|
|
30
|
+
status: "planned",
|
|
31
|
+
approval: { status: "pending" },
|
|
32
|
+
selection: { changed: ["shop"], dependents: [], unclaimed: [], indeterminate: [], waves: [["shop"]] },
|
|
33
|
+
members: [{ member: "shop-dev", component: "shop", planDigest: `jcs1-sha256:${hex(1)}`, status: "planned", counts: memberCounts(doc, "shop-dev") }],
|
|
34
|
+
changeSet: doc,
|
|
35
|
+
};
|
|
36
|
+
const plywood = assertProductWords(PLYWOOD);
|
|
37
|
+
|
|
38
|
+
describe("the note in a product's words (#4550)", () => {
|
|
39
|
+
test("the heading, the noun, the verbs and the approve line are the product's", () => {
|
|
40
|
+
const note = renderPrNote(report, { words: plywood });
|
|
41
|
+
expect(note).toContain("### plywood preview for `dev`");
|
|
42
|
+
expect(note).toContain("Previewed 1 stack.");
|
|
43
|
+
expect(note).toContain("| Stack | Component | Status |");
|
|
44
|
+
expect(note).toContain("| `shop-dev` | shop | previewed |");
|
|
45
|
+
expect(note).toContain(`plywood approve up --plan ${doc.digest} --sign`);
|
|
46
|
+
expect(note).not.toMatch(/chant approve/);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
test("chant's words render the note chant always rendered", () => {
|
|
50
|
+
const note = renderPrNote({ ...report, op: "pr-12", gate: "pr-apply" }, { words: CHANT_WORDS });
|
|
51
|
+
expect(note).toContain("### chant plan for `dev`");
|
|
52
|
+
expect(note).toContain("Planned 1 member.");
|
|
53
|
+
expect(note).toContain(`chant approve pr-12 pr-apply --plan ${doc.digest} --approver <you> --sign`);
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
test("statuses take the product's prefix and stage word", () => {
|
|
57
|
+
expect(prStatusContext("plan", undefined, plywood)).toBe("plywood/preview");
|
|
58
|
+
expect(prStatusContext("apply", "shop-dev", plywood)).toBe("plywood/up/shop-dev");
|
|
59
|
+
expect(prStatusContext("plan", undefined, CHANT_WORDS)).toBe("chant/plan");
|
|
60
|
+
expect(prStatusDescription(report, plywood)).toMatch(/^1 stack: /);
|
|
61
|
+
expect(prApproveCommand(report, "<you>", plywood)).toBe(`plywood approve up --plan ${doc.digest} --sign`);
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
describe("a member's detail section (#4573)", () => {
|
|
66
|
+
test("sits in a collapsed block under the member table", () => {
|
|
67
|
+
const note = renderPrNote({ ...report, details: [{ member: "shop-dev", lines: ["| Statement | Class |", "|---|---|", "| `DROP TABLE x` | destructive |"] }] }, { words: plywood });
|
|
68
|
+
expect(note).toContain("<details><summary>Stack `shop-dev`</summary>");
|
|
69
|
+
expect(note).toContain("| `DROP TABLE x` | destructive |");
|
|
70
|
+
expect(note.indexOf("<details>")).toBeGreaterThan(note.indexOf("| Stack | Component |"));
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
test("is left out, and named, when it would pass the comment limit", () => {
|
|
74
|
+
const lines = Array.from({ length: 400 }, (_, i) => `| row ${i} | ${"x".repeat(40)} |`);
|
|
75
|
+
const note = renderPrNote({ ...report, details: [{ member: "shop-dev", lines }] }, { words: plywood, limit: 4000 });
|
|
76
|
+
expect(note).not.toContain("<details>");
|
|
77
|
+
expect(note).toContain("Left out to keep this note within the comment limit: the detail of `shop-dev`.");
|
|
78
|
+
expect([...note].length).toBeLessThanOrEqual(4000);
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
describe("a capability's policy findings (#4550, pulumi-up's CrossGuard)", () => {
|
|
83
|
+
test("a denial names the rules and the product's override line, and advisory findings are rows", () => {
|
|
84
|
+
const note = renderPrNote(
|
|
85
|
+
{
|
|
86
|
+
...report,
|
|
87
|
+
status: "plan-failed",
|
|
88
|
+
capabilityPolicy: [
|
|
89
|
+
{ member: "shop/dev", denied: true, denials: [{ rule: "crossguard.aws.no-public-bucket", message: "the bucket is public" }], holds: [], warnings: [] },
|
|
90
|
+
{ member: "shop/prod", denied: false, denials: [], holds: [{ rule: "crossguard.aws.tags", message: "missing the team tag" }], warnings: ["pack aws is in preview"] },
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
{ words: plywood },
|
|
94
|
+
);
|
|
95
|
+
expect(note).toContain("The policy in `shop/dev`'s preview denied it, so nothing can apply:");
|
|
96
|
+
expect(note).toContain("- `crossguard.aws.no-public-bucket`: the bucket is public");
|
|
97
|
+
expect(note).toContain("plywood override up --rule crossguard.aws.no-public-bucket --reason <text>");
|
|
98
|
+
expect(note).toContain("| `shop/prod` | `crossguard.aws.tags` | advisory | missing the team tag |");
|
|
99
|
+
expect(note).toContain("| `shop/prod` | | warning | pack aws is in preview |");
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
describe("the approve line's target and the merge sentence (#4601)", () => {
|
|
104
|
+
const yodel = assertProductWords(YODEL);
|
|
105
|
+
const terragucci = assertProductWords(TERRAGUCCI);
|
|
106
|
+
|
|
107
|
+
/** sql-yodeler's probe (src/pr/note.ts at integration/ci-products): one environment, the wave's gate and digest. */
|
|
108
|
+
const probe: PrReport = {
|
|
109
|
+
...report,
|
|
110
|
+
env: "yodel-probe-env",
|
|
111
|
+
op: "yodel-apply",
|
|
112
|
+
gate: "yodel-apply-wave-1",
|
|
113
|
+
digest: "jcs1-sha256:probe",
|
|
114
|
+
members: [{ member: "yodel-probe-env", component: "1 pending", planDigest: "jcs1-sha256:probe", status: "planned", counts: { create: 0, update: 0, replace: 0, delete: 0 } }],
|
|
115
|
+
selection: { changed: ["yodel-probe-env"], dependents: [], unclaimed: [], indeterminate: [], waves: [["yodel-probe-env"]] },
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
test("sql-yodeler's probe passes: the approve line names the environment, and no release deploys the merge", () => {
|
|
119
|
+
const note = renderPrNote(probe, { words: yodel });
|
|
120
|
+
expect(note).toContain("yodel approve yodel-probe-env --plan jcs1-sha256:probe --sign");
|
|
121
|
+
expect(note).not.toContain("a release deploys it");
|
|
122
|
+
expect(note).toContain("On merge the waves are applied in order, each under an approval of its own gate for its own plan.");
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
test("{target} is filled once per member, and a template without it gives one line", () => {
|
|
126
|
+
const tenants: PrReport = {
|
|
127
|
+
...probe,
|
|
128
|
+
env: "prod",
|
|
129
|
+
members: ["prod/acme", "prod/zeta"].map((m) => ({ member: m, component: "1 pending", planDigest: "jcs1-sha256:probe", status: "planned" as const, counts: { create: 0, update: 0, replace: 0, delete: 0 } })),
|
|
130
|
+
};
|
|
131
|
+
expect(prApproveCommands(tenants, "<you>", yodel)).toEqual(["yodel approve prod/acme --plan jcs1-sha256:probe --sign", "yodel approve prod/zeta --plan jcs1-sha256:probe --sign"]);
|
|
132
|
+
const note = renderPrNote(tenants, { words: yodel });
|
|
133
|
+
expect(note).toContain("approves each environment's plan with:");
|
|
134
|
+
expect(note).toContain("yodel approve prod/zeta --plan jcs1-sha256:probe --sign");
|
|
135
|
+
expect(prApproveCommands({ ...tenants, member: "prod/acme" }, "<you>", yodel)).toEqual(["yodel approve prod/acme --plan jcs1-sha256:probe --sign"]);
|
|
136
|
+
expect(prApproveCommands({ ...tenants, members: [] }, "<you>", yodel)).toEqual(["yodel approve prod --plan jcs1-sha256:probe --sign"]);
|
|
137
|
+
expect(prApproveCommands(tenants, "<you>", plywood)).toEqual([`plywood approve ${tenants.gate} --plan jcs1-sha256:probe --sign`]);
|
|
138
|
+
expect(prApproveCommand({ ...report, target: "shop-dev" }, "<you>", plywood)).toBe(`plywood approve up --plan ${doc.digest} --sign`);
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
test("the merge sentence follows each product's apply mode", () => {
|
|
142
|
+
expect(prMergeSentence(report, plywood)).toBe(
|
|
143
|
+
"On merge the waves are updated in order under this approval, each while its plan is one this approval covers. A wave whose plan moved waits at its own gate, `wave-<k>`, for an approval of its own.",
|
|
144
|
+
);
|
|
145
|
+
expect(prMergeSentence(report, terragucci)).toBe(
|
|
146
|
+
"On merge the waves are applied in order, each under an approval of its own gate for its own plan. A wave whose plan moved since this note waits at its gate for a new approval.",
|
|
147
|
+
);
|
|
148
|
+
expect(prMergeSentence(report, CHANT_WORDS)).toContain("On merge the plan is recorded, and a release deploys it.");
|
|
149
|
+
expect(prMergeSentence(report, assertProductWords({ ...PLYWOOD, applyMode: "before-merge" }))).toBe(
|
|
150
|
+
"Before merge, `/plywood up` runs this plan once the pull request is approved, mergeable and green, and only while the plan is still this one; if it moved, the apply refuses and names both digests. The merge records what was updated.",
|
|
151
|
+
);
|
|
152
|
+
for (const w of [plywood, terragucci, yodel]) expect(renderPrNote(report, { words: w })).not.toContain("a release deploys it");
|
|
153
|
+
expect(renderPrNote({ ...report, op: "pr-12", gate: "pr-apply" }, { words: CHANT_WORDS })).toContain("On merge the plan is recorded, and a release deploys it.");
|
|
154
|
+
});
|
|
155
|
+
});
|