@intentius/chant 0.124.51 → 0.124.54
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/audit/discover.d.ts.map +1 -1
- package/dist/audit/discover.js +3 -1
- package/dist/behaviour.d.ts +1 -1
- package/dist/behaviour.d.ts.map +1 -1
- package/dist/capabilities/templates.d.ts +65 -0
- package/dist/capabilities/templates.d.ts.map +1 -0
- package/dist/capabilities/templates.js +193 -0
- package/dist/capabilities/templates.json +145 -0
- package/dist/change-set-graph.d.ts +35 -3
- package/dist/change-set-graph.d.ts.map +1 -1
- package/dist/change-set-graph.js +60 -9
- package/dist/change-set.d.ts +65 -7
- package/dist/change-set.d.ts.map +1 -1
- package/dist/change-set.js +23 -12
- package/dist/ci-identity.d.ts +7 -2
- package/dist/ci-identity.d.ts.map +1 -1
- package/dist/ci-identity.js +4 -1
- package/dist/cli/commands/import-index.d.ts +52 -0
- package/dist/cli/commands/import-index.d.ts.map +1 -0
- package/dist/cli/commands/import-index.js +226 -0
- package/dist/cli/commands/lint.d.ts.map +1 -1
- package/dist/cli/commands/lint.js +4 -2
- package/dist/cli/handlers/components.d.ts.map +1 -1
- package/dist/cli/handlers/components.js +11 -2
- package/dist/cli/handlers/fan-out.d.ts.map +1 -1
- package/dist/cli/handlers/fan-out.js +16 -3
- package/dist/cli/handlers/graph.d.ts.map +1 -1
- package/dist/cli/handlers/graph.js +22 -4
- package/dist/cli/handlers/index-cloud.d.ts +14 -0
- package/dist/cli/handlers/index-cloud.d.ts.map +1 -0
- package/dist/cli/handlers/index-cloud.js +22 -0
- package/dist/cli/handlers/index-diff.d.ts +18 -0
- package/dist/cli/handlers/index-diff.d.ts.map +1 -0
- package/dist/cli/handlers/index-diff.js +142 -0
- package/dist/cli/handlers/lifecycle-drift.d.ts +25 -0
- package/dist/cli/handlers/lifecycle-drift.d.ts.map +1 -0
- package/dist/cli/handlers/lifecycle-drift.js +64 -0
- package/dist/cli/handlers/lifecycle.d.ts.map +1 -1
- package/dist/cli/handlers/lifecycle.js +188 -28
- package/dist/cli/handlers/misc.d.ts +9 -0
- package/dist/cli/handlers/misc.d.ts.map +1 -1
- package/dist/cli/handlers/misc.js +77 -0
- package/dist/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/handlers/pr.js +17 -3
- package/dist/cli/handlers/promote.d.ts.map +1 -1
- package/dist/cli/handlers/promote.js +89 -15
- package/dist/cli/handlers/query.d.ts.map +1 -1
- package/dist/cli/handlers/query.js +28 -4
- package/dist/cli/handlers/scenario.d.ts.map +1 -1
- package/dist/cli/handlers/scenario.js +8 -7
- package/dist/cli/handlers/search.d.ts +34 -4
- package/dist/cli/handlers/search.d.ts.map +1 -1
- package/dist/cli/handlers/search.js +216 -36
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +55 -1
- package/dist/cli/mcp/lifecycle-tools.d.ts.map +1 -1
- package/dist/cli/mcp/lifecycle-tools.js +3 -2
- package/dist/cli/mcp/resource-handlers.d.ts.map +1 -1
- package/dist/cli/mcp/resource-handlers.js +4 -3
- 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 +55 -2
- package/dist/cli/registry.d.ts +19 -1
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/cloud-lister/aws.d.ts +35 -0
- package/dist/cloud-lister/aws.d.ts.map +1 -0
- package/dist/cloud-lister/aws.js +203 -0
- package/dist/cloud-lister/azure.d.ts +34 -0
- package/dist/cloud-lister/azure.d.ts.map +1 -0
- package/dist/cloud-lister/azure.js +129 -0
- package/dist/cloud-lister/common.d.ts +40 -0
- package/dist/cloud-lister/common.d.ts.map +1 -0
- package/dist/cloud-lister/common.js +83 -0
- package/dist/cloud-lister/credentials.d.ts +50 -0
- package/dist/cloud-lister/credentials.d.ts.map +1 -0
- package/dist/cloud-lister/credentials.js +86 -0
- package/dist/cloud-lister/fakes.d.ts +27 -0
- package/dist/cloud-lister/fakes.d.ts.map +1 -0
- package/dist/cloud-lister/fakes.js +50 -0
- package/dist/cloud-lister/gcp.d.ts +42 -0
- package/dist/cloud-lister/gcp.d.ts.map +1 -0
- package/dist/cloud-lister/gcp.js +143 -0
- package/dist/cloud-lister/guard.d.ts +49 -0
- package/dist/cloud-lister/guard.d.ts.map +1 -0
- package/dist/cloud-lister/guard.js +103 -0
- package/dist/cloud-lister/ids.d.ts +23 -0
- package/dist/cloud-lister/ids.d.ts.map +1 -0
- package/dist/cloud-lister/ids.js +42 -0
- package/dist/cloud-lister/index.d.ts +67 -0
- package/dist/cloud-lister/index.d.ts.map +1 -0
- package/dist/cloud-lister/index.js +102 -0
- package/dist/cloud-lister/kubernetes.d.ts +64 -0
- package/dist/cloud-lister/kubernetes.d.ts.map +1 -0
- package/dist/cloud-lister/kubernetes.js +276 -0
- package/dist/cloud-lister/markers.d.ts +31 -0
- package/dist/cloud-lister/markers.d.ts.map +1 -0
- package/dist/cloud-lister/markers.js +73 -0
- package/dist/cloud-lister/mask.d.ts +31 -0
- package/dist/cloud-lister/mask.d.ts.map +1 -0
- package/dist/cloud-lister/mask.js +74 -0
- package/dist/cloud-lister/sigv4.d.ts +29 -0
- package/dist/cloud-lister/sigv4.d.ts.map +1 -0
- package/dist/cloud-lister/sigv4.js +54 -0
- package/dist/cloud-lister/transport.d.ts +55 -0
- package/dist/cloud-lister/transport.d.ts.map +1 -0
- package/dist/cloud-lister/transport.js +86 -0
- package/dist/cloud-lister/types.d.ts +121 -0
- package/dist/cloud-lister/types.d.ts.map +1 -0
- package/dist/cloud-lister/types.js +24 -0
- package/dist/components/capability-plugin-loader.d.ts.map +1 -1
- package/dist/components/capability-plugin-loader.js +6 -0
- package/dist/components/capability-plugin.d.ts +9 -0
- package/dist/components/capability-plugin.d.ts.map +1 -1
- package/dist/components/capability.d.ts +224 -0
- package/dist/components/capability.d.ts.map +1 -1
- package/dist/components/cli-support.d.ts +21 -0
- package/dist/components/cli-support.d.ts.map +1 -1
- package/dist/components/cli-support.js +58 -14
- package/dist/components/covered-round.d.ts +173 -0
- package/dist/components/covered-round.d.ts.map +1 -0
- package/dist/components/covered-round.js +200 -0
- package/dist/components/declared-reads.d.ts +38 -0
- package/dist/components/declared-reads.d.ts.map +1 -0
- package/dist/components/declared-reads.js +131 -0
- package/dist/components/deploy-units.d.ts.map +1 -1
- package/dist/components/deploy-units.js +4 -0
- package/dist/components/driver.d.ts +42 -1
- package/dist/components/driver.d.ts.map +1 -1
- package/dist/components/driver.js +74 -3
- package/dist/components/fan-out-run.d.ts +23 -1
- package/dist/components/fan-out-run.d.ts.map +1 -1
- package/dist/components/fan-out-run.js +82 -14
- package/dist/components/fan-out-support.d.ts +6 -0
- package/dist/components/fan-out-support.d.ts.map +1 -1
- package/dist/components/fan-out-support.js +4 -1
- package/dist/components/fan-out.d.ts +28 -0
- package/dist/components/fan-out.d.ts.map +1 -1
- package/dist/components/groups.d.ts +229 -0
- package/dist/components/groups.d.ts.map +1 -0
- package/dist/components/groups.js +760 -0
- package/dist/components/index.d.ts +7 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +5 -0
- package/dist/components/plan-shape-conformance.d.ts +48 -0
- package/dist/components/plan-shape-conformance.d.ts.map +1 -0
- package/dist/components/plan-shape-conformance.js +122 -0
- package/dist/components/pr-run.d.ts +62 -7
- package/dist/components/pr-run.d.ts.map +1 -1
- package/dist/components/pr-run.js +354 -53
- package/dist/components/promote-rounds.d.ts +9 -0
- package/dist/components/promote-rounds.d.ts.map +1 -1
- package/dist/components/promote-rounds.js +23 -2
- package/dist/components/promote.d.ts +17 -0
- package/dist/components/promote.d.ts.map +1 -1
- package/dist/components/promote.js +36 -6
- package/dist/components/release-gate.d.ts +23 -1
- package/dist/components/release-gate.d.ts.map +1 -1
- package/dist/components/release-gate.js +97 -33
- package/dist/components/run-groups.d.ts +58 -0
- package/dist/components/run-groups.d.ts.map +1 -0
- package/dist/components/run-groups.js +78 -0
- package/dist/components/starter-plugin.d.ts +1 -0
- package/dist/components/starter-plugin.d.ts.map +1 -1
- package/dist/components/starter-plugin.js +6 -1
- package/dist/components/verbs/index.d.ts +1 -0
- package/dist/components/verbs/index.d.ts.map +1 -1
- package/dist/components/verbs/index.js +1 -0
- package/dist/components/verbs/member-outputs.d.ts +187 -0
- package/dist/components/verbs/member-outputs.d.ts.map +1 -0
- package/dist/components/verbs/member-outputs.js +218 -0
- package/dist/components/wave-plan.d.ts +2 -0
- package/dist/components/wave-plan.d.ts.map +1 -1
- package/dist/components/wave-plan.js +4 -1
- package/dist/config.d.ts +60 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +27 -0
- package/dist/deep-observation.d.ts +1 -13
- package/dist/deep-observation.d.ts.map +1 -1
- package/dist/deep-observation.js +5 -22
- package/dist/drift-record.d.ts +542 -0
- package/dist/drift-record.d.ts.map +1 -0
- package/dist/drift-record.js +886 -0
- package/dist/engine-facts.d.ts +144 -0
- package/dist/engine-facts.d.ts.map +1 -0
- package/dist/engine-facts.js +14 -0
- package/dist/graph-ir.d.ts +153 -2
- package/dist/graph-ir.d.ts.map +1 -1
- package/dist/graph-ir.js +224 -6
- package/dist/graph-refs.d.ts +145 -0
- package/dist/graph-refs.d.ts.map +1 -1
- package/dist/graph-refs.js +305 -0
- package/dist/graph-schema/fixtures/adopt.json +15 -0
- package/dist/graph-schema/fixtures/choudoufu.engine-graph.json +169 -0
- package/dist/graph-schema/fixtures/index.json +68 -0
- package/dist/graph-schema/fixtures/plunge.engine-graph.json +158 -0
- package/dist/graph-schema/fixtures.d.ts +23 -0
- package/dist/graph-schema/fixtures.d.ts.map +1 -0
- package/dist/graph-schema/fixtures.js +246 -0
- package/dist/graph-schema/generate.d.ts +15 -0
- package/dist/graph-schema/generate.d.ts.map +1 -0
- package/dist/graph-schema/generate.js +267 -0
- package/dist/graph-schema/graph.schema.json +1387 -0
- package/dist/health.schema.json +2 -1
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/instance-nodes.d.ts +159 -0
- package/dist/instance-nodes.d.ts.map +1 -0
- package/dist/instance-nodes.js +231 -0
- package/dist/lexicon.d.ts +72 -0
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/adoption-file.d.ts +56 -0
- package/dist/lifecycle/adoption-file.d.ts.map +1 -0
- package/dist/lifecycle/adoption-file.js +123 -0
- package/dist/lifecycle/cloud-index.d.ts +186 -0
- package/dist/lifecycle/cloud-index.d.ts.map +1 -0
- package/dist/lifecycle/cloud-index.js +618 -0
- package/dist/lifecycle/derive-edges.d.ts +59 -0
- package/dist/lifecycle/derive-edges.d.ts.map +1 -0
- package/dist/lifecycle/derive-edges.js +126 -0
- package/dist/lifecycle/git.d.ts +10 -9
- package/dist/lifecycle/git.d.ts.map +1 -1
- package/dist/lifecycle/git.js +7 -1
- package/dist/lifecycle/identity-match.d.ts +133 -0
- package/dist/lifecycle/identity-match.d.ts.map +1 -0
- package/dist/lifecycle/identity-match.js +147 -0
- package/dist/lifecycle/index-diff.d.ts +224 -0
- package/dist/lifecycle/index-diff.d.ts.map +1 -0
- package/dist/lifecycle/index-diff.js +327 -0
- package/dist/lifecycle/index-document.d.ts +130 -0
- package/dist/lifecycle/index-document.d.ts.map +1 -0
- package/dist/lifecycle/index-document.js +189 -0
- package/dist/lifecycle/index-drift.d.ts +121 -0
- package/dist/lifecycle/index-drift.d.ts.map +1 -0
- package/dist/lifecycle/index-drift.js +178 -0
- package/dist/lifecycle/index-import.d.ts +168 -0
- package/dist/lifecycle/index-import.d.ts.map +1 -0
- package/dist/lifecycle/index-import.js +515 -0
- package/dist/lifecycle/index-join.d.ts +129 -0
- package/dist/lifecycle/index-join.d.ts.map +1 -0
- package/dist/lifecycle/index-join.js +248 -0
- 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/observation-baseline.d.ts +61 -21
- package/dist/lifecycle/observation-baseline.d.ts.map +1 -1
- package/dist/lifecycle/observation-baseline.js +144 -19
- package/dist/lifecycle/observe.d.ts.map +1 -1
- package/dist/lifecycle/observe.js +6 -1
- package/dist/lifecycle/query.d.ts +45 -4
- package/dist/lifecycle/query.d.ts.map +1 -1
- package/dist/lifecycle/query.js +89 -7
- package/dist/lifecycle/replay.d.ts +10 -3
- package/dist/lifecycle/replay.d.ts.map +1 -1
- package/dist/lifecycle/replay.js +10 -6
- package/dist/lifecycle/scenario.d.ts +4 -3
- package/dist/lifecycle/scenario.d.ts.map +1 -1
- package/dist/lifecycle/snapshot-store-fake.d.ts +9 -0
- package/dist/lifecycle/snapshot-store-fake.d.ts.map +1 -0
- package/dist/lifecycle/snapshot-store-fake.js +21 -0
- package/dist/lifecycle/snapshot-store-s3.d.ts +102 -0
- package/dist/lifecycle/snapshot-store-s3.d.ts.map +1 -0
- package/dist/lifecycle/snapshot-store-s3.js +254 -0
- package/dist/lifecycle/snapshot-store.d.ts +170 -0
- package/dist/lifecycle/snapshot-store.d.ts.map +1 -0
- package/dist/lifecycle/snapshot-store.js +832 -0
- package/dist/lifecycle/snapshot.d.ts +11 -0
- package/dist/lifecycle/snapshot.d.ts.map +1 -1
- package/dist/lifecycle/snapshot.js +18 -5
- package/dist/lifecycle/type-listing.d.ts +148 -0
- package/dist/lifecycle/type-listing.d.ts.map +1 -0
- package/dist/lifecycle/type-listing.js +166 -0
- package/dist/lint/component-checks.d.ts +15 -1
- package/dist/lint/component-checks.d.ts.map +1 -1
- package/dist/lint/component-checks.js +1 -0
- package/dist/lint/presets/relaxed.json +2 -1
- package/dist/lint/presets/strict.json +2 -1
- package/dist/lint/rules/__fixtures__/comp/comp008/fail/dns.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp008/fail/dns.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp008/fail/dns.component.js +13 -0
- package/dist/lint/rules/__fixtures__/comp/comp008/pass/dns.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp008/pass/dns.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp008/pass/dns.component.js +8 -0
- package/dist/lint/rules/comp/comp008-applies-signal-only-root.d.ts +33 -0
- package/dist/lint/rules/comp/comp008-applies-signal-only-root.d.ts.map +1 -0
- package/dist/lint/rules/comp/comp008-applies-signal-only-root.js +123 -0
- package/dist/lint/rules/comp/index.d.ts +2 -1
- package/dist/lint/rules/comp/index.d.ts.map +1 -1
- package/dist/lint/rules/comp/index.js +4 -1
- package/dist/observation.d.ts +19 -2
- package/dist/observation.d.ts.map +1 -1
- package/dist/observation.js +18 -1
- package/dist/op/activities/activity-contracts.d.ts +1 -1
- package/dist/op/activities/activity-contracts.js +1 -1
- package/dist/op/activities/change-set.d.ts +6 -4
- package/dist/op/activities/change-set.d.ts.map +1 -1
- package/dist/op/activities/change-set.js +4 -2
- package/dist/op/activity-failure.d.ts +27 -0
- package/dist/op/activity-failure.d.ts.map +1 -1
- package/dist/op/activity-failure.js +31 -0
- package/dist/op/index.d.ts +2 -1
- package/dist/op/index.d.ts.map +1 -1
- package/dist/op/index.js +1 -1
- package/dist/op/local-executor.d.ts +5 -1
- package/dist/op/local-executor.d.ts.map +1 -1
- package/dist/op/local-executor.js +22 -8
- package/dist/pr-loop.d.ts +92 -3
- package/dist/pr-loop.d.ts.map +1 -1
- package/dist/pr-loop.js +62 -3
- package/dist/pulumi-urn.d.ts +101 -0
- package/dist/pulumi-urn.d.ts.map +1 -0
- package/dist/pulumi-urn.js +131 -0
- package/dist/release-floors.d.ts +23 -0
- package/dist/release-floors.d.ts.map +1 -0
- package/dist/release-floors.js +22 -0
- package/dist/sensitive-key.d.ts +23 -0
- package/dist/sensitive-key.d.ts.map +1 -0
- package/dist/sensitive-key.js +31 -0
- package/dist/wave-runtime.mjs +234 -234
- package/dist/workspace/adoption-report.d.ts +53 -0
- package/dist/workspace/adoption-report.d.ts.map +1 -0
- package/dist/workspace/adoption-report.js +76 -0
- package/dist/workspace/capabilities-contract.d.ts +7 -0
- package/dist/workspace/capabilities-contract.d.ts.map +1 -1
- package/dist/workspace/capabilities-contract.js +2 -1
- package/dist/workspace/capabilities.schema.json +98 -0
- package/dist/workspace/change-set.schema.json +42 -3
- package/dist/workspace/ci-cloud-identity.d.ts +13 -1
- package/dist/workspace/ci-cloud-identity.d.ts.map +1 -1
- package/dist/workspace/ci-cloud-identity.js +30 -1
- package/dist/workspace/compose-graph.d.ts +10 -1
- package/dist/workspace/compose-graph.d.ts.map +1 -1
- package/dist/workspace/compose-graph.js +6 -1
- package/dist/workspace/conformance/index.d.ts +1 -1
- package/dist/workspace/conformance/index.d.ts.map +1 -1
- package/dist/workspace/conformance/index.js +6 -1
- package/dist/workspace/drift-cli.d.ts +81 -0
- package/dist/workspace/drift-cli.d.ts.map +1 -0
- package/dist/workspace/drift-cli.js +317 -0
- package/dist/workspace/drift.schema.json +672 -0
- package/dist/workspace/graph-cli.d.ts +2 -0
- package/dist/workspace/graph-cli.d.ts.map +1 -1
- package/dist/workspace/graph-cli.js +3 -0
- package/dist/workspace/graph.schema.json +72 -0
- package/dist/workspace/init.d.ts +5 -1
- package/dist/workspace/init.d.ts.map +1 -1
- package/dist/workspace/init.js +55 -9
- package/dist/workspace/ledger.schema.json +1 -1
- package/dist/workspace/nested-graph.d.ts.map +1 -1
- package/dist/workspace/nested-graph.js +2 -0
- package/dist/workspace/pr-report.schema.json +76 -3
- package/dist/workspace/promote-waves.d.ts +112 -0
- package/dist/workspace/promote-waves.d.ts.map +1 -0
- package/dist/workspace/promote-waves.js +290 -0
- package/dist/workspace/promote.d.ts +84 -2
- package/dist/workspace/promote.d.ts.map +1 -1
- package/dist/workspace/promote.js +347 -61
- package/dist/workspace/reason-codes.d.ts +12 -0
- package/dist/workspace/reason-codes.d.ts.map +1 -1
- package/dist/workspace/reason-codes.js +14 -0
- package/dist/workspace/search-contract.d.ts +3 -3
- package/dist/workspace/search-contract.d.ts.map +1 -1
- package/dist/workspace/search-contract.js +2 -0
- package/dist/workspace/search.schema.json +103 -5
- package/package.json +14 -1
- package/src/__fixtures__/drift-record/README.md +58 -0
- package/src/__fixtures__/drift-record/choudoufu-cone.ndjson +4 -0
- package/src/__fixtures__/drift-record/choudoufu-resource.ndjson +3 -0
- package/src/__fixtures__/drift-record/component-status-ledger.json +65 -0
- package/src/__fixtures__/drift-record/component-status.json +91 -0
- package/src/__fixtures__/drift-record/deep-diff.json +259 -0
- package/src/__fixtures__/drift-record/lifecycle-diff-live.json +825 -0
- package/src/__fixtures__/drift-record/live-diff.json +125 -0
- package/src/audit/discover.e2e.test.ts +14 -0
- package/src/audit/discover.ts +3 -1
- package/src/behaviour.ts +1 -1
- package/src/capabilities/templates.json +145 -0
- package/src/capabilities/templates.test.ts +212 -0
- package/src/capabilities/templates.ts +204 -0
- package/src/change-set-bundle.test.ts +83 -0
- package/src/change-set-graph.ts +80 -9
- package/src/change-set.test.ts +24 -0
- package/src/change-set.ts +77 -14
- package/src/ci-identity-targets.test.ts +23 -0
- package/src/ci-identity.ts +10 -4
- package/src/cli/commands/import-index.test.ts +117 -0
- package/src/cli/commands/import-index.ts +265 -0
- package/src/cli/commands/lint.ts +4 -2
- package/src/cli/handlers/components.test.ts +9 -0
- package/src/cli/handlers/components.ts +12 -2
- package/src/cli/handlers/fan-out.ts +17 -3
- package/src/cli/handlers/graph.test.ts +42 -0
- package/src/cli/handlers/graph.ts +26 -4
- package/src/cli/handlers/index-cloud.ts +32 -0
- package/src/cli/handlers/index-diff.test.ts +68 -0
- package/src/cli/handlers/index-diff.ts +146 -0
- package/src/cli/handlers/ledger-root-member.test.ts +161 -0
- package/src/cli/handlers/lifecycle-drift.ts +68 -0
- package/src/cli/handlers/lifecycle.test.ts +33 -11
- package/src/cli/handlers/lifecycle.ts +205 -30
- package/src/cli/handlers/misc.ts +73 -0
- package/src/cli/handlers/pr-waves-blocked.test.ts +37 -2
- package/src/cli/handlers/pr.ts +16 -3
- package/src/cli/handlers/promote.test.ts +64 -0
- package/src/cli/handlers/promote.ts +81 -6
- package/src/cli/handlers/query.ts +27 -4
- package/src/cli/handlers/run-declared-reads-cli.test.ts +187 -0
- package/src/cli/handlers/run-groups-cli.test.ts +229 -0
- package/src/cli/handlers/scenario.test.ts +13 -0
- package/src/cli/handlers/scenario.ts +8 -7
- package/src/cli/handlers/search-index.test.ts +255 -0
- package/src/cli/handlers/search-json.test.ts +1 -1
- package/src/cli/handlers/search-ownership.test.ts +194 -0
- package/src/cli/handlers/search.ts +271 -38
- package/src/cli/main.test.ts +7 -0
- package/src/cli/main.ts +56 -1
- package/src/cli/mcp/lifecycle-tools.ts +3 -2
- package/src/cli/mcp/resource-handlers.ts +4 -3
- package/src/cli/mcp/workspace-tools.ts +1 -1
- package/src/cli/parse-args.ts +40 -2
- package/src/cli/registry.ts +19 -1
- package/src/cloud-lister/aws.test.ts +202 -0
- package/src/cloud-lister/aws.ts +226 -0
- package/src/cloud-lister/azure.test.ts +132 -0
- package/src/cloud-lister/azure.ts +142 -0
- package/src/cloud-lister/common.ts +115 -0
- package/src/cloud-lister/credentials.ts +110 -0
- package/src/cloud-lister/fakes.ts +66 -0
- package/src/cloud-lister/gcp.test.ts +121 -0
- package/src/cloud-lister/gcp.ts +159 -0
- package/src/cloud-lister/guard.test.ts +198 -0
- package/src/cloud-lister/guard.ts +111 -0
- package/src/cloud-lister/ids.ts +54 -0
- package/src/cloud-lister/index.ts +134 -0
- package/src/cloud-lister/kubernetes.test.ts +160 -0
- package/src/cloud-lister/kubernetes.ts +284 -0
- package/src/cloud-lister/markers.ts +74 -0
- package/src/cloud-lister/mask.ts +77 -0
- package/src/cloud-lister/shape.test.ts +81 -0
- package/src/cloud-lister/sigv4.ts +70 -0
- package/src/cloud-lister/transport.ts +118 -0
- package/src/cloud-lister/types.ts +135 -0
- package/src/components/capability-plugin-loader.ts +4 -0
- package/src/components/capability-plugin.ts +10 -0
- package/src/components/capability.ts +238 -0
- package/src/components/cli-support.ts +70 -14
- package/src/components/covered-round.test.ts +166 -0
- package/src/components/covered-round.ts +293 -0
- package/src/components/declared-reads.test.ts +103 -0
- package/src/components/declared-reads.ts +134 -0
- package/src/components/deploy-units.ts +4 -0
- package/src/components/driver.ts +101 -4
- package/src/components/fan-out-run.ts +95 -15
- package/src/components/fan-out-support.ts +10 -1
- package/src/components/fan-out.ts +30 -0
- package/src/components/groups.test.ts +320 -0
- package/src/components/groups.ts +880 -0
- package/src/components/index.ts +59 -0
- package/src/components/plan-shape-conformance.ts +130 -0
- package/src/components/pr-env-run-bundle.test.ts +2 -0
- package/src/components/pr-run.test.ts +728 -4
- package/src/components/pr-run.ts +395 -55
- package/src/components/promote-rounds.ts +25 -2
- package/src/components/promote.ts +55 -5
- package/src/components/registry.test.ts +1 -1
- package/src/components/release-gate.ts +115 -30
- package/src/components/release-groups.test.ts +362 -0
- package/src/components/run-groups.ts +113 -0
- package/src/components/starter-plugin.ts +6 -0
- package/src/components/verbs/index.ts +1 -0
- package/src/components/verbs/member-outputs.test.ts +205 -0
- package/src/components/verbs/member-outputs.ts +308 -0
- package/src/components/wave-plan.ts +5 -2
- package/src/config.ts +44 -0
- package/src/deep-observation.ts +5 -23
- package/src/drift-record.test.ts +596 -0
- package/src/drift-record.ts +1206 -0
- package/src/engine-facts.guard.test.ts +111 -0
- package/src/engine-facts.test.ts +178 -0
- package/src/engine-facts.ts +154 -0
- package/src/gated-waves-bundle.test.ts +2 -0
- package/src/graph-ir-live.test.ts +92 -0
- package/src/graph-ir.ts +317 -7
- package/src/graph-refs.ts +416 -0
- package/src/graph-schema/fixtures/adopt.json +15 -0
- package/src/graph-schema/fixtures/choudoufu.engine-graph.json +169 -0
- package/src/graph-schema/fixtures/index.json +68 -0
- package/src/graph-schema/fixtures/plunge.engine-graph.json +158 -0
- package/src/graph-schema/fixtures.ts +267 -0
- package/src/graph-schema/generate.ts +263 -0
- package/src/graph-schema/graph-schema.test.ts +153 -0
- package/src/graph-schema/graph.schema.json +1387 -0
- package/src/health.schema.json +2 -1
- package/src/identity.ts +2 -0
- package/src/index.ts +2 -0
- package/src/instance-nodes.ts +288 -0
- package/src/lexicon.ts +76 -0
- package/src/lifecycle/__fixtures__/index-diff/20261026T120000Z-aaaaaaaaaaaa.json +149 -0
- package/src/lifecycle/__fixtures__/index-diff/20261026T130000Z-bbbbbbbbbbbb.json +127 -0
- package/src/lifecycle/adoption-file.test.ts +100 -0
- package/src/lifecycle/adoption-file.ts +154 -0
- package/src/lifecycle/cloud-index.test.ts +517 -0
- package/src/lifecycle/cloud-index.ts +736 -0
- package/src/lifecycle/derive-edges.test.ts +193 -0
- package/src/lifecycle/derive-edges.ts +182 -0
- package/src/lifecycle/git.ts +10 -4
- package/src/lifecycle/identity-match.test.ts +308 -0
- package/src/lifecycle/identity-match.ts +257 -0
- package/src/lifecycle/index-diff.test.ts +198 -0
- package/src/lifecycle/index-diff.ts +476 -0
- package/src/lifecycle/index-document.test.ts +64 -0
- package/src/lifecycle/index-document.ts +299 -0
- package/src/lifecycle/index-drift.test.ts +191 -0
- package/src/lifecycle/index-drift.ts +304 -0
- package/src/lifecycle/index-import.test.ts +255 -0
- package/src/lifecycle/index-import.ts +634 -0
- package/src/lifecycle/index-join.test.ts +250 -0
- package/src/lifecycle/index-join.ts +304 -0
- package/src/lifecycle/index-store-load-bearing.test.ts +187 -0
- package/src/lifecycle/index.ts +4 -0
- package/src/lifecycle/member-ledger.test.ts +25 -7
- package/src/lifecycle/observation-baseline.test.ts +72 -1
- package/src/lifecycle/observation-baseline.ts +190 -27
- package/src/lifecycle/observe.ts +6 -1
- package/src/lifecycle/query.test.ts +69 -1
- package/src/lifecycle/query.ts +103 -10
- package/src/lifecycle/replay.test.ts +9 -5
- package/src/lifecycle/replay.ts +9 -5
- package/src/lifecycle/scenario.ts +4 -3
- package/src/lifecycle/snapshot-store-fake.ts +29 -0
- package/src/lifecycle/snapshot-store-s3.ts +316 -0
- package/src/lifecycle/snapshot-store.test.ts +385 -0
- package/src/lifecycle/snapshot-store.ts +981 -0
- package/src/lifecycle/snapshot.test.ts +13 -0
- package/src/lifecycle/snapshot.ts +23 -6
- package/src/lifecycle/type-listing.test.ts +166 -0
- package/src/lifecycle/type-listing.ts +309 -0
- package/src/lint/component-checks.ts +17 -1
- package/src/lint/config.test.ts +3 -0
- package/src/lint/presets/relaxed.json +2 -1
- package/src/lint/presets/strict.json +2 -1
- package/src/lint/rules/__fixtures__/comp/comp008/fail/dns.component.ts +15 -0
- package/src/lint/rules/__fixtures__/comp/comp008/pass/dns.component.ts +10 -0
- package/src/lint/rules/comp/comp.test.ts +2 -1
- package/src/lint/rules/comp/comp008-applies-signal-only-root.ts +121 -0
- package/src/lint/rules/comp/comp008.test.ts +77 -0
- package/src/lint/rules/comp/index.ts +4 -1
- package/src/observation-edges.test.ts +33 -0
- package/src/observation.ts +36 -1
- package/src/op/activities/activity-contracts.ts +1 -1
- package/src/op/activities/change-set.ts +8 -5
- package/src/op/activity-failure.ts +36 -0
- package/src/op/index.ts +2 -1
- package/src/op/local-executor.test.ts +80 -0
- package/src/op/local-executor.ts +27 -9
- package/src/pr-loop-bundle.test.ts +5 -2
- package/src/pr-loop.test.ts +57 -1
- package/src/pr-loop.ts +154 -6
- package/src/pulumi-urn.ts +151 -0
- package/src/release-floors.ts +22 -0
- package/src/sensitive-key.ts +34 -0
- package/src/workspace/adoption-report.test.ts +61 -0
- package/src/workspace/adoption-report.ts +103 -0
- package/src/workspace/capabilities-contract.test.ts +4 -0
- package/src/workspace/capabilities-contract.ts +9 -1
- package/src/workspace/capabilities.schema.json +98 -0
- package/src/workspace/change-set.schema.json +42 -3
- package/src/workspace/ci-cloud-identity.ts +31 -1
- package/src/workspace/compose-graph.test.ts +12 -0
- package/src/workspace/compose-graph.ts +12 -1
- package/src/workspace/conformance/conformance.e2e.test.ts +2 -1
- package/src/workspace/conformance/index.ts +6 -1
- package/src/workspace/drift-cli.test.ts +65 -0
- package/src/workspace/drift-cli.ts +365 -0
- package/src/workspace/drift.schema.json +672 -0
- package/src/workspace/graph-cli.ts +5 -0
- package/src/workspace/graph.schema.json +72 -0
- package/src/workspace/init.test.ts +38 -1
- package/src/workspace/init.ts +50 -8
- package/src/workspace/intent-gaps.test.ts +18 -2
- package/src/workspace/ledger.schema.json +1 -1
- package/src/workspace/nested-graph.ts +1 -0
- package/src/workspace/pr-report.schema.json +76 -3
- package/src/workspace/promote-waves.test.ts +296 -0
- package/src/workspace/promote-waves.ts +340 -0
- package/src/workspace/promote.test.ts +158 -4
- package/src/workspace/promote.ts +398 -57
- package/src/workspace/reason-codes.test.ts +4 -1
- package/src/workspace/reason-codes.ts +14 -0
- package/src/workspace/search-contract.ts +2 -0
- package/src/workspace/search.schema.json +103 -5
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads a capability finds in the files its steps name (#4466).
|
|
3
|
+
*
|
|
4
|
+
* A read core can see is a `stackOutput()` or `@<component>.publish.*`
|
|
5
|
+
* reference in a step. A CloudFormation template that imports another
|
|
6
|
+
* stack's export reads that stack too, but the read sits inside the
|
|
7
|
+
* template. A capability that can find such reads says so through
|
|
8
|
+
* `Capability.declaredReads`, and {@link withDeclaredReads} writes each one
|
|
9
|
+
* into the reader's step as the `stackOutput()` reference a person would have
|
|
10
|
+
* written, plus a `dependsOn` on the upstream. From there on it is an ordinary
|
|
11
|
+
* read: it orders the fan-out, it is named under `unknownInputs` while the
|
|
12
|
+
* upstream's plan cannot say the value, and a reader whose plan read another
|
|
13
|
+
* value than the upstream applied is held for a round.
|
|
14
|
+
*/
|
|
15
|
+
import { capabilitySteps } from "./wave-plan.js";
|
|
16
|
+
/** `pointer`'s segments, unescaped (RFC 6901). */
|
|
17
|
+
function segments(pointer) {
|
|
18
|
+
if (pointer === "")
|
|
19
|
+
return [];
|
|
20
|
+
return pointer
|
|
21
|
+
.split("/")
|
|
22
|
+
.slice(1)
|
|
23
|
+
.map((s) => s.replace(/~1/g, "/").replace(/~0/g, "~"));
|
|
24
|
+
}
|
|
25
|
+
/** `value` with `ref` placed at `path`, copying each object on the way; `undefined` when something already sits there. */
|
|
26
|
+
function placed(value, path, ref) {
|
|
27
|
+
if (path.length === 0)
|
|
28
|
+
return undefined;
|
|
29
|
+
const [head, ...rest] = path;
|
|
30
|
+
const here = value[head];
|
|
31
|
+
if (rest.length === 0)
|
|
32
|
+
return here === undefined ? { ...value, [head]: ref } : undefined;
|
|
33
|
+
if (here !== undefined && (here === null || typeof here !== "object" || Array.isArray(here)))
|
|
34
|
+
return undefined;
|
|
35
|
+
const inner = placed(here ?? {}, rest, ref);
|
|
36
|
+
return inner ? { ...value, [head]: inner } : undefined;
|
|
37
|
+
}
|
|
38
|
+
/** `phases` with each step `replace` gives a new value for swapped, in place, nested phases included. */
|
|
39
|
+
function mapSteps(phases, replace) {
|
|
40
|
+
const walk = (steps) => steps.map((step) => {
|
|
41
|
+
if (typeof step.phase === "string" && Array.isArray(step.steps)) {
|
|
42
|
+
return { ...step, steps: walk(step.steps) };
|
|
43
|
+
}
|
|
44
|
+
if (step.kind === "gate")
|
|
45
|
+
return step;
|
|
46
|
+
return replace(step);
|
|
47
|
+
});
|
|
48
|
+
return phases.map((phase) => ({ ...phase, steps: walk(phase.steps) }));
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Each capability's declared reads among `components` (#4466): every read a
|
|
52
|
+
* capability with `declaredReads` reports between two components of the
|
|
53
|
+
* project, its own reads of itself left out. A capability that throws
|
|
54
|
+
* reports none.
|
|
55
|
+
*/
|
|
56
|
+
export async function declaredReadsOf(components, registry, root) {
|
|
57
|
+
const names = new Set(components.map((c) => c.name));
|
|
58
|
+
const byKind = new Map();
|
|
59
|
+
for (const component of components) {
|
|
60
|
+
const seen = new Map();
|
|
61
|
+
for (const step of capabilitySteps(component.deploy)) {
|
|
62
|
+
if (!registry.has(step.kind))
|
|
63
|
+
continue;
|
|
64
|
+
const index = seen.get(step.kind) ?? 0;
|
|
65
|
+
seen.set(step.kind, index + 1);
|
|
66
|
+
const { kind, ...rest } = step;
|
|
67
|
+
(byKind.get(kind) ?? byKind.set(kind, []).get(kind)).push({ component: component.name, index, step: rest });
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
const out = [];
|
|
71
|
+
for (const [kind, members] of byKind) {
|
|
72
|
+
const capability = registry.resolve(kind);
|
|
73
|
+
if (typeof capability.declaredReads !== "function")
|
|
74
|
+
continue;
|
|
75
|
+
let reported;
|
|
76
|
+
try {
|
|
77
|
+
reported = await capability.declaredReads({ root }, members);
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
for (const r of reported ?? []) {
|
|
83
|
+
if (r.reader === r.upstream || !names.has(r.reader) || !names.has(r.upstream))
|
|
84
|
+
continue;
|
|
85
|
+
out.push({ ...r, index: r.index ?? 0, kind });
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return out.sort((a, b) => a.reader.localeCompare(b.reader) || a.index - b.index || a.at.localeCompare(b.at));
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* `components` with each declared read written in (#4466): the reader's
|
|
92
|
+
* step gets `{ stackOutput: { stack: upstream, name: output } }` at the
|
|
93
|
+
* read's place, unless something sits there already, and the reader depends
|
|
94
|
+
* on the upstream. Components no read names come back as they were.
|
|
95
|
+
*/
|
|
96
|
+
export function applyDeclaredReads(components, reads) {
|
|
97
|
+
const byReader = new Map();
|
|
98
|
+
for (const r of reads)
|
|
99
|
+
(byReader.get(r.reader) ?? byReader.set(r.reader, []).get(r.reader)).push(r);
|
|
100
|
+
return components.map((component) => {
|
|
101
|
+
const mine = byReader.get(component.name);
|
|
102
|
+
if (!mine)
|
|
103
|
+
return component;
|
|
104
|
+
const kinds = new Map();
|
|
105
|
+
const added = new Set();
|
|
106
|
+
const deploy = mapSteps(component.deploy, (step) => {
|
|
107
|
+
const index = kinds.get(step.kind) ?? 0;
|
|
108
|
+
kinds.set(step.kind, index + 1);
|
|
109
|
+
let next = step;
|
|
110
|
+
for (const r of mine.filter((x) => x.kind === step.kind && x.index === index)) {
|
|
111
|
+
const { kind, ...rest } = next;
|
|
112
|
+
const with_ = placed(rest, segments(r.at), { stackOutput: { stack: r.upstream, name: r.output } });
|
|
113
|
+
if (!with_)
|
|
114
|
+
continue;
|
|
115
|
+
next = { kind, ...with_ };
|
|
116
|
+
added.add(r.upstream);
|
|
117
|
+
}
|
|
118
|
+
return next;
|
|
119
|
+
});
|
|
120
|
+
const dependsOn = [...(component.dependsOn ?? [])];
|
|
121
|
+
for (const up of [...added].sort())
|
|
122
|
+
if (!dependsOn.includes(up))
|
|
123
|
+
dependsOn.push(up);
|
|
124
|
+
return { ...component, dependsOn, deploy };
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
/** {@link declaredReadsOf} and {@link applyDeclaredReads} in one: `components` with their declared reads written in. */
|
|
128
|
+
export async function withDeclaredReads(components, registry, root) {
|
|
129
|
+
const reads = await declaredReadsOf(components, registry, root);
|
|
130
|
+
return reads.length > 0 ? applyDeclaredReads(components, reads) : [...components];
|
|
131
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-units.d.ts","sourceRoot":"","sources":["../../src/components/deploy-units.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,SAAS,OAAO,EAAE,CAAC;CAC3B;AAED,6EAA6E;AAC7E,MAAM,WAAW,cAAc;IAC7B,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAC;IACb,oEAAoE;IACpE,KAAK,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,cAAc,
|
|
1
|
+
{"version":3,"file":"deploy-units.d.ts","sourceRoot":"","sources":["../../src/components/deploy-units.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,SAAS,OAAO,EAAE,CAAC;CAC3B;AAED,6EAA6E;AAC7E,MAAM,WAAW,cAAc;IAC7B,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAC;IACb,oEAAoE;IACpE,KAAK,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,cAAc,EAwBtD,CAAC;AAEF,kEAAkE;AAClE,MAAM,WAAW,UAAU;IACzB,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,SAAS,gBAAgB,EAAE,GAAG,UAAU,EAAE,CA0B7E"}
|
|
@@ -26,6 +26,10 @@ export const DEPLOY_UNIT_RULES = [
|
|
|
26
26
|
// A Config Connector manifest applied over REST (#4273). Its unit is the
|
|
27
27
|
// step's `stack`, the member its plan names.
|
|
28
28
|
{ kind: "gcp-apply", field: "stack", lexicon: "gcp" },
|
|
29
|
+
// Another workspace member's outputs (#4455). Its unit is the member, so a
|
|
30
|
+
// change signal naming the member puts the component in the change. No
|
|
31
|
+
// lexicon observes it: the member's own pipeline reports its status.
|
|
32
|
+
{ kind: "member-outputs", field: "member", lexicon: "workspace" },
|
|
29
33
|
];
|
|
30
34
|
/**
|
|
31
35
|
* Every distinct deploy unit a component's phases target, in declaration
|
|
@@ -47,7 +47,8 @@
|
|
|
47
47
|
*/
|
|
48
48
|
import { type GateDigestMismatch, type GateLedgerPort } from "../op/gate.js";
|
|
49
49
|
import type { PendingGateRecord } from "../lifecycle/gate-ledger.js";
|
|
50
|
-
import type { CapabilityRegistry, DeployContext } from "./capability.js";
|
|
50
|
+
import type { CapabilityRegistry, DeployContext, GroupMemberStatus } from "./capability.js";
|
|
51
|
+
import type { FanOutGroup } from "./fan-out.js";
|
|
51
52
|
import type { ReleaseIdentity } from "../telemetry-attribution.js";
|
|
52
53
|
import type { RunProgressEvent } from "./run-progress.js";
|
|
53
54
|
import { type RunEventSink } from "../run-event-stream.js";
|
|
@@ -180,6 +181,8 @@ export interface DriverRunResult {
|
|
|
180
181
|
* component that ran in an earlier job.
|
|
181
182
|
*/
|
|
182
183
|
componentOutputs: Record<string, Record<string, unknown>>;
|
|
184
|
+
/** How each member of a group that ran ended, as its capability said (ws-107, #4465), by component. Absent when no group ran. */
|
|
185
|
+
groupOutcomes?: Record<string, GroupMemberStatus>;
|
|
183
186
|
}
|
|
184
187
|
export interface ComponentGraph {
|
|
185
188
|
/** Flat topological order — every dependency before its dependents. */
|
|
@@ -251,6 +254,24 @@ export interface WiringReference {
|
|
|
251
254
|
* upstream applies.
|
|
252
255
|
*/
|
|
253
256
|
export declare function unresolvedWiringReferences(input: Record<string, unknown>, componentOutputs: Record<string, Record<string, unknown>>): WiringReference[];
|
|
257
|
+
/**
|
|
258
|
+
* Every cross-component reference in `input`, sorted by `ref` and each once,
|
|
259
|
+
* with whether `componentOutputs` holds a value for it. A pull request's
|
|
260
|
+
* report records each as a read between components, known at plan or not.
|
|
261
|
+
*/
|
|
262
|
+
export declare function wiringReads(input: Record<string, unknown>, componentOutputs: Record<string, Record<string, unknown>>): Array<WiringReference & {
|
|
263
|
+
known: boolean;
|
|
264
|
+
}>;
|
|
265
|
+
/**
|
|
266
|
+
* Every cross-component reference in `input` with where it sits, as a JSON
|
|
267
|
+
* Pointer into `input` (ws-107), and the output it names (`publish.<field>`
|
|
268
|
+
* for an artifact). A reference made twice is listed at each place. Sorted
|
|
269
|
+
* by `ref`, then by `at`.
|
|
270
|
+
*/
|
|
271
|
+
export declare function wiringReferencesAt(input: Record<string, unknown>): Array<WiringReference & {
|
|
272
|
+
at: string;
|
|
273
|
+
output: string;
|
|
274
|
+
}>;
|
|
254
275
|
/**
|
|
255
276
|
* The cross-component references in `input` that resolve to another value
|
|
256
277
|
* against `now` than against `read`, sorted (#3999). A pull request's apply
|
|
@@ -394,6 +415,26 @@ export interface InterpretRunOptions {
|
|
|
394
415
|
releaseIdentity?: (component: string) => ReleaseIdentity | undefined;
|
|
395
416
|
/** The addresses each component narrows to (#4300), by component: its `DeployContext.targets`. */
|
|
396
417
|
targets?: Readonly<Record<string, readonly string[]>>;
|
|
418
|
+
/** Groups applied as one (ws-107, #4465). See {@link InterpretGroups}. Absent: every component runs its own deploy. */
|
|
419
|
+
groups?: InterpretGroups;
|
|
420
|
+
}
|
|
421
|
+
/**
|
|
422
|
+
* Groups a run applies as one (ws-107, #4465): a promote under a release and
|
|
423
|
+
* `run --components` hand them over, already placed by `groupFanOut`. Each
|
|
424
|
+
* group runs once, through `run`, in the wave its members sit in and in place
|
|
425
|
+
* of their own deploys. A member that does not end `ok` stops the run after
|
|
426
|
+
* its wave, as a failed component does.
|
|
427
|
+
*/
|
|
428
|
+
export interface InterpretGroups {
|
|
429
|
+
/** The grouped waves, which replace the ones `dependsOn` gives. Every component of the run is in one; an empty wave is passed over. */
|
|
430
|
+
waves: string[][];
|
|
431
|
+
/** Each group's members are components of the run, in one wave. */
|
|
432
|
+
groups: readonly FanOutGroup[];
|
|
433
|
+
/** Apply one group with the outputs standing, adding each applied member's own: one result per member, and how each ended. */
|
|
434
|
+
run: (group: FanOutGroup, componentOutputs: Record<string, Record<string, unknown>>) => Promise<{
|
|
435
|
+
results: DriverComponentResult[];
|
|
436
|
+
outcomes: Record<string, GroupMemberStatus>;
|
|
437
|
+
}>;
|
|
397
438
|
}
|
|
398
439
|
/**
|
|
399
440
|
* Run a set of components to completion on the local in-process executor:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../src/components/driver.ts"],"names":[],"mappings":"AAAA;;;;;;;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Ae,EAAE,EAC7B,QAAQ,EAAE,kBAAkB,EAC5B,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,eAAe,CAAC,CA6F1B"}
|
|
@@ -207,6 +207,14 @@ export function unresolvedWiringSources(input, componentOutputs) {
|
|
|
207
207
|
export function unresolvedWiringReferences(input, componentOutputs) {
|
|
208
208
|
return wiringReferences(input).filter((r) => r.value(componentOutputs) === undefined).map(({ source, ref, publish }) => ({ source, ref, publish }));
|
|
209
209
|
}
|
|
210
|
+
/**
|
|
211
|
+
* Every cross-component reference in `input`, sorted by `ref` and each once,
|
|
212
|
+
* with whether `componentOutputs` holds a value for it. A pull request's
|
|
213
|
+
* report records each as a read between components, known at plan or not.
|
|
214
|
+
*/
|
|
215
|
+
export function wiringReads(input, componentOutputs) {
|
|
216
|
+
return wiringReferences(input).map(({ source, ref, publish, value }) => ({ source, ref, publish, known: value(componentOutputs) !== undefined }));
|
|
217
|
+
}
|
|
210
218
|
/**
|
|
211
219
|
* Every cross-component reference in `input`, each once, sorted by `ref`,
|
|
212
220
|
* with the value it resolves to against a given outputs map.
|
|
@@ -240,6 +248,43 @@ function wiringReferences(input) {
|
|
|
240
248
|
walk(input);
|
|
241
249
|
return [...found.values()].sort((a, b) => a.ref.localeCompare(b.ref));
|
|
242
250
|
}
|
|
251
|
+
/**
|
|
252
|
+
* Every cross-component reference in `input` with where it sits, as a JSON
|
|
253
|
+
* Pointer into `input` (ws-107), and the output it names (`publish.<field>`
|
|
254
|
+
* for an artifact). A reference made twice is listed at each place. Sorted
|
|
255
|
+
* by `ref`, then by `at`.
|
|
256
|
+
*/
|
|
257
|
+
export function wiringReferencesAt(input) {
|
|
258
|
+
const found = [];
|
|
259
|
+
const pointer = (path) => path.map((p) => "/" + p.replace(/~/g, "~0").replace(/\//g, "~1")).join("");
|
|
260
|
+
const walk = (value, path) => {
|
|
261
|
+
if (typeof value === "string") {
|
|
262
|
+
if (PRIOR_STEP_REF.test(value))
|
|
263
|
+
return;
|
|
264
|
+
const ref = value.match(COMPONENT_ARTIFACT_REF);
|
|
265
|
+
if (ref) {
|
|
266
|
+
const [, source, field] = ref;
|
|
267
|
+
found.push({ source, ref: `${source}.publish.${field}`, publish: true, at: pointer(path), output: `publish.${field}` });
|
|
268
|
+
}
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
if (Array.isArray(value)) {
|
|
272
|
+
value.forEach((v, i) => walk(v, [...path, String(i)]));
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
if (value && typeof value === "object") {
|
|
276
|
+
if ("stackOutput" in value) {
|
|
277
|
+
const { stack, name } = value.stackOutput;
|
|
278
|
+
found.push({ source: stack, ref: `${stack}.${name}`, publish: name === "publish" || name.startsWith("publish."), at: pointer(path), output: name });
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
for (const [k, v] of Object.entries(value))
|
|
282
|
+
walk(v, [...path, k]);
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
walk(input, []);
|
|
286
|
+
return found.sort((a, b) => a.ref.localeCompare(b.ref) || a.at.localeCompare(b.at));
|
|
287
|
+
}
|
|
243
288
|
/**
|
|
244
289
|
* The cross-component references in `input` that resolve to another value
|
|
245
290
|
* against `now` than against `read`, sorted (#3999). A pull request's apply
|
|
@@ -846,8 +891,21 @@ export function assertTargetsAccepted(component, registry, ctx) {
|
|
|
846
891
|
walk(phase.steps);
|
|
847
892
|
}
|
|
848
893
|
export async function runInterpretDriver(components, registry, options) {
|
|
849
|
-
const
|
|
894
|
+
const graph = resolveComponentGraph(components);
|
|
850
895
|
const byName = new Map(components.map((c) => [c.name, c]));
|
|
896
|
+
// ws-107 (#4465): the grouped waves, and each member's group.
|
|
897
|
+
const waves = options.groups ? options.groups.waves.map((w) => w.filter((name) => byName.has(name))).filter((w) => w.length > 0) : graph.waves;
|
|
898
|
+
const order = options.groups ? waves.flat() : graph.order;
|
|
899
|
+
const placed = new Set(order);
|
|
900
|
+
const unplaced = components.filter((c) => !placed.has(c.name)).map((c) => c.name);
|
|
901
|
+
if (unplaced.length > 0)
|
|
902
|
+
throw new Error(`the grouped waves leave out ${unplaced.join(", ")}, which this run runs`);
|
|
903
|
+
// A group keeps its members in this run; one left with fewer than two is no group, and its member runs its own deploy.
|
|
904
|
+
const runGroups = (options.groups?.groups ?? [])
|
|
905
|
+
.map((g) => ({ ...g, components: g.components.filter((c) => byName.has(c)) }))
|
|
906
|
+
.filter((g) => g.components.length > 1);
|
|
907
|
+
const groupOf = new Map(runGroups.flatMap((g) => g.components.map((c) => [c, g])));
|
|
908
|
+
const groupOutcomes = {};
|
|
851
909
|
const componentOutputs = { ...(options.componentOutputs ?? {}) };
|
|
852
910
|
const emit = joinRunEventSinks(options.onRunEvent, progressSinkOf(options.onProgress));
|
|
853
911
|
const gates = {
|
|
@@ -863,13 +921,25 @@ export async function runInterpretDriver(components, registry, options) {
|
|
|
863
921
|
waveLoop: for (const [waveIndex, wave] of waves.entries()) {
|
|
864
922
|
const waveNum = waveIndex + 1;
|
|
865
923
|
emit?.({ type: "wave-start", wave: waveNum, components: wave });
|
|
866
|
-
const waveComponents = wave.map((name) => byName.get(name));
|
|
867
|
-
const
|
|
924
|
+
const waveComponents = wave.filter((name) => !groupOf.has(name)).map((name) => byName.get(name));
|
|
925
|
+
const groupsHere = [...new Set(wave.map((name) => groupOf.get(name)).filter((g) => g !== undefined))];
|
|
926
|
+
// Groups and the wave's other components run side by side, as a wave's components do.
|
|
927
|
+
const groupResults = Promise.all(groupsHere.map(async (group) => {
|
|
928
|
+
for (const name of group.components)
|
|
929
|
+
emit?.({ type: "component-start", wave: waveNum, component: name });
|
|
930
|
+
const ran = await options.groups.run(group, componentOutputs);
|
|
931
|
+
Object.assign(groupOutcomes, ran.outcomes);
|
|
932
|
+
for (const result of ran.results)
|
|
933
|
+
emit?.({ type: "component-settle", wave: waveNum, component: result.component, status: progressStatus(result.status) });
|
|
934
|
+
return ran.results;
|
|
935
|
+
}));
|
|
936
|
+
const ownResults = await Promise.all(waveComponents.map(async (component) => {
|
|
868
937
|
emit?.({ type: "component-start", wave: waveNum, component: component.name });
|
|
869
938
|
const result = await runComponentDeploy(component, deployContext(options, component.name), registry, componentOutputs, undefined, gates, emit);
|
|
870
939
|
emit?.({ type: "component-settle", wave: waveNum, component: component.name, status: progressStatus(result.status) });
|
|
871
940
|
return result;
|
|
872
941
|
}));
|
|
942
|
+
const waveResults = [...ownResults, ...(await groupResults).flat()];
|
|
873
943
|
results.push(...waveResults);
|
|
874
944
|
const stopped = waveResults.find((r) => r.status !== "ok");
|
|
875
945
|
emit?.({ type: "wave-settle", wave: waveNum, status: progressStatus(stopped?.status ?? "ok") });
|
|
@@ -889,6 +959,7 @@ export async function runInterpretDriver(components, registry, options) {
|
|
|
889
959
|
emit?.({ type: "run-settle", status: progressStatus(status), durationMs: null });
|
|
890
960
|
const result = {
|
|
891
961
|
order, waves, results, ok, status, failedComponent, componentOutputs,
|
|
962
|
+
...(Object.keys(groupOutcomes).length > 0 ? { groupOutcomes } : {}),
|
|
892
963
|
...(gated
|
|
893
964
|
? {
|
|
894
965
|
gatedComponent: gated.component,
|
|
@@ -43,7 +43,7 @@ import { type FanOutPlan, type FanOutProgress, type FanOutSkip } from "./fan-out
|
|
|
43
43
|
import { type GateLedgerPort } from "../op/gate.js";
|
|
44
44
|
import type { RunProgressEvent } from "./run-progress.js";
|
|
45
45
|
import { type RunEventSink } from "../run-event-stream.js";
|
|
46
|
-
import type { CapabilityRegistry } from "./capability.js";
|
|
46
|
+
import type { CapabilityRegistry, GroupMemberStatus, GroupRun } from "./capability.js";
|
|
47
47
|
import type { PendingGateRecord } from "../lifecycle/gate-ledger.js";
|
|
48
48
|
import type { DeployContext } from "./capability.js";
|
|
49
49
|
import { type WaveComponentPlan } from "./wave-plan.js";
|
|
@@ -178,6 +178,20 @@ export interface FanOutRunOptions {
|
|
|
178
178
|
* before it applied.
|
|
179
179
|
*/
|
|
180
180
|
hold?: (component: string, componentOutputs: Record<string, Record<string, unknown>>) => string | undefined;
|
|
181
|
+
/**
|
|
182
|
+
* The approved plan of each group in `plan.groups` (ws-107), by the
|
|
183
|
+
* group's first component. A group runs through `runGroup` in its wave,
|
|
184
|
+
* in place of its members' own runs, and is held and blocked as one: a
|
|
185
|
+
* member held or blocked holds or blocks the rest. Not with `waveGate`.
|
|
186
|
+
*/
|
|
187
|
+
groupRuns?: Record<string, GroupRun>;
|
|
188
|
+
/**
|
|
189
|
+
* A group with no entry in `groupRuns` plans in its wave against the
|
|
190
|
+
* outputs standing, then applies (#4465): `components fan-out` plans
|
|
191
|
+
* nothing before it runs. Without it such a group fails, which is what a
|
|
192
|
+
* pull request's apply wants for a group nobody approved.
|
|
193
|
+
*/
|
|
194
|
+
planGroupsAtWave?: boolean;
|
|
181
195
|
}
|
|
182
196
|
/** A component {@link FanOutRunOptions.hold} held back, or one downstream of it. */
|
|
183
197
|
export interface FanOutHeld {
|
|
@@ -205,6 +219,14 @@ export interface FanOutRunResult {
|
|
|
205
219
|
waves?: WaveRecord[];
|
|
206
220
|
/** What {@link FanOutRunOptions.hold} held back, in plan order. Absent when nothing was. */
|
|
207
221
|
held?: FanOutHeld[];
|
|
222
|
+
/**
|
|
223
|
+
* Members of a group whose apply stopped before their part began (ws-107),
|
|
224
|
+
* sorted. Each has a `fail` result but is not in `failed`; what depends on
|
|
225
|
+
* it outside the group is blocked by it. Absent when none.
|
|
226
|
+
*/
|
|
227
|
+
notStarted?: string[];
|
|
228
|
+
/** How each member of a group that ran ended, as its capability said (#4446), by component. Absent when no group ran. */
|
|
229
|
+
groupOutcomes?: Record<string, GroupMemberStatus>;
|
|
208
230
|
}
|
|
209
231
|
/**
|
|
210
232
|
* Dispatch a fan-out plan.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fan-out-run.d.ts","sourceRoot":"","sources":["../../src/components/fan-out-run.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAA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AC,CAAC;CACnD;AAED;;;;;GAKG;AACH,wBAAsB,SAAS,CAC7B,IAAI,EAAE,UAAU,EAChB,UAAU,EAAE,eAAe,EAAE,EAC7B,QAAQ,EAAE,kBAAkB,EAC5B,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,eAAe,CAAC,CAgO1B;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,CAAC,SAAS,CAAC,GAAG,MAAM,CAO7F"}
|
|
@@ -41,6 +41,7 @@ import { deployContext, runComponentDeploy, } from "./driver.js";
|
|
|
41
41
|
import { downstreamWithin, remainingFanOut } from "./fan-out.js";
|
|
42
42
|
import { evaluateGate, gitGateLedgerPort } from "../op/gate.js";
|
|
43
43
|
import { emitGateStep, joinRunEventSinks, progressSinkOf } from "../run-event-stream.js";
|
|
44
|
+
import { groupsByComponent, narrowGroups, planAndRunComponentGroup, runComponentGroup } from "./groups.js";
|
|
44
45
|
import { planWaveComponent } from "./wave-plan.js";
|
|
45
46
|
import { computePlanDigest } from "../lifecycle/plan-digest.js";
|
|
46
47
|
import { decideWaveGate, runWaveLoop, waveGateName, waveSetDigest } from "../wave-engine.js";
|
|
@@ -130,13 +131,17 @@ export async function runFanOut(plan, components, registry, options) {
|
|
|
130
131
|
const componentOutputs = { ...(options.componentOutputs ?? {}) };
|
|
131
132
|
// Resume first, so the gate is decided against the work that is actually left
|
|
132
133
|
// and a re-run does not re-approve. The digest is carried, not recomputed.
|
|
133
|
-
|
|
134
|
+
// A group keeps what is left of it (#4465).
|
|
135
|
+
const active = options.progress ? narrowGroups(remainingFanOut(plan, components, options.progress), components, plan.groups) : plan;
|
|
134
136
|
if (options.gate && options.waveGate) {
|
|
135
137
|
throw new Error("a fan-out takes one gate over the set or one gate per wave, not both");
|
|
136
138
|
}
|
|
137
139
|
if (options.waveGate && options.plans) {
|
|
138
140
|
throw new Error("a gated-wave fan-out plans each wave itself, so it takes no plans made beforehand");
|
|
139
141
|
}
|
|
142
|
+
if (options.waveGate && plan.groups?.length) {
|
|
143
|
+
throw new Error("a gated-wave fan-out plans component by component, so it takes no groups");
|
|
144
|
+
}
|
|
140
145
|
if (options.waveGate) {
|
|
141
146
|
return runGatedWaves(plan, active, components, registry, options, options.waveGate, gates, componentOutputs);
|
|
142
147
|
}
|
|
@@ -173,44 +178,85 @@ export async function runFanOut(plan, components, registry, options) {
|
|
|
173
178
|
const results = [];
|
|
174
179
|
const completed = [];
|
|
175
180
|
const failed = [];
|
|
181
|
+
const notStarted = [];
|
|
182
|
+
const groupOutcomes = {};
|
|
176
183
|
const blockedBy = new Map();
|
|
177
184
|
const held = new Map();
|
|
178
185
|
let gatedFact;
|
|
179
186
|
const inPlan = new Set(active.order);
|
|
180
187
|
const waveOf = waveNumbers(active.waves);
|
|
181
|
-
|
|
182
|
-
const
|
|
183
|
-
|
|
188
|
+
// ws-107: a group applies as one unit, so it is held and blocked as one.
|
|
189
|
+
const groupOf = groupsByComponent(active);
|
|
190
|
+
/** Hold `root` and everything downstream of it that has not settled otherwise. With `heldBy`, `root` is held for that component's reason. */
|
|
191
|
+
const markHeld = (root, reason, heldBy) => {
|
|
192
|
+
held.set(root, { component: root, reason, ...(heldBy ? { heldBy } : {}) });
|
|
184
193
|
emit?.({ type: "component-settle", wave: waveOf.get(root), component: root, status: "waiting" });
|
|
185
194
|
for (const [component] of downstreamWithin(components, inPlan, [root])) {
|
|
186
195
|
if (held.has(component) || blockedBy.has(component) || failed.includes(component))
|
|
187
196
|
continue;
|
|
188
|
-
held.set(component, { component, reason, heldBy: root });
|
|
197
|
+
held.set(component, { component, reason, heldBy: heldBy ?? root });
|
|
189
198
|
emit?.({ type: "component-settle", wave: waveOf.get(component), component, status: "waiting" });
|
|
190
199
|
}
|
|
191
200
|
};
|
|
192
|
-
/** Skip everything downstream of `
|
|
193
|
-
const markBlocked = (
|
|
194
|
-
for (const [component, by] of downstreamWithin(components, inPlan,
|
|
195
|
-
if (blockedBy.has(component) || failed.includes(component))
|
|
201
|
+
/** Skip everything downstream of `roots`, blaming a root rather than the nearest edge. */
|
|
202
|
+
const markBlocked = (...roots) => {
|
|
203
|
+
for (const [component, by] of downstreamWithin(components, inPlan, roots)) {
|
|
204
|
+
if (blockedBy.has(component) || failed.includes(component) || completed.includes(component) || notStarted.includes(component))
|
|
196
205
|
continue;
|
|
197
206
|
blockedBy.set(component, by);
|
|
198
207
|
}
|
|
199
208
|
};
|
|
200
209
|
for (const [waveIndex, wave] of active.waves.entries()) {
|
|
201
210
|
const waveNum = waveIndex + 1;
|
|
211
|
+
// A member blocked blocks its whole group, by the same failure.
|
|
212
|
+
for (const name of wave) {
|
|
213
|
+
const by = blockedBy.get(name);
|
|
214
|
+
if (by === undefined)
|
|
215
|
+
continue;
|
|
216
|
+
for (const mate of groupOf.get(name)?.components ?? [])
|
|
217
|
+
if (!blockedBy.has(mate) && mate !== by)
|
|
218
|
+
blockedBy.set(mate, by);
|
|
219
|
+
}
|
|
202
220
|
// A component whose upstream failed in an earlier wave is not dispatched.
|
|
203
221
|
const candidates = wave.filter((name) => inPlan.has(name) && !blockedBy.has(name) && !held.has(name));
|
|
204
222
|
for (const name of candidates) {
|
|
223
|
+
if (held.has(name))
|
|
224
|
+
continue;
|
|
205
225
|
const reason = options.hold?.(name, componentOutputs);
|
|
206
|
-
if (reason
|
|
207
|
-
|
|
226
|
+
if (reason === undefined)
|
|
227
|
+
continue;
|
|
228
|
+
markHeld(name, reason);
|
|
229
|
+
for (const mate of groupOf.get(name)?.components ?? [])
|
|
230
|
+
if (!held.has(mate))
|
|
231
|
+
markHeld(mate, reason, name);
|
|
208
232
|
}
|
|
209
233
|
const runnable = candidates.filter((name) => !held.has(name));
|
|
210
234
|
if (runnable.length === 0)
|
|
211
235
|
continue;
|
|
212
236
|
emit?.({ type: "wave-start", wave: waveNum, components: runnable });
|
|
213
|
-
const
|
|
237
|
+
const groupsHere = [...new Set(runnable.map((name) => groupOf.get(name)).filter((g) => g !== undefined))];
|
|
238
|
+
// Groups and the wave's other components run side by side, as a wave's components do.
|
|
239
|
+
const groupRuns = Promise.all(groupsHere.map(async (group) => {
|
|
240
|
+
for (const name of group.components)
|
|
241
|
+
emit?.({ type: "component-start", wave: waveNum, component: name });
|
|
242
|
+
const approved = options.groupRuns?.[group.components[0]];
|
|
243
|
+
const each = {
|
|
244
|
+
group,
|
|
245
|
+
components: byName,
|
|
246
|
+
registry,
|
|
247
|
+
env: options.env,
|
|
248
|
+
...(options.vars ? { vars: options.vars } : {}),
|
|
249
|
+
ctxOf: (name) => fanOutContext(options, name),
|
|
250
|
+
componentOutputs,
|
|
251
|
+
};
|
|
252
|
+
const ran = approved === undefined && options.planGroupsAtWave ? await planAndRunComponentGroup(each) : await runComponentGroup({ ...each, run: approved });
|
|
253
|
+
for (const result of ran.results) {
|
|
254
|
+
emit?.({ type: "component-settle", wave: waveNum, component: result.component, status: result.status === "fail" ? "failed" : result.status });
|
|
255
|
+
options.onComponentSettled?.(result, componentOutputs[result.component]);
|
|
256
|
+
}
|
|
257
|
+
return ran;
|
|
258
|
+
}));
|
|
259
|
+
const waveResults = await Promise.all(runnable.filter((name) => !groupOf.has(name)).map(async (name) => {
|
|
214
260
|
emit?.({ type: "component-start", wave: waveNum, component: name });
|
|
215
261
|
const planned = options.plans?.[name];
|
|
216
262
|
const result = await runComponentDeploy(byName.get(name), { ...fanOutContext(options, name), ...(planned && Object.keys(planned).length > 0 ? { plans: planned } : {}) }, registry, componentOutputs, undefined, gates, emit);
|
|
@@ -223,6 +269,7 @@ export async function runFanOut(plan, components, registry, options) {
|
|
|
223
269
|
options.onComponentSettled?.(result, componentOutputs[name]);
|
|
224
270
|
return result;
|
|
225
271
|
}));
|
|
272
|
+
const groupResults = await groupRuns;
|
|
226
273
|
results.push(...waveResults);
|
|
227
274
|
for (const result of waveResults) {
|
|
228
275
|
if (result.status === "ok") {
|
|
@@ -240,7 +287,26 @@ export async function runFanOut(plan, components, registry, options) {
|
|
|
240
287
|
gatedFact ?? (gatedFact = result.gate);
|
|
241
288
|
markBlocked(result.component);
|
|
242
289
|
}
|
|
243
|
-
|
|
290
|
+
// A group's members settle together; what depends on a member that failed
|
|
291
|
+
// or never started, outside the group, is blocked by that member.
|
|
292
|
+
for (const ran of groupResults) {
|
|
293
|
+
results.push(...ran.results);
|
|
294
|
+
Object.assign(groupOutcomes, ran.outcomes);
|
|
295
|
+
const stopped = [];
|
|
296
|
+
for (const result of ran.results) {
|
|
297
|
+
if (result.status === "ok")
|
|
298
|
+
completed.push(result.component);
|
|
299
|
+
else if (ran.notStarted.includes(result.component))
|
|
300
|
+
notStarted.push(result.component);
|
|
301
|
+
else
|
|
302
|
+
failed.push(result.component);
|
|
303
|
+
if (result.status !== "ok")
|
|
304
|
+
stopped.push(result.component);
|
|
305
|
+
}
|
|
306
|
+
if (stopped.length > 0)
|
|
307
|
+
markBlocked(...stopped);
|
|
308
|
+
}
|
|
309
|
+
const waveFailed = waveResults.some((r) => r.status === "fail") || groupResults.some((ran) => ran.results.some((r) => r.status === "fail"));
|
|
244
310
|
emit?.({
|
|
245
311
|
type: "wave-settle",
|
|
246
312
|
wave: waveNum,
|
|
@@ -254,7 +320,7 @@ export async function runFanOut(plan, components, registry, options) {
|
|
|
254
320
|
.map(([component, by]) => ({ component, reason: "blocked", blockedBy: by }));
|
|
255
321
|
// A failure outranks a gate: something is actually broken, and reporting the
|
|
256
322
|
// run as "waiting on a human" would hide it. Same precedence the driver uses.
|
|
257
|
-
const status = failed.length > 0 ? "fail" : gatedFact ? "gated" : "ok";
|
|
323
|
+
const status = failed.length > 0 || notStarted.length > 0 ? "fail" : gatedFact ? "gated" : "ok";
|
|
258
324
|
emit?.({ type: "run-settle", status: status === "fail" ? "failed" : status, durationMs: null });
|
|
259
325
|
return {
|
|
260
326
|
plan: active,
|
|
@@ -266,6 +332,8 @@ export async function runFanOut(plan, components, registry, options) {
|
|
|
266
332
|
componentOutputs,
|
|
267
333
|
...(gatedFact ? { gate: gatedFact } : {}),
|
|
268
334
|
...(held.size > 0 ? { held: active.order.filter((name) => held.has(name)).map((name) => held.get(name)) } : {}),
|
|
335
|
+
...(notStarted.length > 0 ? { notStarted: [...notStarted].sort() } : {}),
|
|
336
|
+
...(Object.keys(groupOutcomes).length > 0 ? { groupOutcomes } : {}),
|
|
269
337
|
};
|
|
270
338
|
}
|
|
271
339
|
/**
|
|
@@ -30,6 +30,12 @@ export interface DeriveFanOutOptions {
|
|
|
30
30
|
config?: ChantConfig;
|
|
31
31
|
/** Components that form wave 1 (#3049). See `FanOutRequest.canary`. */
|
|
32
32
|
canary?: string[];
|
|
33
|
+
/**
|
|
34
|
+
* The registry whose capabilities' `declaredReads` (#4466) are written into
|
|
35
|
+
* the components before the order is derived. Absent, the project's own
|
|
36
|
+
* (`fanOutRegistry`) is built for it.
|
|
37
|
+
*/
|
|
38
|
+
registry?: CapabilityRegistry;
|
|
33
39
|
}
|
|
34
40
|
export interface DerivedFanOut {
|
|
35
41
|
success: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fan-out-support.d.ts","sourceRoot":"","sources":["../../src/components/fan-out-support.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAMH,OAAO,EAAkC,KAAK,YAAY,EAAE,KAAK,qBAAqB,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAC3H,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"fan-out-support.d.ts","sourceRoot":"","sources":["../../src/components/fan-out-support.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAMH,OAAO,EAAkC,KAAK,YAAY,EAAE,KAAK,qBAAqB,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAC3H,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AACh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