@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
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The harness's contracts (chant#4587): e2e-scenario/v1 and its lint, which
|
|
3
|
+
* refuses a scenario with no claim id or no BREAK arm, and e2e-claim-row/v1
|
|
4
|
+
* and e2e-claims/v1. demo-step/v1 and demo-cycle/v1 keep their own tests in
|
|
5
|
+
* examples/fan-out-estate/demo/schemas/index.test.ts.
|
|
6
|
+
*/
|
|
7
|
+
import { describe, expect, test } from "vitest";
|
|
8
|
+
import { lintScenario } from "./scenario";
|
|
9
|
+
import {
|
|
10
|
+
E2E_CLAIMS_SCHEMA,
|
|
11
|
+
E2E_CLAIM_ROW_SCHEMA,
|
|
12
|
+
E2E_SCENARIO_SCHEMA,
|
|
13
|
+
validateClaimRow,
|
|
14
|
+
validateClaims,
|
|
15
|
+
validateDemoStep,
|
|
16
|
+
validateScenario,
|
|
17
|
+
type ClaimRow,
|
|
18
|
+
} from "./schemas/index";
|
|
19
|
+
import { FLOCI_DIGEST } from "./pins";
|
|
20
|
+
|
|
21
|
+
const scenario = (): Record<string, unknown> => ({
|
|
22
|
+
$schema: E2E_SCENARIO_SCHEMA,
|
|
23
|
+
contract: 1,
|
|
24
|
+
id: "tg-estate-overlap",
|
|
25
|
+
product: "terragucci",
|
|
26
|
+
claim: "choudoufu/rows-overlap",
|
|
27
|
+
tree: { base: "trees/estate", overlays: "trees/overlays" },
|
|
28
|
+
reportUrl: "s3://terragucci-e2e/estate/reports",
|
|
29
|
+
steps: [
|
|
30
|
+
{ id: "one", do: "open", branch: "e2e/one", overlay: "one", title: "One" },
|
|
31
|
+
{ id: "two", do: "open-concurrent", branch: "e2e/two", overlay: "two", title: "Two" },
|
|
32
|
+
{ id: "one-plan", do: "plan", pull: "one", expect: [{ report: { status: "planned" } }] },
|
|
33
|
+
{ id: "one-merge", do: "merge", pull: "one" },
|
|
34
|
+
{ id: "one-apply", do: "apply", merge: "one-merge", expect: [{ report: { status: "applied", components: { a: "applied" }, only: true } }] },
|
|
35
|
+
],
|
|
36
|
+
break: { env: { BREAK: "1" }, note: "the second apply takes the first's rows" },
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
const at = (findings: { at: string; message: string }[]) => findings.map((f) => f.at);
|
|
40
|
+
|
|
41
|
+
describe("e2e-scenario/v1 and its lint", () => {
|
|
42
|
+
test("a scenario with a claim, steps that expect something and a BREAK arm lints clean", () => {
|
|
43
|
+
expect(validateScenario(scenario()).ok).toBe(true);
|
|
44
|
+
expect(lintScenario(scenario())).toEqual([]);
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
test("refuses a scenario with no claim id", () => {
|
|
48
|
+
const s = scenario();
|
|
49
|
+
delete s.claim;
|
|
50
|
+
expect(lintScenario(s)).toContainEqual({ at: "/claim", message: "the scenario has no claim id, so its run would record a row for nothing" });
|
|
51
|
+
expect(lintScenario({ ...scenario(), claim: " " }).map((f) => f.at)).toContain("/claim");
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
test("refuses a scenario with no BREAK arm, or one that does not set BREAK=1", () => {
|
|
55
|
+
const s = scenario();
|
|
56
|
+
delete s.break;
|
|
57
|
+
expect(lintScenario(s)).toContainEqual({ at: "/break", message: "the scenario has no BREAK arm, so nothing shows its outcomes can fail" });
|
|
58
|
+
expect(at(lintScenario({ ...scenario(), break: { env: { BREAK: "0" } } }))).toContain("/break/env/BREAK");
|
|
59
|
+
expect(at(lintScenario({ ...scenario(), break: { overlay: "broken" } }))).toContain("/break/env/BREAK");
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
test("refuses steps that name a pull request or a merge no earlier step made", () => {
|
|
63
|
+
const s = scenario();
|
|
64
|
+
const steps = s.steps as Array<Record<string, unknown>>;
|
|
65
|
+
steps[2] = { id: "one-plan", do: "plan", pull: "nobody", expect: [{ report: { status: "planned" } }] };
|
|
66
|
+
steps[4] = { id: "one-apply", do: "apply", merge: "one", expect: [{ exit: 0 }] };
|
|
67
|
+
const findings = lintScenario(s);
|
|
68
|
+
expect(findings).toContainEqual({ at: "/steps/2/pull", message: "plan names nobody, which is not an earlier open step" });
|
|
69
|
+
expect(findings).toContainEqual({ at: "/steps/4/merge", message: "apply names one, which is not an earlier merge step" });
|
|
70
|
+
expect(findings).toContainEqual({ at: "/steps/4/expect/0", message: "an exit outcome belongs on an out-of-band step" });
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
test("refuses a scenario that checks nothing, a repeated id and a lone open-concurrent", () => {
|
|
74
|
+
const s = scenario();
|
|
75
|
+
s.steps = [
|
|
76
|
+
{ id: "x", do: "open-concurrent", branch: "x", overlay: "x", title: "X" },
|
|
77
|
+
{ id: "x", do: "kill-job" },
|
|
78
|
+
];
|
|
79
|
+
expect(lintScenario(s)).toEqual([
|
|
80
|
+
{ at: "/steps/0/do", message: "open-concurrent opens beside the step before it, which must be an open" },
|
|
81
|
+
{ at: "/steps/1/id", message: "step id x is used twice" },
|
|
82
|
+
{ at: "/steps", message: "no step expects anything, so the plain run would pass and the BREAK run could never be caught" },
|
|
83
|
+
]);
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
test("the schema refuses an unknown step, a step missing its fields and an outcome with two keys", () => {
|
|
87
|
+
for (const bad of [
|
|
88
|
+
{ id: "s", do: "deploy" },
|
|
89
|
+
{ id: "s", do: "open", branch: "b", title: "T" },
|
|
90
|
+
{ id: "s", do: "plan", pull: "one", expect: [{ exit: 0, comment: "x" }] },
|
|
91
|
+
]) {
|
|
92
|
+
const s = scenario();
|
|
93
|
+
(s.steps as unknown[]).push(bad);
|
|
94
|
+
expect(validateScenario(s).ok, JSON.stringify(bad)).toBe(false);
|
|
95
|
+
expect(lintScenario(s).length).toBeGreaterThan(0);
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
const row = (over: Partial<ClaimRow> = {}): ClaimRow => ({
|
|
101
|
+
$schema: E2E_CLAIM_ROW_SCHEMA,
|
|
102
|
+
contract: 1,
|
|
103
|
+
product: "terragucci",
|
|
104
|
+
productCommit: "e962b2c0000000000000000000000000000000aa",
|
|
105
|
+
scenario: "tg-estate-overlap",
|
|
106
|
+
claim: "choudoufu/rows-overlap",
|
|
107
|
+
engine: { binary: "choudoufu", version: "0.31.0" },
|
|
108
|
+
floci: FLOCI_DIGEST,
|
|
109
|
+
date: "2026-10-28",
|
|
110
|
+
plain: "pass",
|
|
111
|
+
break: "caught",
|
|
112
|
+
safeRun: "CLEAN",
|
|
113
|
+
...over,
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
describe("e2e-claim-row/v1 and e2e-claims/v1", () => {
|
|
117
|
+
test("a row carries the product and its commit, the engine binary and version, the floci digest, the date and both verdicts", () => {
|
|
118
|
+
expect(validateClaimRow(row())).toEqual({ ok: true, value: row() });
|
|
119
|
+
const required = (JSON.parse(JSON.stringify(row())) as Record<string, unknown>);
|
|
120
|
+
for (const k of ["product", "productCommit", "engine", "floci", "date", "plain", "break", "safeRun"]) {
|
|
121
|
+
const r = { ...required };
|
|
122
|
+
delete r[k];
|
|
123
|
+
expect(validateClaimRow(r).ok, k).toBe(false);
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
test("refuses a short commit, a tag in place of a digest, a verdict it does not know and a scan that was not CLEAN", () => {
|
|
128
|
+
expect(validateClaimRow(row({ productCommit: "e962b2c" })).ok).toBe(false);
|
|
129
|
+
expect(validateClaimRow(row({ floci: "63d8f1ed" })).ok).toBe(false);
|
|
130
|
+
expect(validateClaimRow({ ...row(), plain: "ok" }).ok).toBe(false);
|
|
131
|
+
expect(validateClaimRow({ ...row(), safeRun: "REAL-CLOUD" }).ok).toBe(false);
|
|
132
|
+
expect(validateClaimRow({ ...row(), date: "28 Oct 2026" }).ok).toBe(false);
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
test("a product's claims are its rows", () => {
|
|
136
|
+
expect(validateClaims({ $schema: E2E_CLAIMS_SCHEMA, contract: 1, product: "terragucci", rows: [row()] }).ok).toBe(true);
|
|
137
|
+
expect(validateClaims({ $schema: E2E_CLAIMS_SCHEMA, contract: 1, product: "terragucci", rows: [{ ...row(), break: "maybe" }] }).ok).toBe(false);
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
test("demo-step/v1 validates from the harness as it did from the demo", () => {
|
|
141
|
+
const step = { $schema: "https://intentius.io/chant/schemas/demo/demo-step/v1/demo-step.schema.json", contract: 1, demo: "fan-out-estate", cycle: 1, step: "planned" };
|
|
142
|
+
expect(validateDemoStep(step).ok).toBe(true);
|
|
143
|
+
expect(validateDemoStep({ ...step, step: "exploded" }).ok).toBe(false);
|
|
144
|
+
});
|
|
145
|
+
});
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The harness's compose project (chant#4587): the services harnessStack
|
|
3
|
+
* gives, the one pin file they read, the runner's config, and ./project/
|
|
4
|
+
* built with `chant build` on the docker lexicon. Nothing here starts a
|
|
5
|
+
* container.
|
|
6
|
+
*/
|
|
7
|
+
import { mkdtempSync, readFileSync, rmSync } from "node:fs";
|
|
8
|
+
import { tmpdir } from "node:os";
|
|
9
|
+
import { join, resolve } from "node:path";
|
|
10
|
+
import { load } from "js-yaml";
|
|
11
|
+
import { afterAll, beforeAll, describe, expect, test } from "vitest";
|
|
12
|
+
import { runCommandInProcess } from "../cli/main";
|
|
13
|
+
import { harnessProjectDir } from "./index";
|
|
14
|
+
import { pickJobContainer } from "./jobs";
|
|
15
|
+
import { CLICKHOUSE_IMAGE, FLOCI_CHANGE_SET_IMAGE, FLOCI_DIGEST, FLOCI_IMAGE, FORGEJO_IMAGE, FORGEJO_RUNNER_IMAGE, POSTGRES_IMAGE } from "./pins";
|
|
16
|
+
import { forgejoRunnerConfig, harnessStack, harnessUrls } from "./stack";
|
|
17
|
+
|
|
18
|
+
const repo = resolve(import.meta.dirname, "..", "..", "..", "..");
|
|
19
|
+
const tmp = mkdtempSync(join(tmpdir(), "chant-e2e-stack-test-"));
|
|
20
|
+
afterAll(() => rmSync(tmp, { recursive: true, force: true }));
|
|
21
|
+
|
|
22
|
+
describe("the harness's pins", () => {
|
|
23
|
+
test("floci is held at 5ec92ae8, the build choudoufu and plunge pin (lex00/floci#265 for the move)", () => {
|
|
24
|
+
expect(FLOCI_DIGEST).toBe("sha256:5ec92ae8046445d62c0009590dd09f04560886e5a5ef31248cb3fcc09b2961ec");
|
|
25
|
+
expect(FLOCI_IMAGE).toBe(`ghcr.io/lex00/floci@${FLOCI_DIGEST}`);
|
|
26
|
+
expect(FLOCI_CHANGE_SET_IMAGE).toContain("sha256:63d8f1ed");
|
|
27
|
+
expect(readFileSync(join(import.meta.dirname, "pins.ts"), "utf8")).toContain("lex00/floci#265");
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
test("Forgejo 16.0.5 and forgejo-runner 13.2.0", () => {
|
|
31
|
+
expect(FORGEJO_IMAGE).toBe("codeberg.org/forgejo/forgejo:16.0.5");
|
|
32
|
+
expect(FORGEJO_RUNNER_IMAGE).toBe("data.forgejo.org/forgejo/runner:13.2.0");
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
test("the sql servers are the ones the sql lexicon pins", () => {
|
|
36
|
+
const pin = readFileSync(join(repo, "lexicons", "sql", "src", "spec", "pin.ts"), "utf8");
|
|
37
|
+
const version = /CLICKHOUSE_VERSION = "([^"]+)"/.exec(pin)![1];
|
|
38
|
+
const digest = /CLICKHOUSE_IMAGE_DIGEST = "([^"]+)"/.exec(pin)![1];
|
|
39
|
+
expect(CLICKHOUSE_IMAGE).toBe(`clickhouse/clickhouse-server:${version}@${digest}`);
|
|
40
|
+
const pg = readFileSync(join(repo, "lexicons", "sql", "src", "spec", "postgres-pin.ts"), "utf8");
|
|
41
|
+
const [, pgVersion, pgDigest] = /major: 18, version: "([^"]+)", digest: "([^"]+)"/.exec(pg)!;
|
|
42
|
+
expect(POSTGRES_IMAGE).toBe(`postgres:${pgVersion}@${pgDigest}`);
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
describe("harnessStack", () => {
|
|
47
|
+
const h = harnessStack({ project: "bench-a", envPrefix: "BENCH_A" });
|
|
48
|
+
|
|
49
|
+
test("names the network, the containers and the volumes after the project", () => {
|
|
50
|
+
expect(h.network).toEqual({ name: "bench-a" });
|
|
51
|
+
expect(Object.values(h.services).map((s) => s.container_name)).toEqual(["bench-a-floci", "bench-a-forgejo", "bench-a-forgejo-runner", "bench-a-clickhouse", "bench-a-postgres"]);
|
|
52
|
+
expect(h.volumes).toEqual({ forgejoData: { name: "bench-a-forgejo-data" }, runnerData: { name: "bench-a-runner-data" } });
|
|
53
|
+
for (const s of Object.values(h.services)) expect(Object.keys(s.networks)).toEqual(["harness"]);
|
|
54
|
+
expect(() => harnessStack({ project: "Bench A" })).toThrow(/not a compose project name/);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
test("binds host ports to 127.0.0.1, moved by the prefix's variables", () => {
|
|
58
|
+
expect(h.services.floci.ports).toEqual(["127.0.0.1:${BENCH_A_FLOCI_PORT:-4591}:4566"]);
|
|
59
|
+
expect(h.services.forgejo.ports).toEqual(["127.0.0.1:${BENCH_A_FORGEJO_PORT:-3391}:3000"]);
|
|
60
|
+
expect(h.services.forgejoRunner.ports).toBeUndefined();
|
|
61
|
+
expect(harnessUrls(h, { BENCH_A_FORGEJO_PORT: "4000" }).forgejo).toBe("http://localhost:4000");
|
|
62
|
+
expect(harnessStack({ project: "demo", bind: null }).services.floci.ports).toEqual(["${CHANT_E2E_FLOCI_PORT:-4591}:4566"]);
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
test("runs forgejo-runner with the docker executor after Forgejo is healthy, and Actions on", () => {
|
|
66
|
+
const r = h.services.forgejoRunner;
|
|
67
|
+
expect(r.image).toBe(FORGEJO_RUNNER_IMAGE);
|
|
68
|
+
expect(r.volumes).toContain("/var/run/docker.sock:/var/run/docker.sock");
|
|
69
|
+
expect(r.depends_on).toEqual({ forgejo: { condition: "service_healthy" } });
|
|
70
|
+
expect(r.command!.at(-1)).toContain("forgejo-runner daemon -c /data/config.yml");
|
|
71
|
+
expect(h.services.forgejo.environment!.FORGEJO__actions__ENABLED).toBe("true");
|
|
72
|
+
expect(harnessStack({ project: "x", forgejoActions: false }).services.forgejo.environment!.FORGEJO__actions__ENABLED).toBe("false");
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
test("puts the sql emulator behind the sql profile, and nothing else", () => {
|
|
76
|
+
expect(h.services.clickhouse.profiles).toEqual(["sql"]);
|
|
77
|
+
expect(h.services.postgres.profiles).toEqual(["sql"]);
|
|
78
|
+
for (const k of ["floci", "forgejo", "forgejoRunner"] as const) expect(h.services[k].profiles).toBeUndefined();
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
test("the runner's config puts every job on the project network, with floci for AWS", () => {
|
|
82
|
+
const text = forgejoRunnerConfig({ network: "bench-a", uuid: "u-1", token: "t-1", jobImage: "node:22-bookworm" });
|
|
83
|
+
const doc = load(text) as { container: { network: string; valid_volumes: string[] }; runner: { envs: Record<string, string>; labels: string[] }; server: { connections: { forgejo: { uuid: string; url: string } } } };
|
|
84
|
+
expect(doc.container.network).toBe("bench-a");
|
|
85
|
+
expect(doc.container.valid_volumes).toEqual([]);
|
|
86
|
+
expect(doc.runner.envs.AWS_ENDPOINT_URL).toBe("http://floci:4566");
|
|
87
|
+
expect(doc.runner.labels).toEqual(["docker:docker://node:22-bookworm", "ubuntu-latest:docker://node:22-bookworm"]);
|
|
88
|
+
expect(doc.server.connections.forgejo).toMatchObject({ uuid: "u-1", url: "http://forgejo:3000/" });
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
test("kill-job picks the newest forgejo-runner job container that matches", () => {
|
|
92
|
+
const ps = ["2026-10-28 10:02\tFORGEJO-ACTIONS-TASK-9_WORKFLOW-pr_JOB-pr-apply", "2026-10-28 10:01\tFORGEJO-ACTIONS-TASK-8_WORKFLOW-pr_JOB-pr-plan", "2026-10-28 09:00\tbench-a-floci"];
|
|
93
|
+
expect(pickJobContainer(ps)).toBe("FORGEJO-ACTIONS-TASK-9_WORKFLOW-pr_JOB-pr-apply");
|
|
94
|
+
expect(pickJobContainer(ps, "pr-plan")).toBe("FORGEJO-ACTIONS-TASK-8_WORKFLOW-pr_JOB-pr-plan");
|
|
95
|
+
expect(pickJobContainer(ps, "drift")).toBeNull();
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
interface ComposeDoc {
|
|
100
|
+
services: Record<string, { image: string; ports?: string[]; profiles?: string[]; networks: Record<string, unknown>; container_name: string }>;
|
|
101
|
+
networks: Record<string, { name: string }>;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
describe("the harness's chant project", () => {
|
|
105
|
+
let doc: ComposeDoc;
|
|
106
|
+
|
|
107
|
+
beforeAll(async () => {
|
|
108
|
+
const out = join(tmp, "compose.yaml");
|
|
109
|
+
expect(await runCommandInProcess(["build", join(harnessProjectDir(), "src"), "--lexicon", "docker", "-o", out])).toBe(0);
|
|
110
|
+
doc = load(readFileSync(out, "utf8")) as ComposeDoc;
|
|
111
|
+
}, 60_000);
|
|
112
|
+
|
|
113
|
+
test("builds floci, Forgejo and forgejo-runner on one network, the sql emulator behind its profile", () => {
|
|
114
|
+
expect(Object.keys(doc.services).sort()).toEqual(["clickhouse", "floci", "forgejo", "forgejoRunner", "postgres"]);
|
|
115
|
+
expect(doc.networks.harness!.name).toBe("chant-e2e");
|
|
116
|
+
for (const s of Object.values(doc.services)) expect(Object.keys(s.networks)).toEqual(["harness"]);
|
|
117
|
+
expect(doc.services.floci!.image).toBe(FLOCI_IMAGE);
|
|
118
|
+
expect(doc.services.forgejo!.image).toBe(FORGEJO_IMAGE);
|
|
119
|
+
expect(doc.services.forgejoRunner!.image).toBe(FORGEJO_RUNNER_IMAGE);
|
|
120
|
+
expect(doc.services.clickhouse!.profiles).toEqual(["sql"]);
|
|
121
|
+
expect(doc.services.postgres!.profiles).toEqual(["sql"]);
|
|
122
|
+
expect(doc.services.floci!.ports).toEqual(["127.0.0.1:${CHANT_E2E_FLOCI_PORT:-4591}:4566"]);
|
|
123
|
+
});
|
|
124
|
+
});
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The e2e harness's compose project (chant#4587), as data a chant
|
|
3
|
+
* docker-lexicon project wraps: floci, Forgejo and forgejo-runner with the
|
|
4
|
+
* docker executor on one network, and the sql emulator's ClickHouse and
|
|
5
|
+
* Postgres behind the `sql` profile. Every image comes from ./pins.ts.
|
|
6
|
+
*
|
|
7
|
+
* Core does not depend on the docker lexicon, so this file returns plain
|
|
8
|
+
* service properties. A product's project hands each to the lexicon's
|
|
9
|
+
* `Service`, under the key named here (compose keys are export names):
|
|
10
|
+
*
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { Network, Service, Volume } from "@intentius/chant-lexicon-docker";
|
|
13
|
+
* import { harnessStack } from "@intentius/chant/e2e-harness";
|
|
14
|
+
* const h = harnessStack({ project: "terragucci-e2e", envPrefix: "TERRAGUCCI_E2E" });
|
|
15
|
+
* export const harness = new Network(h.network);
|
|
16
|
+
* export const floci = new Service(h.services.floci);
|
|
17
|
+
* ...
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* ./project/ is that project for the whole stack, and the fan-out demo's
|
|
21
|
+
* stack/src/compose.ts takes floci and Forgejo from it.
|
|
22
|
+
*
|
|
23
|
+
* Two rules from terragucci's stack hold here. A forge's public URL is its
|
|
24
|
+
* service name (http://forgejo:3000), since inside a job container localhost
|
|
25
|
+
* is the job container. The network has a fixed name, the project's, and the
|
|
26
|
+
* runner puts every job container on it. Host ports bind to 127.0.0.1 and
|
|
27
|
+
* move with `<envPrefix>_<SERVICE>_PORT`, and every name carries the project,
|
|
28
|
+
* so two benches share a host (plywood stack/compose.yml does the same).
|
|
29
|
+
*/
|
|
30
|
+
import { CLICKHOUSE_IMAGE, FLOCI_IMAGE, FORGEJO_IMAGE, FORGEJO_RUNNER_IMAGE, POSTGRES_IMAGE, POSTGRES_PASSWORD } from "./pins";
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* The service properties the harness sets, a subset of compose's. A type
|
|
34
|
+
* alias, not an interface: the docker lexicon's ServiceProps has an `x-` index
|
|
35
|
+
* signature, which only an alias's implicit index signature satisfies.
|
|
36
|
+
*/
|
|
37
|
+
export type ComposeServiceSpec = {
|
|
38
|
+
image: string;
|
|
39
|
+
container_name: string;
|
|
40
|
+
profiles?: string[];
|
|
41
|
+
user?: string;
|
|
42
|
+
environment?: Record<string, string>;
|
|
43
|
+
ports?: string[];
|
|
44
|
+
volumes?: string[];
|
|
45
|
+
working_dir?: string;
|
|
46
|
+
command?: string[];
|
|
47
|
+
depends_on?: Record<string, { condition: "service_started" | "service_healthy" }>;
|
|
48
|
+
networks: Record<string, { aliases: string[] }>;
|
|
49
|
+
healthcheck?: { test: string[]; interval: string; timeout: string; retries: number };
|
|
50
|
+
restart?: string;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export interface HarnessStackOptions {
|
|
54
|
+
/**
|
|
55
|
+
* The compose project, which also names the network, the containers and
|
|
56
|
+
* the volumes. Pass it to `docker compose -p` as well.
|
|
57
|
+
*/
|
|
58
|
+
project: string;
|
|
59
|
+
/** The prefix of the port variables, `<envPrefix>_FLOCI_PORT` and so on. Default `CHANT_E2E`. */
|
|
60
|
+
envPrefix?: string;
|
|
61
|
+
/** The network's export name in the product's project. Default `harness`. */
|
|
62
|
+
networkKey?: string;
|
|
63
|
+
/** Default host ports. */
|
|
64
|
+
ports?: Partial<HarnessPorts>;
|
|
65
|
+
/**
|
|
66
|
+
* The address host ports bind to. Default 127.0.0.1. Null publishes on
|
|
67
|
+
* every interface, for a demo host whose viewers read floci from outside.
|
|
68
|
+
*/
|
|
69
|
+
bind?: string | null;
|
|
70
|
+
/** Forgejo Actions on the instance. Default true; off when nothing on the forge runs workflows. */
|
|
71
|
+
forgejoActions?: boolean;
|
|
72
|
+
/** Another floci image, for a bench that needs the other line (pins.ts). Rows still name the one they ran on. */
|
|
73
|
+
flociImage?: string;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface HarnessPorts {
|
|
77
|
+
floci: number;
|
|
78
|
+
forgejo: number;
|
|
79
|
+
clickhouse: number;
|
|
80
|
+
postgres: number;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/** The default host ports, off every tool's own default and off terragucci's and plywood's benches. */
|
|
84
|
+
export const HARNESS_PORTS: HarnessPorts = { floci: 4591, forgejo: 3391, clickhouse: 8124, postgres: 5433 };
|
|
85
|
+
|
|
86
|
+
/** The profile the sql emulator's servers are behind. */
|
|
87
|
+
export const SQL_PROFILE = "sql";
|
|
88
|
+
|
|
89
|
+
/** Inside the network: the addresses jobs and the runner use. */
|
|
90
|
+
export const HARNESS_HOSTS = {
|
|
91
|
+
floci: "http://floci:4566",
|
|
92
|
+
forgejo: "http://forgejo:3000",
|
|
93
|
+
clickhouse: "http://clickhouse:8123",
|
|
94
|
+
postgres: "postgres://postgres:chant@postgres:5432/postgres",
|
|
95
|
+
} as const;
|
|
96
|
+
|
|
97
|
+
/** Where forgejo-runner reads its config, which `forgejoRunnerConfig` writes. */
|
|
98
|
+
export const RUNNER_CONFIG_PATH = "/data/config.yml";
|
|
99
|
+
|
|
100
|
+
export interface HarnessStack {
|
|
101
|
+
project: string;
|
|
102
|
+
/** The network's properties, under `networkKey`. */
|
|
103
|
+
network: { name: string };
|
|
104
|
+
networkKey: string;
|
|
105
|
+
/** Volumes by export name. */
|
|
106
|
+
volumes: { forgejoData: { name: string }; runnerData: { name: string } };
|
|
107
|
+
/** Services by export name, which is their compose key. */
|
|
108
|
+
services: {
|
|
109
|
+
floci: ComposeServiceSpec;
|
|
110
|
+
forgejo: ComposeServiceSpec;
|
|
111
|
+
forgejoRunner: ComposeServiceSpec;
|
|
112
|
+
clickhouse: ComposeServiceSpec;
|
|
113
|
+
postgres: ComposeServiceSpec;
|
|
114
|
+
};
|
|
115
|
+
/** The port variables, by service. */
|
|
116
|
+
portVars: Record<keyof HarnessPorts, string>;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/** A project name compose and the harness accept: lower case, digits, `-` and `_`, starting with a letter or digit. */
|
|
120
|
+
export function assertProjectName(project: string): void {
|
|
121
|
+
if (!/^[a-z0-9][a-z0-9_-]*$/.test(project)) throw new Error(`"${project}" is not a compose project name (lower case, digits, - and _)`);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function harnessStack(o: HarnessStackOptions): HarnessStack {
|
|
125
|
+
assertProjectName(o.project);
|
|
126
|
+
const p = o.project;
|
|
127
|
+
const prefix = o.envPrefix ?? "CHANT_E2E";
|
|
128
|
+
const key = o.networkKey ?? "harness";
|
|
129
|
+
const ports = { ...HARNESS_PORTS, ...o.ports };
|
|
130
|
+
const bind = o.bind === undefined ? "127.0.0.1" : o.bind;
|
|
131
|
+
const portVars: Record<keyof HarnessPorts, string> = {
|
|
132
|
+
floci: `${prefix}_FLOCI_PORT`,
|
|
133
|
+
forgejo: `${prefix}_FORGEJO_PORT`,
|
|
134
|
+
clickhouse: `${prefix}_CLICKHOUSE_PORT`,
|
|
135
|
+
postgres: `${prefix}_POSTGRES_PORT`,
|
|
136
|
+
};
|
|
137
|
+
const publish = (svc: keyof HarnessPorts, inner: number): string =>
|
|
138
|
+
`${bind ? `${bind}:` : ""}\${${portVars[svc]}:-${ports[svc]}}:${inner}`;
|
|
139
|
+
const on = (...aliases: string[]) => ({ [key]: { aliases } });
|
|
140
|
+
|
|
141
|
+
return {
|
|
142
|
+
project: p,
|
|
143
|
+
network: { name: p },
|
|
144
|
+
networkKey: key,
|
|
145
|
+
volumes: { forgejoData: { name: `${p}-forgejo-data` }, runnerData: { name: `${p}-runner-data` } },
|
|
146
|
+
portVars,
|
|
147
|
+
services: {
|
|
148
|
+
floci: {
|
|
149
|
+
image: o.flociImage ?? FLOCI_IMAGE,
|
|
150
|
+
container_name: `${p}-floci`,
|
|
151
|
+
ports: [publish("floci", 4566)],
|
|
152
|
+
networks: on("floci", "000000000000.floci"),
|
|
153
|
+
restart: "unless-stopped",
|
|
154
|
+
},
|
|
155
|
+
// sqlite and INSTALL_LOCK skip the web installer; the driver makes the
|
|
156
|
+
// admin and the people with Forgejo's own CLI.
|
|
157
|
+
forgejo: {
|
|
158
|
+
image: FORGEJO_IMAGE,
|
|
159
|
+
container_name: `${p}-forgejo`,
|
|
160
|
+
environment: {
|
|
161
|
+
FORGEJO__database__DB_TYPE: "sqlite3",
|
|
162
|
+
FORGEJO__security__INSTALL_LOCK: "true",
|
|
163
|
+
FORGEJO__server__DOMAIN: "forgejo",
|
|
164
|
+
FORGEJO__server__ROOT_URL: "http://forgejo:3000/",
|
|
165
|
+
FORGEJO__server__HTTP_PORT: "3000",
|
|
166
|
+
FORGEJO__server__DISABLE_SSH: "true",
|
|
167
|
+
FORGEJO__service__DISABLE_REGISTRATION: "true",
|
|
168
|
+
FORGEJO__actions__ENABLED: o.forgejoActions === false ? "false" : "true",
|
|
169
|
+
FORGEJO__repository__DEFAULT_BRANCH: "main",
|
|
170
|
+
FORGEJO__log__LEVEL: "warn",
|
|
171
|
+
},
|
|
172
|
+
ports: [publish("forgejo", 3000)],
|
|
173
|
+
volumes: ["forgejoData:/data"],
|
|
174
|
+
networks: on("forgejo"),
|
|
175
|
+
healthcheck: {
|
|
176
|
+
test: ["CMD", "wget", "--spider", "-q", "http://localhost:3000/api/v1/version"],
|
|
177
|
+
interval: "3s",
|
|
178
|
+
timeout: "3s",
|
|
179
|
+
retries: 40,
|
|
180
|
+
},
|
|
181
|
+
restart: "unless-stopped",
|
|
182
|
+
},
|
|
183
|
+
// The docker executor: one job container per job through the host's
|
|
184
|
+
// socket, on the project network (container.network in the config
|
|
185
|
+
// registerForgejoRunner writes). It waits for that config, since the
|
|
186
|
+
// runner's credentials come from Forgejo after it boots. Root, for the
|
|
187
|
+
// socket Docker Desktop mounts as root:root.
|
|
188
|
+
forgejoRunner: {
|
|
189
|
+
image: FORGEJO_RUNNER_IMAGE,
|
|
190
|
+
container_name: `${p}-forgejo-runner`,
|
|
191
|
+
user: "0:0",
|
|
192
|
+
depends_on: { forgejo: { condition: "service_healthy" } },
|
|
193
|
+
volumes: ["/var/run/docker.sock:/var/run/docker.sock", "runnerData:/data"],
|
|
194
|
+
working_dir: "/data",
|
|
195
|
+
command: [
|
|
196
|
+
"sh",
|
|
197
|
+
"-c",
|
|
198
|
+
`while [ ! -s ${RUNNER_CONFIG_PATH} ]; do sleep 1; done; exec forgejo-runner daemon -c ${RUNNER_CONFIG_PATH}`,
|
|
199
|
+
],
|
|
200
|
+
networks: on("forgejo-runner"),
|
|
201
|
+
restart: "unless-stopped",
|
|
202
|
+
},
|
|
203
|
+
clickhouse: {
|
|
204
|
+
image: CLICKHOUSE_IMAGE,
|
|
205
|
+
container_name: `${p}-clickhouse`,
|
|
206
|
+
profiles: [SQL_PROFILE],
|
|
207
|
+
environment: { CLICKHOUSE_SKIP_USER_SETUP: "1" },
|
|
208
|
+
ports: [publish("clickhouse", 8123)],
|
|
209
|
+
networks: on("clickhouse"),
|
|
210
|
+
healthcheck: { test: ["CMD", "wget", "--spider", "-q", "http://localhost:8123/ping"], interval: "2s", timeout: "3s", retries: 60 },
|
|
211
|
+
restart: "unless-stopped",
|
|
212
|
+
},
|
|
213
|
+
postgres: {
|
|
214
|
+
image: POSTGRES_IMAGE,
|
|
215
|
+
container_name: `${p}-postgres`,
|
|
216
|
+
profiles: [SQL_PROFILE],
|
|
217
|
+
environment: { POSTGRES_PASSWORD },
|
|
218
|
+
ports: [publish("postgres", 5432)],
|
|
219
|
+
networks: on("postgres"),
|
|
220
|
+
healthcheck: { test: ["CMD", "pg_isready", "-h", "127.0.0.1", "-U", "postgres"], interval: "2s", timeout: "3s", retries: 60 },
|
|
221
|
+
restart: "unless-stopped",
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/** The host URLs of a stack's services, from its port variables in `env` or the defaults. */
|
|
228
|
+
export function harnessUrls(
|
|
229
|
+
s: Pick<HarnessStack, "portVars">,
|
|
230
|
+
env: Record<string, string | undefined> = process.env,
|
|
231
|
+
defaults: HarnessPorts = HARNESS_PORTS,
|
|
232
|
+
): Record<keyof HarnessPorts, string> {
|
|
233
|
+
const port = (k: keyof HarnessPorts) => Number(env[s.portVars[k]] ?? defaults[k]);
|
|
234
|
+
return {
|
|
235
|
+
floci: `http://localhost:${port("floci")}`,
|
|
236
|
+
forgejo: `http://localhost:${port("forgejo")}`,
|
|
237
|
+
clickhouse: `http://localhost:${port("clickhouse")}`,
|
|
238
|
+
postgres: `postgres://postgres:${POSTGRES_PASSWORD}@localhost:${port("postgres")}/postgres`,
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export interface RunnerConfigOptions {
|
|
243
|
+
/** The project network every job container joins. */
|
|
244
|
+
network: string;
|
|
245
|
+
/** The runner's uuid and token, from POST /admin/actions/runners. */
|
|
246
|
+
uuid: string;
|
|
247
|
+
token: string;
|
|
248
|
+
/** The image the `docker` and `ubuntu-latest` labels run. */
|
|
249
|
+
jobImage: string;
|
|
250
|
+
/** Jobs at once. Default 4. */
|
|
251
|
+
capacity?: number;
|
|
252
|
+
/** Environment every job gets. Default floci's endpoint and test credentials. */
|
|
253
|
+
envs?: Record<string, string>;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/** What every job gets by default: AWS is floci, as a CI runner in a real account carries that account's credentials. */
|
|
257
|
+
export const RUNNER_JOB_ENV: Record<string, string> = {
|
|
258
|
+
AWS_ENDPOINT_URL: HARNESS_HOSTS.floci,
|
|
259
|
+
AWS_ACCESS_KEY_ID: "test",
|
|
260
|
+
AWS_SECRET_ACCESS_KEY: "test",
|
|
261
|
+
AWS_REGION: "us-east-1",
|
|
262
|
+
AWS_EC2_METADATA_DISABLED: "true",
|
|
263
|
+
};
|
|
264
|
+
|
|
265
|
+
const q = (s: string): string => JSON.stringify(s);
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* forgejo-runner's config (Forgejo 16, runner 13): the server connection by
|
|
269
|
+
* uuid and token, the job containers on the project network, no host
|
|
270
|
+
* mounts, and floci for AWS.
|
|
271
|
+
*/
|
|
272
|
+
export function forgejoRunnerConfig(o: RunnerConfigOptions): string {
|
|
273
|
+
const envs = o.envs ?? RUNNER_JOB_ENV;
|
|
274
|
+
return [
|
|
275
|
+
"log:",
|
|
276
|
+
" level: info",
|
|
277
|
+
" job_level: info",
|
|
278
|
+
"runner:",
|
|
279
|
+
" file: /data/.runner",
|
|
280
|
+
` capacity: ${o.capacity ?? 4}`,
|
|
281
|
+
" timeout: 30m",
|
|
282
|
+
" shutdown_timeout: 0s",
|
|
283
|
+
" fetch_interval: 1s",
|
|
284
|
+
" report_interval: 1s",
|
|
285
|
+
" envs:",
|
|
286
|
+
...Object.entries(envs).map(([k, v]) => ` ${k}: ${q(v)}`),
|
|
287
|
+
" labels:",
|
|
288
|
+
` - ${q(`docker:docker://${o.jobImage}`)}`,
|
|
289
|
+
` - ${q(`ubuntu-latest:docker://${o.jobImage}`)}`,
|
|
290
|
+
"cache:",
|
|
291
|
+
" enabled: false",
|
|
292
|
+
"container:",
|
|
293
|
+
` network: ${q(o.network)}`,
|
|
294
|
+
" privileged: false",
|
|
295
|
+
" valid_volumes: []",
|
|
296
|
+
' docker_host: "-"',
|
|
297
|
+
" force_pull: false",
|
|
298
|
+
"server:",
|
|
299
|
+
" connections:",
|
|
300
|
+
" forgejo:",
|
|
301
|
+
" url: http://forgejo:3000/",
|
|
302
|
+
` uuid: ${q(o.uuid)}`,
|
|
303
|
+
` token: ${q(o.token)}`,
|
|
304
|
+
"",
|
|
305
|
+
].join("\n");
|
|
306
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-step time limits of the harness's driver (chant#4587), from the fan-out
|
|
3
|
+
* demo's steps.ts LIMITS. Past its limit a step stalls the run, and a stalled
|
|
4
|
+
* run is neither a pass nor a caught break.
|
|
5
|
+
*/
|
|
6
|
+
import type { ScenarioStepKind } from "./schemas/index";
|
|
7
|
+
|
|
8
|
+
/** Seconds each kind of step may take by default. */
|
|
9
|
+
export const HARNESS_LIMITS: Record<ScenarioStepKind, number> = {
|
|
10
|
+
/** The branch push and the pull request open. */
|
|
11
|
+
open: 60,
|
|
12
|
+
"open-concurrent": 60,
|
|
13
|
+
/** pr-plan.json at the head, from the push. */
|
|
14
|
+
plan: 600,
|
|
15
|
+
/** The forge review and chant approve. */
|
|
16
|
+
approve: 120,
|
|
17
|
+
/** The merge and its merge commit. */
|
|
18
|
+
merge: 60,
|
|
19
|
+
/** pr-apply.json at the merge commit, from the merge. */
|
|
20
|
+
apply: 900,
|
|
21
|
+
/** A command run out of band. */
|
|
22
|
+
"out-of-band": 600,
|
|
23
|
+
/** Finding and killing a running job. */
|
|
24
|
+
"kill-job": 120,
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/** A scenario's limits over the defaults. */
|
|
28
|
+
export function limitsFor(over: Partial<Record<ScenarioStepKind, number>> = {}): Record<ScenarioStepKind, number> {
|
|
29
|
+
return { ...HARNESS_LIMITS, ...over };
|
|
30
|
+
}
|
package/src/engine-facts.test.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { describe, it, expect } from "vitest";
|
|
|
3
3
|
import { buildGraphIr, buildLiveGraphIr, entityFacts, sourceOverlayGraphs, type GraphIR, type LiveObservation } from "./graph-ir";
|
|
4
4
|
import { DECLARABLE_MARKER, type Declarable } from "./declarable";
|
|
5
5
|
import { ENGINE_FACTS_FLOOR, type EngineFacts } from "./engine-facts";
|
|
6
|
-
import { NEXT_RELEASE } from "./release-floors";
|
|
7
6
|
|
|
8
7
|
const facts: EngineFacts = {
|
|
9
8
|
ownership: "bound",
|
|
@@ -172,7 +171,7 @@ describe("buildGraphIr: an entity's facts and reference grain (#4529)", () => {
|
|
|
172
171
|
]);
|
|
173
172
|
});
|
|
174
173
|
|
|
175
|
-
it("names its floor as
|
|
176
|
-
expect(ENGINE_FACTS_FLOOR).toBe(
|
|
174
|
+
it("names its floor as 0.124.54, where it shipped", () => {
|
|
175
|
+
expect(ENGINE_FACTS_FLOOR).toBe("0.124.54");
|
|
177
176
|
});
|
|
178
177
|
});
|
package/src/engine-facts.ts
CHANGED
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
* types and ./lifecycle/index-document.ts (`npm run generate:graph-schema`).
|
|
18
18
|
*/
|
|
19
19
|
import type { GraphIR } from "./graph-ir";
|
|
20
|
-
import { NEXT_RELEASE } from "./release-floors";
|
|
21
20
|
|
|
22
21
|
/** The format of {@link EngineGraphMeta}. Moves only for a change a reader could not ignore. */
|
|
23
22
|
export const ENGINE_GRAPH_FORMAT = 1;
|
|
@@ -32,7 +31,7 @@ export const ENGINE_GRAPH_FORMAT = 1;
|
|
|
32
31
|
* engine side's floor for the terraform read is that lexicon's
|
|
33
32
|
* `MIN_CHOUDOUFU_GRAPH_VERSION`.
|
|
34
33
|
*/
|
|
35
|
-
export const ENGINE_FACTS_FLOOR =
|
|
34
|
+
export const ENGINE_FACTS_FLOOR = "0.124.54";
|
|
36
35
|
|
|
37
36
|
/** The marker values an engine read or recorded for one node. */
|
|
38
37
|
export interface EngineMarkers {
|