@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-report-url.ts
CHANGED
|
@@ -32,17 +32,32 @@
|
|
|
32
32
|
* environment the job gives it, the way the aws lexicon's `s3-sync` does.
|
|
33
33
|
* chant passes it no credential and prints none: a failed upload prints the
|
|
34
34
|
* CLI's own error line.
|
|
35
|
+
*
|
|
36
|
+
* Two more (#4554): `gs://<bucket>/<prefix>` and `az://<account>/<container>/
|
|
37
|
+
* <prefix>` go through chant core's object-store clients (./object-store),
|
|
38
|
+
* which read the job's credentials from its environment the way terragucci's
|
|
39
|
+
* report uploads do: GOOGLE_APPLICATION_CREDENTIALS (or a traded
|
|
40
|
+
* GOOGLE_OAUTH_ACCESS_TOKEN) for GCS, and AZURE_STORAGE_KEY or the ARM_
|
|
41
|
+
* OIDC variables for Azure Blob Storage. An older chant refuses either
|
|
42
|
+
* scheme, so a declaration whose `ci.reportUrl` uses one needs
|
|
43
|
+
* {@link REPORT_URL_CLOUDS_FLOOR} as its `minReader`.
|
|
35
44
|
*/
|
|
36
45
|
|
|
37
46
|
import { spawn } from "node:child_process";
|
|
38
47
|
import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
39
48
|
import { dirname, isAbsolute, join } from "node:path";
|
|
40
49
|
import { fileURLToPath } from "node:url";
|
|
50
|
+
import type { ObjectStore } from "./object-store/common";
|
|
51
|
+
|
|
52
|
+
/** The first chant that reads a `gs://` or `az://` report URL (#4554). */
|
|
53
|
+
export const REPORT_URL_CLOUDS_FLOOR = "0.124.55";
|
|
41
54
|
|
|
42
55
|
/** Where `--report-url` points. */
|
|
43
56
|
export type ReportTarget =
|
|
44
57
|
| { scheme: "file"; url: string; dir: string }
|
|
45
|
-
| { scheme: "s3"; url: string; bucket: string; prefix: string }
|
|
58
|
+
| { scheme: "s3"; url: string; bucket: string; prefix: string }
|
|
59
|
+
| { scheme: "gs"; url: string; bucket: string; prefix: string }
|
|
60
|
+
| { scheme: "az"; url: string; account: string; container: string; prefix: string };
|
|
46
61
|
|
|
47
62
|
/** `--report-url` read, or why it can't be. `name` is what the error calls the value: the flag, or `ci.reportUrl` (#4160). */
|
|
48
63
|
export function parseReportUrl(raw: string, name = "--report-url"): ReportTarget | { error: string } {
|
|
@@ -62,7 +77,18 @@ export function parseReportUrl(raw: string, name = "--report-url"): ReportTarget
|
|
|
62
77
|
const prefix = s3[2]!.replace(/\/+$/, "");
|
|
63
78
|
return { scheme: "s3", url: `s3://${s3[1]}${prefix ? `/${prefix}` : ""}`, bucket: s3[1]!, prefix };
|
|
64
79
|
}
|
|
65
|
-
|
|
80
|
+
// #4554: a GCS bucket and an Azure container, named as terragucci's reports.bucket names them.
|
|
81
|
+
const gs = /^gs:\/\/([a-z0-9][a-z0-9._-]{1,221}[a-z0-9])(?:\/(.*))?$/.exec(url);
|
|
82
|
+
if (gs) {
|
|
83
|
+
const prefix = (gs[2] ?? "").replace(/\/+$/, "");
|
|
84
|
+
return { scheme: "gs", url: `gs://${gs[1]}${prefix ? `/${prefix}` : ""}`, bucket: gs[1]!, prefix };
|
|
85
|
+
}
|
|
86
|
+
const az = /^az:\/\/([a-z0-9]{3,24})\/([a-z0-9](?:[a-z0-9]|-(?=[a-z0-9])){2,62})(?:\/(.*))?$/.exec(url);
|
|
87
|
+
if (az) {
|
|
88
|
+
const prefix = (az[3] ?? "").replace(/\/+$/, "");
|
|
89
|
+
return { scheme: "az", url: `az://${az[1]}/${az[2]}${prefix ? `/${prefix}` : ""}`, account: az[1]!, container: az[2]!, prefix };
|
|
90
|
+
}
|
|
91
|
+
return { error: `${name} ${url}: takes an s3://<bucket>/<prefix>, gs://<bucket>/<prefix>, az://<account>/<container>/<prefix> or file://<directory> URL` };
|
|
66
92
|
}
|
|
67
93
|
|
|
68
94
|
/** The key a stage's files are kept under, below the URL: `<pr>/<commit>[/<member>]`. */
|
|
@@ -103,8 +129,33 @@ export const realAwsCli: AwsCli = (args, stdin) =>
|
|
|
103
129
|
child.stdin.end(stdin);
|
|
104
130
|
});
|
|
105
131
|
|
|
106
|
-
/**
|
|
107
|
-
|
|
132
|
+
/**
|
|
133
|
+
* The object-store client for a `gs://` or `az://` target (#4554), made once
|
|
134
|
+
* on first use from the job's environment. `store` replaces it in a test.
|
|
135
|
+
*/
|
|
136
|
+
export type ReportStore = () => Promise<ObjectStore>;
|
|
137
|
+
|
|
138
|
+
function cloudStore(target: Extract<ReportTarget, { scheme: "gs" | "az" }>, env: NodeJS.ProcessEnv = process.env): ReportStore {
|
|
139
|
+
let made: Promise<ObjectStore> | undefined;
|
|
140
|
+
return () =>
|
|
141
|
+
(made ??= import("./object-store/index").then((m) =>
|
|
142
|
+
target.scheme === "gs"
|
|
143
|
+
? new m.GcsClient(m.gcsFromEnv({ bucket: target.bucket, setting: "the report URL" }, env))
|
|
144
|
+
: new m.AzureBlobClient(m.azureFromEnv({ account: target.account, container: target.container, setting: "the report URL" }, env)),
|
|
145
|
+
));
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/** A key below a cloud target's prefix. */
|
|
149
|
+
const cloudKey = (target: { prefix: string }, key: string): string => `${target.prefix ? `${target.prefix}/` : ""}${key}`;
|
|
150
|
+
|
|
151
|
+
/** A put for `target`. `aws` replaces the AWS CLI in a test, and `store` a GCS or Azure client. */
|
|
152
|
+
export function reportPut(target: ReportTarget, aws: AwsCli = realAwsCli, store?: ReportStore): ReportPut {
|
|
153
|
+
if (target.scheme === "gs" || target.scheme === "az") {
|
|
154
|
+
const open = store ?? cloudStore(target);
|
|
155
|
+
return async (key, body, contentType) => {
|
|
156
|
+
await (await open()).put(cloudKey(target, key), body, contentType);
|
|
157
|
+
};
|
|
158
|
+
}
|
|
108
159
|
if (target.scheme === "file") {
|
|
109
160
|
return async (key, body) => {
|
|
110
161
|
const path = join(target.dir, ...key.split("/"));
|
|
@@ -149,8 +200,12 @@ export const realAwsRead: AwsRead = (args) =>
|
|
|
149
200
|
/** What the AWS CLI says about an object that does not exist. */
|
|
150
201
|
const S3_ABSENT = /\(404\)|Not Found|NoSuchKey|does not exist/i;
|
|
151
202
|
|
|
152
|
-
/** A get for `target`. `aws` replaces the AWS CLI in a test. */
|
|
153
|
-
export function reportGet(target: ReportTarget, aws: AwsRead = realAwsRead): ReportGet {
|
|
203
|
+
/** A get for `target`. `aws` replaces the AWS CLI in a test, and `store` a GCS or Azure client. */
|
|
204
|
+
export function reportGet(target: ReportTarget, aws: AwsRead = realAwsRead, store?: ReportStore): ReportGet {
|
|
205
|
+
if (target.scheme === "gs" || target.scheme === "az") {
|
|
206
|
+
const open = store ?? cloudStore(target);
|
|
207
|
+
return async (key) => (await (await open()).get(cloudKey(target, key))) ?? null;
|
|
208
|
+
}
|
|
154
209
|
if (target.scheme === "file") {
|
|
155
210
|
return async (key) => {
|
|
156
211
|
try {
|
package/src/pr-requires.test.ts
CHANGED
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
import { describe, expect, test } from "vitest";
|
|
8
8
|
import { forgejoForge, githubForge, gitlabForge, type ForgeFetch, type PrForge } from "./pr-forge";
|
|
9
|
-
import { checkPrRequires, PR_APPLY_REQUIRES, unmetRequires } from "./pr-requires";
|
|
9
|
+
import { checkPrRequires, parseRequiresList, PR_APPLY_REQUIRES, unmetRequires } from "./pr-requires";
|
|
10
|
+
import { parseArgs } from "./cli/parse-args";
|
|
10
11
|
|
|
11
12
|
/** A fake forge: `routes` maps `METHOD path-without-query` to a body, a status, or a function of the query. */
|
|
12
13
|
function fakeFetch(routes: Record<string, unknown | ((q: URLSearchParams) => unknown)>): ForgeFetch {
|
|
@@ -283,3 +284,38 @@ describe("checkPrRequires", () => {
|
|
|
283
284
|
expect(unmetRequires(out)).toBe("approved: could not ask gitlab: 401; mergeable: this gitlab client cannot say; undiverged: this gitlab client cannot say; checks: this gitlab client cannot say");
|
|
284
285
|
});
|
|
285
286
|
});
|
|
287
|
+
|
|
288
|
+
describe("--requires (#4607)", () => {
|
|
289
|
+
test("names the checks in the four's order, comma lists and repeats folded", () => {
|
|
290
|
+
expect(parseRequiresList(["checks,approved"])).toEqual({ checks: ["approved", "checks"] });
|
|
291
|
+
expect(parseRequiresList(["mergeable", "mergeable, undiverged"])).toEqual({ checks: ["mergeable", "undiverged"] });
|
|
292
|
+
});
|
|
293
|
+
|
|
294
|
+
test("an unknown check, or none, is an error naming the four", () => {
|
|
295
|
+
const unknown = parseRequiresList(["approved,green"]);
|
|
296
|
+
expect("error" in unknown && unknown.error).toContain('"green" is not one of them');
|
|
297
|
+
expect("error" in unknown && unknown.error).toContain("approved, mergeable, undiverged, checks");
|
|
298
|
+
expect("error" in parseRequiresList([","])).toBe(true);
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
test("pr-apply parses the flag into args.requires", () => {
|
|
302
|
+
expect(parseArgs(["components", "pr-apply", "--before-merge", "--pr", "7", "--requires", "approved,checks"]).requires).toEqual(["approved", "checks"]);
|
|
303
|
+
expect(() => parseArgs(["components", "pr-apply", "--requires", "--json"])).toThrow(/--requires needs a list/);
|
|
304
|
+
});
|
|
305
|
+
|
|
306
|
+
test("a product's subset asks only those checks", async () => {
|
|
307
|
+
const calls: string[] = [];
|
|
308
|
+
const forge = {
|
|
309
|
+
kind: "github",
|
|
310
|
+
prApproved: async () => (calls.push("approved"), { passed: true, reason: "ok" }),
|
|
311
|
+
prMergeable: async () => (calls.push("mergeable"), { passed: false, reason: "conflict" }),
|
|
312
|
+
prUndiverged: async () => (calls.push("undiverged"), { passed: false, reason: "behind" }),
|
|
313
|
+
prChecksPassed: async () => (calls.push("checks"), { passed: true, reason: "green" }),
|
|
314
|
+
} as unknown as PrForge;
|
|
315
|
+
const parsed = parseRequiresList(["approved,checks"]);
|
|
316
|
+
if ("error" in parsed) throw new Error(parsed.error);
|
|
317
|
+
const out = await checkPrRequires(forge, 7, HEAD, { only: parsed.checks, reads: 1 });
|
|
318
|
+
expect(calls).toEqual(["approved", "checks"]);
|
|
319
|
+
expect(unmetRequires(out)).toBeNull();
|
|
320
|
+
});
|
|
321
|
+
});
|
package/src/pr-requires.ts
CHANGED
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
*
|
|
6
6
|
* The checks are terragucci's `apply.requires` (comment-apply.ts:781-860 at
|
|
7
7
|
* INTENTIUS/terragucci e6cb431). A product may leave one out with `only`
|
|
8
|
-
* (#4336)
|
|
9
|
-
*
|
|
8
|
+
* (#4336). `pr-apply --before-merge` asks all four, as ws-106 requires,
|
|
9
|
+
* unless `--requires <list>` names fewer (#4607), which is how a product's
|
|
10
|
+
* `apply.requires` reaches it. A check the
|
|
10
11
|
* forge has not settled, such as GitHub working out whether a pull request
|
|
11
12
|
* can merge, is asked again a few times before it counts as unmet.
|
|
12
13
|
*
|
|
@@ -89,6 +90,19 @@ export async function checkPrRequires(forge: PrForge, pr: number, head: string,
|
|
|
89
90
|
return out;
|
|
90
91
|
}
|
|
91
92
|
|
|
93
|
+
/**
|
|
94
|
+
* The checks a `--requires` list names (#4607), in {@link PR_APPLY_REQUIRES}
|
|
95
|
+
* order: comma lists are split, repeats dropped. An unknown name, or a list
|
|
96
|
+
* that names none, is an error naming the four.
|
|
97
|
+
*/
|
|
98
|
+
export function parseRequiresList(values: readonly string[]): { checks: PrApplyRequire[] } | { error: string } {
|
|
99
|
+
const names = values.flatMap((v) => v.split(",")).map((v) => v.trim()).filter(Boolean);
|
|
100
|
+
const unknown = names.filter((n) => !(PR_APPLY_REQUIRES as readonly string[]).includes(n));
|
|
101
|
+
if (unknown.length > 0) return { error: `--requires takes ${PR_APPLY_REQUIRES.join(", ")}; ${unknown.map((u) => JSON.stringify(u)).join(", ")} is not one of them` };
|
|
102
|
+
if (names.length === 0) return { error: `--requires names at least one of ${PR_APPLY_REQUIRES.join(", ")}` };
|
|
103
|
+
return { checks: PR_APPLY_REQUIRES.filter((n) => names.includes(n)) };
|
|
104
|
+
}
|
|
105
|
+
|
|
92
106
|
/** The unmet checks as one line, or null when all four passed. */
|
|
93
107
|
export function unmetRequires(outcomes: readonly PrRequireOutcome[]): string | null {
|
|
94
108
|
const unmet = outcomes.filter((o) => !o.passed);
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The products import the installed, pinned chant at run time (chant#4591).
|
|
3
|
+
* plywood and terragucci mark `@intentius/chant*` external in their CLI
|
|
4
|
+
* bundles, so every subpath they load must resolve, under plain Node and no
|
|
5
|
+
* TypeScript loader, to compiled JS. Node does not strip types under
|
|
6
|
+
* node_modules, so the core exports carry an `import` condition on `dist/*.js`
|
|
7
|
+
* beside `development` and `default`, as `./notify` did first (#3803).
|
|
8
|
+
*
|
|
9
|
+
* This packs core and the terraform lexicon the way a release does (each
|
|
10
|
+
* prepack builds dist/), unpacks both into a scratch project's node_modules,
|
|
11
|
+
* links the rest of the repository's installed dependencies beside them, and
|
|
12
|
+
* imports each subpath with `node` and nothing else. A compiled lexicon
|
|
13
|
+
* imports core too, so the lexicon rows also prove core's root and subpaths
|
|
14
|
+
* reach dist/.
|
|
15
|
+
*
|
|
16
|
+
* End to end because `npm pack` runs both package builds.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import { execFileSync } from "node:child_process";
|
|
20
|
+
import { mkdirSync, mkdtempSync, readdirSync, readFileSync, rmSync, statSync, symlinkSync } from "node:fs";
|
|
21
|
+
import { tmpdir } from "node:os";
|
|
22
|
+
import { join, resolve } from "node:path";
|
|
23
|
+
import { transformSync } from "esbuild";
|
|
24
|
+
import { afterAll, beforeAll, describe, expect, test } from "vitest";
|
|
25
|
+
|
|
26
|
+
const coreRoot = resolve(import.meta.dirname, "..");
|
|
27
|
+
const repoRoot = resolve(coreRoot, "..", "..");
|
|
28
|
+
const terraformRoot = join(repoRoot, "lexicons", "terraform");
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Every `@intentius/chant` subpath plywood or terragucci loads at run time
|
|
32
|
+
* (type-only imports left out), from packages/plywood/src and
|
|
33
|
+
* packages/terragucci/src at integration/ci-products, plus the ones chant#4591
|
|
34
|
+
* names. A product that starts importing another one adds it here.
|
|
35
|
+
*/
|
|
36
|
+
const CORE_SUBPATHS = [
|
|
37
|
+
"",
|
|
38
|
+
"bucket-check",
|
|
39
|
+
"change-set",
|
|
40
|
+
"ci-control",
|
|
41
|
+
"ci-estate",
|
|
42
|
+
"ci-handover",
|
|
43
|
+
"ci-identity",
|
|
44
|
+
"ci-product",
|
|
45
|
+
"components",
|
|
46
|
+
"components/capability",
|
|
47
|
+
"components/check-hooks",
|
|
48
|
+
"components/component",
|
|
49
|
+
"components/pr-env-run",
|
|
50
|
+
"components/pr-environment",
|
|
51
|
+
"components/verbs/sign",
|
|
52
|
+
"e2e-harness",
|
|
53
|
+
"exit-codes",
|
|
54
|
+
"forge-check",
|
|
55
|
+
"gate-decision",
|
|
56
|
+
"gate-policy",
|
|
57
|
+
"gate-resume-run",
|
|
58
|
+
"gated-waves",
|
|
59
|
+
"lifecycle/gate-audit",
|
|
60
|
+
"lifecycle/git",
|
|
61
|
+
"lifecycle/ledger-read",
|
|
62
|
+
"lifecycle/plan-digest",
|
|
63
|
+
"lifecycle/query",
|
|
64
|
+
"lifecycle/release-ledger",
|
|
65
|
+
"lifecycle/target-lock",
|
|
66
|
+
"lint/post-synth",
|
|
67
|
+
"notify",
|
|
68
|
+
"object-store",
|
|
69
|
+
"op",
|
|
70
|
+
"op/activities",
|
|
71
|
+
"op/activities/review-agent",
|
|
72
|
+
"op/gate-resume-plan",
|
|
73
|
+
"op/op-waves",
|
|
74
|
+
"op/schedule-overdue",
|
|
75
|
+
"op/stage-hooks",
|
|
76
|
+
"override-gate",
|
|
77
|
+
"plan-summary",
|
|
78
|
+
"point-decision",
|
|
79
|
+
"pr-forge",
|
|
80
|
+
"pr-requires",
|
|
81
|
+
"read-filter",
|
|
82
|
+
"terraform/credentials",
|
|
83
|
+
"terraform/parse",
|
|
84
|
+
"wave-blocked",
|
|
85
|
+
"workspace/ci-branches",
|
|
86
|
+
"workspace/declaration",
|
|
87
|
+
"workspace/which-chant",
|
|
88
|
+
"yaml",
|
|
89
|
+
] as const;
|
|
90
|
+
|
|
91
|
+
/** The terraform lexicon subpaths the products load (and chant#4591 names). */
|
|
92
|
+
const TERRAFORM_SUBPATHS = [
|
|
93
|
+
"change-set",
|
|
94
|
+
"changed-roots",
|
|
95
|
+
"compose",
|
|
96
|
+
"compose/estate",
|
|
97
|
+
"compose/root",
|
|
98
|
+
"compose/run",
|
|
99
|
+
"compose/slice",
|
|
100
|
+
"config",
|
|
101
|
+
"drift-rows",
|
|
102
|
+
"hcl/parse",
|
|
103
|
+
"lint/post-synth/tf046",
|
|
104
|
+
"pin",
|
|
105
|
+
"plan-digest",
|
|
106
|
+
"plan-shape",
|
|
107
|
+
"registry",
|
|
108
|
+
"registry/edge",
|
|
109
|
+
"state",
|
|
110
|
+
"terragrunt/affected",
|
|
111
|
+
"terragrunt/mocks",
|
|
112
|
+
"terragrunt/run",
|
|
113
|
+
"terragrunt/units",
|
|
114
|
+
"terragrunt/wave",
|
|
115
|
+
] as const;
|
|
116
|
+
|
|
117
|
+
let scratch: string;
|
|
118
|
+
let consumer: string;
|
|
119
|
+
|
|
120
|
+
/** Packs `dir` into `scratch` and unpacks it at `consumer/node_modules/<name>`. */
|
|
121
|
+
function packInto(dir: string, name: string): void {
|
|
122
|
+
const packed = JSON.parse(
|
|
123
|
+
execFileSync("npm", ["pack", "--json", "--pack-destination", scratch], { cwd: dir, encoding: "utf-8", stdio: ["ignore", "pipe", "pipe"] }),
|
|
124
|
+
) as { filename: string }[];
|
|
125
|
+
const into = join(consumer, "node_modules", name);
|
|
126
|
+
mkdirSync(into, { recursive: true });
|
|
127
|
+
execFileSync("tar", ["-xzf", join(scratch, packed[0].filename), "-C", into, "--strip-components=1"]);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
beforeAll(() => {
|
|
131
|
+
scratch = mkdtempSync(join(tmpdir(), "chant-product-subpaths-"));
|
|
132
|
+
consumer = join(scratch, "consumer");
|
|
133
|
+
mkdirSync(join(consumer, "node_modules", "@intentius"), { recursive: true });
|
|
134
|
+
packInto(coreRoot, "@intentius/chant");
|
|
135
|
+
packInto(terraformRoot, "@intentius/chant-lexicon-terraform");
|
|
136
|
+
// Third-party dependencies come from the repository's install: the
|
|
137
|
+
// hoisted ones beside the packages, core's nested ones under core.
|
|
138
|
+
for (const name of readdirSync(join(repoRoot, "node_modules"))) {
|
|
139
|
+
if (name === "@intentius" || name.startsWith(".")) continue;
|
|
140
|
+
symlinkSync(join(repoRoot, "node_modules", name), join(consumer, "node_modules", name), "dir");
|
|
141
|
+
}
|
|
142
|
+
symlinkSync(join(coreRoot, "node_modules"), join(consumer, "node_modules", "@intentius", "chant", "node_modules"), "dir");
|
|
143
|
+
}, 900_000);
|
|
144
|
+
|
|
145
|
+
afterAll(() => {
|
|
146
|
+
if (scratch) rmSync(scratch, { recursive: true, force: true });
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
/** Imports each specifier under plain node in the consumer project, with no loader. */
|
|
150
|
+
function importEach(specifiers: readonly string[]): { specifier: string; from?: string; exports?: number; error?: string }[] {
|
|
151
|
+
const env = { ...process.env };
|
|
152
|
+
delete env.NODE_OPTIONS;
|
|
153
|
+
const source = `
|
|
154
|
+
const out = [];
|
|
155
|
+
for (const specifier of ${JSON.stringify(specifiers)}) {
|
|
156
|
+
try {
|
|
157
|
+
const m = await import(specifier);
|
|
158
|
+
out.push({ specifier, from: import.meta.resolve(specifier), exports: Object.keys(m).length });
|
|
159
|
+
} catch (e) {
|
|
160
|
+
out.push({ specifier, error: String(e?.message ?? e).split("\\n")[0] });
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
console.log(JSON.stringify(out));
|
|
164
|
+
`;
|
|
165
|
+
return JSON.parse(execFileSync(process.execPath, ["--input-type=module", "-e", source], { cwd: consumer, env, encoding: "utf-8" }));
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/** Every .js and .mjs file under `dir`. */
|
|
169
|
+
function compiledFiles(dir: string): string[] {
|
|
170
|
+
return readdirSync(dir).flatMap((name) => {
|
|
171
|
+
const path = join(dir, name);
|
|
172
|
+
if (statSync(path).isDirectory()) return name === "node_modules" ? [] : compiledFiles(path);
|
|
173
|
+
return /\.m?js$/.test(name) ? [path] : [];
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
describe("product subpaths under plain Node (chant#4591)", () => {
|
|
178
|
+
test("every compiled module in both tarballs parses", () => {
|
|
179
|
+
// A product's bundler parses every module an import reaches, dynamic ones
|
|
180
|
+
// too. tsc-alias once rewrote a regex shaped like an import and left a
|
|
181
|
+
// file Node could not parse (chud-lexicon-exit.js).
|
|
182
|
+
const unparsed: string[] = [];
|
|
183
|
+
for (const pkg of ["@intentius/chant", "@intentius/chant-lexicon-terraform"]) {
|
|
184
|
+
for (const file of compiledFiles(join(consumer, "node_modules", pkg, "dist"))) {
|
|
185
|
+
try {
|
|
186
|
+
transformSync(readFileSync(file, "utf-8"), { format: "esm", loader: "js", logLevel: "silent" });
|
|
187
|
+
} catch (e) {
|
|
188
|
+
unparsed.push(`${file}: ${(e as { errors?: { text: string }[] }).errors?.[0]?.text ?? String(e)}`);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
expect(unparsed).toEqual([]);
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
test("every core subpath a product loads imports from dist/", () => {
|
|
197
|
+
const results = importEach(CORE_SUBPATHS.map((s) => (s ? `@intentius/chant/${s}` : "@intentius/chant")));
|
|
198
|
+
expect(results.filter((r) => r.error)).toEqual([]);
|
|
199
|
+
for (const r of results) {
|
|
200
|
+
expect(r.from, r.specifier).toMatch(/\/node_modules\/@intentius\/chant\/dist\/.+\.js$/);
|
|
201
|
+
expect(r.exports, r.specifier).toBeGreaterThan(0);
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
test("every terraform lexicon subpath a product loads imports from dist/, with core from dist/ under it", () => {
|
|
206
|
+
const results = importEach(TERRAFORM_SUBPATHS.map((s) => `@intentius/chant-lexicon-terraform/${s}`));
|
|
207
|
+
expect(results.filter((r) => r.error)).toEqual([]);
|
|
208
|
+
for (const r of results) {
|
|
209
|
+
expect(r.from, r.specifier).toMatch(/\/node_modules\/@intentius\/chant-lexicon-terraform\/dist\/.+\.js$/);
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
});
|
package/src/release-floors.ts
CHANGED
package/src/run-event.ts
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* {@link runEventOfProgress} and {@link runEventsOfStepRecord} say how each
|
|
20
20
|
* maps onto this contract.
|
|
21
21
|
*
|
|
22
|
-
* This module imports no runtime code beyond the chant version (`./chant-version.ts`), so a consumer
|
|
22
|
+
* This module imports no runtime code beyond the chant version (`./chant-version.ts`) and the release floors (`./release-floors.ts`), so a consumer
|
|
23
23
|
* can import the types and the writer without loading the rest of chant. It
|
|
24
24
|
* lives outside `workspace/` so that a level-0 import of `@intentius/chant`
|
|
25
25
|
* loads no workspace module (#2526).
|
|
@@ -215,8 +215,35 @@ export interface RunEventStepSettle {
|
|
|
215
215
|
error?: string;
|
|
216
216
|
/** Why the step skipped, gated or waited, for a person. */
|
|
217
217
|
message?: string;
|
|
218
|
+
/**
|
|
219
|
+
* What the step did to each resource, when its engine reported it (#4615),
|
|
220
|
+
* such as plunge's per-resource timings on a `pulumi-up` step. Optional,
|
|
221
|
+
* added within contract 1 by chant {@link RUN_EVENT_RESOURCES_FLOOR}; a
|
|
222
|
+
* reader that does not know it ignores it.
|
|
223
|
+
*/
|
|
224
|
+
resources?: RunEventResource[];
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/** One resource a step changed or tried to (#4615). */
|
|
228
|
+
export interface RunEventResource {
|
|
229
|
+
/** The engine's id for it: a URN, an address. */
|
|
230
|
+
resource: string;
|
|
231
|
+
/** Its type, when the engine names one. */
|
|
232
|
+
type?: string;
|
|
233
|
+
/** Its name, when the engine names one apart from the id. */
|
|
234
|
+
name?: string;
|
|
235
|
+
status: "ok" | "failed";
|
|
236
|
+
/** When the engine started on it, ISO-8601, when it says. */
|
|
237
|
+
startedAt?: string;
|
|
238
|
+
/** How long the engine spent on it, or null when it did not time it. */
|
|
239
|
+
durationMs: number | null;
|
|
240
|
+
/** How many engine calls it took (provider calls, record writes), when the engine counts them. */
|
|
241
|
+
calls?: number;
|
|
218
242
|
}
|
|
219
243
|
|
|
244
|
+
/** The first chant that writes `resources` on `step-settle` (#4615). */
|
|
245
|
+
export const RUN_EVENT_RESOURCES_FLOOR = "0.124.55";
|
|
246
|
+
|
|
220
247
|
/** The run stopped at a gate nobody has approved, or a decision point nobody has answered. */
|
|
221
248
|
export interface RunEventGateWaiting {
|
|
222
249
|
type: "gate-waiting";
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The JSON replacer that sorts object keys, alone in a leaf module so a small
|
|
3
|
+
* bundle that digests JSON (the gate decision's gated-request digest, #4551)
|
|
4
|
+
* takes it without `./utils.ts` and its AttrRef import.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* JSON.stringify replacer that sorts object keys for deterministic output.
|
|
9
|
+
*/
|
|
10
|
+
export function sortedJsonReplacer(_key: string, value: unknown): unknown {
|
|
11
|
+
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
12
|
+
return Object.fromEntries(
|
|
13
|
+
Object.entries(value as Record<string, unknown>).sort(([a], [b]) => a.localeCompare(b))
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
return value;
|
|
17
|
+
}
|
|
@@ -24,11 +24,17 @@ describe("the stage-hooks bundle", () => {
|
|
|
24
24
|
logLevel: "silent",
|
|
25
25
|
});
|
|
26
26
|
expect(Object.keys(result.metafile.inputs).map((i) => i.replace(/^.*?packages\//, "packages/")).sort()).toEqual([
|
|
27
|
+
// The product's words (#4550): gate and status names, no imports.
|
|
28
|
+
"packages/core/src/ci-product-words.ts",
|
|
29
|
+
// The control repo's settings check (#4568, #4617), which the spec checks.
|
|
30
|
+
"packages/core/src/control/dispatch.ts",
|
|
27
31
|
"packages/core/src/lifecycle/gate-seal.ts",
|
|
28
32
|
"packages/core/src/notify-verify.ts",
|
|
29
33
|
"packages/core/src/notify.ts",
|
|
30
34
|
"packages/core/src/op/gate-point.ts",
|
|
31
35
|
"packages/core/src/op/gate-quorum.ts",
|
|
36
|
+
"packages/core/src/op/op-waves-capability-spec.ts",
|
|
37
|
+
"packages/core/src/op/op-waves-release.ts",
|
|
32
38
|
"packages/core/src/op/op-waves.ts",
|
|
33
39
|
"packages/core/src/op/stage-hooks.ts",
|
|
34
40
|
"packages/core/src/wave-blocked.ts",
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// The token lookup Terraform and OpenTofu use (chant#4563): TF_TOKEN_<host> first, then the CLI config
|
|
2
|
+
// file and credentials.tfrc.json.
|
|
3
|
+
import { describe, expect, it } from "vitest";
|
|
4
|
+
import { authorizationFor, credentialsHost, credentialsFilePath, terraformCredential, terraformToken, tokenVariable } from "./credentials";
|
|
5
|
+
|
|
6
|
+
const files = (map: Record<string, string>) => (path: string) => map[path];
|
|
7
|
+
|
|
8
|
+
describe("tokenVariable", () => {
|
|
9
|
+
it("writes dots as _ and dashes as __, lower case", () => {
|
|
10
|
+
expect(tokenVariable("app.terraform.io")).toBe("TF_TOKEN_app_terraform_io");
|
|
11
|
+
expect(tokenVariable("My-Registry.Example.com")).toBe("TF_TOKEN_my__registry_example_com");
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it("uses punycode for an internationalised host", () => {
|
|
15
|
+
expect(tokenVariable("bücher.example")).toBe("TF_TOKEN_xn____bcher__kva_example");
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it("drops port 443 and has no variable for another port", () => {
|
|
19
|
+
expect(credentialsHost("registry.example.com:443")).toBe("registry.example.com");
|
|
20
|
+
expect(tokenVariable("127.0.0.1:8443")).toBeUndefined();
|
|
21
|
+
expect(credentialsHost("https://Registry.Example.com/v1/modules/")).toBe("registry.example.com");
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
describe("terraformCredential", () => {
|
|
26
|
+
const home = "/home/u";
|
|
27
|
+
const tfrc = "/home/u/.terraform.d/credentials.tfrc.json";
|
|
28
|
+
|
|
29
|
+
it("reads TF_TOKEN_<host>", () => {
|
|
30
|
+
expect(terraformCredential("app.terraform.io", { env: { TF_TOKEN_app_terraform_io: "t1" }, readFile: files({}) })).toEqual({ token: "t1", from: "TF_TOKEN_app_terraform_io" });
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it("matches a variable whose name decodes to the host in another case", () => {
|
|
34
|
+
expect(terraformToken("app.terraform.io", { env: { TF_TOKEN_App_Terraform_Io: "t2" }, readFile: files({}) })).toBe("t2");
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it("reads credentials.tfrc.json under HOME", () => {
|
|
38
|
+
const c = terraformCredential("registry.example.com", { env: { HOME: home }, platform: "linux", readFile: files({ [tfrc]: JSON.stringify({ credentials: { "registry.example.com": { token: "f1" } } }) }) });
|
|
39
|
+
expect(c).toEqual({ token: "f1", from: tfrc });
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it("reads a host with a port from the file only", () => {
|
|
43
|
+
const readFile = files({ [tfrc]: JSON.stringify({ credentials: { "127.0.0.1:8443": { token: "p1" } } }) });
|
|
44
|
+
expect(terraformToken("127.0.0.1:8443", { env: { HOME: home }, platform: "linux", readFile })).toBe("p1");
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it("reads a credentials block from the HCL file TF_CLI_CONFIG_FILE names", () => {
|
|
48
|
+
const cli = "/etc/tf/cli.tfrc";
|
|
49
|
+
const text = `# comment\nplugin_cache_dir = "/tmp"\ncredentials "registry.example.com" {\n token = "h1"\n}\n`;
|
|
50
|
+
expect(terraformCredential("registry.example.com", { env: { TF_CLI_CONFIG_FILE: cli }, readFile: files({ [cli]: text }) })).toEqual({ token: "h1", from: cli });
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
it("lets the variable win over both files", () => {
|
|
54
|
+
const cli = "/etc/tf/cli.tfrc";
|
|
55
|
+
const readFile = files({
|
|
56
|
+
[cli]: `credentials "registry.example.com" { token = "h1" }`,
|
|
57
|
+
[tfrc]: JSON.stringify({ credentials: { "registry.example.com": { token: "f1" } } }),
|
|
58
|
+
});
|
|
59
|
+
expect(terraformToken("registry.example.com", { env: { HOME: home, TF_CLI_CONFIG_FILE: cli, TF_TOKEN_registry_example_com: "e1" }, platform: "linux", readFile })).toBe("e1");
|
|
60
|
+
expect(terraformToken("registry.example.com", { env: { HOME: home, TF_CLI_CONFIG_FILE: cli }, platform: "linux", readFile })).toBe("h1");
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
it("finds nothing without a variable, a home or a config file", () => {
|
|
64
|
+
expect(terraformCredential("registry.example.com", { env: {}, readFile: files({}) })).toBeUndefined();
|
|
65
|
+
expect(credentialsFilePath({ env: {}, platform: "linux" })).toBeUndefined();
|
|
66
|
+
expect(credentialsFilePath({ env: { APPDATA: "C:\\Users\\u\\AppData\\Roaming" }, platform: "win32" })).toContain("terraform.d");
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
it("skips a file that is neither JSON nor holds a block for the host", () => {
|
|
70
|
+
expect(terraformToken("registry.example.com", { env: { HOME: home }, platform: "linux", readFile: files({ [tfrc]: "{not json" }) })).toBeUndefined();
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
it("builds the Authorization header, or none", () => {
|
|
74
|
+
expect(authorizationFor("app.terraform.io", { env: { TF_TOKEN_app_terraform_io: "t1" }, readFile: files({}) })).toEqual({ Authorization: "Bearer t1" });
|
|
75
|
+
expect(authorizationFor("app.terraform.io", { env: {}, readFile: files({}) })).toEqual({});
|
|
76
|
+
});
|
|
77
|
+
});
|