@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,307 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The control repo's entries (#4568): its projects and its shared defaults,
|
|
3
|
+
* as `control-entry` records on the control repo's workspace ledger.
|
|
4
|
+
*
|
|
5
|
+
* terragucci kept these as `chant workspace records` files committed to the
|
|
6
|
+
* control repo (packages/terragucci/src/control-records.ts at 18f6431595).
|
|
7
|
+
* Under the ci-products ruling (records go on the ledger, never product git
|
|
8
|
+
* writes; #4551) they are lines of `_control/entries.jsonl` on the control
|
|
9
|
+
* repo's `chant/lifecycle` branch, appended through the same git layer every
|
|
10
|
+
* other ledger here uses, under the member prefix of the directory they are
|
|
11
|
+
* written from.
|
|
12
|
+
*
|
|
13
|
+
* The file is a log. Each line is one version of one entry: a project's
|
|
14
|
+
* (`entry: project`, `project: <host>/<owner>/<name>`) or the defaults'
|
|
15
|
+
* (`entry: defaults`). An entry's current version is its newest line; a
|
|
16
|
+
* `retired` version closes it, and a project that comes back gets a new id.
|
|
17
|
+
* Each line names the digest of the version it replaces (`prev`), so a write
|
|
18
|
+
* that raced another is refused rather than lost, as terragucci's `amend
|
|
19
|
+
* --expect` refused it, and a reader finds a broken chain.
|
|
20
|
+
*
|
|
21
|
+
* What an entry's `settings` hold is the product's: chant checks the shape
|
|
22
|
+
* of the record, and the product passes a `validate` that checks its
|
|
23
|
+
* settings the way its config would.
|
|
24
|
+
*
|
|
25
|
+
* Neither write pushes: call `pushLifecycleReport` after, the two-step shape
|
|
26
|
+
* every ledger here uses.
|
|
27
|
+
*/
|
|
28
|
+
import { createHash } from "node:crypto";
|
|
29
|
+
import { parseProjectKey } from "./dispatch.js";
|
|
30
|
+
/** The ledger directory and file the entries are kept in. */
|
|
31
|
+
export const CONTROL_LEDGER_DIR = "_control";
|
|
32
|
+
export const CONTROL_LEDGER_FILE = "entries.jsonl";
|
|
33
|
+
/** The record kind, as each line names it. */
|
|
34
|
+
export const CONTROL_ENTRY_KIND = "control-entry";
|
|
35
|
+
/** The prefix of an entry's id: `ctl-001`. */
|
|
36
|
+
export const CONTROL_ID_PREFIX = "ctl";
|
|
37
|
+
export const CONTROL_ENTRY_KINDS = ["project", "defaults"];
|
|
38
|
+
/** Records the control repo's entries are wrong in; `problems` lists each one. */
|
|
39
|
+
export class ControlRecordsError extends Error {
|
|
40
|
+
constructor(message, problems = [message]) {
|
|
41
|
+
super(message);
|
|
42
|
+
this.problems = problems;
|
|
43
|
+
this.name = "ControlRecordsError";
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
/** A write refused because the entry changed since it was read. */
|
|
47
|
+
export class ControlEntryConflict extends ControlRecordsError {
|
|
48
|
+
constructor(message) {
|
|
49
|
+
super(message);
|
|
50
|
+
this.name = "ControlEntryConflict";
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function canonical(v) {
|
|
54
|
+
if (Array.isArray(v))
|
|
55
|
+
return v.map(canonical);
|
|
56
|
+
if (v && typeof v === "object")
|
|
57
|
+
return Object.fromEntries(Object.keys(v).sort().map((k) => [k, canonical(v[k])]));
|
|
58
|
+
return v;
|
|
59
|
+
}
|
|
60
|
+
/** The digest of a record: sha256 over the canonical JSON of every field but `digest`. */
|
|
61
|
+
export function controlEntryDigest(record) {
|
|
62
|
+
const { digest: _drop, ...rest } = record;
|
|
63
|
+
return `sha256:${createHash("sha256").update(JSON.stringify(canonical(rest))).digest("hex")}`;
|
|
64
|
+
}
|
|
65
|
+
const ID = new RegExp(`^${CONTROL_ID_PREFIX}-[0-9]{3,}$`);
|
|
66
|
+
/** The problems with one parsed line, or [] when it is a record. */
|
|
67
|
+
export function controlEntryRecordProblems(v) {
|
|
68
|
+
if (typeof v !== "object" || v === null || Array.isArray(v))
|
|
69
|
+
return ["not an object"];
|
|
70
|
+
const r = v;
|
|
71
|
+
const out = [];
|
|
72
|
+
if (r.version !== 1)
|
|
73
|
+
out.push("version must be 1");
|
|
74
|
+
if (r.kind !== CONTROL_ENTRY_KIND)
|
|
75
|
+
out.push(`kind must be ${CONTROL_ENTRY_KIND}`);
|
|
76
|
+
if (!(typeof r.id === "string" && ID.test(r.id)))
|
|
77
|
+
out.push(`id must be ${CONTROL_ID_PREFIX}-<three digits or more>`);
|
|
78
|
+
if (!CONTROL_ENTRY_KINDS.includes(r.entry))
|
|
79
|
+
out.push("entry must be project or defaults");
|
|
80
|
+
if (r.entry === "project" && !(typeof r.project === "string" && r.project.length > 0))
|
|
81
|
+
out.push("a project entry names its project");
|
|
82
|
+
if (r.entry === "defaults" && r.project !== null)
|
|
83
|
+
out.push("the defaults name no project");
|
|
84
|
+
if (r.state !== "active" && r.state !== "retired")
|
|
85
|
+
out.push("state must be active or retired");
|
|
86
|
+
if (typeof r.settings !== "object" || r.settings === null || Array.isArray(r.settings))
|
|
87
|
+
out.push("settings must be an object");
|
|
88
|
+
if (!(Array.isArray(r.estates) && r.estates.every((e) => typeof e === "string" && e.length > 0) && new Set(r.estates).size === r.estates.length))
|
|
89
|
+
out.push("estates must be distinct names");
|
|
90
|
+
if (r.entry === "defaults" && Array.isArray(r.estates) && r.estates.length > 0)
|
|
91
|
+
out.push("the defaults own no estates");
|
|
92
|
+
if (!(typeof r.product === "string" && r.product.length > 0))
|
|
93
|
+
out.push("product must name the product that wrote it");
|
|
94
|
+
if (!(typeof r.at === "string" && !Number.isNaN(Date.parse(r.at))))
|
|
95
|
+
out.push("at must be a time");
|
|
96
|
+
if (r.by !== undefined && typeof r.by !== "string")
|
|
97
|
+
out.push("by must be a string");
|
|
98
|
+
if (!(r.prev === null || typeof r.prev === "string"))
|
|
99
|
+
out.push("prev must be a digest or null");
|
|
100
|
+
if (typeof r.digest !== "string")
|
|
101
|
+
out.push("digest is missing");
|
|
102
|
+
else if (out.length === 0 && controlEntryDigest(r) !== r.digest)
|
|
103
|
+
out.push("digest does not match the record");
|
|
104
|
+
return out;
|
|
105
|
+
}
|
|
106
|
+
/** Every line of the file, each a record or the problems that kept it out. */
|
|
107
|
+
export function parseControlEntries(text) {
|
|
108
|
+
const records = [];
|
|
109
|
+
const malformed = [];
|
|
110
|
+
(text ?? "").split("\n").forEach((raw, i) => {
|
|
111
|
+
if (!raw.trim())
|
|
112
|
+
return;
|
|
113
|
+
let v;
|
|
114
|
+
try {
|
|
115
|
+
v = JSON.parse(raw);
|
|
116
|
+
}
|
|
117
|
+
catch {
|
|
118
|
+
malformed.push({ line: i + 1, problems: ["not JSON"] });
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
const problems = controlEntryRecordProblems(v);
|
|
122
|
+
if (problems.length > 0)
|
|
123
|
+
malformed.push({ line: i + 1, problems });
|
|
124
|
+
else
|
|
125
|
+
records.push(v);
|
|
126
|
+
});
|
|
127
|
+
return { records, malformed };
|
|
128
|
+
}
|
|
129
|
+
/** The key an entry is one of: its project, or `defaults`. */
|
|
130
|
+
function keyOf(r) {
|
|
131
|
+
return r.entry === "defaults" ? "defaults" : r.project;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Each entry's current version from the log, oldest first: the newest line
|
|
135
|
+
* of each id, left out when it is retired. A version whose `prev` is not the
|
|
136
|
+
* digest of the one before it, or two active ids for one project (or for
|
|
137
|
+
* the defaults), is a problem.
|
|
138
|
+
*/
|
|
139
|
+
export function currentControlEntries(records) {
|
|
140
|
+
const problems = [];
|
|
141
|
+
const newest = new Map();
|
|
142
|
+
for (const r of records) {
|
|
143
|
+
const before = newest.get(r.id);
|
|
144
|
+
if ((before?.digest ?? null) !== r.prev)
|
|
145
|
+
problems.push(`${r.id} at ${r.at} replaces ${r.prev ?? "nothing"}, but its version before was ${before?.digest ?? "none"}`);
|
|
146
|
+
if (before && keyOf(before) !== keyOf(r))
|
|
147
|
+
problems.push(`${r.id} moved from ${keyOf(before)} to ${keyOf(r)}; an id keeps its project`);
|
|
148
|
+
newest.set(r.id, r);
|
|
149
|
+
}
|
|
150
|
+
const entries = [];
|
|
151
|
+
const byKey = new Map();
|
|
152
|
+
for (const r of newest.values()) {
|
|
153
|
+
if (r.state === "retired")
|
|
154
|
+
continue;
|
|
155
|
+
const key = keyOf(r);
|
|
156
|
+
const prior = byKey.get(key);
|
|
157
|
+
if (prior)
|
|
158
|
+
problems.push(`${key} has two active entries, ${prior} and ${r.id}; retire one`);
|
|
159
|
+
else
|
|
160
|
+
byKey.set(key, r.id);
|
|
161
|
+
if (r.entry === "project") {
|
|
162
|
+
try {
|
|
163
|
+
parseProjectKey(r.project);
|
|
164
|
+
}
|
|
165
|
+
catch (e) {
|
|
166
|
+
problems.push(`${r.id}: ${e.message}`);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
entries.push({
|
|
170
|
+
id: r.id,
|
|
171
|
+
entry: r.entry,
|
|
172
|
+
...(r.project !== null ? { project: r.project } : {}),
|
|
173
|
+
settings: r.settings,
|
|
174
|
+
estates: r.estates,
|
|
175
|
+
digest: r.digest,
|
|
176
|
+
at: r.at,
|
|
177
|
+
...(r.by !== undefined ? { by: r.by } : {}),
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
return { entries, problems };
|
|
181
|
+
}
|
|
182
|
+
/** The control repo's `_control/entries.jsonl` on its local `chant/lifecycle`, under the member prefix of `cwd`. */
|
|
183
|
+
export function gitControlLedger(opts = {}) {
|
|
184
|
+
return {
|
|
185
|
+
async read() {
|
|
186
|
+
const { readBlobFromPath } = await import("../lifecycle/git.js");
|
|
187
|
+
return readBlobFromPath(CONTROL_LEDGER_DIR, CONTROL_LEDGER_FILE, opts);
|
|
188
|
+
},
|
|
189
|
+
async append(line, message) {
|
|
190
|
+
const { appendLedgerLine } = await import("../lifecycle/git.js");
|
|
191
|
+
return appendLedgerLine(CONTROL_LEDGER_DIR, CONTROL_LEDGER_FILE, line, message, opts);
|
|
192
|
+
},
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
/** The control repo's current entries, each checked. A problem anywhere refuses the read, unless `lenient`. */
|
|
196
|
+
export async function readControlEntries(port, opts = {}) {
|
|
197
|
+
const { records, malformed } = parseControlEntries(await port.read());
|
|
198
|
+
const { entries, problems } = currentControlEntries(records);
|
|
199
|
+
const all = [...malformed.map((m) => `${CONTROL_LEDGER_DIR}/${CONTROL_LEDGER_FILE}:${m.line}: ${m.problems.join(", ")}`), ...problems];
|
|
200
|
+
if (opts.validate)
|
|
201
|
+
for (const e of entries)
|
|
202
|
+
for (const p of opts.validate(e.entry, e.project, e.settings))
|
|
203
|
+
all.push(`${e.id} (${e.project ?? "defaults"}): ${p}`);
|
|
204
|
+
if (all.length > 0 && !opts.lenient)
|
|
205
|
+
throw new ControlRecordsError(`the control repo's entries have ${all.length} problem(s):\n ${all.join("\n ")}`, all);
|
|
206
|
+
return entries;
|
|
207
|
+
}
|
|
208
|
+
/** The entries as a product's control config holds them: the defaults, and each project's settings by key. */
|
|
209
|
+
export function controlConfig(entries) {
|
|
210
|
+
const defaults = entries.find((e) => e.entry === "defaults");
|
|
211
|
+
const projects = {};
|
|
212
|
+
for (const e of entries.filter((x) => x.entry === "project").sort((a, b) => a.project.localeCompare(b.project)))
|
|
213
|
+
projects[e.project] = e.settings;
|
|
214
|
+
return { ...(defaults ? { defaults: defaults.settings } : {}), projects };
|
|
215
|
+
}
|
|
216
|
+
/** Who claims each estate in the entries: estate name to project keys. Read at each plan; nothing is kept between plans. */
|
|
217
|
+
export function estateClaims(entries) {
|
|
218
|
+
const claims = new Map();
|
|
219
|
+
for (const e of entries) {
|
|
220
|
+
if (e.entry !== "project")
|
|
221
|
+
continue;
|
|
222
|
+
for (const estate of e.estates)
|
|
223
|
+
claims.set(estate, [...(claims.get(estate) ?? []), e.project]);
|
|
224
|
+
}
|
|
225
|
+
return claims;
|
|
226
|
+
}
|
|
227
|
+
const same = (a, b) => JSON.stringify(canonical(a)) === JSON.stringify(canonical(b));
|
|
228
|
+
function nextId(records) {
|
|
229
|
+
const n = records.reduce((max, r) => Math.max(max, Number(r.id.slice(CONTROL_ID_PREFIX.length + 1))), 0) + 1;
|
|
230
|
+
return `${CONTROL_ID_PREFIX}-${String(n).padStart(3, "0")}`;
|
|
231
|
+
}
|
|
232
|
+
async function writeVersion(port, fields, opts, message) {
|
|
233
|
+
const record = { ...fields, digest: controlEntryDigest(fields) };
|
|
234
|
+
const problems = controlEntryRecordProblems(record);
|
|
235
|
+
if (problems.length > 0)
|
|
236
|
+
throw new ControlRecordsError(`not a control entry: ${problems.join(", ")}`, problems);
|
|
237
|
+
if (opts.dryRun)
|
|
238
|
+
return { record };
|
|
239
|
+
return { record, commit: await port.append(JSON.stringify(record), message) };
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Creates the project's (or the defaults') entry, or writes a new version
|
|
243
|
+
* of the active one. With `expect`, a current version whose digest differs
|
|
244
|
+
* is refused ({@link ControlEntryConflict}). `estates` left out keeps the
|
|
245
|
+
* entry's.
|
|
246
|
+
*/
|
|
247
|
+
export async function putControlEntry(port, want, opts) {
|
|
248
|
+
if (want.entry === "project" && !want.project)
|
|
249
|
+
throw new ControlRecordsError("a project entry needs the project's key");
|
|
250
|
+
if (want.entry === "defaults" && (want.project || want.estates?.length))
|
|
251
|
+
throw new ControlRecordsError("the defaults take no project key and own no estates");
|
|
252
|
+
if (want.entry === "project")
|
|
253
|
+
parseProjectKey(want.project);
|
|
254
|
+
const problems = opts.validate?.(want.entry, want.project, want.settings) ?? [];
|
|
255
|
+
if (problems.length > 0)
|
|
256
|
+
throw new ControlRecordsError(`${want.project ?? "defaults"}: ${problems.join("; ")}`, problems);
|
|
257
|
+
const { records, malformed } = parseControlEntries(await port.read());
|
|
258
|
+
if (malformed.length > 0)
|
|
259
|
+
throw new ControlRecordsError(`the control repo's entries have malformed lines (${malformed.map((m) => m.line).join(", ")}); fix them before writing`);
|
|
260
|
+
const { entries } = currentControlEntries(records);
|
|
261
|
+
const key = want.entry === "defaults" ? "defaults" : want.project;
|
|
262
|
+
const current = entries.find((e) => (want.entry === "defaults" ? e.entry === "defaults" : e.project === want.project));
|
|
263
|
+
if (opts.expect !== undefined && opts.expect !== (current?.digest ?? "")) {
|
|
264
|
+
throw new ControlEntryConflict(`${key} changed since it was read (now ${current?.digest ?? "absent"}, read at ${opts.expect || "absent"}); read it again`);
|
|
265
|
+
}
|
|
266
|
+
const at = (opts.now ?? (() => new Date()))().toISOString();
|
|
267
|
+
const base = { version: 1, kind: CONTROL_ENTRY_KIND, product: opts.product, at, ...(opts.by !== undefined ? { by: opts.by } : {}) };
|
|
268
|
+
if (!current) {
|
|
269
|
+
const out = await writeVersion(port, { ...base, id: nextId(records), entry: want.entry, project: want.project ?? null, state: "active", settings: want.settings, estates: want.estates ?? [], prev: null }, opts, `Control entry ${key} created`);
|
|
270
|
+
return { id: out.record.id, status: "created", ...out };
|
|
271
|
+
}
|
|
272
|
+
const estates = want.estates ?? current.estates;
|
|
273
|
+
if (same(current.settings, want.settings) && same(current.estates, estates))
|
|
274
|
+
return { id: current.id, status: "unchanged" };
|
|
275
|
+
const out = await writeVersion(port, { ...base, id: current.id, entry: current.entry, project: current.project ?? null, state: "active", settings: want.settings, estates, prev: current.digest }, opts, `Control entry ${key} updated`);
|
|
276
|
+
return { id: current.id, status: "updated", ...out };
|
|
277
|
+
}
|
|
278
|
+
/** Retires a project's active entry: the closed state, so the project is no longer read. */
|
|
279
|
+
export async function retireControlEntry(port, project, opts) {
|
|
280
|
+
const { records } = parseControlEntries(await port.read());
|
|
281
|
+
const current = currentControlEntries(records).entries.find((e) => e.project === project);
|
|
282
|
+
if (!current)
|
|
283
|
+
throw new ControlRecordsError(`no active entry for ${project} in the control repo`);
|
|
284
|
+
if (opts.expect !== undefined && opts.expect !== current.digest)
|
|
285
|
+
throw new ControlEntryConflict(`${project} changed since it was read; read it again`);
|
|
286
|
+
const at = (opts.now ?? (() => new Date()))().toISOString();
|
|
287
|
+
const out = await writeVersion(port, { version: 1, kind: CONTROL_ENTRY_KIND, id: current.id, entry: "project", project, state: "retired", settings: current.settings, estates: current.estates, product: opts.product, at, ...(opts.by !== undefined ? { by: opts.by } : {}), prev: current.digest }, opts, `Control entry ${project} retired`);
|
|
288
|
+
return { id: current.id, status: "retired", ...out };
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Writes a control config (the defaults and each project's settings) as
|
|
292
|
+
* entries: one per project and one for the defaults. Moves a control repo
|
|
293
|
+
* off a config file, or off terragucci's record files, onto the ledger.
|
|
294
|
+
*/
|
|
295
|
+
export async function importControlConfig(port, config, opts) {
|
|
296
|
+
if (Object.keys(config.projects).length === 0)
|
|
297
|
+
throw new ControlRecordsError("only a control repo's config, which lists projects, becomes entries");
|
|
298
|
+
const out = [];
|
|
299
|
+
const { expect: _one, ...each } = opts;
|
|
300
|
+
if (config.defaults)
|
|
301
|
+
out.push({ entry: "defaults", ...(await putControlEntry(port, { entry: "defaults", settings: config.defaults }, each)) });
|
|
302
|
+
for (const [project, settings] of Object.entries(config.projects)) {
|
|
303
|
+
const estates = config.estates?.[project];
|
|
304
|
+
out.push({ entry: project, ...(await putControlEntry(port, { entry: "project", project, settings, ...(estates ? { estates } : {}) }, each)) });
|
|
305
|
+
}
|
|
306
|
+
return out;
|
|
307
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../../../src/discovery/sandbox/bundle.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../../../src/discovery/sandbox/bundle.ts"],"names":[],"mappings":"AAmNA,MAAM,WAAW,YAAY;IAC3B,uSAAuS;IACvS,UAAU,EAAE,MAAM,CAAC;IACnB,kJAAkJ;IAClJ,SAAS,EAAE,MAAM,CAAC;IAClB,uQAAuQ;IACvQ,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,uGAAuG;IACvG,UAAU,EAAE,MAAM,CAAC;IACnB,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,wBAAsB,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAiC9E"}
|
|
@@ -4,6 +4,7 @@ import { createRequire } from "node:module";
|
|
|
4
4
|
import { tmpdir } from "node:os";
|
|
5
5
|
import { dirname, join, resolve as resolvePath } from "node:path";
|
|
6
6
|
import { SOURCE_EXPORT_CONDITIONS } from "../../module-source.js";
|
|
7
|
+
import { chantPackageSourceTarget } from "../../ts-loader.js";
|
|
7
8
|
/**
|
|
8
9
|
* chant #1045 Phase 2 — bundles the generated sandbox driver (`./driver.ts`)
|
|
9
10
|
* into one self-contained ESM file with esbuild, so the sandboxed child never
|
|
@@ -182,6 +183,29 @@ function externalTrustedPackagesPlugin() {
|
|
|
182
183
|
};
|
|
183
184
|
return { plugin, readPaths };
|
|
184
185
|
}
|
|
186
|
+
/**
|
|
187
|
+
* chant#4591: chant core's exports give an ESM import its compiled
|
|
188
|
+
* `dist/*.js` (the `import` condition), so a product can load the installed
|
|
189
|
+
* chant under plain Node. esbuild always matches `import`. The driver names
|
|
190
|
+
* chant's own modules by their `src/*.ts` path (`chantSourceDir`), so a
|
|
191
|
+
* project's or a compiled lexicon's import of `@intentius/chant` has to land
|
|
192
|
+
* on that same source, or the bundle carries a second copy of core with its
|
|
193
|
+
* own registries and classes. Lexicons are left alone: they bundle from the
|
|
194
|
+
* `dist/*.js` they ship, as before.
|
|
195
|
+
*/
|
|
196
|
+
function chantCoreSourcePlugin() {
|
|
197
|
+
return {
|
|
198
|
+
name: "chant-sandbox-core-source",
|
|
199
|
+
setup(build) {
|
|
200
|
+
build.onResolve({ filter: /^@intentius\/chant(?:\/.*)?$/ }, (args) => {
|
|
201
|
+
if (!args.importer)
|
|
202
|
+
return undefined;
|
|
203
|
+
const target = chantPackageSourceTarget(args.path, args.importer);
|
|
204
|
+
return target === undefined ? undefined : { path: target };
|
|
205
|
+
});
|
|
206
|
+
},
|
|
207
|
+
};
|
|
208
|
+
}
|
|
185
209
|
/**
|
|
186
210
|
* Bundle `driverSource` (see {@link import("./driver.js").generateDriverSource})
|
|
187
211
|
* into a single self-contained ESM file.
|
|
@@ -207,7 +231,7 @@ export async function bundleDriver(driverSource) {
|
|
|
207
231
|
// Setting `conditions` replaces esbuild's default ["module"], so it is
|
|
208
232
|
// kept, and compiled the option is left out as before.
|
|
209
233
|
...(SOURCE_EXPORT_CONDITIONS.length > 0 ? { conditions: ["module", ...SOURCE_EXPORT_CONDITIONS] } : {}),
|
|
210
|
-
plugins: [plugin],
|
|
234
|
+
plugins: [chantCoreSourcePlugin(), plugin],
|
|
211
235
|
});
|
|
212
236
|
}
|
|
213
237
|
catch (err) {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A bucket, for real: one bucket in the harness's floci, path-style S3 over
|
|
3
|
+
* http (chant#4587, from the fan-out demo's lib/bucket.ts). floci takes
|
|
4
|
+
* unsigned requests, so the driver needs no AWS CLI on the host. chant's
|
|
5
|
+
* reports under `--report-url` are read from here.
|
|
6
|
+
*/
|
|
7
|
+
import type { Bucket } from "./ports.js";
|
|
8
|
+
export declare class FlociBucket implements Bucket {
|
|
9
|
+
private readonly endpoint;
|
|
10
|
+
private readonly bucket;
|
|
11
|
+
/** `endpoint` is floci as the driver reaches it, http://localhost:<port>. */
|
|
12
|
+
constructor(endpoint: string, bucket: string);
|
|
13
|
+
private url;
|
|
14
|
+
/** The bucket itself. An existing one is kept. */
|
|
15
|
+
create(): Promise<void>;
|
|
16
|
+
get(key: string): Promise<string | null>;
|
|
17
|
+
put(key: string, body: string, contentType: string): Promise<void>;
|
|
18
|
+
list(prefix: string): Promise<string[]>;
|
|
19
|
+
delete(key: string): Promise<void>;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=bucket.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bucket.d.ts","sourceRoot":"","sources":["../../src/e2e-harness/bucket.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAItC,qBAAa,WAAY,YAAW,MAAM;IAGtC,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAHzB,6EAA6E;IAC7E,YACmB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EAC7B;IAEJ,OAAO,CAAC,GAAG;IAIX,kDAAkD;IAC5C,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAG5B;IAEK,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAK7C;IAEK,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAQvE;IAEK,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAc5C;IAEK,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGvC;CACF"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
const TIMEOUT_MS = 30000;
|
|
2
|
+
export class FlociBucket {
|
|
3
|
+
/** `endpoint` is floci as the driver reaches it, http://localhost:<port>. */
|
|
4
|
+
constructor(endpoint, bucket) {
|
|
5
|
+
this.endpoint = endpoint;
|
|
6
|
+
this.bucket = bucket;
|
|
7
|
+
}
|
|
8
|
+
url(key = "") {
|
|
9
|
+
return `${this.endpoint.replace(/\/$/, "")}/${this.bucket}${key ? `/${key.split("/").map(encodeURIComponent).join("/")}` : ""}`;
|
|
10
|
+
}
|
|
11
|
+
/** The bucket itself. An existing one is kept. */
|
|
12
|
+
async create() {
|
|
13
|
+
const res = await fetch(this.url(), { method: "PUT", signal: AbortSignal.timeout(TIMEOUT_MS) });
|
|
14
|
+
if (!res.ok && res.status !== 409)
|
|
15
|
+
throw new Error(`floci PUT ${this.bucket} answered ${res.status}`);
|
|
16
|
+
}
|
|
17
|
+
async get(key) {
|
|
18
|
+
const res = await fetch(this.url(key), { signal: AbortSignal.timeout(TIMEOUT_MS) });
|
|
19
|
+
if (res.status === 404 || res.status === 403)
|
|
20
|
+
return null;
|
|
21
|
+
if (!res.ok)
|
|
22
|
+
throw new Error(`floci GET ${key} answered ${res.status}`);
|
|
23
|
+
return res.text();
|
|
24
|
+
}
|
|
25
|
+
async put(key, body, contentType) {
|
|
26
|
+
const res = await fetch(this.url(key), {
|
|
27
|
+
method: "PUT",
|
|
28
|
+
headers: { "content-type": contentType },
|
|
29
|
+
body,
|
|
30
|
+
signal: AbortSignal.timeout(TIMEOUT_MS),
|
|
31
|
+
});
|
|
32
|
+
if (!res.ok)
|
|
33
|
+
throw new Error(`floci PUT ${key} answered ${res.status}`);
|
|
34
|
+
}
|
|
35
|
+
async list(prefix) {
|
|
36
|
+
const keys = [];
|
|
37
|
+
let token;
|
|
38
|
+
for (;;) {
|
|
39
|
+
const q = new URLSearchParams({ "list-type": "2", prefix, ...(token ? { "continuation-token": token } : {}) });
|
|
40
|
+
const res = await fetch(`${this.url()}?${q.toString()}`, { signal: AbortSignal.timeout(TIMEOUT_MS) });
|
|
41
|
+
if (!res.ok)
|
|
42
|
+
throw new Error(`floci list ${prefix} answered ${res.status}`);
|
|
43
|
+
const xml = await res.text();
|
|
44
|
+
for (const m of xml.matchAll(/<Key>([^<]*)<\/Key>/g))
|
|
45
|
+
keys.push(decodeXml(m[1]));
|
|
46
|
+
const next = /<NextContinuationToken>([^<]*)<\/NextContinuationToken>/.exec(xml)?.[1];
|
|
47
|
+
if (!next || !/<IsTruncated>true<\/IsTruncated>/.test(xml))
|
|
48
|
+
break;
|
|
49
|
+
token = decodeXml(next);
|
|
50
|
+
}
|
|
51
|
+
return keys;
|
|
52
|
+
}
|
|
53
|
+
async delete(key) {
|
|
54
|
+
const res = await fetch(this.url(key), { method: "DELETE", signal: AbortSignal.timeout(TIMEOUT_MS) });
|
|
55
|
+
if (!res.ok && res.status !== 404)
|
|
56
|
+
throw new Error(`floci DELETE ${key} answered ${res.status}`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function decodeXml(s) {
|
|
60
|
+
return s.replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'").replace(/&/g, "&");
|
|
61
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The claim row protocol (chant#4587), terragucci's: one claim, a plain run
|
|
3
|
+
* that must pass, a BREAK=1 run that must be caught, one row. A row records
|
|
4
|
+
* the product and its commit, the engine binary and version, the floci
|
|
5
|
+
* digest, the date and both verdicts.
|
|
6
|
+
*
|
|
7
|
+
* Following the ledger ruling (chant#4551), the run is a ledger record: op
|
|
8
|
+
* `e2e-claim`, the row as its `claim` outcome, one phase per arm. A
|
|
9
|
+
* product's page reads e2e-claims/v1, rendered from those records with the
|
|
10
|
+
* newest row per scenario and claim. Recording goes through ./safe-run.ts's
|
|
11
|
+
* `recordClaimRow`, which refuses a run whose scan was not CLEAN.
|
|
12
|
+
*/
|
|
13
|
+
import type { OpRunRecord, OpRunRecordInput } from "../op/runtime.js";
|
|
14
|
+
import type { RunOrigin } from "../lifecycle/release-ledger.js";
|
|
15
|
+
import type { ClaimRun } from "./driver.js";
|
|
16
|
+
import { type BreakVerdict, type ClaimRow, type ClaimsDoc, type PlainVerdict, type Scenario } from "./schemas/index.js";
|
|
17
|
+
/** The op every claim run is recorded under. */
|
|
18
|
+
export declare const CLAIM_OP = "e2e-claim";
|
|
19
|
+
export interface ClaimRowInput {
|
|
20
|
+
scenario: Pick<Scenario, "id" | "product" | "claim">;
|
|
21
|
+
productCommit: string;
|
|
22
|
+
engine: {
|
|
23
|
+
binary: string;
|
|
24
|
+
version: string;
|
|
25
|
+
};
|
|
26
|
+
verdicts: {
|
|
27
|
+
plain: PlainVerdict;
|
|
28
|
+
break: BreakVerdict;
|
|
29
|
+
};
|
|
30
|
+
/** When the run ended. */
|
|
31
|
+
at: Date;
|
|
32
|
+
/** The floci digest the stack ran. Default the harness's pin. */
|
|
33
|
+
floci?: string;
|
|
34
|
+
chant?: string;
|
|
35
|
+
runUrl?: string;
|
|
36
|
+
}
|
|
37
|
+
/** A claim row, validated. A run's scan verdict is added when it is recorded. */
|
|
38
|
+
export declare function claimRow(i: ClaimRowInput): ClaimRow;
|
|
39
|
+
/** Whether a row proves its claim: the plain run passed and the BREAK run was caught. */
|
|
40
|
+
export declare const rowHolds: (row: Pick<ClaimRow, "plain" | "break">) => boolean;
|
|
41
|
+
/**
|
|
42
|
+
* The run record of one claim run (#4551): op `e2e-claim`, labels naming the
|
|
43
|
+
* product, scenario and claim, the row as the `claim` outcome, and one phase
|
|
44
|
+
* per arm with a step per scenario step. Status ok when the row holds.
|
|
45
|
+
*/
|
|
46
|
+
export declare function claimRunRecordInput(o: {
|
|
47
|
+
row: ClaimRow;
|
|
48
|
+
run: ClaimRun;
|
|
49
|
+
env?: string;
|
|
50
|
+
gitSha?: string;
|
|
51
|
+
runOrigin?: RunOrigin;
|
|
52
|
+
}): OpRunRecordInput;
|
|
53
|
+
/** The rows on a ledger's e2e-claim records, oldest first. A record whose outcome is not a row is skipped. */
|
|
54
|
+
export declare function claimRowsOf(records: readonly OpRunRecord[]): ClaimRow[];
|
|
55
|
+
/**
|
|
56
|
+
* e2e-claims/v1 for one product: its newest row per scenario and claim,
|
|
57
|
+
* sorted by scenario then claim. Rows are recorded in order, so the last
|
|
58
|
+
* one read for a pair is the newest.
|
|
59
|
+
*/
|
|
60
|
+
export declare function renderClaims(product: string, rows: readonly ClaimRow[]): ClaimsDoc;
|
|
61
|
+
/**
|
|
62
|
+
* Whether an engine claim about `version` may count a row: only when the row
|
|
63
|
+
* ran that version of that engine (chant#4586, the v0.28.0 against 0.31.0
|
|
64
|
+
* split), and only when it holds.
|
|
65
|
+
*/
|
|
66
|
+
export declare function rowCountsFor(row: ClaimRow, engine: {
|
|
67
|
+
binary: string;
|
|
68
|
+
version: string;
|
|
69
|
+
}): boolean;
|
|
70
|
+
//# sourceMappingURL=claim.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claim.d.ts","sourceRoot":"","sources":["../../src/e2e-harness/claim.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,KAAK,EAAU,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEjD,OAAO,EAKL,KAAK,YAAY,EACjB,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,QAAQ,EACd,MAAM,iBAAiB,CAAC;AAEzB,gDAAgD;AAChD,eAAO,MAAM,QAAQ,cAAc,CAAC;AAEpC,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC,CAAC;IACrD,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5C,QAAQ,EAAE;QAAE,KAAK,EAAE,YAAY,CAAC;QAAC,KAAK,EAAE,YAAY,CAAA;KAAE,CAAC;IACvD,0BAA0B;IAC1B,EAAE,EAAE,IAAI,CAAC;IACT,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,iFAAiF;AACjF,wBAAgB,QAAQ,CAAC,CAAC,EAAE,aAAa,GAAG,QAAQ,CAoBnD;AAED,yFAAyF;AACzF,eAAO,MAAM,QAAQ,QAAS,IAAI,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,KAAG,OAAyD,CAAC;AAc5H;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE;IAAE,GAAG,EAAE,QAAQ,CAAC;IAAC,GAAG,EAAE,QAAQ,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,SAAS,CAAA;CAAE,GAAG,gBAAgB,CAa/I;AAED,8GAA8G;AAC9G,wBAAgB,WAAW,CAAC,OAAO,EAAE,SAAS,WAAW,EAAE,GAAG,QAAQ,EAAE,CAOvE;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,QAAQ,EAAE,GAAG,SAAS,CAYlF;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAGhG"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { FLOCI_DIGEST } from "./pins.js";
|
|
2
|
+
import { E2E_CLAIMS_SCHEMA, E2E_CLAIM_ROW_SCHEMA, validateClaimRow, validateClaims, } from "./schemas/index.js";
|
|
3
|
+
/** The op every claim run is recorded under. */
|
|
4
|
+
export const CLAIM_OP = "e2e-claim";
|
|
5
|
+
/** A claim row, validated. A run's scan verdict is added when it is recorded. */
|
|
6
|
+
export function claimRow(i) {
|
|
7
|
+
const row = {
|
|
8
|
+
$schema: E2E_CLAIM_ROW_SCHEMA,
|
|
9
|
+
contract: 1,
|
|
10
|
+
product: i.scenario.product,
|
|
11
|
+
productCommit: i.productCommit,
|
|
12
|
+
scenario: i.scenario.id,
|
|
13
|
+
claim: i.scenario.claim,
|
|
14
|
+
engine: { binary: i.engine.binary, version: i.engine.version },
|
|
15
|
+
floci: i.floci ?? FLOCI_DIGEST,
|
|
16
|
+
...(i.chant ? { chant: i.chant } : {}),
|
|
17
|
+
date: i.at.toISOString().slice(0, 10),
|
|
18
|
+
plain: i.verdicts.plain,
|
|
19
|
+
break: i.verdicts.break,
|
|
20
|
+
safeRun: "CLEAN",
|
|
21
|
+
...(i.runUrl ? { runUrl: i.runUrl } : {}),
|
|
22
|
+
};
|
|
23
|
+
const v = validateClaimRow(row);
|
|
24
|
+
if (!v.ok)
|
|
25
|
+
throw new Error(`the claim row for ${row.scenario} is not e2e-claim-row/v1: ${v.errors.join("; ")}`);
|
|
26
|
+
return row;
|
|
27
|
+
}
|
|
28
|
+
/** Whether a row proves its claim: the plain run passed and the BREAK run was caught. */
|
|
29
|
+
export const rowHolds = (row) => row.plain === "pass" && row.break === "caught";
|
|
30
|
+
const phaseOf = (run) => ({
|
|
31
|
+
name: run.arm,
|
|
32
|
+
// A phase fails when a step did, as the ledger reads phases; the arm's verdict is in the row.
|
|
33
|
+
status: run.outcome === "held" ? "ok" : "fail",
|
|
34
|
+
steps: run.steps.map((s) => ({
|
|
35
|
+
fn: `${s.do}:${s.id}`,
|
|
36
|
+
status: s.stopped ? "fail" : "ok",
|
|
37
|
+
durationMs: 0,
|
|
38
|
+
...(s.stopped ? { error: `${s.stopped.outcome}: ${s.stopped.reason}` } : {}),
|
|
39
|
+
})),
|
|
40
|
+
});
|
|
41
|
+
/**
|
|
42
|
+
* The run record of one claim run (#4551): op `e2e-claim`, labels naming the
|
|
43
|
+
* product, scenario and claim, the row as the `claim` outcome, and one phase
|
|
44
|
+
* per arm with a step per scenario step. Status ok when the row holds.
|
|
45
|
+
*/
|
|
46
|
+
export function claimRunRecordInput(o) {
|
|
47
|
+
return {
|
|
48
|
+
op: CLAIM_OP,
|
|
49
|
+
env: o.env ?? "local",
|
|
50
|
+
started: o.run.plain.started,
|
|
51
|
+
ended: o.run.break.ended,
|
|
52
|
+
status: rowHolds(o.row) ? "ok" : "fail",
|
|
53
|
+
labels: { Product: o.row.product, Scenario: o.row.scenario, Claim: o.row.claim },
|
|
54
|
+
outcomes: { claim: o.row },
|
|
55
|
+
phases: [phaseOf(o.run.plain), phaseOf(o.run.break)],
|
|
56
|
+
...(o.gitSha ? { gitSha: o.gitSha } : {}),
|
|
57
|
+
...(o.runOrigin ? { runOrigin: o.runOrigin } : {}),
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
/** The rows on a ledger's e2e-claim records, oldest first. A record whose outcome is not a row is skipped. */
|
|
61
|
+
export function claimRowsOf(records) {
|
|
62
|
+
return records
|
|
63
|
+
.filter((r) => r.op === CLAIM_OP)
|
|
64
|
+
.slice()
|
|
65
|
+
.sort((a, b) => a.ended.localeCompare(b.ended))
|
|
66
|
+
.map((r) => r.outcomes.claim)
|
|
67
|
+
.filter((c) => validateClaimRow(c).ok);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* e2e-claims/v1 for one product: its newest row per scenario and claim,
|
|
71
|
+
* sorted by scenario then claim. Rows are recorded in order, so the last
|
|
72
|
+
* one read for a pair is the newest.
|
|
73
|
+
*/
|
|
74
|
+
export function renderClaims(product, rows) {
|
|
75
|
+
const newest = new Map();
|
|
76
|
+
for (const row of rows)
|
|
77
|
+
if (row.product === product)
|
|
78
|
+
newest.set(`${row.scenario}\u0000${row.claim}`, row);
|
|
79
|
+
const doc = {
|
|
80
|
+
$schema: E2E_CLAIMS_SCHEMA,
|
|
81
|
+
contract: 1,
|
|
82
|
+
product,
|
|
83
|
+
rows: [...newest.values()].sort((a, b) => a.scenario.localeCompare(b.scenario) || a.claim.localeCompare(b.claim)),
|
|
84
|
+
};
|
|
85
|
+
const v = validateClaims(doc);
|
|
86
|
+
if (!v.ok)
|
|
87
|
+
throw new Error(`the rendered claims of ${product} are not e2e-claims/v1: ${v.errors.join("; ")}`);
|
|
88
|
+
return doc;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Whether an engine claim about `version` may count a row: only when the row
|
|
92
|
+
* ran that version of that engine (chant#4586, the v0.28.0 against 0.31.0
|
|
93
|
+
* split), and only when it holds.
|
|
94
|
+
*/
|
|
95
|
+
export function rowCountsFor(row, engine) {
|
|
96
|
+
const norm = (v) => v.replace(/^v/, "");
|
|
97
|
+
return row.engine.binary === engine.binary && norm(row.engine.version) === norm(engine.version) && rowHolds(row);
|
|
98
|
+
}
|