@intentius/chant 0.124.55 → 0.124.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ci-agent.d.ts.map +1 -1
- package/dist/ci-agent.js +1 -2
- package/dist/ci-audit/attribution.d.ts +111 -0
- package/dist/ci-audit/attribution.d.ts.map +1 -0
- package/dist/ci-audit/attribution.js +194 -0
- package/dist/ci-audit/audit-log.d.ts +144 -0
- package/dist/ci-audit/audit-log.d.ts.map +1 -0
- package/dist/ci-audit/audit-log.js +149 -0
- package/dist/ci-audit/index.d.ts +12 -0
- package/dist/ci-audit/index.d.ts.map +1 -0
- package/dist/ci-audit/index.js +11 -0
- package/dist/ci-audit/unrecorded.d.ts +74 -0
- package/dist/ci-audit/unrecorded.d.ts.map +1 -0
- package/dist/ci-audit/unrecorded.js +95 -0
- package/dist/ci-audit.d.ts +3 -0
- package/dist/ci-audit.d.ts.map +1 -0
- package/dist/ci-audit.js +2 -0
- package/dist/ci-control.d.ts.map +1 -1
- package/dist/ci-control.js +3 -4
- package/dist/ci-estate.d.ts +24 -0
- package/dist/ci-estate.d.ts.map +1 -1
- package/dist/ci-estate.js +1 -2
- package/dist/ci-identity.d.ts.map +1 -1
- package/dist/ci-identity.js +2 -3
- package/dist/ci-job-guard.d.ts +139 -0
- package/dist/ci-job-guard.d.ts.map +1 -0
- package/dist/ci-job-guard.js +287 -0
- package/dist/ci-jobs.d.ts +7 -0
- package/dist/ci-jobs.d.ts.map +1 -1
- package/dist/ci-jobs.js +7 -0
- package/dist/ci-product-words.d.ts +7 -1
- package/dist/ci-product-words.d.ts.map +1 -1
- package/dist/ci-product-words.js +38 -4
- package/dist/ci-product.d.ts +35 -0
- package/dist/ci-product.d.ts.map +1 -1
- package/dist/ci-product.js +38 -4
- package/dist/ci-respond-run.d.ts +73 -0
- package/dist/ci-respond-run.d.ts.map +1 -0
- package/dist/ci-respond-run.js +247 -0
- package/dist/ci-respond.d.ts +189 -0
- package/dist/ci-respond.d.ts.map +1 -0
- package/dist/ci-respond.js +285 -0
- package/dist/cli/handlers/audit-log.d.ts +12 -0
- package/dist/cli/handlers/audit-log.d.ts.map +1 -0
- package/dist/cli/handlers/audit-log.js +81 -0
- package/dist/cli/handlers/build.d.ts +7 -0
- package/dist/cli/handlers/build.d.ts.map +1 -1
- package/dist/cli/handlers/build.js +81 -0
- package/dist/cli/handlers/ci-check-job.d.ts +11 -0
- package/dist/cli/handlers/ci-check-job.d.ts.map +1 -0
- package/dist/cli/handlers/ci-check-job.js +27 -0
- package/dist/cli/handlers/ci-check.d.ts.map +1 -1
- package/dist/cli/handlers/ci-check.js +38 -9
- package/dist/cli/handlers/e2e-safe-run.d.ts +12 -0
- package/dist/cli/handlers/e2e-safe-run.d.ts.map +1 -0
- package/dist/cli/handlers/e2e-safe-run.js +23 -0
- package/dist/cli/handlers/lifecycle.d.ts.map +1 -1
- package/dist/cli/handlers/lifecycle.js +14 -0
- package/dist/cli/handlers/pr.d.ts +5 -0
- package/dist/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/handlers/pr.js +346 -36
- package/dist/cli/handlers/run-wave.js +89 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +56 -2
- package/dist/cli/parse-args.d.ts.map +1 -1
- package/dist/cli/parse-args.js +107 -0
- package/dist/cli/registry.d.ts +38 -0
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/components/adoption.d.ts.map +1 -1
- package/dist/components/adoption.js +1 -2
- package/dist/components/auto-release.d.ts +5 -2
- package/dist/components/auto-release.d.ts.map +1 -1
- package/dist/components/auto-release.js +9 -4
- package/dist/components/capability.d.ts +47 -0
- package/dist/components/capability.d.ts.map +1 -1
- package/dist/components/capability.js +25 -0
- package/dist/components/check-hooks.d.ts +4 -1
- package/dist/components/check-hooks.d.ts.map +1 -1
- package/dist/components/check-steps.d.ts +74 -0
- package/dist/components/check-steps.d.ts.map +1 -0
- package/dist/components/check-steps.js +102 -0
- package/dist/components/ci-services.d.ts.map +1 -1
- package/dist/components/ci-services.js +1 -2
- package/dist/components/deploy-units.d.ts +12 -0
- package/dist/components/deploy-units.d.ts.map +1 -1
- package/dist/components/deploy-units.js +20 -1
- package/dist/components/driver.d.ts +12 -0
- package/dist/components/driver.d.ts.map +1 -1
- package/dist/components/driver.js +35 -1
- package/dist/components/groups.d.ts.map +1 -1
- package/dist/components/groups.js +4 -3
- package/dist/components/pr-env-ledger.d.ts.map +1 -1
- package/dist/components/pr-env-ledger.js +1 -2
- package/dist/components/pr-environment.d.ts +1 -1
- package/dist/components/pr-environment.d.ts.map +1 -1
- package/dist/components/pr-environment.js +1 -1
- package/dist/components/pr-pipeline.d.ts +137 -5
- package/dist/components/pr-pipeline.d.ts.map +1 -1
- package/dist/components/pr-pipeline.js +164 -20
- package/dist/components/pr-run.d.ts +8 -0
- package/dist/components/pr-run.d.ts.map +1 -1
- package/dist/components/pr-run.js +9 -4
- package/dist/components/product-pipeline.d.ts +35 -2
- package/dist/components/product-pipeline.d.ts.map +1 -1
- package/dist/components/product-pipeline.js +24 -5
- package/dist/components/row-lease.d.ts +22 -1
- package/dist/components/row-lease.d.ts.map +1 -1
- package/dist/components/row-lease.js +32 -6
- package/dist/components/wave-plan.d.ts +8 -0
- package/dist/components/wave-plan.d.ts.map +1 -1
- package/dist/components/wave-plan.js +18 -2
- package/dist/e2e-harness/bucket.d.ts +21 -0
- package/dist/e2e-harness/bucket.d.ts.map +1 -0
- package/dist/e2e-harness/bucket.js +61 -0
- package/dist/e2e-harness/claim.d.ts +70 -0
- package/dist/e2e-harness/claim.d.ts.map +1 -0
- package/dist/e2e-harness/claim.js +98 -0
- package/dist/e2e-harness/driver.d.ts +64 -0
- package/dist/e2e-harness/driver.d.ts.map +1 -0
- package/dist/e2e-harness/driver.js +243 -0
- package/dist/e2e-harness/forgejo.d.ts +77 -0
- package/dist/e2e-harness/forgejo.d.ts.map +1 -0
- package/dist/e2e-harness/forgejo.js +205 -0
- package/dist/e2e-harness/git.d.ts +32 -0
- package/dist/e2e-harness/git.d.ts.map +1 -0
- package/dist/e2e-harness/git.js +67 -0
- package/dist/e2e-harness/index.d.ts +22 -0
- package/dist/e2e-harness/index.d.ts.map +1 -0
- package/dist/e2e-harness/index.js +47 -0
- package/dist/e2e-harness/jobs.d.ts +8 -0
- package/dist/e2e-harness/jobs.d.ts.map +1 -0
- package/dist/e2e-harness/jobs.js +34 -0
- package/dist/e2e-harness/pins.d.ts +45 -0
- package/dist/e2e-harness/pins.d.ts.map +1 -0
- package/dist/e2e-harness/pins.js +44 -0
- package/dist/e2e-harness/ports.d.ts +113 -0
- package/dist/e2e-harness/ports.d.ts.map +1 -0
- package/dist/e2e-harness/ports.js +4 -0
- package/dist/e2e-harness/reports.d.ts +45 -0
- package/dist/e2e-harness/reports.d.ts.map +1 -0
- package/dist/e2e-harness/reports.js +57 -0
- package/dist/e2e-harness/safe-run-cli.d.ts +17 -0
- package/dist/e2e-harness/safe-run-cli.d.ts.map +1 -0
- package/dist/e2e-harness/safe-run-cli.js +43 -0
- package/dist/e2e-harness/safe-run.d.ts +61 -0
- package/dist/e2e-harness/safe-run.d.ts.map +1 -0
- package/dist/e2e-harness/safe-run.js +172 -0
- package/dist/e2e-harness/scenario.d.ts +11 -0
- package/dist/e2e-harness/scenario.d.ts.map +1 -0
- package/dist/e2e-harness/scenario.js +89 -0
- package/dist/e2e-harness/schemas/demo-cycle.schema.json +282 -0
- package/dist/e2e-harness/schemas/demo-step.schema.json +245 -0
- package/dist/e2e-harness/schemas/e2e-claim-row.schema.json +33 -0
- package/dist/e2e-harness/schemas/e2e-claims.schema.json +18 -0
- package/dist/e2e-harness/schemas/e2e-scenario.schema.json +150 -0
- package/dist/e2e-harness/schemas/index.d.ts +191 -0
- package/dist/e2e-harness/schemas/index.d.ts.map +1 -0
- package/dist/e2e-harness/schemas/index.js +62 -0
- package/dist/e2e-harness/stack.d.ts +124 -0
- package/dist/e2e-harness/stack.d.ts.map +1 -0
- package/dist/e2e-harness/stack.js +207 -0
- package/dist/e2e-harness/steps.d.ts +11 -0
- package/dist/e2e-harness/steps.d.ts.map +1 -0
- package/dist/e2e-harness/steps.js +22 -0
- package/dist/e2e-harness.d.ts +3 -0
- package/dist/e2e-harness.d.ts.map +1 -0
- package/dist/e2e-harness.js +2 -0
- package/dist/exit-codes.d.ts +7 -1
- package/dist/exit-codes.d.ts.map +1 -1
- package/dist/exit-codes.js +7 -1
- package/dist/lexicon.d.ts +55 -0
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/gate-ledger.d.ts.map +1 -1
- package/dist/lifecycle/gate-ledger.js +2 -3
- package/dist/lifecycle/gated-request.d.ts.map +1 -1
- package/dist/lifecycle/gated-request.js +1 -2
- package/dist/lifecycle/git.d.ts +39 -3
- package/dist/lifecycle/git.d.ts.map +1 -1
- package/dist/lifecycle/git.js +223 -15
- package/dist/lifecycle/lock-rows.d.ts +23 -0
- package/dist/lifecycle/lock-rows.d.ts.map +1 -1
- package/dist/lifecycle/lock-rows.js +47 -8
- package/dist/lifecycle/query.d.ts.map +1 -1
- package/dist/lifecycle/query.js +4 -5
- package/dist/lifecycle/release-catalog.d.ts.map +1 -1
- package/dist/lifecycle/release-catalog.js +1 -1
- package/dist/lifecycle/release-ledger.d.ts.map +1 -1
- package/dist/lifecycle/release-ledger.js +1 -2
- package/dist/lifecycle/release-status.d.ts +20 -0
- package/dist/lifecycle/release-status.d.ts.map +1 -1
- package/dist/lifecycle/release-status.js +1 -22
- package/dist/lifecycle/resource-lock.d.ts +70 -0
- package/dist/lifecycle/resource-lock.d.ts.map +1 -1
- package/dist/lifecycle/resource-lock.js +241 -5
- package/dist/lifecycle/wave-plans.d.ts +23 -7
- package/dist/lifecycle/wave-plans.d.ts.map +1 -1
- package/dist/lifecycle/wave-plans.js +9 -2
- package/dist/op/approval-status.d.ts +103 -0
- package/dist/op/approval-status.d.ts.map +1 -0
- package/dist/op/approval-status.js +197 -0
- package/dist/op/gate.js +21 -4
- package/dist/op/index.d.ts +1 -1
- package/dist/op/index.d.ts.map +1 -1
- package/dist/op/index.js +1 -1
- package/dist/op/op-waves-capability-spec.d.ts +8 -0
- package/dist/op/op-waves-capability-spec.d.ts.map +1 -1
- package/dist/op/op-waves-capability-spec.js +21 -0
- package/dist/op/op-waves-release-port.js +1 -1
- package/dist/op/op-waves-release.d.ts +2 -1
- package/dist/op/op-waves-release.d.ts.map +1 -1
- package/dist/op/op-waves-release.js +1 -2
- package/dist/op/op-waves-run.d.ts +15 -2
- package/dist/op/op-waves-run.d.ts.map +1 -1
- package/dist/op/op-waves-run.js +195 -31
- package/dist/op/op-waves-stand-down.d.ts.map +1 -1
- package/dist/op/op-waves-stand-down.js +1 -2
- package/dist/op/op-waves.d.ts +53 -0
- package/dist/op/op-waves.d.ts.map +1 -1
- package/dist/op/op-waves.js +62 -6
- package/dist/op/runtime.d.ts +4 -0
- package/dist/op/runtime.d.ts.map +1 -1
- package/dist/op/runtime.js +2 -3
- package/dist/otlp.d.ts.map +1 -1
- package/dist/otlp.js +1 -2
- package/dist/parallelism.d.ts +17 -0
- package/dist/parallelism.d.ts.map +1 -0
- package/dist/parallelism.js +33 -0
- package/dist/policy-source.d.ts.map +1 -1
- package/dist/policy-source.js +1 -2
- package/dist/pr-forge.d.ts.map +1 -1
- package/dist/pr-forge.js +56 -39
- package/dist/pr-loop.d.ts +9 -0
- package/dist/pr-loop.d.ts.map +1 -1
- package/dist/pr-loop.js +22 -4
- package/dist/pr-merge.d.ts +64 -0
- package/dist/pr-merge.d.ts.map +1 -0
- package/dist/pr-merge.js +78 -0
- package/dist/pr-post.d.ts +70 -1
- package/dist/pr-post.d.ts.map +1 -1
- package/dist/pr-post.js +116 -5
- package/dist/pr-report-url.d.ts.map +1 -1
- package/dist/pr-report-url.js +1 -2
- package/dist/release-floors.d.ts +1 -1
- package/dist/release-floors.js +1 -1
- package/dist/run-event.d.ts.map +1 -1
- package/dist/run-event.js +1 -2
- package/dist/scheduled-op-cloud.d.ts +32 -0
- package/dist/scheduled-op-cloud.d.ts.map +1 -0
- package/dist/scheduled-op-cloud.js +69 -0
- package/dist/wave-runtime.mjs +351 -328
- package/dist/workspace/ci-lock-grain.d.ts +5 -0
- package/dist/workspace/ci-lock-grain.d.ts.map +1 -1
- package/dist/workspace/ci-lock-grain.js +1 -7
- package/dist/workspace/ci-run.d.ts.map +1 -1
- package/dist/workspace/ci-run.js +5 -1
- package/dist/workspace/pr-report.schema.json +5 -0
- package/package.json +1 -1
- package/src/ci-agent.ts +1 -2
- package/src/ci-audit/__fixtures__/cloudtrail-lookup-bucket.json +37 -0
- package/src/ci-audit/__fixtures__/cloudtrail-writes-window.json +59 -0
- package/src/ci-audit/attribution.ts +260 -0
- package/src/ci-audit/audit-log.ts +220 -0
- package/src/ci-audit/ci-audit.test.ts +175 -0
- package/src/ci-audit/index.ts +14 -0
- package/src/ci-audit/unrecorded.ts +140 -0
- package/src/ci-audit.ts +2 -0
- package/src/ci-control.ts +3 -4
- package/src/ci-estate.ts +1 -2
- package/src/ci-identity-database.test.ts +2 -3
- package/src/ci-identity-targets.test.ts +1 -3
- package/src/ci-identity.ts +2 -3
- package/src/ci-job-guard.test.ts +154 -0
- package/src/ci-job-guard.ts +319 -0
- package/src/ci-jobs.ts +8 -0
- package/src/ci-product-comment-targets.test.ts +45 -0
- package/src/ci-product-words.ts +35 -6
- package/src/ci-product.ts +55 -4
- package/src/ci-respond-run.ts +291 -0
- package/src/ci-respond.test.ts +264 -0
- package/src/ci-respond.ts +412 -0
- package/src/cli/handlers/audit-log.ts +74 -0
- package/src/cli/handlers/build-pr-loop-flags.test.ts +98 -0
- package/src/cli/handlers/build.ts +69 -0
- package/src/cli/handlers/ci-check-job.test.ts +114 -0
- package/src/cli/handlers/ci-check-job.ts +33 -0
- package/src/cli/handlers/ci-check.ts +38 -8
- package/src/cli/handlers/e2e-safe-run.ts +27 -0
- package/src/cli/handlers/lifecycle.ts +13 -0
- package/src/cli/handlers/pr-before-merge.test.ts +1 -1
- package/src/cli/handlers/pr-deploy-inputs.test.ts +1 -1
- package/src/cli/handlers/pr-endpoint.test.ts +1 -1
- package/src/cli/handlers/pr-green.test.ts +1 -1
- package/src/cli/handlers/pr-plan-comment-targets.test.ts +166 -0
- package/src/cli/handlers/pr-plan-flags.test.ts +161 -0
- package/src/cli/handlers/pr-plan-targets.test.ts +1 -1
- package/src/cli/handlers/pr-record.test.ts +34 -2
- package/src/cli/handlers/pr-waves-blocked.test.ts +1 -1
- package/src/cli/handlers/pr-waves.test.ts +1 -1
- package/src/cli/handlers/pr.test.ts +1 -1
- package/src/cli/handlers/pr.ts +311 -32
- package/src/cli/handlers/run-wave.ts +79 -1
- package/src/cli/main.test.ts +1 -1
- package/src/cli/main.ts +56 -2
- package/src/cli/parse-args.ts +77 -0
- package/src/cli/registry.ts +38 -0
- package/src/components/adoption.ts +1 -2
- package/src/components/auto-release.test.ts +4 -2
- package/src/components/auto-release.ts +9 -5
- package/src/components/capability.ts +60 -0
- package/src/components/check-hooks.ts +4 -1
- package/src/components/check-steps.test.ts +70 -0
- package/src/components/check-steps.ts +158 -0
- package/src/components/ci-services.ts +1 -2
- package/src/components/deploy-units.test.ts +18 -1
- package/src/components/deploy-units.ts +26 -1
- package/src/components/driver.ts +35 -1
- package/src/components/groups.ts +4 -2
- package/src/components/plan-flags.test.ts +46 -0
- package/src/components/pr-comment-preview-targets.test.ts +34 -0
- package/src/components/pr-env-ledger.ts +1 -2
- package/src/components/pr-env-run-bundle.test.ts +0 -20
- package/src/components/pr-environment.ts +1 -1
- package/src/components/pr-pipeline-runners.test.ts +80 -0
- package/src/components/pr-pipeline.ts +244 -20
- package/src/components/pr-run.ts +17 -6
- package/src/components/pr-stale-job.test.ts +34 -0
- package/src/components/product-pipeline.ts +50 -8
- package/src/components/row-lease.test.ts +61 -1
- package/src/components/row-lease.ts +48 -7
- package/src/components/wave-plan.ts +18 -2
- package/src/e2e-harness/__project__/chant.config.ts +4 -0
- package/src/e2e-harness/__project__/src/compose.ts +33 -0
- package/src/e2e-harness/bucket.ts +69 -0
- package/src/e2e-harness/claim.test.ts +150 -0
- package/src/e2e-harness/claim.ts +140 -0
- package/src/e2e-harness/driver.test.ts +304 -0
- package/src/e2e-harness/driver.ts +294 -0
- package/src/e2e-harness/forgejo.ts +267 -0
- package/src/e2e-harness/git.ts +96 -0
- package/src/e2e-harness/index.ts +49 -0
- package/src/e2e-harness/jobs.ts +35 -0
- package/src/e2e-harness/pins.ts +52 -0
- package/src/e2e-harness/ports.ts +130 -0
- package/src/e2e-harness/reports.ts +79 -0
- package/src/e2e-harness/safe-run-cli.test.ts +102 -0
- package/src/e2e-harness/safe-run-cli.ts +54 -0
- package/src/e2e-harness/safe-run.ts +198 -0
- package/src/e2e-harness/scenario.ts +89 -0
- package/src/e2e-harness/schemas/README.md +62 -0
- package/src/e2e-harness/schemas/demo-cycle.schema.json +282 -0
- package/src/e2e-harness/schemas/demo-step.schema.json +245 -0
- package/src/e2e-harness/schemas/e2e-claim-row.schema.json +33 -0
- package/src/e2e-harness/schemas/e2e-claims.schema.json +18 -0
- package/src/e2e-harness/schemas/e2e-scenario.schema.json +150 -0
- package/src/e2e-harness/schemas/index.ts +220 -0
- package/src/e2e-harness/schemas.test.ts +145 -0
- package/src/e2e-harness/stack.test.ts +124 -0
- package/src/e2e-harness/stack.ts +306 -0
- package/src/e2e-harness/steps.ts +30 -0
- package/src/e2e-harness.ts +2 -0
- package/src/exit-codes.test.ts +3 -2
- package/src/exit-codes.ts +7 -1
- package/src/gate-decision-bundle.test.ts +0 -2
- package/src/lexicon.ts +57 -0
- package/src/lifecycle/control-entries-ledger.test.ts +2 -3
- package/src/lifecycle/gate-ledger.ts +2 -3
- package/src/lifecycle/gated-request.ts +1 -2
- package/src/lifecycle/git.test.ts +155 -0
- package/src/lifecycle/git.ts +213 -17
- package/src/lifecycle/lock-rows.test.ts +6 -1
- package/src/lifecycle/lock-rows.ts +58 -7
- package/src/lifecycle/query.ts +4 -5
- package/src/lifecycle/release-catalog.test.ts +3 -4
- package/src/lifecycle/release-catalog.ts +1 -1
- package/src/lifecycle/release-ledger.ts +1 -2
- package/src/lifecycle/release-status.test.ts +3 -4
- package/src/lifecycle/release-status.ts +1 -2
- package/src/lifecycle/resource-lock-wait.test.ts +292 -0
- package/src/lifecycle/resource-lock.ts +261 -7
- package/src/lifecycle/wave-plans.ts +33 -5
- package/src/op/approval-status.test.ts +134 -0
- package/src/op/approval-status.ts +235 -0
- package/src/op/gate-review.test.ts +2 -1
- package/src/op/gate.test.ts +7 -5
- package/src/op/gate.ts +20 -4
- package/src/op/index.ts +2 -0
- package/src/op/op-waves-after-plan.test.ts +11 -0
- package/src/op/op-waves-capability-spec.ts +20 -0
- package/src/op/op-waves-ledger-lock.test.ts +208 -0
- package/src/op/op-waves-parallelism.test.ts +89 -0
- package/src/op/op-waves-pull-request.test.ts +78 -1
- package/src/op/op-waves-release-port.ts +1 -1
- package/src/op/op-waves-release.ts +2 -3
- package/src/op/op-waves-run.ts +196 -31
- package/src/op/op-waves-stand-down.ts +1 -2
- package/src/op/op-waves.ts +81 -6
- package/src/op/runtime.ts +6 -3
- package/src/otlp.ts +1 -2
- package/src/parallelism.test.ts +38 -0
- package/src/parallelism.ts +33 -0
- package/src/policy-source.ts +1 -2
- package/src/pr-forge-bundle.test.ts +1 -1
- package/src/pr-forge.ts +54 -35
- package/src/pr-loop-bundle.test.ts +0 -2
- package/src/pr-loop-narrowed.test.ts +63 -0
- package/src/pr-loop.ts +30 -4
- package/src/pr-merge.test.ts +100 -0
- package/src/pr-merge.ts +105 -0
- package/src/pr-post-stale.test.ts +163 -0
- package/src/pr-post.ts +159 -5
- package/src/pr-report-url.ts +1 -2
- package/src/product-subpaths-plain-node.e2e.test.ts +1 -0
- package/src/release-floors.ts +1 -1
- package/src/run-event.ts +1 -2
- package/src/scheduled-op-cloud.ts +68 -0
- package/src/stage-hooks-bundle.test.ts +0 -2
- package/src/workspace/ci-lock-grain.ts +1 -2
- package/src/workspace/ci-run.ts +5 -1
- package/src/workspace/pr-report.schema.json +5 -0
|
@@ -15,6 +15,13 @@
|
|
|
15
15
|
* - A held row fails the step, or every member of the group, with a record
|
|
16
16
|
* marked `held`, so the command exits 5 (`CHANT_EXIT.held`) and nothing of
|
|
17
17
|
* that step applied.
|
|
18
|
+
* - A step on the `target` grain whose lexicon names its target's row
|
|
19
|
+
* (`targetLockRow`: a stock Pulumi stack, a Terraform root), or on the
|
|
20
|
+
* `repo` grain, waits for that row in the ledger's queue, oldest commit
|
|
21
|
+
* first, up to `CHANT_LOCK_WAIT` seconds (ruling for ci-products
|
|
22
|
+
* 2026-10-28, "Ledger lock"), and at the deadline fails with
|
|
23
|
+
* {@link LockWaitTimeoutError}, held, exit 5. A step on the resource grain
|
|
24
|
+
* never waits.
|
|
18
25
|
*
|
|
19
26
|
* The port ({@link ledgerRowLease}) writes `_locks/rows/<gate>.json` through
|
|
20
27
|
* ../lifecycle/resource-lock.ts with one holder for the whole run, and
|
|
@@ -35,14 +42,22 @@ export interface RowLeasePort {
|
|
|
35
42
|
* Lease `rows` for `label` (a component, or a group's components), all or
|
|
36
43
|
* nothing. Throws {@link LockRowsHeldError} when another live run holds
|
|
37
44
|
* one, and any other error when the rows file cannot be read or written.
|
|
45
|
+
* With `wait`, waits in the queue for them instead, and throws
|
|
46
|
+
* {@link LockWaitTimeoutError} at the deadline.
|
|
38
47
|
*/
|
|
39
|
-
take(rows: readonly LockRow[], label: string
|
|
48
|
+
take(rows: readonly LockRow[], label: string, opts?: {
|
|
49
|
+
wait?: boolean;
|
|
50
|
+
}): Promise<RowLease>;
|
|
40
51
|
}
|
|
41
52
|
/** Another live run holds a row this apply changes (#4594), so nothing of it applied. Exit 5. */
|
|
42
53
|
export declare class LockRowsHeldError extends Error {
|
|
43
54
|
readonly lockRowsHeld = true;
|
|
44
55
|
constructor(message: string);
|
|
45
56
|
}
|
|
57
|
+
/** A wait for a target's row reached its deadline (ruling for ci-products 2026-10-28): nothing of the step applied. Exit 5, as a held row is. */
|
|
58
|
+
export declare class LockWaitTimeoutError extends LockRowsHeldError {
|
|
59
|
+
constructor(message: string);
|
|
60
|
+
}
|
|
46
61
|
/** Whether `err` is a held row ({@link LockRowsHeldError}), by its mark, so a copy from another bundle counts too. */
|
|
47
62
|
export declare function isLockRowsHeldError(err: unknown): err is LockRowsHeldError;
|
|
48
63
|
export interface LedgerRowLeaseOptions {
|
|
@@ -53,6 +68,12 @@ export interface LedgerRowLeaseOptions {
|
|
|
53
68
|
holder?: LockRowHolder;
|
|
54
69
|
/** Where the lease's info lines go. Default stderr. */
|
|
55
70
|
log?: (line: string) => void;
|
|
71
|
+
/** How long a waiting take waits, in seconds. Default `CHANT_LOCK_WAIT`. */
|
|
72
|
+
waitSeconds?: number;
|
|
73
|
+
/** How often a waiting take reads the rows file again, in ms. Default `CHANT_LOCK_POLL` seconds, else 10 s. */
|
|
74
|
+
pollMs?: number;
|
|
75
|
+
/** The commit time that orders this run in the queue. Default: HEAD's in `cwd`. */
|
|
76
|
+
commitAt?: string;
|
|
56
77
|
}
|
|
57
78
|
/**
|
|
58
79
|
* The port over `gate`'s rows file on `chant/lifecycle` (#4594), one holder
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"row-lease.d.ts","sourceRoot":"","sources":["../../src/components/row-lease.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"row-lease.d.ts","sourceRoot":"","sources":["../../src/components/row-lease.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjE,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE9E,qDAAqD;AACrD,MAAM,WAAW,QAAQ;IACvB,8IAA8I;IAC9I,O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ClB,KAAK,EAAE,OAAO,GACb,OAAO,CAAC;IAAE,GAAG,EAAE,aAAa,CAAC;IAAC,KAAK,EAAE,QAAQ,CAAA;CAAE,CAAC,CAgBlD;AAED;;;GAGG;AACH,wBAAsB,aAAa,CACjC,UAAU,EAAE,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,EACtC,OAAO,EAAE,aAAa,CAAC;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,aAAa,CAAA;CAAE,CAAC,EAClF,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,EAC/C,QAAQ,EAAE,SAAS,GAAG,SAAS,GAC9B,OAAO,CAAC,OAAO,EAAE,CAAC,CASpB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { lockGrainBeforePlan, resolvePlannedLock, sortedLockRows } from "../lifecycle/lock-rows.js";
|
|
1
|
+
import { lockGrainBeforePlan, queueRowsOf, resolvePlannedLock, sortedLockRows } from "../lifecycle/lock-rows.js";
|
|
2
2
|
/** Another live run holds a row this apply changes (#4594), so nothing of it applied. Exit 5. */
|
|
3
3
|
export class LockRowsHeldError extends Error {
|
|
4
4
|
constructor(message) {
|
|
@@ -7,6 +7,13 @@ export class LockRowsHeldError extends Error {
|
|
|
7
7
|
this.name = "LockRowsHeldError";
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
+
/** A wait for a target's row reached its deadline (ruling for ci-products 2026-10-28): nothing of the step applied. Exit 5, as a held row is. */
|
|
11
|
+
export class LockWaitTimeoutError extends LockRowsHeldError {
|
|
12
|
+
constructor(message) {
|
|
13
|
+
super(message);
|
|
14
|
+
this.name = "LockWaitTimeoutError";
|
|
15
|
+
}
|
|
16
|
+
}
|
|
10
17
|
/** Whether `err` is a held row ({@link LockRowsHeldError}), by its mark, so a copy from another bundle counts too. */
|
|
11
18
|
export function isLockRowsHeldError(err) {
|
|
12
19
|
return typeof err === "object" && err !== null && err.lockRowsHeld === true;
|
|
@@ -24,15 +31,28 @@ export function ledgerRowLease(gate, opts = {}) {
|
|
|
24
31
|
let holder = opts.holder;
|
|
25
32
|
const lock = () => import("../lifecycle/resource-lock.js");
|
|
26
33
|
return {
|
|
27
|
-
async take(rows, label) {
|
|
34
|
+
async take(rows, label, takeOpts) {
|
|
28
35
|
const wanted = sortedLockRows(rows);
|
|
29
36
|
if (wanted.length === 0)
|
|
30
37
|
return NO_LEASE;
|
|
31
|
-
const { leaseLockRows, lockRowHolder, releaseLockRows } = await lock();
|
|
38
|
+
const { commitTimeOf, leaseLockRows, lockPollMs, lockRowHolder, lockWaitSeconds, releaseLockRows } = await lock();
|
|
32
39
|
holder ?? (holder = lockRowHolder(process.env));
|
|
33
40
|
const fresh = wanted.filter((r) => (counts.get(r.key) ?? 0) === 0);
|
|
34
41
|
if (fresh.length > 0) {
|
|
35
|
-
const
|
|
42
|
+
const commitAt = takeOpts?.wait ? (opts.commitAt ?? (await commitTimeOf(holder.sha ?? "HEAD", opts.cwd))) : undefined;
|
|
43
|
+
const wait = takeOpts?.wait
|
|
44
|
+
? {
|
|
45
|
+
wait: {
|
|
46
|
+
deadline: Date.now() + (opts.waitSeconds ?? lockWaitSeconds(process.env)) * 1000,
|
|
47
|
+
pollMs: opts.pollMs ?? lockPollMs(process.env),
|
|
48
|
+
log: (line) => log(`${label}: ${line}`),
|
|
49
|
+
...(commitAt ? { commitAt } : {}),
|
|
50
|
+
},
|
|
51
|
+
}
|
|
52
|
+
: {};
|
|
53
|
+
const leased = await leaseLockRows(gate, fresh, { holder, ...(opts.cwd ? { cwd: opts.cwd } : {}), ...(opts.alive ? { alive: opts.alive } : {}), ...wait });
|
|
54
|
+
if (!leased.ok && leased.timedOut)
|
|
55
|
+
throw new LockWaitTimeoutError(`${label}: LockWaitTimeoutError: ${leased.message}, so nothing of it was applied.`);
|
|
36
56
|
if (!leased.ok) {
|
|
37
57
|
throw new LockRowsHeldError(`${label}: ${leased.message}, so nothing of it was applied. Apply again once that run ends; a run that is gone, or whose lease is older than CHANT_LOCK_STALE seconds, is taken over.`);
|
|
38
58
|
}
|
|
@@ -80,9 +100,15 @@ export function ledgerRowLease(gate, opts = {}) {
|
|
|
80
100
|
*/
|
|
81
101
|
export async function leaseCapabilityStep(capability, ctx, input) {
|
|
82
102
|
const port = ctx.rowLease;
|
|
83
|
-
if (!port
|
|
103
|
+
if (!port)
|
|
84
104
|
return { ctx, lease: NO_LEASE };
|
|
85
|
-
|
|
105
|
+
const grain = await lockGrainBeforePlan(capability, input, ctx.lockGrain);
|
|
106
|
+
if (grain !== "resource") {
|
|
107
|
+
// The ruling for ci-products (2026-10-28): the target's row (or the repo row), waited for, whether or not a plan was handed in.
|
|
108
|
+
const queue = await queueRowsOf(capability, input, ctx.component, grain);
|
|
109
|
+
return { ctx, lease: queue.length > 0 ? await port.take(queue, ctx.component, { wait: true }) : NO_LEASE };
|
|
110
|
+
}
|
|
111
|
+
if (ctx.plans !== undefined || !capability.plan)
|
|
86
112
|
return { ctx, lease: NO_LEASE };
|
|
87
113
|
const planned = await capability.plan(ctx, input);
|
|
88
114
|
const lock = await resolvePlannedLock(capability, input, planned, ctx.lockGrain);
|
|
@@ -108,6 +108,14 @@ export declare function targetedPlanDigest(planDigest: string, targets: readonly
|
|
|
108
108
|
* `ctx.targets`, the plan as it came.
|
|
109
109
|
*/
|
|
110
110
|
export declare function bindTargets(kind: string, ctx: DeployContext, planned: CapabilityPlan): CapabilityPlan;
|
|
111
|
+
/**
|
|
112
|
+
* A step's plan made with `ctx.refresh` or `ctx.targetDependents` (#4627),
|
|
113
|
+
* its digest bound to them: the digest over the plan's own digest and the
|
|
114
|
+
* flags, so an approval of a refreshed or widened plan covers no plain one,
|
|
115
|
+
* as {@link bindTargets} binds targets. Without either flag, the plan as it
|
|
116
|
+
* came.
|
|
117
|
+
*/
|
|
118
|
+
export declare function bindPlanFlags(ctx: Pick<DeployContext, "refresh" | "targetDependents">, planned: CapabilityPlan): CapabilityPlan;
|
|
111
119
|
/**
|
|
112
120
|
* The outputs `component` exposes now, read from each step whose capability
|
|
113
121
|
* has `outputs` (#3183), merged the way the driver merges a run's outputs.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wave-plan.d.ts","sourceRoot":"","sources":["../../src/components/wave-plan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAsB,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,
|
|
1
|
+
{"version":3,"file":"wave-plan.d.ts","sourceRoot":"","sources":["../../src/components/wave-plan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAsB,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAA6F,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAI9K,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACtG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD;;;;;;;GAOG;AACH,MAAM,MAAM,iBAAiB,GACzB;IACE,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,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E,WAAW,CAAC,MAAM,EAAE,eAAe,CAAC,EAChD,QAAQ,EAAE,kBAAkB,EAC5B,KAAK,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,aAAa,EAC3C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAC/C,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAYnC"}
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
* `@<component>.publish.*`) resolves.
|
|
28
28
|
*/
|
|
29
29
|
import { resolvePlannedLock } from "../lifecycle/lock-rows.js";
|
|
30
|
-
import { assertTargetsAccepted, resolveStepInput, unresolvedWiringSources } from "./driver.js";
|
|
30
|
+
import { assertPlanFlagsAccepted, assertTargetsAccepted, resolveStepInput, unresolvedWiringSources } from "./driver.js";
|
|
31
31
|
import { componentPlanDigest } from "./gate-plan.js";
|
|
32
32
|
import { componentDeployInputs } from "./deploy-inputs.js";
|
|
33
33
|
import { computePlanDigest } from "../lifecycle/plan-digest.js";
|
|
@@ -103,13 +103,14 @@ export async function planWaveComponent(component, registry, ctx, componentOutpu
|
|
|
103
103
|
const locks = {};
|
|
104
104
|
const locations = {};
|
|
105
105
|
assertTargetsAccepted(component, registry, ctx);
|
|
106
|
+
assertPlanFlagsAccepted(component, registry, ctx);
|
|
106
107
|
for (const step of capabilitySteps(component.deploy)) {
|
|
107
108
|
const capability = registry.resolve(step.kind);
|
|
108
109
|
if (!capability.plan)
|
|
109
110
|
continue;
|
|
110
111
|
const { kind: _kind, ...rest } = step;
|
|
111
112
|
const input = resolveStepInput(rest, {}, componentOutputs);
|
|
112
|
-
const planned = bindTargets(step.kind, ctx, await capability.plan(planContext(ctx, rest, componentOutputs), input));
|
|
113
|
+
const planned = bindPlanFlags(ctx, bindTargets(step.kind, ctx, await capability.plan(planContext(ctx, rest, componentOutputs), input)));
|
|
113
114
|
const member = { member: planned.member, planDigest: planned.planDigest };
|
|
114
115
|
members.push(member);
|
|
115
116
|
parts.push(planned.changeSet ?? emptyPart(member));
|
|
@@ -208,6 +209,21 @@ export function bindTargets(kind, ctx, planned) {
|
|
|
208
209
|
: undefined;
|
|
209
210
|
return { ...planned, planDigest, targets: want, ...(changeSet ? { changeSet } : {}) };
|
|
210
211
|
}
|
|
212
|
+
/**
|
|
213
|
+
* A step's plan made with `ctx.refresh` or `ctx.targetDependents` (#4627),
|
|
214
|
+
* its digest bound to them: the digest over the plan's own digest and the
|
|
215
|
+
* flags, so an approval of a refreshed or widened plan covers no plain one,
|
|
216
|
+
* as {@link bindTargets} binds targets. Without either flag, the plan as it
|
|
217
|
+
* came.
|
|
218
|
+
*/
|
|
219
|
+
export function bindPlanFlags(ctx, planned) {
|
|
220
|
+
const flags = { ...(ctx.refresh ? { refresh: true } : {}), ...(ctx.targetDependents ? { targetDependents: true } : {}) };
|
|
221
|
+
if (Object.keys(flags).length === 0)
|
|
222
|
+
return planned;
|
|
223
|
+
const planDigest = computePlanDigest("capability-plan-flags", { plan: planned.planDigest, ...flags });
|
|
224
|
+
const changeSet = planned.changeSet ? { ...planned.changeSet, member: { ...planned.changeSet.member, planDigest } } : undefined;
|
|
225
|
+
return { ...planned, planDigest, ...(changeSet ? { changeSet } : {}) };
|
|
226
|
+
}
|
|
211
227
|
/** `next` over `prior`, as a later step's outputs win over an earlier one's in a run. */
|
|
212
228
|
function mergePlannedOutputs(prior, next) {
|
|
213
229
|
const known = { ...(prior?.known ?? {}), ...next.known };
|
|
@@ -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,CA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 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { Bucket, Chant, Clock, ForgeReads, Jobs, Ledger, Log, OutOfBand, PullForge } from "./ports.js";
|
|
2
|
+
import type { BreakVerdict, PlainVerdict, Scenario, ScenarioStepKind } from "./schemas/index.js";
|
|
3
|
+
export type Arm = "plain" | "break";
|
|
4
|
+
export interface DriverPorts {
|
|
5
|
+
forge: PullForge & Partial<ForgeReads>;
|
|
6
|
+
/** The bucket the scenario's report URL names. */
|
|
7
|
+
bucket: Bucket;
|
|
8
|
+
chant: Pick<Chant, "approve">;
|
|
9
|
+
clock: Clock;
|
|
10
|
+
/** An overlay's files, repo-relative path to content. */
|
|
11
|
+
overlay(name: string): Record<string, string>;
|
|
12
|
+
ledger?: Ledger;
|
|
13
|
+
jobs?: Jobs;
|
|
14
|
+
outOfBand?: OutOfBand;
|
|
15
|
+
/** Put the repo and the stacks back to the base, before each run. */
|
|
16
|
+
reset?(): Promise<void>;
|
|
17
|
+
/** Hand the run's environment to where the pipeline reads it (the runner's secrets file). */
|
|
18
|
+
arm?(arm: Arm, env: Record<string, string>): Promise<void>;
|
|
19
|
+
log?: Log;
|
|
20
|
+
}
|
|
21
|
+
export interface DriverOptions {
|
|
22
|
+
/** Who approves, as chant names reviewers: `forgejo@forgejo:3000:<login>`. */
|
|
23
|
+
approver: string;
|
|
24
|
+
/** How often reports are polled, in ms. Default 2000. */
|
|
25
|
+
pollMs?: number;
|
|
26
|
+
}
|
|
27
|
+
export interface StepResult {
|
|
28
|
+
id: string;
|
|
29
|
+
do: ScenarioStepKind;
|
|
30
|
+
pull?: number;
|
|
31
|
+
commit?: string;
|
|
32
|
+
/** Why the run stopped at this step. */
|
|
33
|
+
stopped?: {
|
|
34
|
+
outcome: "broke" | "stalled";
|
|
35
|
+
reason: string;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export interface ArmRun {
|
|
39
|
+
scenario: string;
|
|
40
|
+
arm: Arm;
|
|
41
|
+
outcome: "held" | "broke" | "stalled";
|
|
42
|
+
reason?: string;
|
|
43
|
+
started: string;
|
|
44
|
+
ended: string;
|
|
45
|
+
steps: StepResult[];
|
|
46
|
+
}
|
|
47
|
+
/** Run one arm of a scenario. */
|
|
48
|
+
export declare function runArm(s: Scenario, arm: Arm, p: DriverPorts, opts: DriverOptions): Promise<ArmRun>;
|
|
49
|
+
/** The row's verdicts from the two runs. */
|
|
50
|
+
export declare function verdictsOf(plain: Pick<ArmRun, "outcome">, brk: Pick<ArmRun, "outcome">): {
|
|
51
|
+
plain: PlainVerdict;
|
|
52
|
+
break: BreakVerdict;
|
|
53
|
+
};
|
|
54
|
+
export interface ClaimRun {
|
|
55
|
+
plain: ArmRun;
|
|
56
|
+
break: ArmRun;
|
|
57
|
+
verdicts: {
|
|
58
|
+
plain: PlainVerdict;
|
|
59
|
+
break: BreakVerdict;
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
/** The plain run, then the BREAK run, and their verdicts. */
|
|
63
|
+
export declare function runClaim(s: Scenario, p: DriverPorts, opts: DriverOptions): Promise<ClaimRun>;
|
|
64
|
+
//# sourceMappingURL=driver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../src/e2e-harness/driver.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzG,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAiC,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAG7H,MAAM,MAAM,GAAG,GAAG,OAAO,GAAG,OAAO,CAAC;AAEpC,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IACvC,kDAAkD;IAClD,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IAC9B,KAAK,EAAE,KAAK,CAAC;IACb,yDAAyD;IACzD,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,qEAAqE;IACrE,KAAK,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACxB,6FAA6F;IAC7F,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,M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