@intentius/chant 0.124.27 → 0.124.29
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/README.md +1 -1
- package/dist/__golden__/wave-loop/fan-out-gated.json +8 -0
- package/dist/__golden__/wave-loop/fan-out-no-members.json +4 -0
- package/dist/__golden__/wave-loop/fan-out-only.json +6 -0
- package/dist/__golden__/wave-loop/op-by-apply-hold.json +2 -0
- package/dist/__golden__/wave-loop/op-cost-member.json +3 -0
- package/dist/__golden__/wave-loop/op-held-on-before-apply.json +1 -0
- package/dist/__golden__/wave-loop/op-held-on.json +2 -0
- package/dist/__golden__/wave-loop/op-hooks-held.json +2 -0
- package/dist/__golden__/wave-loop/op-hooks-hold-before-apply.json +2 -0
- package/dist/__golden__/wave-loop/op-hooks-refused-at-base.json +3 -0
- package/dist/__golden__/wave-loop/op-hooks-share.json +3 -0
- package/dist/__golden__/wave-loop/op-per-run.json +7 -0
- package/dist/__golden__/wave-loop/op-pr-review.json +7 -0
- package/dist/__golden__/wave-loop/op-sealed.json +3 -0
- package/dist/__golden__/wave-loop/op-spend.json +3 -0
- package/dist/__golden__/wave-loop/op-wave-commands.json +7 -0
- package/dist/__golden__/wave-loop/op-wide-waiting.json +4 -0
- package/dist/build-params.d.ts +34 -1
- package/dist/build-params.d.ts.map +1 -1
- package/dist/build-params.js +31 -1
- package/dist/change-set-graph.d.ts +63 -0
- package/dist/change-set-graph.d.ts.map +1 -0
- package/dist/change-set-graph.js +130 -0
- package/dist/change-set.d.ts +62 -3
- package/dist/change-set.d.ts.map +1 -1
- package/dist/change-set.js +36 -4
- package/dist/chant-version.d.ts +9 -0
- package/dist/chant-version.d.ts.map +1 -0
- package/dist/chant-version.js +16 -0
- package/dist/cli/build-params-cli.d.ts +7 -1
- package/dist/cli/build-params-cli.d.ts.map +1 -1
- package/dist/cli/build-params-cli.js +17 -8
- package/dist/cli/commands/build.d.ts +8 -0
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/build.js +15 -11
- package/dist/cli/commands/check-lexicon-docs.d.ts.map +1 -1
- package/dist/cli/commands/check-lexicon-docs.js +30 -2
- package/dist/cli/commands/check-lexicon.d.ts.map +1 -1
- package/dist/cli/commands/check-lexicon.js +13 -2
- package/dist/cli/commands/init-lexicon/templates/docs.d.ts +4 -1
- package/dist/cli/commands/init-lexicon/templates/docs.d.ts.map +1 -1
- package/dist/cli/commands/init-lexicon/templates/docs.js +6 -6
- package/dist/cli/commands/init-lexicon.d.ts.map +1 -1
- package/dist/cli/commands/init-lexicon.js +17 -8
- package/dist/cli/handlers/approve.d.ts.map +1 -1
- package/dist/cli/handlers/approve.js +64 -4
- package/dist/cli/handlers/build.d.ts.map +1 -1
- package/dist/cli/handlers/build.js +43 -4
- package/dist/cli/handlers/change-set.d.ts +10 -0
- package/dist/cli/handlers/change-set.d.ts.map +1 -1
- package/dist/cli/handlers/change-set.js +51 -1
- package/dist/cli/handlers/fan-out.d.ts +10 -1
- package/dist/cli/handlers/fan-out.d.ts.map +1 -1
- package/dist/cli/handlers/fan-out.js +54 -6
- package/dist/cli/handlers/lifecycle-gc.d.ts +19 -0
- package/dist/cli/handlers/lifecycle-gc.d.ts.map +1 -0
- package/dist/cli/handlers/lifecycle-gc.js +143 -0
- package/dist/cli/handlers/pr.d.ts +16 -2
- package/dist/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/handlers/pr.js +269 -37
- package/dist/cli/handlers/promote.d.ts +7 -0
- package/dist/cli/handlers/promote.d.ts.map +1 -1
- package/dist/cli/handlers/promote.js +440 -28
- package/dist/cli/handlers/release.d.ts +91 -0
- package/dist/cli/handlers/release.d.ts.map +1 -0
- package/dist/cli/handlers/release.js +589 -0
- package/dist/cli/handlers/run.d.ts +38 -2
- package/dist/cli/handlers/run.d.ts.map +1 -1
- package/dist/cli/handlers/run.js +234 -16
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +143 -17
- package/dist/cli/mcp/workspace-tools.js +1 -1
- package/dist/cli/parse-args.d.ts.map +1 -1
- package/dist/cli/parse-args.js +73 -5
- package/dist/cli/registry.d.ts +43 -5
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/cli/run-events.d.ts +30 -0
- package/dist/cli/run-events.d.ts.map +1 -0
- package/dist/cli/run-events.js +49 -0
- package/dist/cli/version.d.ts +3 -5
- package/dist/cli/version.d.ts.map +1 -1
- package/dist/cli/version.js +3 -13
- package/dist/codegen/docs-in-site.d.ts +71 -0
- package/dist/codegen/docs-in-site.d.ts.map +1 -0
- package/dist/codegen/docs-in-site.js +177 -0
- package/dist/codegen/docs-types.d.ts +14 -1
- package/dist/codegen/docs-types.d.ts.map +1 -1
- package/dist/codegen/docs.d.ts +18 -1
- package/dist/codegen/docs.d.ts.map +1 -1
- package/dist/codegen/docs.js +40 -7
- package/dist/codegen/rehype-base-url.mjs +15 -9
- package/dist/components/auto-release.d.ts +6 -1
- package/dist/components/auto-release.d.ts.map +1 -1
- package/dist/components/auto-release.js +3 -0
- package/dist/components/capability.d.ts +9 -0
- package/dist/components/capability.d.ts.map +1 -1
- package/dist/components/cli-support.d.ts +6 -0
- package/dist/components/cli-support.d.ts.map +1 -1
- package/dist/components/cli-support.js +10 -9
- package/dist/components/driver.d.ts +50 -9
- package/dist/components/driver.d.ts.map +1 -1
- package/dist/components/driver.js +116 -54
- package/dist/components/fan-out-inputs.d.ts +69 -0
- package/dist/components/fan-out-inputs.d.ts.map +1 -0
- package/dist/components/fan-out-inputs.js +169 -0
- package/dist/components/fan-out-record.d.ts +13 -0
- package/dist/components/fan-out-record.d.ts.map +1 -1
- package/dist/components/fan-out-record.js +16 -0
- package/dist/components/fan-out-run.d.ts +7 -0
- package/dist/components/fan-out-run.d.ts.map +1 -1
- package/dist/components/fan-out-run.js +85 -26
- package/dist/components/fan-out.d.ts +4 -0
- package/dist/components/fan-out.d.ts.map +1 -1
- package/dist/components/pr-pipeline.d.ts +25 -0
- package/dist/components/pr-pipeline.d.ts.map +1 -1
- package/dist/components/pr-pipeline.js +22 -4
- package/dist/components/pr-run.d.ts +11 -0
- package/dist/components/pr-run.d.ts.map +1 -1
- package/dist/components/pr-run.js +20 -1
- package/dist/components/promote-order.d.ts +38 -0
- package/dist/components/promote-order.d.ts.map +1 -0
- package/dist/components/promote-order.js +62 -0
- package/dist/components/promote.d.ts +38 -2
- package/dist/components/promote.d.ts.map +1 -1
- package/dist/components/promote.js +77 -2
- package/dist/components/release-compile.d.ts +142 -0
- package/dist/components/release-compile.d.ts.map +1 -0
- package/dist/components/release-compile.js +382 -0
- package/dist/components/release-gate.d.ts +135 -0
- package/dist/components/release-gate.d.ts.map +1 -0
- package/dist/components/release-gate.js +288 -0
- package/dist/components/release-promote.d.ts +96 -0
- package/dist/components/release-promote.d.ts.map +1 -0
- package/dist/components/release-promote.js +204 -0
- package/dist/components/run-progress.d.ts +7 -0
- package/dist/components/run-progress.d.ts.map +1 -1
- package/dist/components/wave-plan.d.ts +8 -1
- package/dist/components/wave-plan.d.ts.map +1 -1
- package/dist/components/wave-plan.js +11 -3
- package/dist/config.d.ts +45 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +3 -0
- package/dist/flag-params.d.ts +54 -0
- package/dist/flag-params.d.ts.map +1 -0
- package/dist/flag-params.js +130 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/lifecycle/__fixtures__/publish-fakes.d.ts +120 -0
- package/dist/lifecycle/__fixtures__/publish-fakes.d.ts.map +1 -0
- package/dist/lifecycle/__fixtures__/publish-fakes.js +304 -0
- package/dist/lifecycle/change-set-store.d.ts +68 -0
- package/dist/lifecycle/change-set-store.d.ts.map +1 -0
- package/dist/lifecycle/change-set-store.js +97 -0
- package/dist/lifecycle/commit-sha.d.ts +13 -0
- package/dist/lifecycle/commit-sha.d.ts.map +1 -0
- package/dist/lifecycle/commit-sha.js +21 -0
- package/dist/lifecycle/delivery-metrics.d.ts +139 -0
- package/dist/lifecycle/delivery-metrics.d.ts.map +1 -0
- package/dist/lifecycle/delivery-metrics.js +145 -0
- package/dist/lifecycle/deploy-outcome.d.ts +81 -0
- package/dist/lifecycle/deploy-outcome.d.ts.map +1 -0
- package/dist/lifecycle/deploy-outcome.js +101 -0
- package/dist/lifecycle/gate-change-set.d.ts +78 -0
- package/dist/lifecycle/gate-change-set.d.ts.map +1 -0
- package/dist/lifecycle/gate-change-set.js +138 -0
- package/dist/lifecycle/gate-ledger.d.ts +51 -4
- package/dist/lifecycle/gate-ledger.d.ts.map +1 -1
- package/dist/lifecycle/gate-ledger.js +18 -0
- package/dist/lifecycle/git.d.ts +30 -1
- package/dist/lifecycle/git.d.ts.map +1 -1
- package/dist/lifecycle/git.js +31 -5
- package/dist/lifecycle/index.d.ts +4 -0
- package/dist/lifecycle/index.d.ts.map +1 -1
- package/dist/lifecycle/index.js +4 -0
- package/dist/lifecycle/mixed-environment.d.ts +95 -0
- package/dist/lifecycle/mixed-environment.d.ts.map +1 -0
- package/dist/lifecycle/mixed-environment.js +154 -0
- package/dist/lifecycle/publish-attachments.d.ts +79 -0
- package/dist/lifecycle/publish-attachments.d.ts.map +1 -0
- package/dist/lifecycle/publish-attachments.js +179 -0
- package/dist/lifecycle/publish-credentials.d.ts +37 -0
- package/dist/lifecycle/publish-credentials.d.ts.map +1 -0
- package/dist/lifecycle/publish-credentials.js +69 -0
- package/dist/lifecycle/publish-declaration.d.ts +97 -0
- package/dist/lifecycle/publish-declaration.d.ts.map +1 -0
- package/dist/lifecycle/publish-declaration.js +83 -0
- package/dist/lifecycle/publish-forge.d.ts +53 -0
- package/dist/lifecycle/publish-forge.d.ts.map +1 -0
- package/dist/lifecycle/publish-forge.js +298 -0
- package/dist/lifecycle/publish-npm.d.ts +61 -0
- package/dist/lifecycle/publish-npm.d.ts.map +1 -0
- package/dist/lifecycle/publish-npm.js +242 -0
- package/dist/lifecycle/publish-oci.d.ts +64 -0
- package/dist/lifecycle/publish-oci.d.ts.map +1 -0
- package/dist/lifecycle/publish-oci.js +383 -0
- package/dist/lifecycle/publish-record.d.ts +66 -0
- package/dist/lifecycle/publish-record.d.ts.map +1 -0
- package/dist/lifecycle/publish-record.js +84 -0
- package/dist/lifecycle/publish-targets.d.ts +45 -0
- package/dist/lifecycle/publish-targets.d.ts.map +1 -0
- package/dist/lifecycle/publish-targets.js +85 -0
- package/dist/lifecycle/release-cut.d.ts +154 -0
- package/dist/lifecycle/release-cut.d.ts.map +1 -0
- package/dist/lifecycle/release-cut.js +366 -0
- package/dist/lifecycle/release-join.d.ts +95 -0
- package/dist/lifecycle/release-join.d.ts.map +1 -0
- package/dist/lifecycle/release-join.js +139 -0
- package/dist/lifecycle/release-ledger.d.ts +54 -0
- package/dist/lifecycle/release-ledger.d.ts.map +1 -1
- package/dist/lifecycle/release-ledger.js +53 -20
- package/dist/lifecycle/release-publish.d.ts +312 -0
- package/dist/lifecycle/release-publish.d.ts.map +1 -0
- package/dist/lifecycle/release-publish.js +335 -0
- package/dist/lifecycle/release-revocation.d.ts +80 -0
- package/dist/lifecycle/release-revocation.d.ts.map +1 -0
- package/dist/lifecycle/release-revocation.js +123 -0
- package/dist/lifecycle/release-store.d.ts +200 -0
- package/dist/lifecycle/release-store.d.ts.map +1 -0
- package/dist/lifecycle/release-store.js +320 -0
- package/dist/lifecycle/release-verify.d.ts +61 -0
- package/dist/lifecycle/release-verify.d.ts.map +1 -0
- package/dist/lifecycle/release-verify.js +92 -0
- package/dist/lifecycle/release-workstation.d.ts +91 -0
- package/dist/lifecycle/release-workstation.d.ts.map +1 -0
- package/dist/lifecycle/release-workstation.js +180 -0
- package/dist/lifecycle/retention-policy.d.ts +45 -0
- package/dist/lifecycle/retention-policy.d.ts.map +1 -0
- package/dist/lifecycle/retention-policy.js +43 -0
- package/dist/lifecycle/retention.d.ts +185 -0
- package/dist/lifecycle/retention.d.ts.map +1 -0
- package/dist/lifecycle/retention.js +400 -0
- package/dist/lifecycle/run-ledger.d.ts +4 -0
- package/dist/lifecycle/run-ledger.d.ts.map +1 -1
- package/dist/lifecycle/run-ledger.js +2 -0
- package/dist/op/activities/change-coverage.d.ts.map +1 -1
- package/dist/op/activities/change-coverage.js +4 -2
- package/dist/op/activities/source-release.d.ts.map +1 -1
- package/dist/op/activities/source-release.js +7 -3
- package/dist/op/activities/source-rollback.d.ts.map +1 -1
- package/dist/op/activities/source-rollback.js +7 -3
- package/dist/op/gate-name.d.ts +11 -2
- package/dist/op/gate-name.d.ts.map +1 -1
- package/dist/op/gate-name.js +12 -3
- package/dist/op/gate-run-locator.d.ts +22 -0
- package/dist/op/gate-run-locator.d.ts.map +1 -1
- package/dist/op/gate-run-locator.js +31 -0
- package/dist/op/gate.d.ts +27 -3
- package/dist/op/gate.d.ts.map +1 -1
- package/dist/op/gate.js +57 -3
- package/dist/op/local-executor.d.ts +36 -1
- package/dist/op/local-executor.d.ts.map +1 -1
- package/dist/op/local-executor.js +158 -52
- package/dist/op/op-waves-run.d.ts.map +1 -1
- package/dist/op/op-waves-run.js +4 -0
- package/dist/op/run-live.d.ts +2 -0
- package/dist/op/run-live.d.ts.map +1 -1
- package/dist/op/run-live.js +1 -1
- package/dist/op/runtime.d.ts +46 -0
- package/dist/op/runtime.d.ts.map +1 -1
- package/dist/op/runtimes/local.d.ts.map +1 -1
- package/dist/op/runtimes/local.js +8 -0
- package/dist/plan-summary.d.ts.map +1 -1
- package/dist/plan-summary.js +8 -2
- package/dist/point-decision.d.ts +2 -0
- package/dist/point-decision.d.ts.map +1 -1
- package/dist/point-decision.js +9 -2
- package/dist/pr-loop.d.ts +7 -0
- package/dist/pr-loop.d.ts.map +1 -1
- package/dist/pr-loop.js +23 -4
- package/dist/pr-report-url.d.ts +82 -0
- package/dist/pr-report-url.d.ts.map +1 -0
- package/dist/pr-report-url.js +174 -0
- package/dist/provenance.d.ts +2 -2
- package/dist/provenance.d.ts.map +1 -1
- package/dist/run-event-store.d.ts +104 -0
- package/dist/run-event-store.d.ts.map +1 -0
- package/dist/run-event-store.js +251 -0
- package/dist/run-event-stream.d.ts +133 -0
- package/dist/run-event-stream.d.ts.map +1 -0
- package/dist/run-event-stream.js +242 -0
- package/dist/run-event.d.ts +285 -0
- package/dist/run-event.d.ts.map +1 -0
- package/dist/run-event.js +209 -0
- package/dist/wave-runtime.mjs +262 -226
- package/dist/workspace/__fixtures__/flag-workspace.d.ts +31 -0
- package/dist/workspace/__fixtures__/flag-workspace.d.ts.map +1 -0
- package/dist/workspace/__fixtures__/flag-workspace.js +114 -0
- package/dist/workspace/__fixtures__/run-event-check.d.ts +19 -0
- package/dist/workspace/__fixtures__/run-event-check.d.ts.map +1 -0
- package/dist/workspace/__fixtures__/run-event-check.js +59 -0
- package/dist/workspace/change-set-show.d.ts +56 -0
- package/dist/workspace/change-set-show.d.ts.map +1 -0
- package/dist/workspace/change-set-show.js +54 -0
- package/dist/workspace/change-set-show.schema.json +102 -0
- package/dist/workspace/change-set.schema.json +32 -1
- package/dist/workspace/changes-cli.d.ts.map +1 -1
- package/dist/workspace/changes-cli.js +10 -1
- package/dist/workspace/changes.d.ts +37 -0
- package/dist/workspace/changes.d.ts.map +1 -1
- package/dist/workspace/changes.js +49 -2
- package/dist/workspace/changes.schema.json +135 -0
- package/dist/workspace/check.schema.json +4 -2
- package/dist/workspace/checks/records.d.ts +9 -1
- package/dist/workspace/checks/records.d.ts.map +1 -1
- package/dist/workspace/checks/records.js +35 -1
- package/dist/workspace/checks.d.ts +1 -0
- package/dist/workspace/checks.d.ts.map +1 -1
- package/dist/workspace/checks.js +2 -1
- package/dist/workspace/ci-green-cli.d.ts +19 -4
- package/dist/workspace/ci-green-cli.d.ts.map +1 -1
- package/dist/workspace/ci-green-cli.js +75 -12
- package/dist/workspace/ci-green-forge.d.ts +20 -3
- package/dist/workspace/ci-green-forge.d.ts.map +1 -1
- package/dist/workspace/ci-green-forge.js +6 -4
- package/dist/workspace/ci-green-workflow.d.ts +11 -0
- package/dist/workspace/ci-green-workflow.d.ts.map +1 -1
- package/dist/workspace/ci-green-workflow.js +6 -0
- package/dist/workspace/ci-green.d.ts +281 -13
- package/dist/workspace/ci-green.d.ts.map +1 -1
- package/dist/workspace/ci-green.js +456 -38
- package/dist/workspace/ci-last-green.schema.json +32 -2
- package/dist/workspace/ci-list.schema.json +525 -0
- package/dist/workspace/commit-links.d.ts +85 -0
- package/dist/workspace/commit-links.d.ts.map +1 -0
- package/dist/workspace/commit-links.js +163 -0
- package/dist/workspace/declaration.d.ts +35 -0
- package/dist/workspace/declaration.d.ts.map +1 -1
- package/dist/workspace/declaration.js +27 -1
- package/dist/workspace/declaration.schema.json +76 -0
- package/dist/workspace/declared-kinds.d.ts +16 -0
- package/dist/workspace/declared-kinds.d.ts.map +1 -1
- package/dist/workspace/declared-kinds.js +25 -0
- package/dist/workspace/delivery-metrics.d.ts +91 -0
- package/dist/workspace/delivery-metrics.d.ts.map +1 -0
- package/dist/workspace/delivery-metrics.js +217 -0
- package/dist/workspace/delivery-metrics.schema.json +519 -0
- package/dist/workspace/flags-read.d.ts +37 -0
- package/dist/workspace/flags-read.d.ts.map +1 -0
- package/dist/workspace/flags-read.js +103 -0
- package/dist/workspace/flags.d.ts +100 -0
- package/dist/workspace/flags.d.ts.map +1 -0
- package/dist/workspace/flags.js +98 -0
- package/dist/workspace/graph-cli.js +1 -1
- package/dist/workspace/identity-gate-rule.d.ts +37 -0
- package/dist/workspace/identity-gate-rule.d.ts.map +1 -1
- package/dist/workspace/identity-gate-rule.js +72 -7
- package/dist/workspace/identity.d.ts +12 -0
- package/dist/workspace/identity.d.ts.map +1 -1
- package/dist/workspace/identity.js +13 -1
- package/dist/workspace/intent-cli.d.ts +11 -2
- package/dist/workspace/intent-cli.d.ts.map +1 -1
- package/dist/workspace/intent-cli.js +54 -5
- package/dist/workspace/intent-trace.d.ts +219 -0
- package/dist/workspace/intent-trace.d.ts.map +1 -0
- package/dist/workspace/intent-trace.js +314 -0
- package/dist/workspace/intent.d.ts +36 -7
- package/dist/workspace/intent.d.ts.map +1 -1
- package/dist/workspace/intent.js +192 -22
- package/dist/workspace/intent.schema.json +702 -6
- package/dist/workspace/ls.d.ts +4 -0
- package/dist/workspace/ls.d.ts.map +1 -1
- package/dist/workspace/ls.js +2 -0
- package/dist/workspace/ls.schema.json +3 -1
- package/dist/workspace/member-pipeline.d.ts +6 -0
- package/dist/workspace/member-pipeline.d.ts.map +1 -1
- package/dist/workspace/member-pipeline.js +6 -0
- package/dist/workspace/overlap.d.ts +146 -0
- package/dist/workspace/overlap.d.ts.map +1 -0
- package/dist/workspace/overlap.js +276 -0
- package/dist/workspace/promotion-order.d.ts +41 -0
- package/dist/workspace/promotion-order.d.ts.map +1 -0
- package/dist/workspace/promotion-order.js +95 -0
- package/dist/workspace/reason-codes.d.ts +4 -0
- package/dist/workspace/reason-codes.d.ts.map +1 -1
- package/dist/workspace/reason-codes.js +7 -1
- package/dist/workspace/records.d.ts +15 -2
- package/dist/workspace/records.d.ts.map +1 -1
- package/dist/workspace/records.js +32 -0
- package/dist/workspace/records.schema.json +21 -2
- package/dist/workspace/reference-kinds/flag/flag.kind.mjs +32 -0
- package/dist/workspace/reference-kinds/flag/flag.schema.json +53 -0
- package/dist/workspace/releases.d.ts +81 -0
- package/dist/workspace/releases.d.ts.map +1 -0
- package/dist/workspace/releases.js +103 -0
- package/dist/workspace/releases.schema.json +513 -0
- package/dist/workspace/run-event.schema.json +295 -0
- package/dist/workspace/status-gates.d.ts +34 -1
- package/dist/workspace/status-gates.d.ts.map +1 -1
- package/dist/workspace/status-gates.js +31 -2
- package/dist/workspace/status-stewards.d.ts +4 -0
- package/dist/workspace/status-stewards.d.ts.map +1 -1
- package/dist/workspace/status-stewards.js +2 -0
- package/dist/workspace/status.d.ts +117 -0
- package/dist/workspace/status.d.ts.map +1 -1
- package/dist/workspace/status.js +218 -4
- package/dist/workspace/status.schema.json +268 -2
- package/dist/workspace/trust/ci-tag-statement.d.ts +102 -0
- package/dist/workspace/trust/ci-tag-statement.d.ts.map +1 -0
- package/dist/workspace/trust/ci-tag-statement.js +123 -0
- package/dist/workspace/trust/op-run-statement.d.ts +91 -0
- package/dist/workspace/trust/op-run-statement.d.ts.map +1 -0
- package/dist/workspace/trust/op-run-statement.js +143 -0
- package/dist/workspace/trust/rotation.d.ts +18 -2
- package/dist/workspace/trust/rotation.d.ts.map +1 -1
- package/dist/workspace/trust/rotation.js +65 -16
- package/dist/workspace/trust/seal.d.ts +11 -0
- package/dist/workspace/trust/seal.d.ts.map +1 -1
- package/dist/workspace/trust/seal.js +9 -0
- package/dist/workspace/trust/ssh-commit.d.ts.map +1 -1
- package/dist/workspace/trust/ssh-commit.js +10 -10
- package/dist/workspace/wip.d.ts.map +1 -1
- package/dist/workspace/wip.js +11 -3
- package/package.json +1 -1
- package/src/__golden__/wave-loop/fan-out-gated.json +8 -0
- package/src/__golden__/wave-loop/fan-out-no-members.json +4 -0
- package/src/__golden__/wave-loop/fan-out-only.json +6 -0
- package/src/__golden__/wave-loop/op-by-apply-hold.json +2 -0
- package/src/__golden__/wave-loop/op-cost-member.json +3 -0
- package/src/__golden__/wave-loop/op-held-on-before-apply.json +1 -0
- package/src/__golden__/wave-loop/op-held-on.json +2 -0
- package/src/__golden__/wave-loop/op-hooks-held.json +2 -0
- package/src/__golden__/wave-loop/op-hooks-hold-before-apply.json +2 -0
- package/src/__golden__/wave-loop/op-hooks-refused-at-base.json +3 -0
- package/src/__golden__/wave-loop/op-hooks-share.json +3 -0
- package/src/__golden__/wave-loop/op-per-run.json +7 -0
- package/src/__golden__/wave-loop/op-pr-review.json +7 -0
- package/src/__golden__/wave-loop/op-sealed.json +3 -0
- package/src/__golden__/wave-loop/op-spend.json +3 -0
- package/src/__golden__/wave-loop/op-wave-commands.json +7 -0
- package/src/__golden__/wave-loop/op-wide-waiting.json +4 -0
- package/src/build-params.test.ts +46 -0
- package/src/build-params.ts +55 -1
- package/src/change-set-graph.test.ts +72 -0
- package/src/change-set-graph.ts +141 -0
- package/src/change-set.ts +87 -6
- package/src/chant-version.ts +16 -0
- package/src/cli/build-params-cli.ts +22 -9
- package/src/cli/commands/build.ts +25 -11
- package/src/cli/commands/check-lexicon-docs.test.ts +51 -0
- package/src/cli/commands/check-lexicon-docs.ts +39 -2
- package/src/cli/commands/check-lexicon.ts +14 -2
- package/src/cli/commands/init-lexicon/templates/docs.ts +7 -6
- package/src/cli/commands/init-lexicon.test.ts +25 -0
- package/src/cli/commands/init-lexicon.ts +18 -8
- package/src/cli/handlers/approve-release.test.ts +84 -0
- package/src/cli/handlers/approve-revoked.test.ts +155 -0
- package/src/cli/handlers/approve.ts +65 -2
- package/src/cli/handlers/build.test.ts +67 -0
- package/src/cli/handlers/build.ts +46 -4
- package/src/cli/handlers/change-set.ts +49 -1
- package/src/cli/handlers/fan-out.test.ts +228 -1
- package/src/cli/handlers/fan-out.ts +53 -6
- package/src/cli/handlers/intent-trace.e2e.test.ts +201 -0
- package/src/cli/handlers/lifecycle-gc.test.ts +126 -0
- package/src/cli/handlers/lifecycle-gc.ts +146 -0
- package/src/cli/handlers/operator.test.ts +37 -0
- package/src/cli/handlers/pr.test.ts +341 -0
- package/src/cli/handlers/pr.ts +292 -47
- package/src/cli/handlers/promote.test.ts +669 -7
- package/src/cli/handlers/promote.ts +464 -29
- package/src/cli/handlers/release-implicit.e2e.test.ts +161 -0
- package/src/cli/handlers/release-join.e2e.test.ts +185 -0
- package/src/cli/handlers/release-publish-targets.e2e.test.ts +295 -0
- package/src/cli/handlers/release-verify.e2e.test.ts +117 -0
- package/src/cli/handlers/release-workstation-ci.e2e.test.ts +135 -0
- package/src/cli/handlers/release.e2e.test.ts +199 -0
- package/src/cli/handlers/release.ts +593 -0
- package/src/cli/handlers/run-auto-release.test.ts +80 -0
- package/src/cli/handlers/run-events-cmd.test.ts +92 -0
- package/src/cli/handlers/run-release.test.ts +55 -0
- package/src/cli/handlers/run.test.ts +30 -0
- package/src/cli/handlers/run.ts +243 -18
- package/src/cli/main.test.ts +8 -0
- package/src/cli/main.ts +143 -17
- package/src/cli/mcp/never-over-mcp.test.ts +2 -0
- package/src/cli/mcp/workspace-tools.ts +1 -1
- package/src/cli/parse-args.ts +56 -5
- package/src/cli/registry.ts +43 -5
- package/src/cli/run-events.ts +57 -0
- package/src/cli/version.ts +3 -13
- package/src/codegen/docs-in-site.test.ts +166 -0
- package/src/codegen/docs-in-site.ts +182 -0
- package/src/codegen/docs-site/AgentPrompt.astro +26 -1
- package/src/codegen/docs-types.ts +14 -1
- package/src/codegen/docs.ts +60 -7
- package/src/codegen/rehype-base-url.d.mts +3 -1
- package/src/codegen/rehype-base-url.mjs +15 -9
- package/src/codegen/rehype-base-url.test.ts +34 -0
- package/src/components/auto-release.test.ts +30 -0
- package/src/components/auto-release.ts +9 -1
- package/src/components/capability.ts +9 -0
- package/src/components/cli-support.test.ts +82 -0
- package/src/components/cli-support.ts +16 -9
- package/src/components/driver.test.ts +24 -0
- package/src/components/driver.ts +165 -56
- package/src/components/fan-out-inputs.test.ts +85 -0
- package/src/components/fan-out-inputs.ts +192 -0
- package/src/components/fan-out-record.test.ts +10 -0
- package/src/components/fan-out-record.ts +19 -0
- package/src/components/fan-out-run.ts +104 -35
- package/src/components/fan-out.ts +4 -0
- package/src/components/pr-pipeline.ts +35 -4
- package/src/components/pr-run.ts +30 -1
- package/src/components/promote-order.test.ts +90 -0
- package/src/components/promote-order.ts +75 -0
- package/src/components/promote.test.ts +10 -1
- package/src/components/promote.ts +94 -3
- package/src/components/release-compile.test.ts +147 -0
- package/src/components/release-compile.ts +459 -0
- package/src/components/release-gate.test.ts +215 -0
- package/src/components/release-gate.ts +355 -0
- package/src/components/release-promote.test.ts +159 -0
- package/src/components/release-promote.ts +232 -0
- package/src/components/run-progress.ts +7 -0
- package/src/components/wave-plan.ts +16 -3
- package/src/config.ts +15 -1
- package/src/flag-params.test.ts +144 -0
- package/src/flag-params.ts +134 -0
- package/src/index.ts +2 -0
- package/src/lifecycle/__fixtures__/publish-fakes.ts +351 -0
- package/src/lifecycle/change-set-store.test.ts +217 -0
- package/src/lifecycle/change-set-store.ts +113 -0
- package/src/lifecycle/commit-sha.ts +23 -0
- package/src/lifecycle/delivery-metrics.ts +263 -0
- package/src/lifecycle/deploy-outcome.ts +147 -0
- package/src/lifecycle/gate-change-set.e2e.test.ts +122 -0
- package/src/lifecycle/gate-change-set.ts +164 -0
- package/src/lifecycle/gate-ledger.test.ts +33 -0
- package/src/lifecycle/gate-ledger.ts +68 -3
- package/src/lifecycle/git.ts +61 -8
- package/src/lifecycle/index.ts +4 -0
- package/src/lifecycle/mixed-environment.test.ts +97 -0
- package/src/lifecycle/mixed-environment.ts +204 -0
- package/src/lifecycle/publish-attachments.ts +196 -0
- package/src/lifecycle/publish-credentials.ts +84 -0
- package/src/lifecycle/publish-declaration.ts +95 -0
- package/src/lifecycle/publish-forge.ts +325 -0
- package/src/lifecycle/publish-npm.ts +259 -0
- package/src/lifecycle/publish-oci.ts +396 -0
- package/src/lifecycle/publish-record.ts +113 -0
- package/src/lifecycle/publish-resume.test.ts +168 -0
- package/src/lifecycle/publish-targets.test.ts +494 -0
- package/src/lifecycle/publish-targets.ts +100 -0
- package/src/lifecycle/release-cut-signed.test.ts +180 -0
- package/src/lifecycle/release-cut.test.ts +483 -0
- package/src/lifecycle/release-cut.ts +503 -0
- package/src/lifecycle/release-flag.test.ts +112 -0
- package/src/lifecycle/release-join.test.ts +68 -0
- package/src/lifecycle/release-join.ts +182 -0
- package/src/lifecycle/release-ledger.test.ts +14 -0
- package/src/lifecycle/release-ledger.ts +85 -17
- package/src/lifecycle/release-publish.test.ts +225 -0
- package/src/lifecycle/release-publish.ts +568 -0
- package/src/lifecycle/release-revocation.ts +147 -0
- package/src/lifecycle/release-store.ts +434 -0
- package/src/lifecycle/release-verify.test.ts +110 -0
- package/src/lifecycle/release-verify.ts +120 -0
- package/src/lifecycle/release-workstation.test.ts +204 -0
- package/src/lifecycle/release-workstation.ts +216 -0
- package/src/lifecycle/retention-growth.e2e.test.ts +279 -0
- package/src/lifecycle/retention-policy.ts +63 -0
- package/src/lifecycle/retention.test.ts +363 -0
- package/src/lifecycle/retention.ts +508 -0
- package/src/lifecycle/run-ledger.test.ts +10 -0
- package/src/lifecycle/run-ledger.ts +6 -0
- package/src/op/activities/change-coverage.ts +4 -1
- package/src/op/activities/source-release.ts +8 -3
- package/src/op/activities/source-rollback.ts +8 -4
- package/src/op/commit-run-gate-deploy-join.test.ts +117 -0
- package/src/op/gate-name.ts +13 -3
- package/src/op/gate-release.test.ts +126 -0
- package/src/op/gate-run-locator.test.ts +110 -0
- package/src/op/gate-run-locator.ts +35 -0
- package/src/op/gate.ts +88 -6
- package/src/op/local-executor.ts +207 -52
- package/src/op/op-waves-run.ts +4 -0
- package/src/op/run-events.test.ts +166 -0
- package/src/op/run-live.ts +1 -1
- package/src/op/runtime.ts +39 -0
- package/src/op/runtimes/local.test.ts +16 -0
- package/src/op/runtimes/local.ts +9 -0
- package/src/plan-summary.test.ts +20 -0
- package/src/plan-summary.ts +8 -1
- package/src/point-decision.ts +12 -2
- package/src/pr-loop.ts +25 -4
- package/src/pr-report-url.test.ts +131 -0
- package/src/pr-report-url.ts +209 -0
- package/src/provenance.ts +2 -2
- package/src/run-event-store.test.ts +144 -0
- package/src/run-event-store.ts +273 -0
- package/src/run-event-stream.test.ts +175 -0
- package/src/run-event-stream.ts +309 -0
- package/src/run-event.test.ts +277 -0
- package/src/run-event.ts +471 -0
- package/src/wave-loop-golden.test.ts +9 -0
- package/src/workspace/__fixtures__/flag-workspace.ts +132 -0
- package/src/workspace/__fixtures__/older-records/change-set-984534ea9.json +100 -0
- package/src/workspace/__fixtures__/older-records/older-records.json +326 -0
- package/src/workspace/__fixtures__/run-event-check.ts +58 -0
- package/src/workspace/ancestry-index.test.ts +93 -0
- package/src/workspace/change-set-show.schema.json +102 -0
- package/src/workspace/change-set-show.ts +72 -0
- package/src/workspace/change-set.schema.json +32 -1
- package/src/workspace/changes-cli.ts +10 -1
- package/src/workspace/changes.schema.json +135 -0
- package/src/workspace/changes.test.ts +1 -1
- package/src/workspace/changes.ts +84 -2
- package/src/workspace/check.schema.json +4 -2
- package/src/workspace/checks/records.ts +35 -1
- package/src/workspace/checks.ts +2 -1
- package/src/workspace/ci-green-cli.ts +75 -13
- package/src/workspace/ci-green-forge.ts +24 -4
- package/src/workspace/ci-green-runs.test.ts +242 -0
- package/src/workspace/ci-green-signed.test.ts +302 -0
- package/src/workspace/ci-green-workflow.test.ts +16 -0
- package/src/workspace/ci-green-workflow.ts +12 -0
- package/src/workspace/ci-green.test.ts +131 -2
- package/src/workspace/ci-green.ts +635 -42
- package/src/workspace/ci-last-green.schema.json +32 -2
- package/src/workspace/ci-list.schema.json +525 -0
- package/src/workspace/commit-links.test.ts +279 -0
- package/src/workspace/commit-links.ts +183 -0
- package/src/workspace/declaration.schema.json +76 -0
- package/src/workspace/declaration.test.ts +28 -0
- package/src/workspace/declaration.ts +60 -2
- package/src/workspace/declared-kinds.ts +40 -1
- package/src/workspace/delivery-metrics.schema.json +519 -0
- package/src/workspace/delivery-metrics.test.ts +236 -0
- package/src/workspace/delivery-metrics.ts +286 -0
- package/src/workspace/flags-read.ts +121 -0
- package/src/workspace/flags.test.ts +141 -0
- package/src/workspace/flags.ts +157 -0
- package/src/workspace/graph-cli.ts +1 -1
- package/src/workspace/identity-gate-rule.ts +91 -7
- package/src/workspace/identity.ts +14 -1
- package/src/workspace/intent-cli.ts +46 -5
- package/src/workspace/intent-trace.test.ts +173 -0
- package/src/workspace/intent-trace.ts +484 -0
- package/src/workspace/intent.schema.json +702 -6
- package/src/workspace/intent.ts +196 -26
- package/src/workspace/ls.schema.json +3 -1
- package/src/workspace/ls.ts +6 -0
- package/src/workspace/member-pipeline.test.ts +17 -0
- package/src/workspace/member-pipeline.ts +9 -0
- package/src/workspace/older-records.test.ts +412 -0
- package/src/workspace/overlap.test.ts +165 -0
- package/src/workspace/overlap.ts +340 -0
- package/src/workspace/promotion-order.ts +97 -0
- package/src/workspace/read-contract.e2e.test.ts +5 -1
- package/src/workspace/reason-codes.test.ts +7 -1
- package/src/workspace/reason-codes.ts +7 -1
- package/src/workspace/record-assets.test.ts +2 -1
- package/src/workspace/records-contract.e2e.test.ts +2 -1
- package/src/workspace/records.schema.json +21 -2
- package/src/workspace/records.ts +36 -2
- package/src/workspace/reference-kinds/flag/flag.kind.mjs +32 -0
- package/src/workspace/reference-kinds/flag/flag.schema.json +53 -0
- package/src/workspace/releases.schema.json +513 -0
- package/src/workspace/releases.test.ts +108 -0
- package/src/workspace/releases.ts +133 -0
- package/src/workspace/run-event.schema.json +295 -0
- package/src/workspace/status-contract.test.ts +81 -1
- package/src/workspace/status-gates.ts +64 -1
- package/src/workspace/status-mixed.test.ts +152 -0
- package/src/workspace/status-revoked.test.ts +153 -0
- package/src/workspace/status-stewards.ts +6 -0
- package/src/workspace/status.schema.json +268 -2
- package/src/workspace/status.ts +334 -4
- package/src/workspace/trust/ci-tag-statement.ts +151 -0
- package/src/workspace/trust/op-run-statement.ts +148 -0
- package/src/workspace/trust/rotation.ts +61 -14
- package/src/workspace/trust/seal.ts +10 -0
- package/src/workspace/trust/ssh-commit.ts +10 -9
- package/src/workspace/wip.ts +11 -2
- package/src/cli/commands/__fixtures__/init-lexicon-output/docs/astro.config.mjs +0 -14
- package/src/cli/commands/__fixtures__/init-lexicon-output/docs/package.json +0 -16
- package/src/cli/commands/__fixtures__/init-lexicon-output/docs/src/content/docs/index.mdx +0 -8
- package/src/cli/commands/__fixtures__/init-lexicon-output/docs/src/content.config.ts +0 -15
- package/src/cli/commands/__fixtures__/init-lexicon-output/docs/tsconfig.json +0 -10
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://intentius.io/chant/schemas/workspace/change-set/v1/change-set.schema.json",
|
|
3
|
+
"contract": 1,
|
|
4
|
+
"digest": "jcs1-sha256:38ee3f4bfab616f181ff10ea6b2c75284e3b93a0f976907fc84954e6c0356f07",
|
|
5
|
+
"members": [
|
|
6
|
+
{
|
|
7
|
+
"member": "queues",
|
|
8
|
+
"lexicon": "aws",
|
|
9
|
+
"planner": "chant",
|
|
10
|
+
"scope": "dev",
|
|
11
|
+
"status": "planned",
|
|
12
|
+
"planDigest": "jcs1-sha256:e526af57de8232c2d567d96e24eae57daf4aceb664e4ab3f00f3da1061361cb9",
|
|
13
|
+
"holes": []
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"entries": [
|
|
17
|
+
{
|
|
18
|
+
"member": "queues",
|
|
19
|
+
"lexicon": "aws",
|
|
20
|
+
"planner": "chant",
|
|
21
|
+
"address": "alerts",
|
|
22
|
+
"type": "AWS::SNS::Topic",
|
|
23
|
+
"id": "arn:aws:sns:us-east-1:000000000000:cs-alerts",
|
|
24
|
+
"action": "no-op",
|
|
25
|
+
"scope": "dev",
|
|
26
|
+
"attributes": [],
|
|
27
|
+
"node": null
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"member": "queues",
|
|
31
|
+
"lexicon": "aws",
|
|
32
|
+
"planner": "chant",
|
|
33
|
+
"address": "dlq",
|
|
34
|
+
"type": "unknown",
|
|
35
|
+
"action": "create",
|
|
36
|
+
"scope": "dev",
|
|
37
|
+
"attributes": [],
|
|
38
|
+
"node": null
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"member": "queues",
|
|
42
|
+
"lexicon": "aws",
|
|
43
|
+
"planner": "chant",
|
|
44
|
+
"address": "events",
|
|
45
|
+
"type": "AWS::SQS::Queue",
|
|
46
|
+
"id": "http://localhost:4566/000000000000/cs-events",
|
|
47
|
+
"action": "no-op",
|
|
48
|
+
"scope": "dev",
|
|
49
|
+
"attributes": [],
|
|
50
|
+
"node": null
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"member": "queues",
|
|
54
|
+
"lexicon": "aws",
|
|
55
|
+
"planner": "chant",
|
|
56
|
+
"address": "jobs",
|
|
57
|
+
"type": "AWS::SQS::Queue",
|
|
58
|
+
"id": "http://localhost:4566/000000000000/cs-jobs",
|
|
59
|
+
"action": "no-op",
|
|
60
|
+
"scope": "dev",
|
|
61
|
+
"attributes": [],
|
|
62
|
+
"node": null
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"summary": {
|
|
66
|
+
"members": 1,
|
|
67
|
+
"entries": 4,
|
|
68
|
+
"actions": {
|
|
69
|
+
"create": 1,
|
|
70
|
+
"update": 0,
|
|
71
|
+
"replace": 0,
|
|
72
|
+
"delete": 0,
|
|
73
|
+
"read": 0,
|
|
74
|
+
"no-op": 3,
|
|
75
|
+
"forget": 0
|
|
76
|
+
},
|
|
77
|
+
"types": {
|
|
78
|
+
"AWS::SNS::Topic": {
|
|
79
|
+
"no-op": 1
|
|
80
|
+
},
|
|
81
|
+
"AWS::SQS::Queue": {
|
|
82
|
+
"no-op": 2
|
|
83
|
+
},
|
|
84
|
+
"unknown": {
|
|
85
|
+
"create": 1
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"byMember": {
|
|
89
|
+
"queues": {
|
|
90
|
+
"no-op": 3,
|
|
91
|
+
"create": 1
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"deletes": [],
|
|
95
|
+
"replacements": [],
|
|
96
|
+
"failed": [],
|
|
97
|
+
"holes": 0
|
|
98
|
+
},
|
|
99
|
+
"graph": null
|
|
100
|
+
}
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "Ledger lines as chant 0.124.27 and older producers wrote them, before #4020 (gitSha and runOrigin on run records, gitSha and runId on gate lines, admission on deploy records), #4043 (releaseDigest on deploy records), #4045 (releaseDigest and empty on gate lines) and #4046 (implicit releases) added their fields. Data only: workspace/older-records.test.ts writes each file to the chant/lifecycle branch of a temp repo and reads it through the real readers (INTENTIUS/chant#4034). Every entry names the producer that wrote its shape and the source it was taken from. The values are made up. The keys, and which keys are present, are what each producer wrote.",
|
|
3
|
+
"files": {
|
|
4
|
+
"staging/releases.jsonl": [
|
|
5
|
+
{
|
|
6
|
+
"producer": "chant components release (a CI job)",
|
|
7
|
+
"source": "packages/core/src/cli/handlers/components.ts at 162e1602c^ (the appendReleaseRecord call in the release handler): component, env, digest, gitSha, runId, runOrigin from resolveRunId, timestamp, actor; no approver because none was passed",
|
|
8
|
+
"line": {
|
|
9
|
+
"version": 1,
|
|
10
|
+
"component": "api",
|
|
11
|
+
"env": "staging",
|
|
12
|
+
"digest": "sha256:47e0cbb98c01f4a49e3450e8686ca069f23c3c13c2d49cf50a4c3513f01b6ed3",
|
|
13
|
+
"gitSha": "2f22765d04931a078909145ca628d2264c852d7d",
|
|
14
|
+
"runId": "8431209934",
|
|
15
|
+
"runOrigin": { "forge": "github", "repo": "acme/shop", "url": "https://github.com/acme/shop/actions/runs/8431209934" },
|
|
16
|
+
"timestamp": "2026-09-08T14:02:11.482Z",
|
|
17
|
+
"actor": "ci-bot"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"producer": "chant components release --approver (a person at a terminal)",
|
|
22
|
+
"source": "the same call with args.approver set (#1035) and no CI env, so resolveRunId minted a local id",
|
|
23
|
+
"line": {
|
|
24
|
+
"version": 1,
|
|
25
|
+
"component": "worker",
|
|
26
|
+
"env": "staging",
|
|
27
|
+
"digest": "sha256:fc653e205472032353d140e5cd5543e7d3e3de8dc2013b1a43e2f068a4260198",
|
|
28
|
+
"gitSha": "6b1f53303a732ccc8c6aae6640399827c15250e3",
|
|
29
|
+
"runId": "local-1788901200000",
|
|
30
|
+
"runOrigin": { "forge": "local" },
|
|
31
|
+
"timestamp": "2026-09-08T21:00:00.000Z",
|
|
32
|
+
"actor": "alice",
|
|
33
|
+
"approver": "bob"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"producer": "chant run --components (auto-release), a pinned helm deploy",
|
|
38
|
+
"source": "packages/core/src/components/auto-release.ts at 162e1602c^ (maybeRecordAutoRelease): the rendered digest in digest, the input-side digest in inputDigest (#1242, #1243); no approver and no admission, which run --components copied only from 0.124.28",
|
|
39
|
+
"line": {
|
|
40
|
+
"version": 1,
|
|
41
|
+
"component": "ingress",
|
|
42
|
+
"env": "staging",
|
|
43
|
+
"digest": "sha256:9ccd4fd27f728a7d88462fc94e6c8d901d1d2de3d5d0291ca99bccd462d8d3e4",
|
|
44
|
+
"gitSha": "a625406f6977d45c1391b078f4d3656e0b75bfcb",
|
|
45
|
+
"runId": "local-1788904800000",
|
|
46
|
+
"runOrigin": { "forge": "local" },
|
|
47
|
+
"timestamp": "2026-09-08T22:00:00.000Z",
|
|
48
|
+
"actor": "alice",
|
|
49
|
+
"inputDigest": "sha256:bc227a21bd89c5c2e7e971e001e538da4dff21e972059a914b38595400418ca1"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"producer": "SQL Yodeler (yodel apply)",
|
|
54
|
+
"source": "INTENTIUS/sql-yodeler at 8dacbec, src/release/index.ts recordRelease: component is the project directory in its repository or schema, digest is schemaSha of the recorded schema (test/release.test.ts holds the call), runId and runOrigin from resolveRunId, approver when a gate approved",
|
|
55
|
+
"line": {
|
|
56
|
+
"version": 1,
|
|
57
|
+
"component": "schema",
|
|
58
|
+
"env": "staging",
|
|
59
|
+
"digest": "sha256:69c1a029277e628cfd0386e730d5d8decf9414b4fde67b37c77efe32b7550804",
|
|
60
|
+
"gitSha": "e4666a670f042877c67a84473a71675ee0950a08",
|
|
61
|
+
"runId": "8431977120",
|
|
62
|
+
"runOrigin": { "forge": "github", "repo": "acme/warehouse", "url": "https://github.com/acme/warehouse/actions/runs/8431977120" },
|
|
63
|
+
"timestamp": "2026-09-09T08:30:00.000Z",
|
|
64
|
+
"actor": "acme-deploy",
|
|
65
|
+
"approver": "alice"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"prod/releases.jsonl": [
|
|
70
|
+
{
|
|
71
|
+
"producer": "chant components release",
|
|
72
|
+
"source": "as the first staging entry; the build api went to prod first",
|
|
73
|
+
"line": {
|
|
74
|
+
"version": 1,
|
|
75
|
+
"component": "api",
|
|
76
|
+
"env": "prod",
|
|
77
|
+
"digest": "sha256:db88ccee4ed09c4324d896b8a0db6dab0091c76f579eab51e54656c40517866f",
|
|
78
|
+
"gitSha": "8dc29fc58c0bd99068c2e5c752aa61521d4f11ce",
|
|
79
|
+
"runId": "8399000111",
|
|
80
|
+
"runOrigin": { "forge": "github", "repo": "acme/shop", "url": "https://github.com/acme/shop/actions/runs/8399000111" },
|
|
81
|
+
"timestamp": "2026-09-01T10:00:00.000Z",
|
|
82
|
+
"actor": "ci-bot"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"producer": "chant components promote",
|
|
87
|
+
"source": "packages/core/src/components/promote.ts at 162e1602c^ (sharedRecord plus promotedFrom, #2530): the artifact is the staging record's own, and promotedFrom names the staging record by env, runId and timestamp",
|
|
88
|
+
"line": {
|
|
89
|
+
"version": 1,
|
|
90
|
+
"component": "api",
|
|
91
|
+
"env": "prod",
|
|
92
|
+
"digest": "sha256:47e0cbb98c01f4a49e3450e8686ca069f23c3c13c2d49cf50a4c3513f01b6ed3",
|
|
93
|
+
"gitSha": "2f22765d04931a078909145ca628d2264c852d7d",
|
|
94
|
+
"runId": "local-1788987600000",
|
|
95
|
+
"runOrigin": { "forge": "local" },
|
|
96
|
+
"timestamp": "2026-09-09T12:00:00.000Z",
|
|
97
|
+
"actor": "alice",
|
|
98
|
+
"approver": "bob",
|
|
99
|
+
"promotedFrom": { "env": "staging", "runId": "8431209934", "timestamp": "2026-09-08T14:02:11.482Z" }
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"producer": "chant components rollback",
|
|
104
|
+
"source": "packages/core/src/op/activities/source-rollback.ts at 162e1602c^ and promote.ts rollbackRecord (#2531): the earlier release's digest again, with restores naming it",
|
|
105
|
+
"line": {
|
|
106
|
+
"version": 1,
|
|
107
|
+
"component": "api",
|
|
108
|
+
"env": "prod",
|
|
109
|
+
"digest": "sha256:db88ccee4ed09c4324d896b8a0db6dab0091c76f579eab51e54656c40517866f",
|
|
110
|
+
"gitSha": "8dc29fc58c0bd99068c2e5c752aa61521d4f11ce",
|
|
111
|
+
"runId": "local-1789074000000",
|
|
112
|
+
"runOrigin": { "forge": "local" },
|
|
113
|
+
"timestamp": "2026-09-10T12:00:00.000Z",
|
|
114
|
+
"actor": "alice",
|
|
115
|
+
"restores": { "env": "prod", "runId": "8399000111", "timestamp": "2026-09-01T10:00:00.000Z" }
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"producer": "chant components redeploy",
|
|
120
|
+
"source": "promote.ts redeployRecord (#2604): the digest the ledger recorded as current, deployed again, with redeploys naming that record",
|
|
121
|
+
"line": {
|
|
122
|
+
"version": 1,
|
|
123
|
+
"component": "api",
|
|
124
|
+
"env": "prod",
|
|
125
|
+
"digest": "sha256:db88ccee4ed09c4324d896b8a0db6dab0091c76f579eab51e54656c40517866f",
|
|
126
|
+
"gitSha": "8dc29fc58c0bd99068c2e5c752aa61521d4f11ce",
|
|
127
|
+
"runId": "local-1789077600000",
|
|
128
|
+
"runOrigin": { "forge": "local" },
|
|
129
|
+
"timestamp": "2026-09-10T13:00:00.000Z",
|
|
130
|
+
"actor": "alice",
|
|
131
|
+
"redeploys": { "env": "prod", "runId": "local-1789074000000", "timestamp": "2026-09-10T12:00:00.000Z" }
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"producer": "SQL Yodeler, a tenant",
|
|
136
|
+
"source": "recordRelease with env.tenant set: the component is schema/<tenant> and the ledger env is the tenant's env",
|
|
137
|
+
"line": {
|
|
138
|
+
"version": 1,
|
|
139
|
+
"component": "schema/acme",
|
|
140
|
+
"env": "prod",
|
|
141
|
+
"digest": "sha256:69c1a029277e628cfd0386e730d5d8decf9414b4fde67b37c77efe32b7550804",
|
|
142
|
+
"gitSha": "e4666a670f042877c67a84473a71675ee0950a08",
|
|
143
|
+
"runId": "8432100045",
|
|
144
|
+
"runOrigin": { "forge": "github", "repo": "acme/warehouse", "url": "https://github.com/acme/warehouse/actions/runs/8432100045" },
|
|
145
|
+
"timestamp": "2026-09-09T16:00:00.000Z",
|
|
146
|
+
"actor": "acme-deploy"
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
],
|
|
150
|
+
"fly/releases.jsonl": [
|
|
151
|
+
{
|
|
152
|
+
"producer": "chud-studio (arugula-salad/studio), the release Op's Record phase",
|
|
153
|
+
"source": "template/delivery/ops/release.op.ts at studio 6e0e5d8 calls releaseRecord, chant's op/activities/source-release.ts, whose appendReleaseRecord call at 162e1602c^ wrote this shape: digest is the release plan's digest, gitSha the plan's, approver the gate's resolvedBy names",
|
|
154
|
+
"line": {
|
|
155
|
+
"version": 1,
|
|
156
|
+
"component": "app",
|
|
157
|
+
"env": "fly",
|
|
158
|
+
"digest": "sha256:65a540cde9fceddfc88c9a21750b256c99096ebe6ae31f4a8ff26e89712f67cf",
|
|
159
|
+
"gitSha": "2f22765d04931a078909145ca628d2264c852d7d",
|
|
160
|
+
"runId": "local-1788998400000",
|
|
161
|
+
"runOrigin": { "forge": "local" },
|
|
162
|
+
"timestamp": "2026-09-10T00:00:00.000Z",
|
|
163
|
+
"actor": "alex",
|
|
164
|
+
"approver": "alex"
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
],
|
|
168
|
+
"fly/runs__release.jsonl": [
|
|
169
|
+
{
|
|
170
|
+
"producer": "chud-studio's release Op, first run, stopped at the ship gate",
|
|
171
|
+
"source": "packages/core/src/lifecycle/run-ledger.ts buildRunRecord at 162e1602c^ (OpRunRecord in op/runtime.ts): no gitSha and no runOrigin",
|
|
172
|
+
"line": {
|
|
173
|
+
"version": 1,
|
|
174
|
+
"id": "0b7d6a3e-5f1c-4c52-9a52-6f0d3f6f5a11",
|
|
175
|
+
"op": "release",
|
|
176
|
+
"env": "fly",
|
|
177
|
+
"started": "2026-09-09T23:50:00.000Z",
|
|
178
|
+
"ended": "2026-09-09T23:50:41.000Z",
|
|
179
|
+
"status": "gated",
|
|
180
|
+
"labels": { "Env": "fly" },
|
|
181
|
+
"outcomes": {},
|
|
182
|
+
"phases": [
|
|
183
|
+
{ "name": "Check", "status": "ok", "durationMs": 20100, "steps": [{ "fn": "shell", "status": "ok", "durationMs": 20100 }] },
|
|
184
|
+
{ "name": "Plan", "status": "ok", "durationMs": 900, "steps": [{ "fn": "releasePlan", "status": "ok", "durationMs": 900 }] },
|
|
185
|
+
{ "name": "Gate", "status": "skipped", "steps": [{ "fn": "gate:ship", "status": "skipped", "durationMs": 0 }] }
|
|
186
|
+
],
|
|
187
|
+
"gate": { "name": "ship", "since": "2026-09-09T23:50:40.000Z" }
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"producer": "chud-studio's release Op, second run, after the approval",
|
|
192
|
+
"source": "as above; the Gate step carries approval { gate, resolvedBy, timestamp } (#2119)",
|
|
193
|
+
"line": {
|
|
194
|
+
"version": 1,
|
|
195
|
+
"id": "9c1e5b07-2d44-4f9a-8d0b-3a7f1c2b9e22",
|
|
196
|
+
"op": "release",
|
|
197
|
+
"env": "fly",
|
|
198
|
+
"started": "2026-09-10T00:00:00.000Z",
|
|
199
|
+
"ended": "2026-09-10T00:01:10.000Z",
|
|
200
|
+
"status": "ok",
|
|
201
|
+
"labels": { "Env": "fly" },
|
|
202
|
+
"outcomes": {},
|
|
203
|
+
"phases": [
|
|
204
|
+
{ "name": "Check", "status": "ok", "durationMs": 20300, "steps": [{ "fn": "shell", "status": "ok", "durationMs": 20300 }] },
|
|
205
|
+
{ "name": "Gate", "status": "ok", "durationMs": 5, "steps": [{ "fn": "gate:ship", "status": "ok", "durationMs": 5, "approval": { "gate": "ship", "resolvedBy": "alex", "timestamp": "2026-09-09T23:55:00.000Z" } }] },
|
|
206
|
+
{ "name": "Ship", "status": "ok", "durationMs": 40100, "steps": [{ "fn": "flyRelease", "status": "ok", "durationMs": 40100 }] }
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
],
|
|
211
|
+
"_gates/api.jsonl": [
|
|
212
|
+
{
|
|
213
|
+
"producer": "chant run --components, a component gate (the pending fact)",
|
|
214
|
+
"source": "packages/core/src/lifecycle/gate-ledger.ts PendingGateRecord at 162e1602c^: environment and planDigest since #2574; no gitSha, runId, releaseDigest",
|
|
215
|
+
"line": {
|
|
216
|
+
"version": 1,
|
|
217
|
+
"kind": "pending",
|
|
218
|
+
"op": "api",
|
|
219
|
+
"gate": "deploy",
|
|
220
|
+
"environment": "prod",
|
|
221
|
+
"planDigest": "sha256:0c3c94bc645b25af58a4ed063bbd3c428cc9eeb119ed7c86f197c63c3c6b5000",
|
|
222
|
+
"timestamp": "2026-09-09T11:00:00.000Z",
|
|
223
|
+
"expiresAt": "2026-09-16T11:00:00.000Z"
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"producer": "chant approve api deploy --env prod",
|
|
228
|
+
"source": "GateResolutionRecord at 162e1602c^, a line with no kind (the shape before #2119 stayed valid) and origin cli (#2384); no gitSha, runId, releaseDigest, empty",
|
|
229
|
+
"line": {
|
|
230
|
+
"version": 1,
|
|
231
|
+
"op": "api",
|
|
232
|
+
"gate": "deploy",
|
|
233
|
+
"resolvedBy": "bob",
|
|
234
|
+
"timestamp": "2026-09-09T11:30:00.000Z",
|
|
235
|
+
"planDigest": "sha256:0c3c94bc645b25af58a4ed063bbd3c428cc9eeb119ed7c86f197c63c3c6b5000",
|
|
236
|
+
"environment": "prod",
|
|
237
|
+
"origin": "cli"
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
],
|
|
241
|
+
"_gates/release.jsonl": [
|
|
242
|
+
{
|
|
243
|
+
"producer": "chud-studio's release Op gate ship (the pending fact)",
|
|
244
|
+
"source": "a gate step of an authored Op (op/gate.ts at 162e1602c^): no environment, the plan digest from the releasePlan activity; the quorum block studio adds is left out",
|
|
245
|
+
"line": {
|
|
246
|
+
"version": 1,
|
|
247
|
+
"kind": "pending",
|
|
248
|
+
"op": "release",
|
|
249
|
+
"gate": "ship",
|
|
250
|
+
"description": "Ship app to fly",
|
|
251
|
+
"planDigest": "sha256:65a540cde9fceddfc88c9a21750b256c99096ebe6ae31f4a8ff26e89712f67cf",
|
|
252
|
+
"timestamp": "2026-09-09T23:50:40.000Z",
|
|
253
|
+
"expiresAt": "2026-09-16T23:50:40.000Z"
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"producer": "chant approve release ship --plan <digest>",
|
|
258
|
+
"source": "GateResolutionRecord at 162e1602c^ with kind resolution (#2119) and the plan (#2300)",
|
|
259
|
+
"line": {
|
|
260
|
+
"version": 1,
|
|
261
|
+
"kind": "resolution",
|
|
262
|
+
"op": "release",
|
|
263
|
+
"gate": "ship",
|
|
264
|
+
"resolvedBy": "alex",
|
|
265
|
+
"timestamp": "2026-09-09T23:55:00.000Z",
|
|
266
|
+
"planDigest": "sha256:65a540cde9fceddfc88c9a21750b256c99096ebe6ae31f4a8ff26e89712f67cf",
|
|
267
|
+
"origin": "cli"
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
],
|
|
271
|
+
"_gates/web.jsonl": [
|
|
272
|
+
{
|
|
273
|
+
"producer": "chant components pr-apply (the pending fact for a pull request's change set)",
|
|
274
|
+
"source": "pr-apply bound the change-set document's digest in planDigest from #4022 (984534ea9); the document is change-set-984534ea9.json beside this file: composeChangeSet and lifecyclePlanPart as they stood at 984534ea9, before #4045 added releaseDigest and environment, then mapChangeSetToGraph with no graph read, which is what storeGateChangeSet stores when the graph can't be read (every node null, graph null)",
|
|
275
|
+
"line": {
|
|
276
|
+
"version": 1,
|
|
277
|
+
"kind": "pending",
|
|
278
|
+
"op": "web",
|
|
279
|
+
"gate": "pr-apply",
|
|
280
|
+
"environment": "staging",
|
|
281
|
+
"planDigest": "jcs1-sha256:38ee3f4bfab616f181ff10ea6b2c75284e3b93a0f976907fc84954e6c0356f07",
|
|
282
|
+
"timestamp": "2026-09-09T09:00:00.000Z",
|
|
283
|
+
"expiresAt": "2026-09-16T09:00:00.000Z"
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
],
|
|
287
|
+
"_gates/nightly.jsonl": [
|
|
288
|
+
{
|
|
289
|
+
"producer": "an Op gate that binds no plan (before #2300)",
|
|
290
|
+
"source": "PendingGateRecord with no planDigest and no environment, and a resolution with neither, the shape every gate had before #2300",
|
|
291
|
+
"line": {
|
|
292
|
+
"version": 1,
|
|
293
|
+
"kind": "pending",
|
|
294
|
+
"op": "nightly",
|
|
295
|
+
"gate": "confirm",
|
|
296
|
+
"timestamp": "2026-09-08T00:00:00.000Z",
|
|
297
|
+
"expiresAt": "2026-09-15T00:00:00.000Z"
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"producer": "chant approve nightly confirm",
|
|
302
|
+
"source": "as above, written before #2119 so it has no kind",
|
|
303
|
+
"line": {
|
|
304
|
+
"version": 1,
|
|
305
|
+
"op": "nightly",
|
|
306
|
+
"gate": "confirm",
|
|
307
|
+
"resolvedBy": "dave",
|
|
308
|
+
"timestamp": "2026-09-08T01:00:00.000Z"
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
]
|
|
312
|
+
},
|
|
313
|
+
"plans": {
|
|
314
|
+
"producer": "chud-studio's release Op, the releasePlan activity, persisted by releaseRecord (persistReleasePlan, plan-ledger.ts, ws-055)",
|
|
315
|
+
"source": "template/delivery/ops/release.op.ts at studio 6e0e5d8: component, env, gitSha and content { artifact, shipSkip }; the plan carries its own digest",
|
|
316
|
+
"digest": "sha256:65a540cde9fceddfc88c9a21750b256c99096ebe6ae31f4a8ff26e89712f67cf",
|
|
317
|
+
"plan": {
|
|
318
|
+
"digest": "sha256:65a540cde9fceddfc88c9a21750b256c99096ebe6ae31f4a8ff26e89712f67cf",
|
|
319
|
+
"component": "app",
|
|
320
|
+
"env": "fly",
|
|
321
|
+
"gitSha": "2f22765d04931a078909145ca628d2264c852d7d",
|
|
322
|
+
"artifact": { "kind": "source-tree", "digest": "sha256:6ce407d632d7e805de020f9d0a5d70fea814b67285ced915be1271255b4fb622", "dir": "app" },
|
|
323
|
+
"shipSkip": { "answer": "ship", "decider": "model" }
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What every emitter's test checks about a run's stream (#4041): each line
|
|
3
|
+
* passes `run-event.schema.json`, the stream opens with `run-start` and ends
|
|
4
|
+
* with one `run-settle`, `seq` counts from 0, every line names the same run,
|
|
5
|
+
* and every step that starts settles after its start, under the same step id.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { expect } from "vitest";
|
|
9
|
+
import { contract } from "./contract-repo";
|
|
10
|
+
import schema from "../run-event.schema.json";
|
|
11
|
+
import type { RunEvent } from "../../run-event";
|
|
12
|
+
|
|
13
|
+
const { expectValid } = contract(schema);
|
|
14
|
+
|
|
15
|
+
/** A step's id in the stream: its component, phase, name and place. */
|
|
16
|
+
export function stepKey(e: { component: string | null; phase: string; step: string; index?: number }): string {
|
|
17
|
+
return JSON.stringify([e.component, e.phase, e.step, e.index ?? null]);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** Check a stream's lines and hand back its events. */
|
|
21
|
+
export function checkRunEventLines(lines: string[]): RunEvent[] {
|
|
22
|
+
for (const line of lines) expect(line.endsWith("\n")).toBe(true);
|
|
23
|
+
const events = lines.map((l) => JSON.parse(l) as RunEvent);
|
|
24
|
+
for (const event of events) expectValid(event);
|
|
25
|
+
expect(events.map((e) => e.seq)).toEqual(events.map((_, i) => i));
|
|
26
|
+
expect(events[0]?.type).toBe("run-start");
|
|
27
|
+
expect(events.at(-1)?.type).toBe("run-settle");
|
|
28
|
+
expect(events.filter((e) => e.type === "run-settle")).toHaveLength(1);
|
|
29
|
+
const runs = new Set(events.map((e) => JSON.stringify([e.runId, e.kind, e.name, e.gitSha, e.runtime, e.runOrigin])));
|
|
30
|
+
expect(runs.size).toBe(1);
|
|
31
|
+
|
|
32
|
+
const open = new Map<string, number>();
|
|
33
|
+
for (const e of events) {
|
|
34
|
+
if (e.type === "step-start") {
|
|
35
|
+
const key = stepKey(e);
|
|
36
|
+
expect(open.has(key), `${key} started twice`).toBe(false);
|
|
37
|
+
open.set(key, e.seq);
|
|
38
|
+
} else if (e.type === "step-settle") {
|
|
39
|
+
const key = stepKey(e);
|
|
40
|
+
if (open.has(key)) open.delete(key);
|
|
41
|
+
// Only a step that never ran settles without a start.
|
|
42
|
+
else expect(e.status, `${key} settled ${e.status} with no step-start`).toBe("skipped");
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
expect([...open.keys()], "steps that started and never settled").toEqual([]);
|
|
46
|
+
return events;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** The step events of a stream, as `[type, step, status]`, for a compact assertion. */
|
|
50
|
+
export function stepTrail(events: RunEvent[]): Array<[string, string, string?]> {
|
|
51
|
+
const out: Array<[string, string, string?]> = [];
|
|
52
|
+
for (const e of events) {
|
|
53
|
+
if (e.type === "step-start") out.push([e.type, e.step]);
|
|
54
|
+
else if (e.type === "step-settle") out.push([e.type, e.step, e.skip ? `${e.status}:${e.skip}` : e.status]);
|
|
55
|
+
else if (e.type === "gate-waiting" || e.type === "gate-resolved") out.push([e.type, e.step]);
|
|
56
|
+
}
|
|
57
|
+
return out;
|
|
58
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* #4032: the signer-position lookup and the decision windows of the intent
|
|
3
|
+
* walk read the commit graph once, in process, where they used to start a
|
|
4
|
+
* git process per question. Each answer must stay what git gives.
|
|
5
|
+
*
|
|
6
|
+
* The repository has merges of branches that forked at different points, a
|
|
7
|
+
* branch merged twice, and a branch never merged, so a commit's way into the
|
|
8
|
+
* first-parent line is not its date order.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { afterAll, beforeAll, describe, expect, test } from "vitest";
|
|
12
|
+
import { descendants } from "./intent";
|
|
13
|
+
import { SignerPositions, type SignerVersion } from "./trust/rotation";
|
|
14
|
+
import { TestRepo } from "./trust/test-repo";
|
|
15
|
+
|
|
16
|
+
let r: TestRepo;
|
|
17
|
+
let all: string[];
|
|
18
|
+
let unmerged: string;
|
|
19
|
+
|
|
20
|
+
function version(n: number, commit: string): SignerVersion {
|
|
21
|
+
return { version: n, commit, digest: `d${n}`, threshold: 1, signers: [], excluded: [], signedBy: [] };
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
beforeAll(() => {
|
|
25
|
+
r = new TestRepo("4032-ancestry");
|
|
26
|
+
r.commit("m1");
|
|
27
|
+
r.git(["branch", "a"]);
|
|
28
|
+
r.commit("m2");
|
|
29
|
+
r.git(["checkout", "-q", "a"]);
|
|
30
|
+
r.commit("a1");
|
|
31
|
+
r.git(["branch", "b"]);
|
|
32
|
+
r.commit("a2");
|
|
33
|
+
r.git(["checkout", "-q", "b"]);
|
|
34
|
+
r.commit("b1");
|
|
35
|
+
r.commit("b2");
|
|
36
|
+
r.git(["checkout", "-q", "main"]);
|
|
37
|
+
r.git(["merge", "-q", "--no-ff", "--no-gpg-sign", "-m", "merge a", "a"]);
|
|
38
|
+
r.commit("m3");
|
|
39
|
+
r.git(["checkout", "-q", "a"]);
|
|
40
|
+
r.commit("a3");
|
|
41
|
+
r.git(["checkout", "-q", "main"]);
|
|
42
|
+
r.git(["merge", "-q", "--no-ff", "--no-gpg-sign", "-m", "merge b", "b"]);
|
|
43
|
+
r.git(["merge", "-q", "--no-ff", "--no-gpg-sign", "-m", "merge a again", "a"]);
|
|
44
|
+
r.commit("m4");
|
|
45
|
+
r.git(["checkout", "-q", "-b", "side", "HEAD~2"]);
|
|
46
|
+
unmerged = r.commit("never merged");
|
|
47
|
+
r.git(["checkout", "-q", "main"]);
|
|
48
|
+
all = r.git(["rev-list", "--all"]).split("\n").filter(Boolean);
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
afterAll(() => r.cleanup());
|
|
52
|
+
|
|
53
|
+
describe("SignerPositions (#4032)", () => {
|
|
54
|
+
test("a full commit id is placed where git merge-base places it, for every commit", () => {
|
|
55
|
+
const base = r.head();
|
|
56
|
+
const line = r.git(["rev-list", "--first-parent", base]).split("\n").filter(Boolean);
|
|
57
|
+
// Versions made at the oldest, a middle and the newest first-parent commits.
|
|
58
|
+
const history = { versions: [version(1, line.at(-1)!), version(2, line[Math.floor(line.length / 2)]), version(3, line[0])] };
|
|
59
|
+
const fast = new SignerPositions(r.dir, base, history);
|
|
60
|
+
const slow = new SignerPositions(r.dir, base, history);
|
|
61
|
+
expect(all).toContain(unmerged);
|
|
62
|
+
for (const c of all) {
|
|
63
|
+
// An abbreviated id takes the old path, one git merge-base per step of a binary search.
|
|
64
|
+
expect(fast.versionFor(c)?.version ?? null, c).toBe(slow.versionFor(c.slice(0, 12))?.version ?? null);
|
|
65
|
+
}
|
|
66
|
+
expect(fast.versionFor(unmerged)?.version).toBe(3);
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
test("an id the repository doesn't have is judged by the latest version, as before", () => {
|
|
70
|
+
const base = r.head();
|
|
71
|
+
const p = new SignerPositions(r.dir, base, { versions: [version(1, base)] });
|
|
72
|
+
expect(p.versionFor("0".repeat(40))?.version).toBe(1);
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
describe("descendants (#4032)", () => {
|
|
77
|
+
test("matches git rev-list --ancestry-path for every pair of commits", () => {
|
|
78
|
+
for (const rev of [r.head(), unmerged]) {
|
|
79
|
+
for (const c of all) {
|
|
80
|
+
const expected = new Set([c, ...r.git(["rev-list", "--ancestry-path", `${c}..${rev}`]).split("\n").filter(Boolean)]);
|
|
81
|
+
expect(descendants(r.dir, c, rev), `${c}..${rev}`).toEqual(expected);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
test("an abbreviated id, or one the repository doesn't have, still answers", () => {
|
|
87
|
+
const short = all.at(-1)!.slice(0, 12);
|
|
88
|
+
const listed = r.git(["rev-list", "--ancestry-path", `${short}..${r.head()}`]).split("\n").filter(Boolean);
|
|
89
|
+
expect(listed.length).toBeGreaterThan(0);
|
|
90
|
+
expect(descendants(r.dir, short, r.head())).toEqual(new Set([short, ...listed]));
|
|
91
|
+
expect(descendants(r.dir, "0".repeat(40), r.head())).toEqual(new Set(["0".repeat(40)]));
|
|
92
|
+
});
|
|
93
|
+
});
|