@intentius/chant 0.124.28 → 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/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 +8 -1
- package/dist/change-set-graph.d.ts.map +1 -1
- package/dist/change-set-graph.js +4 -2
- package/dist/change-set.d.ts +10 -0
- package/dist/change-set.d.ts.map +1 -1
- package/dist/change-set.js +4 -3
- 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.map +1 -1
- package/dist/cli/commands/build.js +6 -3
- package/dist/cli/handlers/approve.d.ts.map +1 -1
- package/dist/cli/handlers/approve.js +45 -0
- package/dist/cli/handlers/build.d.ts.map +1 -1
- package/dist/cli/handlers/build.js +15 -4
- package/dist/cli/handlers/fan-out.d.ts +9 -0
- package/dist/cli/handlers/fan-out.d.ts.map +1 -1
- package/dist/cli/handlers/fan-out.js +40 -3
- 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 +11 -3
- package/dist/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/handlers/pr.js +134 -26
- 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 +210 -33
- package/dist/cli/handlers/release.d.ts +62 -5
- package/dist/cli/handlers/release.d.ts.map +1 -1
- package/dist/cli/handlers/release.js +414 -28
- package/dist/cli/handlers/run.d.ts +11 -1
- package/dist/cli/handlers/run.d.ts.map +1 -1
- package/dist/cli/handlers/run.js +67 -6
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +61 -10
- package/dist/cli/parse-args.d.ts.map +1 -1
- package/dist/cli/parse-args.js +24 -2
- package/dist/cli/registry.d.ts +15 -3
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/cli/run-events.d.ts +3 -2
- package/dist/cli/run-events.d.ts.map +1 -1
- package/dist/cli/run-events.js +5 -3
- package/dist/components/auto-release.d.ts +2 -0
- package/dist/components/auto-release.d.ts.map +1 -1
- package/dist/components/auto-release.js +1 -0
- package/dist/components/capability.d.ts +9 -0
- package/dist/components/capability.d.ts.map +1 -1
- package/dist/components/driver.d.ts +8 -0
- package/dist/components/driver.d.ts.map +1 -1
- package/dist/components/driver.js +35 -0
- 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.map +1 -1
- package/dist/components/fan-out-run.js +50 -0
- 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/promote.d.ts +23 -0
- package/dist/components/promote.d.ts.map +1 -1
- package/dist/components/promote.js +60 -2
- package/dist/components/release-compile.d.ts +9 -0
- package/dist/components/release-compile.d.ts.map +1 -1
- package/dist/components/release-compile.js +9 -3
- package/dist/components/release-gate.d.ts +11 -1
- package/dist/components/release-gate.d.ts.map +1 -1
- package/dist/components/release-gate.js +10 -4
- package/dist/components/wave-plan.d.ts +5 -0
- package/dist/components/wave-plan.d.ts.map +1 -1
- package/dist/components/wave-plan.js +10 -2
- package/dist/config.d.ts +38 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +2 -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/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 +2 -1
- package/dist/lifecycle/change-set-store.d.ts.map +1 -1
- package/dist/lifecycle/change-set-store.js +2 -1
- 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 +10 -1
- package/dist/lifecycle/gate-change-set.d.ts.map +1 -1
- package/dist/lifecycle/gate-change-set.js +35 -3
- package/dist/lifecycle/gate-ledger.d.ts +2 -3
- package/dist/lifecycle/gate-ledger.d.ts.map +1 -1
- 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 +48 -1
- package/dist/lifecycle/release-cut.d.ts.map +1 -1
- package/dist/lifecycle/release-cut.js +116 -23
- 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-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 +12 -2
- package/dist/lifecycle/release-store.d.ts.map +1 -1
- package/dist/lifecycle/release-store.js +4 -2
- 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/plan-summary.d.ts.map +1 -1
- package/dist/plan-summary.js +8 -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 +29 -2
- package/dist/run-event-store.d.ts.map +1 -1
- package/dist/run-event-store.js +50 -3
- package/dist/run-event-stream.d.ts +2 -1
- package/dist/run-event-stream.d.ts.map +1 -1
- package/dist/run-event-stream.js +5 -1
- package/dist/run-event.d.ts +19 -1
- package/dist/run-event.d.ts.map +1 -1
- package/dist/run-event.js +2 -0
- package/dist/wave-runtime.mjs +260 -229
- 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/change-set.schema.json +5 -1
- 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.d.ts +8 -0
- package/dist/workspace/ci-green.d.ts.map +1 -1
- package/dist/workspace/ci-green.js +10 -3
- package/dist/workspace/declaration.d.ts +16 -0
- package/dist/workspace/declaration.d.ts.map +1 -1
- package/dist/workspace/declaration.js +26 -0
- package/dist/workspace/declaration.schema.json +64 -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/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 +30 -6
- package/dist/workspace/intent.d.ts.map +1 -1
- package/dist/workspace/intent.js +141 -21
- package/dist/workspace/intent.schema.json +702 -6
- 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/reason-codes.d.ts +2 -0
- package/dist/workspace/reason-codes.d.ts.map +1 -1
- package/dist/workspace/reason-codes.js +3 -0
- 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 +9 -0
- package/dist/workspace/releases.d.ts.map +1 -1
- package/dist/workspace/releases.js +9 -0
- package/dist/workspace/releases.schema.json +123 -1
- package/dist/workspace/run-event.schema.json +10 -3
- package/dist/workspace/status-gates.d.ts +8 -0
- package/dist/workspace/status-gates.d.ts.map +1 -1
- package/dist/workspace/status.d.ts +78 -0
- package/dist/workspace/status.d.ts.map +1 -1
- package/dist/workspace/status.js +170 -3
- package/dist/workspace/status.schema.json +198 -1
- package/dist/workspace/wip.d.ts.map +1 -1
- package/dist/workspace/wip.js +11 -3
- package/package.json +1 -1
- package/src/build-params.test.ts +46 -0
- package/src/build-params.ts +55 -1
- package/src/change-set-graph.ts +10 -2
- package/src/change-set.ts +14 -3
- package/src/cli/build-params-cli.ts +22 -9
- package/src/cli/commands/build.ts +6 -3
- package/src/cli/handlers/approve-release.test.ts +5 -1
- package/src/cli/handlers/approve-revoked.test.ts +155 -0
- package/src/cli/handlers/approve.ts +47 -0
- package/src/cli/handlers/build.test.ts +15 -0
- package/src/cli/handlers/build.ts +17 -4
- package/src/cli/handlers/fan-out.test.ts +180 -1
- package/src/cli/handlers/fan-out.ts +38 -3
- 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/pr.test.ts +148 -1
- package/src/cli/handlers/pr.ts +139 -28
- package/src/cli/handlers/promote.test.ts +280 -2
- package/src/cli/handlers/promote.ts +210 -34
- package/src/cli/handlers/release-implicit.e2e.test.ts +12 -4
- 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 +146 -32
- package/src/cli/handlers/release.ts +415 -28
- package/src/cli/handlers/run-auto-release.test.ts +9 -0
- package/src/cli/handlers/run-release.test.ts +55 -0
- package/src/cli/handlers/run.ts +69 -5
- package/src/cli/main.test.ts +1 -0
- package/src/cli/main.ts +61 -10
- package/src/cli/parse-args.ts +19 -2
- package/src/cli/registry.ts +15 -3
- package/src/cli/run-events.ts +5 -2
- package/src/components/auto-release.test.ts +9 -0
- package/src/components/auto-release.ts +3 -0
- package/src/components/capability.ts +9 -0
- package/src/components/driver.test.ts +24 -0
- package/src/components/driver.ts +36 -0
- 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 +48 -0
- package/src/components/fan-out.ts +4 -0
- package/src/components/pr-pipeline.ts +35 -4
- package/src/components/promote.ts +68 -2
- package/src/components/release-compile.ts +17 -3
- package/src/components/release-gate.ts +18 -4
- package/src/components/wave-plan.ts +15 -2
- package/src/config.ts +8 -0
- package/src/flag-params.test.ts +144 -0
- package/src/flag-params.ts +134 -0
- package/src/lifecycle/__fixtures__/publish-fakes.ts +351 -0
- package/src/lifecycle/change-set-store.ts +2 -1
- package/src/lifecycle/delivery-metrics.ts +263 -0
- package/src/lifecycle/deploy-outcome.ts +147 -0
- package/src/lifecycle/gate-change-set.ts +37 -6
- package/src/lifecycle/gate-ledger.ts +2 -2
- 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.test.ts +74 -2
- package/src/lifecycle/release-cut.ts +158 -22
- 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-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 +15 -4
- 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/plan-summary.test.ts +20 -0
- package/src/plan-summary.ts +8 -1
- 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.ts +63 -3
- package/src/run-event-stream.ts +4 -1
- package/src/run-event.ts +21 -1
- 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/change-set.schema.json +5 -1
- 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.ts +14 -3
- package/src/workspace/declaration.schema.json +64 -0
- package/src/workspace/declaration.test.ts +28 -0
- package/src/workspace/declaration.ts +38 -0
- 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/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 +148 -25
- 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/read-contract.e2e.test.ts +2 -1
- package/src/workspace/reason-codes.test.ts +5 -0
- package/src/workspace/reason-codes.ts +3 -0
- 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 +123 -1
- package/src/workspace/releases.ts +11 -0
- package/src/workspace/run-event.schema.json +10 -3
- package/src/workspace/status-contract.test.ts +29 -0
- package/src/workspace/status-gates.ts +8 -0
- package/src/workspace/status-mixed.test.ts +152 -0
- package/src/workspace/status-revoked.test.ts +153 -0
- package/src/workspace/status.schema.json +198 -1
- package/src/workspace/status.ts +254 -3
- package/src/workspace/wip.ts +11 -2
package/dist/workspace/status.js
CHANGED
|
@@ -37,7 +37,10 @@ import { formatError } from "../cli/format.js";
|
|
|
37
37
|
import { GATES_DIR } from "../lifecycle/gate-ledger.js";
|
|
38
38
|
import { readPathSha } from "../lifecycle/git.js";
|
|
39
39
|
import { latestPerComponent, readReleaseLedger } from "../lifecycle/release-ledger.js";
|
|
40
|
+
import { describeRevocation, revokedCommitsAt, revokedReleaseLookup } from "../lifecycle/release-revocation.js";
|
|
40
41
|
import { readReleasePlan } from "../lifecycle/plan-ledger.js";
|
|
42
|
+
import { readDeployOutcomes } from "../lifecycle/deploy-outcome.js";
|
|
43
|
+
import { mixedEnvironment, releaseRollbackLine, rollbackTarget } from "../lifecycle/mixed-environment.js";
|
|
41
44
|
import { listWorkLeases } from "../lifecycle/work-lease.js";
|
|
42
45
|
import { readCheckoutHead, worktreeChanges } from "./records-checkout.js";
|
|
43
46
|
import { policyView, replicationState } from "./wip.js";
|
|
@@ -187,7 +190,12 @@ async function shipView(member, cwd, read) {
|
|
|
187
190
|
return view;
|
|
188
191
|
}
|
|
189
192
|
const defaultReader = (path, cwd) => readReleaseLedger(path.slice(0, -"/releases.jsonl".length), { cwd });
|
|
190
|
-
|
|
193
|
+
const defaultOutcomeReader = (path, cwd) => readDeployOutcomes(path.slice(0, -"/releases.jsonl".length), { cwd }).catch(() => []);
|
|
194
|
+
/** The per-component rollback line, for a component an environment runs from a revoked release when no earlier release can be named (#4033). */
|
|
195
|
+
export function rollbackLine(env, component) {
|
|
196
|
+
return `chant components rollback ${env} --component ${component}`;
|
|
197
|
+
}
|
|
198
|
+
async function readEnvironment(member, env, cwd, read, revokedOf = async () => null, readOutcomes = defaultOutcomeReader) {
|
|
191
199
|
const ledger = await ledgerFor(member, env, cwd);
|
|
192
200
|
let records;
|
|
193
201
|
let malformed;
|
|
@@ -210,6 +218,40 @@ async function readEnvironment(member, env, cwd, read) {
|
|
|
210
218
|
// member (see plan-ledger.ts's readReleasePlan doc).
|
|
211
219
|
const planPrefix = ledger.layout === "members" ? `${MEMBERS_DIR}/${member.name}/` : "";
|
|
212
220
|
const latest = [...latestPerComponent(records).values()].sort((a, b) => (a.component < b.component ? -1 : a.component > b.component ? 1 : 0));
|
|
221
|
+
// #4043: a release item names the label of the release it was deployed from.
|
|
222
|
+
const memberDir = resolve(cwd, member.dir);
|
|
223
|
+
let labels = new Map();
|
|
224
|
+
let labelsRead = false;
|
|
225
|
+
const readLabels = async () => {
|
|
226
|
+
if (labelsRead)
|
|
227
|
+
return labels;
|
|
228
|
+
labelsRead = true;
|
|
229
|
+
try {
|
|
230
|
+
const { readCuts, labelsByDigest } = await import("../lifecycle/release-store.js");
|
|
231
|
+
labels = labelsByDigest((await readCuts({ cwd: memberDir })).cuts);
|
|
232
|
+
}
|
|
233
|
+
catch {
|
|
234
|
+
// The label is a convenience; the digest is the join key.
|
|
235
|
+
}
|
|
236
|
+
return labels;
|
|
237
|
+
};
|
|
238
|
+
if (latest.some((r) => r.releaseDigest !== undefined))
|
|
239
|
+
await readLabels();
|
|
240
|
+
// #4035: whether a release a rollback could go back to is kept and not revoked.
|
|
241
|
+
const checks = new Map();
|
|
242
|
+
const check = (digest) => {
|
|
243
|
+
let found = checks.get(digest);
|
|
244
|
+
if (!found) {
|
|
245
|
+
found = (async () => {
|
|
246
|
+
const { readRelease } = await import("../lifecycle/release-store.js");
|
|
247
|
+
const kept = (await readRelease(digest, { cwd: memberDir }).catch(() => null)) !== null;
|
|
248
|
+
return { kept, revoked: kept && (await revokedOf(digest)) !== null };
|
|
249
|
+
})();
|
|
250
|
+
checks.set(digest, found);
|
|
251
|
+
}
|
|
252
|
+
return found;
|
|
253
|
+
};
|
|
254
|
+
const back = { records, check, label: async (digest) => (await readLabels()).get(digest) };
|
|
213
255
|
const releases = await Promise.all(latest.map(async (r) => ({
|
|
214
256
|
component: r.component,
|
|
215
257
|
digest: r.digest,
|
|
@@ -220,9 +262,13 @@ async function readEnvironment(member, env, cwd, read) {
|
|
|
220
262
|
actor: r.actor,
|
|
221
263
|
approver: r.approver ?? null,
|
|
222
264
|
admission: r.admission ? { op: r.admission.op, gate: r.admission.gate, resolvedAt: r.admission.resolvedAt } : null,
|
|
265
|
+
releaseDigest: r.releaseDigest ?? null,
|
|
266
|
+
releaseLabel: (r.releaseDigest !== undefined ? labels.get(r.releaseDigest) : undefined) ?? null,
|
|
223
267
|
flags: [...(r.flags ?? [])],
|
|
224
268
|
plan: await readReleasePlan(r.digest, { cwd, prefix: planPrefix }),
|
|
269
|
+
...(await revokedItem(r, env, revokedOf, back)),
|
|
225
270
|
})));
|
|
271
|
+
const mixed = await mixedEnvironment({ env, records, outcomes: await readOutcomes(ledger.path, cwd), label: back.label, check });
|
|
226
272
|
return {
|
|
227
273
|
env,
|
|
228
274
|
ledger: { ...ledger, shared: false },
|
|
@@ -230,8 +276,41 @@ async function readEnvironment(member, env, cwd, read) {
|
|
|
230
276
|
reason: malformed > 0
|
|
231
277
|
? { code: "ledger-malformed", message: `${ledger.path}: ${malformed} line${malformed === 1 ? " is" : "s are"} not a release record and ${malformed === 1 ? "was" : "were"} skipped` }
|
|
232
278
|
: null,
|
|
279
|
+
...(mixed ? { mixed } : {}),
|
|
233
280
|
};
|
|
234
281
|
}
|
|
282
|
+
/**
|
|
283
|
+
* `{ revoked }` when the record names a release cut from a revoked commit
|
|
284
|
+
* (#4033), else nothing. Its rollback line names the newest release the
|
|
285
|
+
* environment ran before this one that is kept and not revoked (#4035).
|
|
286
|
+
*/
|
|
287
|
+
async function revokedItem(r, env, revokedOf, back) {
|
|
288
|
+
if (r.releaseDigest === undefined)
|
|
289
|
+
return {};
|
|
290
|
+
const revoked = await revokedOf(r.releaseDigest);
|
|
291
|
+
if (!revoked)
|
|
292
|
+
return {};
|
|
293
|
+
const target = await rollbackTarget({ records: back.records, exclude: new Set([r.releaseDigest]), before: r.timestamp, check: back.check });
|
|
294
|
+
const rollback = target ? releaseRollbackLine(env, target, await back.label(target)) : rollbackLine(env, r.component);
|
|
295
|
+
return { revoked: { ...revoked, rollback } };
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* A release gate whose release was cut from a revoked commit is superseded
|
|
299
|
+
* (#4033): `chant approve` refuses it and the promote refuses the release, so
|
|
300
|
+
* neither an approval nor a pending fact will pass it. An expired gate stays
|
|
301
|
+
* expired. The gate carries the revocation.
|
|
302
|
+
*/
|
|
303
|
+
async function supersedeRevokedGates(gates, revokedOf) {
|
|
304
|
+
return Promise.all(gates.map(async (g) => {
|
|
305
|
+
if (g.releaseDigest === undefined)
|
|
306
|
+
return g;
|
|
307
|
+
const revoked = await revokedOf(g.releaseDigest);
|
|
308
|
+
if (!revoked)
|
|
309
|
+
return g;
|
|
310
|
+
const { releaseDigest: _d, label: _l, ...revocation } = revoked;
|
|
311
|
+
return { ...g, state: g.state === "expired" ? g.state : "superseded", revoked: revocation };
|
|
312
|
+
}));
|
|
313
|
+
}
|
|
235
314
|
/** The digest two environments are compared on: the input side when there is one. */
|
|
236
315
|
const compareKey = (r) => r.inputDigest ?? r.digest;
|
|
237
316
|
export function compareEnvironments(a, b) {
|
|
@@ -276,11 +355,18 @@ export async function workspaceStatus(query) {
|
|
|
276
355
|
const ruleSource = scopeSource(found.dir);
|
|
277
356
|
const rules = (gate) => gateAdmissionFrom(ruleSource, gate);
|
|
278
357
|
const releaseRule = releaseRuleFrom(ruleSource).rule;
|
|
358
|
+
// #4033 (ws-105): revoked commits, read from local tags once and only when a release is met.
|
|
359
|
+
// Tags that can't be judged read as none revoked; workspace check reports the declaration.
|
|
360
|
+
let revokedCommits;
|
|
361
|
+
const revoked = () => (revokedCommits ?? (revokedCommits = revokedCommitsAt(top, ruleSource.declaration?.ci?.green ?? null).catch(() => new Map())));
|
|
362
|
+
// #4024: the flag records, read once for every member. Unreadable records list as null.
|
|
363
|
+
const flags = await readStatusFlags(declaration, found.dir);
|
|
279
364
|
const members = [];
|
|
280
365
|
for (const m of declaration.members) {
|
|
366
|
+
const revokedOf = revokedReleaseLookup(resolve(found.dir, m.dir), revoked);
|
|
281
367
|
const environments = [];
|
|
282
368
|
for (const env of envs)
|
|
283
|
-
environments.push(await readEnvironment(m, env, found.dir, read));
|
|
369
|
+
environments.push(await readEnvironment(m, env, found.dir, read, revokedOf, query.readOutcomes));
|
|
284
370
|
const own = await hasMemberLedger(m, found.dir);
|
|
285
371
|
const gates = await readMemberGates(own ? `${MEMBERS_DIR}/${m.name}/${GATES_DIR}` : GATES_DIR, own ? "members" : "flat", commit, envs, found.dir, now, query.readGates, rules);
|
|
286
372
|
const stewards = await (query.readStewards ?? readMemberStewards)(resolve(found.dir, m.dir), query.env, now, m.kind, m.box);
|
|
@@ -297,7 +383,7 @@ export async function workspaceStatus(query) {
|
|
|
297
383
|
compare: query.compareTo === undefined ? null : compareEnvironments(environments[0], environments[environments.length - 1]),
|
|
298
384
|
readable: environments.every((e) => e.reason === null),
|
|
299
385
|
gateLedger: gates.ledger,
|
|
300
|
-
gates: gates.gates,
|
|
386
|
+
gates: await supersedeRevokedGates(gates.gates, revokedOf),
|
|
301
387
|
box: m.box === null
|
|
302
388
|
? null
|
|
303
389
|
: {
|
|
@@ -325,6 +411,7 @@ export async function workspaceStatus(query) {
|
|
|
325
411
|
stewardReasons: stewards.reasons,
|
|
326
412
|
promotionOrder: await (query.readPromotionOrder ?? readMemberPromotionOrder)(resolve(found.dir, m.dir)),
|
|
327
413
|
releaseCuts: await readReleaseCuts(resolve(found.dir, m.dir), releaseRule),
|
|
414
|
+
featureFlags: flags === null ? null : flags.filter((f) => f.member === m.name).map(({ member: _member, ...f }) => f),
|
|
328
415
|
...x(m.pointer),
|
|
329
416
|
});
|
|
330
417
|
}
|
|
@@ -342,6 +429,17 @@ export async function workspaceStatus(query) {
|
|
|
342
429
|
m.gateLedger.shared = m.gateLedger.layout === "flat" && flatGates > 1;
|
|
343
430
|
const leases = await readWorkspaceLeases(declaration.members, found.dir, new Date(now));
|
|
344
431
|
const acceptance = await readWorkspaceAcceptance(declaration, found.dir);
|
|
432
|
+
// #4025: the change sets still waiting to apply, the ones a pending or approved gate binds.
|
|
433
|
+
const pendingChangeSets = [];
|
|
434
|
+
for (const m of members) {
|
|
435
|
+
const own = m.gateLedger.layout === "members";
|
|
436
|
+
for (const g of m.gates) {
|
|
437
|
+
if (g.changeSet === undefined || (g.state !== "pending" && g.state !== "approved"))
|
|
438
|
+
continue;
|
|
439
|
+
pendingChangeSets.push({ digest: g.changeSet, cwd: resolve(found.dir, m.dir), ledgerMember: own ? m.name : null, gitSha: g.gitSha ?? null });
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
const overlap = await readStatusOverlap(declaration, found.dir, top, pendingChangeSets);
|
|
345
443
|
return {
|
|
346
444
|
...head,
|
|
347
445
|
env: query.env,
|
|
@@ -354,6 +452,7 @@ export async function workspaceStatus(query) {
|
|
|
354
452
|
leases,
|
|
355
453
|
acceptance,
|
|
356
454
|
replication: replicationOf(declaration, top),
|
|
455
|
+
overlap,
|
|
357
456
|
summary: {
|
|
358
457
|
members: members.length,
|
|
359
458
|
released: members.filter((m) => m.environments[0].releases.length > 0).length,
|
|
@@ -419,6 +518,33 @@ async function readWorkspaceLeases(members, cwd, now) {
|
|
|
419
518
|
}
|
|
420
519
|
return out;
|
|
421
520
|
}
|
|
521
|
+
/** Every flag of the declared flag kinds (#4024), read in the working tree, sorted by id; null when they can't be read. */
|
|
522
|
+
async function readStatusFlags(declaration, root) {
|
|
523
|
+
if (declaredRecordKinds(declaration).length === 0)
|
|
524
|
+
return [];
|
|
525
|
+
try {
|
|
526
|
+
const { readWorkspaceFlags } = await import("./flags-read.js");
|
|
527
|
+
const { flags } = await readWorkspaceFlags(root);
|
|
528
|
+
return flags
|
|
529
|
+
.map((f) => ({ id: f.id, member: f.member, param: f.param, owner: f.owner, values: f.values, work: f.work, implements: f.implements, stale: f.stale, kind: f.kind, path: f.path }))
|
|
530
|
+
.sort((a, b) => (a.id < b.id ? -1 : a.id > b.id ? 1 : 0));
|
|
531
|
+
}
|
|
532
|
+
catch {
|
|
533
|
+
return null;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
/** The overlap report (#4025); null when no work kind is declared or it can't be read. */
|
|
537
|
+
async function readStatusOverlap(declaration, root, top, changeSets) {
|
|
538
|
+
if (declaredRecordKinds(declaration).length === 0)
|
|
539
|
+
return null;
|
|
540
|
+
try {
|
|
541
|
+
const { readOverlap } = await import("./overlap.js");
|
|
542
|
+
return await readOverlap({ declaration, root, top, changeSets });
|
|
543
|
+
}
|
|
544
|
+
catch {
|
|
545
|
+
return null;
|
|
546
|
+
}
|
|
547
|
+
}
|
|
422
548
|
/** The acceptance counts of every declared work kind with criteria (#2772), read in the working tree. */
|
|
423
549
|
async function readWorkspaceAcceptance(declaration, root) {
|
|
424
550
|
if (declaredRecordKinds(declaration).length === 0)
|
|
@@ -504,6 +630,25 @@ export function formatStatus(doc) {
|
|
|
504
630
|
memberNotes.push(` ${e.reason.code}: ${e.reason.message}`);
|
|
505
631
|
else if (e.ledger.shared && e.releases.length > 0)
|
|
506
632
|
memberNotes.push(` ${e.env} is read from the shared flat ledger ${e.ledger.path}`);
|
|
633
|
+
// #4033: a component running a release cut from a revoked commit, and the way back.
|
|
634
|
+
for (const r of e.releases) {
|
|
635
|
+
if (!r.revoked)
|
|
636
|
+
continue;
|
|
637
|
+
const name = r.revoked.label ?? r.revoked.releaseDigest;
|
|
638
|
+
memberNotes.push(` ${e.env}: ${r.component} runs release ${name}, revoked by ${r.revoked.tag} (${describeRevocation(r.revoked)}); roll back: ${r.revoked.rollback}`);
|
|
639
|
+
}
|
|
640
|
+
// #4035: an environment running a mix, what each component runs, and the lines that settle it.
|
|
641
|
+
if (e.mixed) {
|
|
642
|
+
const what = e.mixed.components.map((c) => {
|
|
643
|
+
const runs = c.releaseDigest ? `release ${c.releaseLabel ?? c.releaseDigest.slice(0, 24)}` : c.digest ? "no release" : "nothing recorded";
|
|
644
|
+
return c.state === "settled" ? `${c.component} runs ${runs}` : `${c.component} ${c.state} (${c.attempt.verb} ${c.attempt.runId}), recorded ${runs}`;
|
|
645
|
+
});
|
|
646
|
+
memberNotes.push(` ${e.env} is mixed: ${what.join("; ")}`);
|
|
647
|
+
for (const line of e.mixed.redeploy)
|
|
648
|
+
memberNotes.push(` redeploy: ${line}`);
|
|
649
|
+
if (e.mixed.rollback)
|
|
650
|
+
memberNotes.push(` roll back: ${e.mixed.rollback}`);
|
|
651
|
+
}
|
|
507
652
|
}
|
|
508
653
|
if (memberNotes.length > 0)
|
|
509
654
|
notes.set(rows.length - 1, memberNotes);
|
|
@@ -538,6 +683,28 @@ export function formatStatus(doc) {
|
|
|
538
683
|
}
|
|
539
684
|
lines.push(...table(rows));
|
|
540
685
|
}
|
|
686
|
+
const flagged = doc.members.filter((m) => (m.featureFlags ?? []).length > 0);
|
|
687
|
+
if (flagged.length > 0) {
|
|
688
|
+
lines.push("");
|
|
689
|
+
const rows = [["FLAG", "PARAM", doc.env.toUpperCase(), "WORK ITEM", ""]];
|
|
690
|
+
for (const m of flagged) {
|
|
691
|
+
for (const f of m.featureFlags) {
|
|
692
|
+
const value = f.values[doc.env];
|
|
693
|
+
rows.push([`${m.name}/${f.id}`, f.param, value === undefined ? "default" : JSON.stringify(value), f.work ? `${f.work.id} (${f.work.state ?? "unknown"})` : "-", f.stale ? "due for removal" : ""]);
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
lines.push(...table(rows));
|
|
697
|
+
}
|
|
698
|
+
// #4025: in-flight work items that changed the same thing.
|
|
699
|
+
if (doc.overlap && doc.overlap.pairs.length > 0) {
|
|
700
|
+
lines.push("");
|
|
701
|
+
const rows = [["OVERLAP", "FILES", "ADDRESSES"]];
|
|
702
|
+
for (const p of doc.overlap.pairs) {
|
|
703
|
+
const list = (xs) => (xs.length === 0 ? "-" : xs.length <= 2 ? xs.join(", ") : `${xs.slice(0, 2).join(", ")} and ${xs.length - 2} more`);
|
|
704
|
+
rows.push([`${p.items[0]} and ${p.items[1]}`, list(p.files), list([...new Set(p.addresses.map((x) => x.node ?? x.address))])]);
|
|
705
|
+
}
|
|
706
|
+
lines.push(...table(rows));
|
|
707
|
+
}
|
|
541
708
|
const boxes = doc.members.filter((m) => m.box?.isolation);
|
|
542
709
|
if (boxes.length > 0) {
|
|
543
710
|
lines.push("");
|
|
@@ -123,6 +123,10 @@
|
|
|
123
123
|
"type": "array",
|
|
124
124
|
"items": { "$ref": "#/$defs/acceptance" }
|
|
125
125
|
},
|
|
126
|
+
"overlap": {
|
|
127
|
+
"description": "Added in contract 1 by #4025, written by chant 0.124.29 and newer; absent from older output, so a reader treats a missing field as unknown. Overlap between in-flight work items: a work item (a current record of a declared work kind) is in flight unless it implements at least one decision and every one is confirmed (in one of its kind's closed states and superseded by nothing, as featureFlags reads it). Its commits are the ones linked to it as #4029 defines linked (a Chant-Record: <work kind>:<id> trailer, or a Chant-Lease trailer that resolves to it), read from every local and remote-tracking branch and HEAD, the chant/ ledger branches left out, merges skipped, and never fetched. Two items overlap when their commits touch the same file, or when one entry of a change set a pending or approved gate binds is attributed to both: an entry is attributed to an item when a commit linked to the item changed the entry's source file (recorded on the stored change set) and that commit is in the history the change set was planned from. A report only: nothing is locked or refused. Null when the workspace declares no work kind, or the work records or history can't be read.",
|
|
128
|
+
"oneOf": [{ "type": "null" }, { "$ref": "#/$defs/overlap" }]
|
|
129
|
+
},
|
|
126
130
|
"summary": {
|
|
127
131
|
"type": "object",
|
|
128
132
|
"required": ["members", "released", "unreadable", "differing"],
|
|
@@ -266,9 +270,97 @@
|
|
|
266
270
|
}
|
|
267
271
|
}
|
|
268
272
|
}
|
|
273
|
+
},
|
|
274
|
+
"featureFlags": {
|
|
275
|
+
"description": "The member's feature flags (#4024): each record of a declared flag kind whose member field names this member, sorted by id. A flag is a workspace record the member's build reads as one build-time parameter, with chant build --env <env>; its value in an environment is recorded on the build, and on a release's target, as a param whose source is flag:<id>. Named featureFlags because a release record's flags already holds legacy-digest. Empty when no flag names the member, and null when the flag records could not be read. Optional: written from chant 0.124.29, absent from older output.",
|
|
276
|
+
"type": ["array", "null"],
|
|
277
|
+
"items": { "$ref": "#/$defs/featureFlag" }
|
|
269
278
|
}
|
|
270
279
|
}
|
|
271
280
|
},
|
|
281
|
+
"overlap": {
|
|
282
|
+
"type": "object",
|
|
283
|
+
"required": ["items", "pairs", "changeSets", "unattributed"],
|
|
284
|
+
"properties": {
|
|
285
|
+
"items": {
|
|
286
|
+
"type": "array",
|
|
287
|
+
"description": "Each in-flight work item with at least one linked commit, sorted by item.",
|
|
288
|
+
"items": {
|
|
289
|
+
"type": "object",
|
|
290
|
+
"required": ["item", "path", "state", "commits"],
|
|
291
|
+
"properties": {
|
|
292
|
+
"item": { "type": "string", "description": "<work kind>:<id>, as a Chant-Record trailer names it." },
|
|
293
|
+
"path": { "type": "string", "description": "The work record file, from the repository root." },
|
|
294
|
+
"state": { "type": ["string", "null"] },
|
|
295
|
+
"commits": { "type": "array", "items": { "type": "string" }, "description": "The commits linked to the item, newest first." }
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
"pairs": {
|
|
300
|
+
"type": "array",
|
|
301
|
+
"description": "Each pair of items that share a file or a change-set entry, sorted by the first item and then the second. Empty when nothing overlaps.",
|
|
302
|
+
"items": {
|
|
303
|
+
"type": "object",
|
|
304
|
+
"required": ["items", "files", "addresses"],
|
|
305
|
+
"properties": {
|
|
306
|
+
"items": { "type": "array", "items": { "type": "string" }, "minItems": 2, "maxItems": 2, "description": "The two items, in sorted order." },
|
|
307
|
+
"files": { "type": "array", "items": { "type": "string" }, "description": "The paths, from the repository root, that both items' linked commits add, change or delete, sorted. A rename counts as a delete and an add." },
|
|
308
|
+
"addresses": {
|
|
309
|
+
"type": "array",
|
|
310
|
+
"description": "The change-set entries attributed to both items, by change set, member and address.",
|
|
311
|
+
"items": {
|
|
312
|
+
"type": "object",
|
|
313
|
+
"required": ["changeSet", "ledgerMember", "member", "address", "node", "source"],
|
|
314
|
+
"properties": {
|
|
315
|
+
"changeSet": { "type": "string", "description": "The change set's digest, for chant change-set show." },
|
|
316
|
+
"ledgerMember": { "type": ["string", "null"], "description": "The workspace member whose ledger stores the change set, or null for the flat ledger." },
|
|
317
|
+
"member": { "type": "string", "description": "The entry's change-set member." },
|
|
318
|
+
"address": { "type": "string", "description": "The entry's planner address." },
|
|
319
|
+
"node": { "type": ["string", "null"], "description": "The entry's graph node." },
|
|
320
|
+
"source": { "type": "string", "description": "The entry's source file, from the repository root, that both items' commits changed." }
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
"changeSets": { "type": "array", "items": { "type": "string" }, "description": "The digests of the stored change sets read: those a pending or approved gate binds, sorted." },
|
|
328
|
+
"unattributed": { "type": "integer", "minimum": 0, "description": "Entries of those change sets with no source (stored by a chant before 0.124.29, or mapped onto no node with a source location), so attributed to no item." }
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
"featureFlag": {
|
|
332
|
+
"type": "object",
|
|
333
|
+
"required": ["id", "param", "owner", "values", "work", "implements", "stale", "kind", "path"],
|
|
334
|
+
"properties": {
|
|
335
|
+
"id": { "type": "string", "description": "The flag's name, its record's id." },
|
|
336
|
+
"param": { "type": "string", "description": "The build parameter of the member the flag sets: a key of buildParams in its chant.config.ts." },
|
|
337
|
+
"owner": { "type": "string", "description": "Who owns the flag, and removes it when its work is settled." },
|
|
338
|
+
"values": {
|
|
339
|
+
"type": "object",
|
|
340
|
+
"description": "The flag's value per environment, as the record writes it. An environment it leaves out builds with the parameter's declared default.",
|
|
341
|
+
"additionalProperties": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }] }
|
|
342
|
+
},
|
|
343
|
+
"work": {
|
|
344
|
+
"description": "The work item the flag hides, with that item's state, which is null when no record of the flag kind's work kind has the id. Null when the record names none.",
|
|
345
|
+
"oneOf": [
|
|
346
|
+
{ "type": "null" },
|
|
347
|
+
{ "type": "object", "required": ["id", "state"], "properties": { "id": { "type": "string" }, "state": { "type": ["string", "null"] } } }
|
|
348
|
+
]
|
|
349
|
+
},
|
|
350
|
+
"implements": {
|
|
351
|
+
"type": "array",
|
|
352
|
+
"description": "Each decision the work item implements, with its state, and confirmed: true when the decision is in one of its kind's closed states and nothing supersedes it.",
|
|
353
|
+
"items": {
|
|
354
|
+
"type": "object",
|
|
355
|
+
"required": ["id", "state", "confirmed"],
|
|
356
|
+
"properties": { "id": { "type": "string" }, "state": { "type": ["string", "null"] }, "confirmed": { "type": "boolean" } }
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
"stale": { "type": "boolean", "description": "True when the work item implements at least one decision and every one is confirmed: the flag is due for removal, and chant workspace check reports it (WSP118)." },
|
|
360
|
+
"kind": { "type": "string", "description": "The flag kind file, from the workspace root." },
|
|
361
|
+
"path": { "type": "string", "description": "The flag record file, from the workspace root." }
|
|
362
|
+
}
|
|
363
|
+
},
|
|
272
364
|
"stewardForm": { "enum": ["local", "fountain"] },
|
|
273
365
|
"steward": {
|
|
274
366
|
"type": "object",
|
|
@@ -874,13 +966,14 @@
|
|
|
874
966
|
"planDigest": { "type": ["string", "null"], "description": "The plan the run reached the gate with (#2300), or null for a gate that binds no plan. An approval counts only for this plan." },
|
|
875
967
|
"state": {
|
|
876
968
|
"enum": ["pending", "approved", "expired", "superseded"],
|
|
877
|
-
"description": "Read from the newest pending fact for the gate in env, as a run reads it. approved: the approvals recorded since it, for its plan, pass the gate (its quorum, or a policy permit in enforce mode). expired: not approved, and the pending fact is past expiresAt, so the next run records a fresh one. superseded: not approved, and an approval recorded since it names a different plan, so it doesn't count. pending: none of these."
|
|
969
|
+
"description": "Read from the newest pending fact for the gate in env, as a run reads it. approved: the approvals recorded since it, for its plan, pass the gate (its quorum, or a policy permit in enforce mode). expired: not approved, and the pending fact is past expiresAt, so the next run records a fresh one. superseded: not approved, and an approval recorded since it names a different plan, so it doesn't count; or, on a release gate that is not expired, its release was cut from a revoked commit (#4033, ws-105), so chant approve refuses it with release-revoked and revoked is set. pending: none of these."
|
|
878
970
|
},
|
|
879
971
|
"recordedAt": { "type": "string", "description": "When the run recorded the pending fact." },
|
|
880
972
|
"gitSha": { "type": "string", "description": "Added in contract 1 by #4020, written by chant 0.124.28 and newer. The commit the run reached the gate at, from the pending fact. Absent on a fact recorded by an older chant, and when the run knew no commit. It joins the gate to a release's gitSha and to a run's." },
|
|
881
973
|
"runId": { "type": "string", "description": "Added in contract 1 by #4020, written by chant 0.124.28 and newer. The run that reached the gate: an Op run id, or the CI run id for a component gate that ran in CI. Absent when the run had none." },
|
|
882
974
|
"changeSet": { "type": "string", "pattern": "^(?:jcs1-)?sha256:[0-9a-f]{64}$", "description": "Added in contract 1 by #4022, written by chant 0.124.28 and newer. The change set the gate binds: planDigest, when a change-set document is stored under it in the member's _change-sets/ on chant/lifecycle, as a pull-request gate's apply and a release gate (#4045) store it. chant change-set show <changeSet> --json prints it, each entry with its graph node. Absent when none is stored, as for a component gate, which binds a lifecycle-plan digest." },
|
|
883
975
|
"releaseDigest": { "type": "string", "pattern": "^(?:jcs1-)?sha256:[0-9a-f]{64}$", "description": "Added in contract 1 by #4045, written by chant 0.124.28 and newer. The release the gate binds, from the pending fact: set on a release gate, the gate chant components promote --release passes for an environment, whose component is the op release. An approval counts toward it only when it was recorded for this release, environment and planDigest. Absent on every other gate." },
|
|
976
|
+
"revoked": { "$ref": "#/$defs/revocation", "description": "Added in contract 1 by #4033 (ws-105), written by chant 0.124.29 and newer. Set on a release gate whose release was cut from a commit with a ci/revoked/<sha> tag, judged as release cut judges it: the tag. The gate's state is then superseded, or expired when its pending fact has expired. Absent otherwise." },
|
|
884
977
|
"expiresAt": { "type": "string" },
|
|
885
978
|
"approvals": {
|
|
886
979
|
"description": "The approvals that count toward the gate for its plan, oldest first.",
|
|
@@ -957,6 +1050,59 @@
|
|
|
957
1050
|
}
|
|
958
1051
|
}
|
|
959
1052
|
]
|
|
1053
|
+
},
|
|
1054
|
+
"mixed": { "$ref": "#/$defs/mixed" }
|
|
1055
|
+
}
|
|
1056
|
+
},
|
|
1057
|
+
"mixed": {
|
|
1058
|
+
"type": "object",
|
|
1059
|
+
"description": "Added in contract 1 by #4035, written by chant 0.124.29 and newer. Set when the environment runs a mix: a components promote, rollback or redeploy left a component failed or gated (its <env>/outcomes.jsonl on chant/lifecycle says so) and the release ledger has recorded nothing for it since, or the latest records of its components name more than one release, a record of no release counting as one, with at least one naming a release. Derived when read. Absent otherwise.",
|
|
1060
|
+
"required": ["components", "redeploy", "rollback"],
|
|
1061
|
+
"properties": {
|
|
1062
|
+
"components": {
|
|
1063
|
+
"description": "Every component the ledger records in the environment or a run left unsettled, sorted by name.",
|
|
1064
|
+
"type": "array",
|
|
1065
|
+
"items": {
|
|
1066
|
+
"type": "object",
|
|
1067
|
+
"required": ["component", "digest", "releaseDigest", "releaseLabel", "state", "attempt"],
|
|
1068
|
+
"properties": {
|
|
1069
|
+
"component": { "type": "string" },
|
|
1070
|
+
"digest": { "type": ["string", "null"], "description": "The digest the release ledger records the component running, or null when it has no record in the environment." },
|
|
1071
|
+
"releaseDigest": { "type": ["string", "null"], "description": "The release that record names, or null." },
|
|
1072
|
+
"releaseLabel": { "type": ["string", "null"], "description": "That release's label, or null." },
|
|
1073
|
+
"state": {
|
|
1074
|
+
"enum": ["settled", "failed", "gated"],
|
|
1075
|
+
"description": "settled: the record is what the component runs. failed or gated: the newest run that named it failed on it or stopped at its gate after the steps before the gate ran, and nothing has been recorded for it since, so what it runs is not known."
|
|
1076
|
+
},
|
|
1077
|
+
"attempt": {
|
|
1078
|
+
"description": "For an unsettled component, the run that left it so and what it was deploying. Null when settled.",
|
|
1079
|
+
"oneOf": [
|
|
1080
|
+
{ "type": "null" },
|
|
1081
|
+
{
|
|
1082
|
+
"type": "object",
|
|
1083
|
+
"required": ["verb", "runId", "timestamp", "digest", "releaseDigest", "releaseLabel"],
|
|
1084
|
+
"properties": {
|
|
1085
|
+
"verb": { "enum": ["promote", "rollback", "redeploy"] },
|
|
1086
|
+
"runId": { "type": "string" },
|
|
1087
|
+
"timestamp": { "type": "string" },
|
|
1088
|
+
"digest": { "type": "string" },
|
|
1089
|
+
"releaseDigest": { "type": ["string", "null"] },
|
|
1090
|
+
"releaseLabel": { "type": ["string", "null"] }
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
]
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
},
|
|
1098
|
+
"redeploy": {
|
|
1099
|
+
"type": "array",
|
|
1100
|
+
"items": { "type": "string" },
|
|
1101
|
+
"description": "chant components redeploy <env> --component <component> for each unsettled component the ledger records, run in the member's directory: it puts the component's recorded release back. Empty when no component is unsettled."
|
|
1102
|
+
},
|
|
1103
|
+
"rollback": {
|
|
1104
|
+
"type": ["string", "null"],
|
|
1105
|
+
"description": "chant components rollback <env> --release <label|digest>, run in the member's directory: it restores every component of the newest release the environment ran, other than the one it was moving to, that is still kept and not revoked. Null when there is none."
|
|
960
1106
|
}
|
|
961
1107
|
}
|
|
962
1108
|
},
|
|
@@ -987,13 +1133,64 @@
|
|
|
987
1133
|
}
|
|
988
1134
|
]
|
|
989
1135
|
},
|
|
1136
|
+
"releaseDigest": { "type": ["string", "null"], "pattern": "^(?:jcs1-)?sha256:[0-9a-f]{64}$", "description": "Added in contract 1 by #4043, written by chant 0.124.29 and newer. The release this deploy was made from: the releaseDigest of _releases/<releaseDigest>.json. A promote with --release writes it, a run --components with --release writes it, and a rollback or redeploy copies it from the record it restores. Null for a deploy that named no release. With the item's environment it names the release target." },
|
|
1137
|
+
"releaseLabel": { "type": ["string", "null"], "description": "Added in contract 1 by #4043, written by chant 0.124.29 and newer. The label that release was cut with, from _releases/cuts.jsonl. Null when releaseDigest is null, when the release has no label, and when the cuts can't be read." },
|
|
990
1138
|
"flags": { "type": "array", "items": { "enum": ["legacy-digest"] } },
|
|
991
1139
|
"plan": {
|
|
992
1140
|
"type": ["object", "null"],
|
|
993
1141
|
"description": "The release plan digest names, read from _plans/<digest>.json on chant/lifecycle (ws-055, #2733): the work items and evidence this release shipped. Null when this checkout has no plan stored under that digest — most releases carry no plan, and a plan not yet fetched also reads null."
|
|
1142
|
+
},
|
|
1143
|
+
"revoked": {
|
|
1144
|
+
"description": "Added in contract 1 by #4033 (ws-105), written by chant 0.124.29 and newer. Set when the deploy record names a release in releaseDigest and that release was cut from a commit with a ci/revoked/<sha> tag: the environment runs a revoked release. Read from local tags at read time and judged as release cut judges them, so with ci.green.signedSince an unsigned revoked tag is ignored. Absent when the release is not revoked, when the record names no release, and when the ci tags can't be judged.",
|
|
1145
|
+
"allOf": [
|
|
1146
|
+
{ "$ref": "#/$defs/revocation" },
|
|
1147
|
+
{
|
|
1148
|
+
"type": "object",
|
|
1149
|
+
"required": ["releaseDigest", "label", "rollback"],
|
|
1150
|
+
"properties": {
|
|
1151
|
+
"releaseDigest": { "type": "string", "pattern": "^(?:jcs1-)?sha256:[0-9a-f]{64}$", "description": "The revoked release the environment runs." },
|
|
1152
|
+
"label": { "type": ["string", "null"], "description": "The release's label, or null when its cuts gave it none." },
|
|
1153
|
+
"rollback": { "type": "string", "description": "The line that rolls the environment back, run in the member's directory. Since #4035 (chant 0.124.29): chant components rollback <env> --release <label|digest>, naming the newest release the environment ran before this one that is still kept and not revoked. When there is none, and from chant 0.124.28: chant components rollback <env> --component <component>." }
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
]
|
|
994
1157
|
}
|
|
995
1158
|
}
|
|
996
1159
|
},
|
|
1160
|
+
"revocation": {
|
|
1161
|
+
"type": "object",
|
|
1162
|
+
"description": "The ci/revoked/<sha> tag on a release's commit (#4033, ws-105), as chant ci list --json shows a commit's revoked tag, with the commit.",
|
|
1163
|
+
"required": ["commit", "tag", "tagged", "phase", "run", "signer"],
|
|
1164
|
+
"properties": {
|
|
1165
|
+
"commit": { "type": "string", "description": "The release's commit, which the tag names." },
|
|
1166
|
+
"tag": { "type": "string", "description": "ci/revoked/<sha>." },
|
|
1167
|
+
"tagged": { "type": ["string", "null"], "description": "When the tag was made, ISO 8601, or null for a lightweight tag." },
|
|
1168
|
+
"phase": { "type": ["string", "null"], "description": "The phase the annotation names as failed, or null when the annotation can't be read." },
|
|
1169
|
+
"run": {
|
|
1170
|
+
"description": "The run the annotation names as failed, or null.",
|
|
1171
|
+
"oneOf": [
|
|
1172
|
+
{ "type": "null" },
|
|
1173
|
+
{
|
|
1174
|
+
"type": "object",
|
|
1175
|
+
"required": ["name", "id", "conclusion", "url"],
|
|
1176
|
+
"properties": {
|
|
1177
|
+
"name": { "type": "string" },
|
|
1178
|
+
"id": { "type": ["integer", "null"], "description": "The check run's id, or null for a chant Op run." },
|
|
1179
|
+
"conclusion": { "type": ["string", "null"] },
|
|
1180
|
+
"url": { "type": ["string", "null"] },
|
|
1181
|
+
"opRun": {
|
|
1182
|
+
"type": "object",
|
|
1183
|
+
"required": ["id", "env", "signer"],
|
|
1184
|
+
"properties": { "id": { "type": "string" }, "env": { "type": "string" }, "signer": { "type": "string" } },
|
|
1185
|
+
"description": "Present only when the run is a chant Op run (ci.green.source runs, #4044): its id, the env it is recorded under and the runner whose statement it carries. id is then null."
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
]
|
|
1190
|
+
},
|
|
1191
|
+
"signer": { "type": ["string", "null"], "description": "The runner principal whose statement the tag carries, or null when it counts unsigned." }
|
|
1192
|
+
}
|
|
1193
|
+
},
|
|
997
1194
|
"compare": {
|
|
998
1195
|
"type": "object",
|
|
999
1196
|
"required": ["differs", "components"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wip.d.ts","sourceRoot":"","sources":["../../src/workspace/wip.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAOH,OAAO,EAA6E,KAAK,YAAY,EAAE,KAAK,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAO5K,wDAAwD;AACxD,eAAO,MAAM,cAAc,oBAAoB,CAAC;AAChD,uGAAuG;AACvG,eAAO,MAAM,kBAAkB,wBAAwB,CAAC;AACxD,iFAAiF;AACjF,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAC/D,yBAAyB;AACzB,eAAO,MAAM,UAAU,+BAA+B,CAAC;AAEvD,+DAA+D;AAC/D,eAAO,MAAM,oBAAoB,IAAI,CAAC;AACtC,eAAO,MAAM,aAAa,wEAAwE,CAAC;AACnG,eAAO,MAAM,mBAAmB,oFAAoF,CAAC;AAErH,wCAAwC;AACxC,eAAO,MAAM,eAAe,uNAAsE,CAAC;AACnG,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5D,iEAAiE;AACjE,eAAO,MAAM,qBAAqB,sYAWQ,CAAC;AAC3C,MAA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AC,EAAE,MAAM,CAAC;IACZ,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,0IAA0I;AAC1I,wBAAgB,OAAO,CAAC,GAAG,EAAE,cAAc,GAAG,gBAAgB,CAwB7D;AAED,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,mHAAmH;IACnH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,iBAAiB,GAAG,gBAAgB,CAoCnE;AA4CD,iIAAiI;AACjI,wBAAgB,OAAO,CAAC,GAAG,EAAE;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,gBAAgB,CAQ9D;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,gBAAgB,CAiD/D"}
|
package/dist/workspace/wip.js
CHANGED
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
* policy says.
|
|
38
38
|
*/
|
|
39
39
|
import { spawnSync } from "node:child_process";
|
|
40
|
-
import { copyFileSync, existsSync, lstatSync, mkdtempSync, rmSync, unlinkSync } from "node:fs";
|
|
40
|
+
import { copyFileSync, existsSync, lstatSync, mkdtempSync, rmSync, statSync, unlinkSync, utimesSync } from "node:fs";
|
|
41
41
|
import { tmpdir } from "node:os";
|
|
42
42
|
import { join, resolve } from "node:path";
|
|
43
43
|
import { KEPT_REF_PREFIX } from "../lifecycle/work-lease.js";
|
|
@@ -219,8 +219,16 @@ function worktreeTree(top) {
|
|
|
219
219
|
const index = join(dir, "index");
|
|
220
220
|
// Start from the checkout's index so git reuses its stat data; the original is never written.
|
|
221
221
|
const own = out(top, ["rev-parse", "--git-path", "index"]);
|
|
222
|
-
if (own && existsSync(resolve(top, own)))
|
|
223
|
-
|
|
222
|
+
if (own && existsSync(resolve(top, own))) {
|
|
223
|
+
const source = resolve(top, own);
|
|
224
|
+
copyFileSync(source, index);
|
|
225
|
+
// Keep the index's own timestamps on the copy. git treats an entry whose
|
|
226
|
+
// file is as new as the index as racily clean and reads its content; a
|
|
227
|
+
// copy stamped now would make a same-size edit made in the same second as
|
|
228
|
+
// the last index write look unchanged, and the snapshot would miss it.
|
|
229
|
+
const { atime, mtime } = statSync(source);
|
|
230
|
+
utimesSync(index, atime, mtime);
|
|
231
|
+
}
|
|
224
232
|
const env = { GIT_INDEX_FILE: index };
|
|
225
233
|
const add = git(top, ["add", "--all", "--", ":/"], { env });
|
|
226
234
|
if (!add.ok)
|
package/package.json
CHANGED