@intentius/chant 0.124.55 → 0.124.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ci-agent.d.ts.map +1 -1
- package/dist/ci-agent.js +1 -2
- package/dist/ci-audit/attribution.d.ts +111 -0
- package/dist/ci-audit/attribution.d.ts.map +1 -0
- package/dist/ci-audit/attribution.js +194 -0
- package/dist/ci-audit/audit-log.d.ts +144 -0
- package/dist/ci-audit/audit-log.d.ts.map +1 -0
- package/dist/ci-audit/audit-log.js +149 -0
- package/dist/ci-audit/index.d.ts +12 -0
- package/dist/ci-audit/index.d.ts.map +1 -0
- package/dist/ci-audit/index.js +12 -0
- package/dist/ci-audit/unrecorded.d.ts +74 -0
- package/dist/ci-audit/unrecorded.d.ts.map +1 -0
- package/dist/ci-audit/unrecorded.js +95 -0
- package/dist/ci-audit.d.ts +3 -0
- package/dist/ci-audit.d.ts.map +1 -0
- package/dist/ci-audit.js +2 -0
- package/dist/ci-control.d.ts.map +1 -1
- package/dist/ci-control.js +3 -4
- package/dist/ci-estate.d.ts +24 -0
- package/dist/ci-estate.d.ts.map +1 -1
- package/dist/ci-estate.js +1 -2
- package/dist/ci-identity.d.ts.map +1 -1
- package/dist/ci-identity.js +2 -3
- package/dist/ci-job-guard.d.ts +139 -0
- package/dist/ci-job-guard.d.ts.map +1 -0
- package/dist/ci-job-guard.js +287 -0
- package/dist/ci-jobs.d.ts +7 -0
- package/dist/ci-jobs.d.ts.map +1 -1
- package/dist/ci-jobs.js +7 -0
- package/dist/ci-product-words.d.ts +7 -1
- package/dist/ci-product-words.d.ts.map +1 -1
- package/dist/ci-product-words.js +38 -4
- package/dist/ci-product.d.ts +35 -0
- package/dist/ci-product.d.ts.map +1 -1
- package/dist/ci-product.js +38 -3
- package/dist/ci-respond-run.d.ts +73 -0
- package/dist/ci-respond-run.d.ts.map +1 -0
- package/dist/ci-respond-run.js +247 -0
- package/dist/ci-respond.d.ts +189 -0
- package/dist/ci-respond.d.ts.map +1 -0
- package/dist/ci-respond.js +285 -0
- package/dist/cli/handlers/audit-log.d.ts +12 -0
- package/dist/cli/handlers/audit-log.d.ts.map +1 -0
- package/dist/cli/handlers/audit-log.js +81 -0
- package/dist/cli/handlers/build.d.ts +7 -0
- package/dist/cli/handlers/build.d.ts.map +1 -1
- package/dist/cli/handlers/build.js +81 -0
- package/dist/cli/handlers/ci-check-job.d.ts +11 -0
- package/dist/cli/handlers/ci-check-job.d.ts.map +1 -0
- package/dist/cli/handlers/ci-check-job.js +27 -0
- package/dist/cli/handlers/ci-check.d.ts.map +1 -1
- package/dist/cli/handlers/ci-check.js +38 -9
- package/dist/cli/handlers/e2e-safe-run.d.ts +12 -0
- package/dist/cli/handlers/e2e-safe-run.d.ts.map +1 -0
- package/dist/cli/handlers/e2e-safe-run.js +23 -0
- package/dist/cli/handlers/pr.d.ts +5 -0
- package/dist/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/handlers/pr.js +259 -4
- package/dist/cli/handlers/run-wave.js +89 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +56 -2
- package/dist/cli/parse-args.d.ts.map +1 -1
- package/dist/cli/parse-args.js +107 -0
- package/dist/cli/registry.d.ts +38 -0
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/components/adoption.d.ts.map +1 -1
- package/dist/components/adoption.js +1 -2
- package/dist/components/capability.d.ts +37 -0
- package/dist/components/capability.d.ts.map +1 -1
- package/dist/components/capability.js +25 -0
- package/dist/components/check-hooks.d.ts +4 -1
- package/dist/components/check-hooks.d.ts.map +1 -1
- package/dist/components/check-steps.d.ts +74 -0
- package/dist/components/check-steps.d.ts.map +1 -0
- package/dist/components/check-steps.js +102 -0
- package/dist/components/ci-services.d.ts.map +1 -1
- package/dist/components/ci-services.js +1 -2
- package/dist/components/driver.d.ts +12 -0
- package/dist/components/driver.d.ts.map +1 -1
- package/dist/components/driver.js +35 -1
- package/dist/components/groups.d.ts.map +1 -1
- package/dist/components/groups.js +4 -3
- package/dist/components/pr-env-ledger.d.ts.map +1 -1
- package/dist/components/pr-env-ledger.js +1 -2
- package/dist/components/pr-environment.d.ts +1 -1
- package/dist/components/pr-environment.d.ts.map +1 -1
- package/dist/components/pr-environment.js +1 -1
- package/dist/components/pr-pipeline.d.ts +129 -3
- package/dist/components/pr-pipeline.d.ts.map +1 -1
- package/dist/components/pr-pipeline.js +153 -17
- package/dist/components/pr-run.d.ts +8 -0
- package/dist/components/pr-run.d.ts.map +1 -1
- package/dist/components/pr-run.js +9 -4
- package/dist/components/product-pipeline.d.ts +35 -2
- package/dist/components/product-pipeline.d.ts.map +1 -1
- package/dist/components/product-pipeline.js +24 -5
- package/dist/components/wave-plan.d.ts +8 -0
- package/dist/components/wave-plan.d.ts.map +1 -1
- package/dist/components/wave-plan.js +18 -2
- package/dist/e2e-harness/bucket.d.ts +21 -0
- package/dist/e2e-harness/bucket.d.ts.map +1 -0
- package/dist/e2e-harness/bucket.js +61 -0
- package/dist/e2e-harness/claim.d.ts +70 -0
- package/dist/e2e-harness/claim.d.ts.map +1 -0
- package/dist/e2e-harness/claim.js +98 -0
- package/dist/e2e-harness/driver.d.ts +64 -0
- package/dist/e2e-harness/driver.d.ts.map +1 -0
- package/dist/e2e-harness/driver.js +243 -0
- package/dist/e2e-harness/forgejo.d.ts +77 -0
- package/dist/e2e-harness/forgejo.d.ts.map +1 -0
- package/dist/e2e-harness/forgejo.js +205 -0
- package/dist/e2e-harness/git.d.ts +32 -0
- package/dist/e2e-harness/git.d.ts.map +1 -0
- package/dist/e2e-harness/git.js +67 -0
- package/dist/e2e-harness/index.d.ts +22 -0
- package/dist/e2e-harness/index.d.ts.map +1 -0
- package/dist/e2e-harness/index.js +48 -0
- package/dist/e2e-harness/jobs.d.ts +8 -0
- package/dist/e2e-harness/jobs.d.ts.map +1 -0
- package/dist/e2e-harness/jobs.js +34 -0
- package/dist/e2e-harness/pins.d.ts +45 -0
- package/dist/e2e-harness/pins.d.ts.map +1 -0
- package/dist/e2e-harness/pins.js +44 -0
- package/dist/e2e-harness/ports.d.ts +113 -0
- package/dist/e2e-harness/ports.d.ts.map +1 -0
- package/dist/e2e-harness/ports.js +4 -0
- package/dist/e2e-harness/reports.d.ts +45 -0
- package/dist/e2e-harness/reports.d.ts.map +1 -0
- package/dist/e2e-harness/reports.js +57 -0
- package/dist/e2e-harness/safe-run-cli.d.ts +17 -0
- package/dist/e2e-harness/safe-run-cli.d.ts.map +1 -0
- package/dist/e2e-harness/safe-run-cli.js +43 -0
- package/dist/e2e-harness/safe-run.d.ts +61 -0
- package/dist/e2e-harness/safe-run.d.ts.map +1 -0
- package/dist/e2e-harness/safe-run.js +172 -0
- package/dist/e2e-harness/scenario.d.ts +11 -0
- package/dist/e2e-harness/scenario.d.ts.map +1 -0
- package/dist/e2e-harness/scenario.js +89 -0
- package/dist/e2e-harness/schemas/demo-cycle.schema.json +282 -0
- package/dist/e2e-harness/schemas/demo-step.schema.json +245 -0
- package/dist/e2e-harness/schemas/e2e-claim-row.schema.json +33 -0
- package/dist/e2e-harness/schemas/e2e-claims.schema.json +18 -0
- package/dist/e2e-harness/schemas/e2e-scenario.schema.json +150 -0
- package/dist/e2e-harness/schemas/index.d.ts +191 -0
- package/dist/e2e-harness/schemas/index.d.ts.map +1 -0
- package/dist/e2e-harness/schemas/index.js +62 -0
- package/dist/e2e-harness/stack.d.ts +124 -0
- package/dist/e2e-harness/stack.d.ts.map +1 -0
- package/dist/e2e-harness/stack.js +207 -0
- package/dist/e2e-harness/steps.d.ts +11 -0
- package/dist/e2e-harness/steps.d.ts.map +1 -0
- package/dist/e2e-harness/steps.js +22 -0
- package/dist/e2e-harness.d.ts +3 -0
- package/dist/e2e-harness.d.ts.map +1 -0
- package/dist/e2e-harness.js +2 -0
- package/dist/exit-codes.d.ts +7 -1
- package/dist/exit-codes.d.ts.map +1 -1
- package/dist/exit-codes.js +7 -1
- package/dist/lexicon.d.ts +46 -0
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/gate-ledger.d.ts.map +1 -1
- package/dist/lifecycle/gate-ledger.js +2 -3
- package/dist/lifecycle/gated-request.d.ts.map +1 -1
- package/dist/lifecycle/gated-request.js +1 -2
- package/dist/lifecycle/query.d.ts.map +1 -1
- package/dist/lifecycle/query.js +4 -5
- package/dist/lifecycle/release-catalog.d.ts.map +1 -1
- package/dist/lifecycle/release-catalog.js +1 -1
- package/dist/lifecycle/release-ledger.d.ts.map +1 -1
- package/dist/lifecycle/release-ledger.js +1 -2
- package/dist/lifecycle/release-status.d.ts +20 -0
- package/dist/lifecycle/release-status.d.ts.map +1 -1
- package/dist/lifecycle/release-status.js +1 -22
- package/dist/lifecycle/wave-plans.d.ts +23 -7
- package/dist/lifecycle/wave-plans.d.ts.map +1 -1
- package/dist/lifecycle/wave-plans.js +9 -2
- package/dist/op/approval-status.d.ts +103 -0
- package/dist/op/approval-status.d.ts.map +1 -0
- package/dist/op/approval-status.js +197 -0
- package/dist/op/index.d.ts +1 -1
- package/dist/op/index.d.ts.map +1 -1
- package/dist/op/index.js +1 -1
- package/dist/op/op-waves-capability-spec.d.ts +8 -0
- package/dist/op/op-waves-capability-spec.d.ts.map +1 -1
- package/dist/op/op-waves-capability-spec.js +21 -0
- package/dist/op/op-waves-release.d.ts.map +1 -1
- package/dist/op/op-waves-release.js +1 -2
- package/dist/op/op-waves-run.d.ts +7 -2
- package/dist/op/op-waves-run.d.ts.map +1 -1
- package/dist/op/op-waves-run.js +96 -4
- package/dist/op/op-waves-stand-down.d.ts.map +1 -1
- package/dist/op/op-waves-stand-down.js +1 -2
- package/dist/op/op-waves.d.ts +35 -0
- package/dist/op/op-waves.d.ts.map +1 -1
- package/dist/op/op-waves.js +46 -6
- package/dist/op/runtime.d.ts +4 -0
- package/dist/op/runtime.d.ts.map +1 -1
- package/dist/op/runtime.js +2 -3
- package/dist/otlp.d.ts.map +1 -1
- package/dist/otlp.js +1 -2
- package/dist/parallelism.d.ts +17 -0
- package/dist/parallelism.d.ts.map +1 -0
- package/dist/parallelism.js +33 -0
- package/dist/policy-source.d.ts.map +1 -1
- package/dist/policy-source.js +1 -2
- package/dist/pr-forge.d.ts.map +1 -1
- package/dist/pr-forge.js +56 -39
- package/dist/pr-loop.d.ts +9 -0
- package/dist/pr-loop.d.ts.map +1 -1
- package/dist/pr-loop.js +22 -3
- package/dist/pr-merge.d.ts +64 -0
- package/dist/pr-merge.d.ts.map +1 -0
- package/dist/pr-merge.js +78 -0
- package/dist/pr-post.d.ts +70 -1
- package/dist/pr-post.d.ts.map +1 -1
- package/dist/pr-post.js +116 -5
- package/dist/pr-report-url.d.ts.map +1 -1
- package/dist/pr-report-url.js +1 -2
- package/dist/release-floors.d.ts +1 -1
- package/dist/release-floors.js +1 -1
- package/dist/run-event.d.ts.map +1 -1
- package/dist/run-event.js +1 -2
- package/dist/scheduled-op-cloud.d.ts +32 -0
- package/dist/scheduled-op-cloud.d.ts.map +1 -0
- package/dist/scheduled-op-cloud.js +69 -0
- package/dist/wave-runtime.mjs +340 -327
- package/dist/workspace/ci-lock-grain.d.ts +5 -0
- package/dist/workspace/ci-lock-grain.d.ts.map +1 -1
- package/dist/workspace/ci-lock-grain.js +1 -7
- package/dist/workspace/ci-run.d.ts.map +1 -1
- package/dist/workspace/ci-run.js +5 -1
- package/dist/workspace/pr-report.schema.json +5 -0
- package/package.json +1 -1
- package/src/ci-agent.ts +1 -2
- package/src/ci-audit/__fixtures__/cloudtrail-lookup-bucket.json +37 -0
- package/src/ci-audit/__fixtures__/cloudtrail-writes-window.json +59 -0
- package/src/ci-audit/attribution.ts +260 -0
- package/src/ci-audit/audit-log.ts +220 -0
- package/src/ci-audit/ci-audit.test.ts +175 -0
- package/src/ci-audit/index.ts +15 -0
- package/src/ci-audit/unrecorded.ts +140 -0
- package/src/ci-audit.ts +2 -0
- package/src/ci-control.ts +3 -4
- package/src/ci-estate.ts +1 -2
- package/src/ci-identity-database.test.ts +2 -3
- package/src/ci-identity-targets.test.ts +1 -3
- package/src/ci-identity.ts +2 -3
- package/src/ci-job-guard.test.ts +154 -0
- package/src/ci-job-guard.ts +319 -0
- package/src/ci-jobs.ts +8 -0
- package/src/ci-product-comment-targets.test.ts +45 -0
- package/src/ci-product-words.ts +35 -6
- package/src/ci-product.ts +55 -3
- package/src/ci-respond-run.ts +291 -0
- package/src/ci-respond.test.ts +264 -0
- package/src/ci-respond.ts +412 -0
- package/src/cli/handlers/audit-log.ts +74 -0
- package/src/cli/handlers/build-pr-loop-flags.test.ts +98 -0
- package/src/cli/handlers/build.ts +69 -0
- package/src/cli/handlers/ci-check-job.test.ts +114 -0
- package/src/cli/handlers/ci-check-job.ts +33 -0
- package/src/cli/handlers/ci-check.ts +38 -8
- package/src/cli/handlers/e2e-safe-run.ts +27 -0
- package/src/cli/handlers/pr-plan-comment-targets.test.ts +166 -0
- package/src/cli/handlers/pr-plan-flags.test.ts +161 -0
- package/src/cli/handlers/pr.ts +228 -4
- package/src/cli/handlers/run-wave.ts +79 -1
- package/src/cli/main.test.ts +1 -1
- package/src/cli/main.ts +56 -2
- package/src/cli/parse-args.ts +77 -0
- package/src/cli/registry.ts +38 -0
- package/src/components/adoption.ts +1 -2
- package/src/components/capability.ts +50 -0
- package/src/components/check-hooks.ts +4 -1
- package/src/components/check-steps.test.ts +70 -0
- package/src/components/check-steps.ts +158 -0
- package/src/components/ci-services.ts +1 -2
- package/src/components/driver.ts +35 -1
- package/src/components/groups.ts +4 -2
- package/src/components/plan-flags.test.ts +46 -0
- package/src/components/pr-comment-preview-targets.test.ts +34 -0
- package/src/components/pr-env-ledger.ts +1 -2
- package/src/components/pr-env-run-bundle.test.ts +0 -20
- package/src/components/pr-environment.ts +1 -1
- package/src/components/pr-pipeline-runners.test.ts +80 -0
- package/src/components/pr-pipeline.ts +232 -17
- package/src/components/pr-run.ts +17 -6
- package/src/components/pr-stale-job.test.ts +34 -0
- package/src/components/product-pipeline.ts +50 -8
- package/src/components/wave-plan.ts +18 -2
- package/src/e2e-harness/__project__/chant.config.ts +4 -0
- package/src/e2e-harness/__project__/src/compose.ts +33 -0
- package/src/e2e-harness/bucket.ts +69 -0
- package/src/e2e-harness/claim.test.ts +150 -0
- package/src/e2e-harness/claim.ts +140 -0
- package/src/e2e-harness/driver.test.ts +304 -0
- package/src/e2e-harness/driver.ts +294 -0
- package/src/e2e-harness/forgejo.ts +267 -0
- package/src/e2e-harness/git.ts +96 -0
- package/src/e2e-harness/index.ts +50 -0
- package/src/e2e-harness/jobs.ts +35 -0
- package/src/e2e-harness/pins.ts +52 -0
- package/src/e2e-harness/ports.ts +130 -0
- package/src/e2e-harness/reports.ts +79 -0
- package/src/e2e-harness/safe-run-cli.test.ts +102 -0
- package/src/e2e-harness/safe-run-cli.ts +54 -0
- package/src/e2e-harness/safe-run.ts +198 -0
- package/src/e2e-harness/scenario.ts +89 -0
- package/src/e2e-harness/schemas/README.md +62 -0
- package/src/e2e-harness/schemas/demo-cycle.schema.json +282 -0
- package/src/e2e-harness/schemas/demo-step.schema.json +245 -0
- package/src/e2e-harness/schemas/e2e-claim-row.schema.json +33 -0
- package/src/e2e-harness/schemas/e2e-claims.schema.json +18 -0
- package/src/e2e-harness/schemas/e2e-scenario.schema.json +150 -0
- package/src/e2e-harness/schemas/index.ts +220 -0
- package/src/e2e-harness/schemas.test.ts +145 -0
- package/src/e2e-harness/stack.test.ts +124 -0
- package/src/e2e-harness/stack.ts +306 -0
- package/src/e2e-harness/steps.ts +30 -0
- package/src/e2e-harness.ts +2 -0
- package/src/exit-codes.test.ts +3 -2
- package/src/exit-codes.ts +7 -1
- package/src/gate-decision-bundle.test.ts +0 -2
- package/src/lexicon.ts +48 -0
- package/src/lifecycle/control-entries-ledger.test.ts +2 -3
- package/src/lifecycle/gate-ledger.ts +2 -3
- package/src/lifecycle/gated-request.ts +1 -2
- package/src/lifecycle/query.ts +4 -5
- package/src/lifecycle/release-catalog.test.ts +3 -4
- package/src/lifecycle/release-catalog.ts +1 -1
- package/src/lifecycle/release-ledger.ts +1 -2
- package/src/lifecycle/release-status.test.ts +3 -4
- package/src/lifecycle/release-status.ts +1 -2
- package/src/lifecycle/wave-plans.ts +33 -5
- package/src/op/approval-status.test.ts +134 -0
- package/src/op/approval-status.ts +235 -0
- package/src/op/gate-review.test.ts +2 -1
- package/src/op/index.ts +2 -0
- package/src/op/op-waves-after-plan.test.ts +12 -0
- package/src/op/op-waves-capability-spec.ts +20 -0
- package/src/op/op-waves-parallelism.test.ts +89 -0
- package/src/op/op-waves-pull-request.test.ts +78 -1
- package/src/op/op-waves-release.ts +1 -2
- package/src/op/op-waves-run.ts +94 -4
- package/src/op/op-waves-stand-down.ts +1 -2
- package/src/op/op-waves.ts +63 -6
- package/src/op/runtime.ts +6 -3
- package/src/otlp.ts +1 -2
- package/src/parallelism.test.ts +38 -0
- package/src/parallelism.ts +33 -0
- package/src/policy-source.ts +1 -2
- package/src/pr-forge-bundle.test.ts +1 -1
- package/src/pr-forge.ts +54 -35
- package/src/pr-loop-bundle.test.ts +1 -1
- package/src/pr-loop-narrowed.test.ts +63 -0
- package/src/pr-loop.ts +30 -3
- package/src/pr-merge.test.ts +100 -0
- package/src/pr-merge.ts +105 -0
- package/src/pr-post-stale.test.ts +163 -0
- package/src/pr-post.ts +159 -5
- package/src/pr-report-url.ts +1 -2
- package/src/product-subpaths-plain-node.e2e.test.ts +1 -0
- package/src/release-floors.ts +1 -1
- package/src/run-event.ts +1 -2
- package/src/scheduled-op-cloud.ts +68 -0
- package/src/stage-hooks-bundle.test.ts +0 -2
- package/src/workspace/ci-lock-grain.ts +1 -2
- package/src/workspace/ci-run.ts +5 -1
- package/src/workspace/pr-report.schema.json +5 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A cloud's audit log, as CI core reads it (#4632, moved from terragucci's
|
|
3
|
+
* respond/attribute.ts and state-writers.ts): who last wrote an object, and
|
|
4
|
+
* every write in a window. CloudTrail is the first reader; the cloud is
|
|
5
|
+
* named per workspace member ({@link AuditLogSettings}), so a member on
|
|
6
|
+
* another cloud reads as `unavailable` with the reason, never as silence.
|
|
7
|
+
*
|
|
8
|
+
* The reader runs the `aws` CLI with the credentials the job already holds
|
|
9
|
+
* (a drift job's preview identity, #4631). Tests pass `run` and read
|
|
10
|
+
* recorded CloudTrail output; nothing here reaches a cloud by itself.
|
|
11
|
+
*/
|
|
12
|
+
import { spawnSync } from "node:child_process";
|
|
13
|
+
/** `aws`, `aws:us-east-1`, as `--audit-log` takes it. */
|
|
14
|
+
export function parseAuditLogSetting(text) {
|
|
15
|
+
const [cloud, region, ...rest] = text.split(":");
|
|
16
|
+
if (cloud !== "aws")
|
|
17
|
+
return { error: `--audit-log reads aws's CloudTrail, not ${JSON.stringify(cloud)}: --audit-log aws[:<region>]` };
|
|
18
|
+
if (rest.length > 0)
|
|
19
|
+
return { error: `--audit-log takes aws[:<region>], not ${JSON.stringify(text)}` };
|
|
20
|
+
return { cloud, ...(region ? { region } : {}) };
|
|
21
|
+
}
|
|
22
|
+
/** The setting for `member`: its own, else `*`'s. */
|
|
23
|
+
export function auditLogFor(settings, member) {
|
|
24
|
+
return settings?.[member] ?? settings?.["*"];
|
|
25
|
+
}
|
|
26
|
+
const ENGINE_AGENT = /terraform|opentofu|tofu|pulumi/i;
|
|
27
|
+
/**
|
|
28
|
+
* A CloudTrail record read as a person or a controller, or neither. A write
|
|
29
|
+
* by an AWS service principal is a controller; an IAM user, the root user,
|
|
30
|
+
* an Identity Center session and a role session named for an email address
|
|
31
|
+
* are people. A role session with a machine name could be a pipeline or a
|
|
32
|
+
* controller, so it answers nothing.
|
|
33
|
+
*/
|
|
34
|
+
export function classifyEvent(e) {
|
|
35
|
+
const id = e.userIdentity ?? {};
|
|
36
|
+
const by = id.invokedBy ?? e.invokedBy;
|
|
37
|
+
if (id.type === "AWSService" || (by && /\.amazonaws\.com$/.test(by)))
|
|
38
|
+
return { actor: "controller", who: by ?? "an AWS service" };
|
|
39
|
+
const arn = id.arn ?? "";
|
|
40
|
+
const session = arn.split("/").at(-1) ?? "";
|
|
41
|
+
if (id.type === "IAMUser")
|
|
42
|
+
return { actor: "human", who: id.userName ?? session };
|
|
43
|
+
if (id.type === "Root")
|
|
44
|
+
return { actor: "human", who: "the root user" };
|
|
45
|
+
if (id.type === "IdentityCenterUser" || id.type === "FederatedUser")
|
|
46
|
+
return { actor: "human", who: id.userName ?? session };
|
|
47
|
+
if (id.type === "AssumedRole") {
|
|
48
|
+
const issuer = id.sessionContext?.sessionIssuer?.userName ?? "";
|
|
49
|
+
if (/^AWSReservedSSO_/.test(issuer) || session.includes("@"))
|
|
50
|
+
return { actor: "human", who: session || issuer };
|
|
51
|
+
}
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
const isWrite = (e) => e.readOnly !== true && e.readOnly !== "true";
|
|
55
|
+
/** The newest write outside the engine that classifies. An older write by someone else is not who last changed it. */
|
|
56
|
+
export function newestActor(events) {
|
|
57
|
+
const writes = events.filter((e) => isWrite(e) && !ENGINE_AGENT.test(e.userAgent ?? "")).sort((a, b) => String(b.eventTime ?? "").localeCompare(String(a.eventTime ?? "")));
|
|
58
|
+
const e = writes[0];
|
|
59
|
+
const c = e && classifyEvent(e);
|
|
60
|
+
return e && c ? { status: "found", ...c, event: e.eventName ?? "an event", at: e.eventTime ?? "" } : { status: "silent" };
|
|
61
|
+
}
|
|
62
|
+
/** A CloudTrail record as a write, or undefined for a read. */
|
|
63
|
+
export function trailWrite(e) {
|
|
64
|
+
if (!isWrite(e))
|
|
65
|
+
return undefined;
|
|
66
|
+
const c = classifyEvent(e);
|
|
67
|
+
const who = c?.who ?? e.userIdentity?.arn ?? e.userIdentity?.userName ?? "an unnamed principal";
|
|
68
|
+
const resources = (e.resources ?? []).map((r) => r.ARN ?? r.resourceName ?? r.ResourceName).filter((r) => typeof r === "string" && r !== "");
|
|
69
|
+
return {
|
|
70
|
+
at: e.eventTime ?? "",
|
|
71
|
+
event: e.eventName ?? "an event",
|
|
72
|
+
who,
|
|
73
|
+
...(c ? { actor: c.actor } : {}),
|
|
74
|
+
resources,
|
|
75
|
+
...(ENGINE_AGENT.test(e.userAgent ?? "") ? { engine: true } : {}),
|
|
76
|
+
...(e.eventID ? { id: e.eventID } : {}),
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
/** The `aws` CLI on the job's PATH, with the credentials it already has. */
|
|
80
|
+
export const spawnAws = (args) => {
|
|
81
|
+
const p = spawnSync("aws", args, { encoding: "utf-8", maxBuffer: 1 << 26 });
|
|
82
|
+
return { status: p.status, stdout: p.stdout ?? "", stderr: p.stderr ?? "", ...(p.error ? { error: p.error } : {}) };
|
|
83
|
+
};
|
|
84
|
+
/** CloudTrail's `lookup-events` output: each record's own JSON in `CloudTrailEvent`. */
|
|
85
|
+
export function parseLookupEvents(stdout) {
|
|
86
|
+
let doc;
|
|
87
|
+
try {
|
|
88
|
+
doc = JSON.parse(stdout);
|
|
89
|
+
}
|
|
90
|
+
catch {
|
|
91
|
+
return undefined;
|
|
92
|
+
}
|
|
93
|
+
const events = [];
|
|
94
|
+
for (const e of doc.Events ?? []) {
|
|
95
|
+
try {
|
|
96
|
+
const inner = JSON.parse(e.CloudTrailEvent ?? "{}");
|
|
97
|
+
events.push({
|
|
98
|
+
...(e.EventName ? { eventName: e.EventName } : {}),
|
|
99
|
+
...(e.EventTime ? { eventTime: String(e.EventTime) } : {}),
|
|
100
|
+
...(e.EventId ? { eventID: e.EventId } : {}),
|
|
101
|
+
...(e.Resources ? { resources: e.Resources.map((r) => ({ ...(r.ResourceName ? { ResourceName: r.ResourceName } : {}) })) } : {}),
|
|
102
|
+
...inner,
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
catch {
|
|
106
|
+
// A record that does not parse says nothing.
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return events;
|
|
110
|
+
}
|
|
111
|
+
const why = (p) => {
|
|
112
|
+
if (p.error?.code === "ENOENT")
|
|
113
|
+
return "the aws CLI is not installed";
|
|
114
|
+
return (p.error?.message ?? (p.stderr.trim() || `aws exited ${p.status}`)).split("\n")[0];
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* CloudTrail through the `aws` CLI: `lookup-events` by resource name for a
|
|
118
|
+
* lookup, by `ReadOnly=false` over the window for the writes. Only an
|
|
119
|
+
* `aws_` (Terraform) or `aws:` (Pulumi) resource is looked up.
|
|
120
|
+
*/
|
|
121
|
+
export function awsAuditLog(o = {}) {
|
|
122
|
+
const run = o.run ?? spawnAws;
|
|
123
|
+
const region = o.region ? ["--region", o.region] : [];
|
|
124
|
+
return {
|
|
125
|
+
async lookup(q) {
|
|
126
|
+
if (!q.type.startsWith("aws_") && !q.type.startsWith("aws:"))
|
|
127
|
+
return { status: "unavailable", reason: `CloudTrail holds no writes of ${q.type}` };
|
|
128
|
+
const start = new Date((o.now?.() ?? new Date()).getTime() - (o.days ?? 14) * 86400000).toISOString();
|
|
129
|
+
const p = run(["cloudtrail", "lookup-events", "--output", "json", "--max-results", "50", "--start-time", start, "--lookup-attributes", `AttributeKey=ResourceName,AttributeValue=${q.ref}`, ...region]);
|
|
130
|
+
if (p.error || p.status !== 0)
|
|
131
|
+
return { status: "unavailable", reason: why(p) };
|
|
132
|
+
const events = parseLookupEvents(p.stdout);
|
|
133
|
+
return events ? newestActor(events) : { status: "unavailable", reason: "aws printed no JSON" };
|
|
134
|
+
},
|
|
135
|
+
async writes(q) {
|
|
136
|
+
const p = run(["cloudtrail", "lookup-events", "--output", "json", "--start-time", q.since, "--end-time", q.until, "--lookup-attributes", "AttributeKey=ReadOnly,AttributeValue=false", ...region]);
|
|
137
|
+
if (p.error || p.status !== 0)
|
|
138
|
+
return { status: "unavailable", reason: why(p) };
|
|
139
|
+
const events = parseLookupEvents(p.stdout);
|
|
140
|
+
if (!events)
|
|
141
|
+
return { status: "unavailable", reason: "aws printed no JSON" };
|
|
142
|
+
return { status: "read", writes: events.map(trailWrite).filter((w) => w !== undefined) };
|
|
143
|
+
},
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
/** The reader for a setting. */
|
|
147
|
+
export function auditLogOf(setting, o = {}) {
|
|
148
|
+
return awsAuditLog({ ...o, ...(setting.region ? { region: setting.region } : {}), ...(setting.days !== undefined ? { days: setting.days } : {}) });
|
|
149
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@intentius/chant/ci-audit` (#4632): drift attribution from a cloud's
|
|
3
|
+
* audit log, and the unrecorded writer audit against the ledger's apply
|
|
4
|
+
* records, in CI core for terragucci and plywood. A product feature-detects
|
|
5
|
+
* on `CI_AUDIT_FLOOR`.
|
|
6
|
+
*/
|
|
7
|
+
/** The first chant with drift attribution and the unrecorded writer audit in core. */
|
|
8
|
+
export declare const CI_AUDIT_FLOOR = "0.124.56";
|
|
9
|
+
export * from "./audit-log.js";
|
|
10
|
+
export * from "./attribution.js";
|
|
11
|
+
export * from "./unrecorded.js";
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ci-audit/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,sFAAsF;AACtF,eAAO,MAAM,cAAc,aAAe,CAAC;AAE3C,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@intentius/chant/ci-audit` (#4632): drift attribution from a cloud's
|
|
3
|
+
* audit log, and the unrecorded writer audit against the ledger's apply
|
|
4
|
+
* records, in CI core for terragucci and plywood. A product feature-detects
|
|
5
|
+
* on `CI_AUDIT_FLOOR`.
|
|
6
|
+
*/
|
|
7
|
+
import { NEXT_RELEASE } from "../release-floors.js";
|
|
8
|
+
/** The first chant with drift attribution and the unrecorded writer audit in core. */
|
|
9
|
+
export const CI_AUDIT_FLOOR = NEXT_RELEASE;
|
|
10
|
+
export * from "./audit-log.js";
|
|
11
|
+
export * from "./attribution.js";
|
|
12
|
+
export * from "./unrecorded.js";
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The unrecorded writer audit (#4632, moved from terragucci's
|
|
3
|
+
* report/unrecorded.ts and state-writers.ts): the audit log's writes
|
|
4
|
+
* compared against the ledger's apply records, and every write no
|
|
5
|
+
* recorded apply made reported with its writer.
|
|
6
|
+
*
|
|
7
|
+
* A write counts as recorded when it falls inside a recorded apply's run
|
|
8
|
+
* (its record's start to its end, a second early since a log keeps times to
|
|
9
|
+
* the second) and, when the apply names its principals, one of them made
|
|
10
|
+
* it. A write a controller made (an AWS service) is a write by design, which
|
|
11
|
+
* drift attribution covers, so it is reported apart and never as
|
|
12
|
+
* unrecorded. A write younger than the settle time is left for a later run,
|
|
13
|
+
* since a running apply has not ended its record yet.
|
|
14
|
+
*
|
|
15
|
+
* The apply records are the op run ledger's (`../lifecycle/run-ledger.ts`):
|
|
16
|
+
* every op wave job that applied or tried to, and any run a caller names.
|
|
17
|
+
* Only times and principals are read, never a state's contents.
|
|
18
|
+
*/
|
|
19
|
+
import type { OpRunRecord } from "../op/runtime.js";
|
|
20
|
+
import type { AuditLog, AuditWrite } from "./audit-log.js";
|
|
21
|
+
/** How long a write waits before it is judged. Default one hour. */
|
|
22
|
+
export declare const UNRECORDED_SETTLE_SECONDS = 3600;
|
|
23
|
+
/** One recorded apply's run. */
|
|
24
|
+
export interface ApplyWindow {
|
|
25
|
+
run: string;
|
|
26
|
+
op: string;
|
|
27
|
+
started: string;
|
|
28
|
+
ended: string;
|
|
29
|
+
/** The principals the apply ran as, when the record names them. Absent: any writer inside the window counts. */
|
|
30
|
+
principals?: string[];
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The applies among run records: an op wave job that applied or failed a
|
|
34
|
+
* run, or any record `isApply` accepts. A record whose times do not parse
|
|
35
|
+
* is left out.
|
|
36
|
+
*/
|
|
37
|
+
export declare function applyWindowsFromRuns(records: readonly OpRunRecord[], isApply?: (r: OpRunRecord) => boolean): ApplyWindow[];
|
|
38
|
+
export interface UnrecordedWrite extends AuditWrite {
|
|
39
|
+
/** Why no recorded apply covers it. */
|
|
40
|
+
why: string;
|
|
41
|
+
}
|
|
42
|
+
export interface UnrecordedReport {
|
|
43
|
+
since: string;
|
|
44
|
+
until: string;
|
|
45
|
+
/** Writes no recorded apply made, oldest first. */
|
|
46
|
+
unrecorded: UnrecordedWrite[];
|
|
47
|
+
/** Writes a recorded apply covers. */
|
|
48
|
+
recorded: number;
|
|
49
|
+
/** Writes a controller made by design. */
|
|
50
|
+
controller: AuditWrite[];
|
|
51
|
+
/** Writes younger than the settle time, left for a later run. */
|
|
52
|
+
pending: number;
|
|
53
|
+
/** Why the log could not be read, when it could not. */
|
|
54
|
+
unavailable?: string;
|
|
55
|
+
}
|
|
56
|
+
/** Judge each write against the apply windows. Pure. */
|
|
57
|
+
export declare function judgeWrites(writes: readonly AuditWrite[], windows: readonly ApplyWindow[], at: {
|
|
58
|
+
since: string;
|
|
59
|
+
until: string;
|
|
60
|
+
now?: Date;
|
|
61
|
+
settleSeconds?: number;
|
|
62
|
+
resources?: readonly string[];
|
|
63
|
+
}): UnrecordedReport;
|
|
64
|
+
/** Read the log's writes over the window and judge them. Never throws for the log. */
|
|
65
|
+
export declare function unrecordedWrites(log: AuditLog, windows: readonly ApplyWindow[], at: {
|
|
66
|
+
since: string;
|
|
67
|
+
until: string;
|
|
68
|
+
now?: Date;
|
|
69
|
+
settleSeconds?: number;
|
|
70
|
+
resources?: readonly string[];
|
|
71
|
+
}): Promise<UnrecordedReport>;
|
|
72
|
+
/** The report as lines for an issue or a log. */
|
|
73
|
+
export declare function renderUnrecorded(report: UnrecordedReport): string;
|
|
74
|
+
//# sourceMappingURL=unrecorded.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unrecorded.d.ts","sourceRoot":"","sources":["../../src/ci-aud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AAC,EAAE,IAAI,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GACtG,gBAAgB,CA6BlB;AAED,sFAAsF;AACtF,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,QAAQ,EACb,OAAO,EAAE,SAAS,WAAW,EAAE,EAC/B,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,IAAI,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GACtG,OAAO,CAAC,gBAAgB,CAAC,CAI3B;AAED,iDAAiD;AACjD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAKjE"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The unrecorded writer audit (#4632, moved from terragucci's
|
|
3
|
+
* report/unrecorded.ts and state-writers.ts): the audit log's writes
|
|
4
|
+
* compared against the ledger's apply records, and every write no
|
|
5
|
+
* recorded apply made reported with its writer.
|
|
6
|
+
*
|
|
7
|
+
* A write counts as recorded when it falls inside a recorded apply's run
|
|
8
|
+
* (its record's start to its end, a second early since a log keeps times to
|
|
9
|
+
* the second) and, when the apply names its principals, one of them made
|
|
10
|
+
* it. A write a controller made (an AWS service) is a write by design, which
|
|
11
|
+
* drift attribution covers, so it is reported apart and never as
|
|
12
|
+
* unrecorded. A write younger than the settle time is left for a later run,
|
|
13
|
+
* since a running apply has not ended its record yet.
|
|
14
|
+
*
|
|
15
|
+
* The apply records are the op run ledger's (`../lifecycle/run-ledger.ts`):
|
|
16
|
+
* every op wave job that applied or tried to, and any run a caller names.
|
|
17
|
+
* Only times and principals are read, never a state's contents.
|
|
18
|
+
*/
|
|
19
|
+
/** How long a write waits before it is judged. Default one hour. */
|
|
20
|
+
export const UNRECORDED_SETTLE_SECONDS = 3600;
|
|
21
|
+
/**
|
|
22
|
+
* The applies among run records: an op wave job that applied or failed a
|
|
23
|
+
* run, or any record `isApply` accepts. A record whose times do not parse
|
|
24
|
+
* is left out.
|
|
25
|
+
*/
|
|
26
|
+
export function applyWindowsFromRuns(records, isApply = defaultIsApply) {
|
|
27
|
+
return records
|
|
28
|
+
.filter((r) => isApply(r) && Number.isFinite(Date.parse(r.started)) && Number.isFinite(Date.parse(r.ended)))
|
|
29
|
+
.map((r) => {
|
|
30
|
+
const principal = r.labels?.Principal;
|
|
31
|
+
return { run: r.id, op: r.op, started: r.started, ended: r.ended, ...(principal ? { principals: [principal] } : {}) };
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function defaultIsApply(r) {
|
|
35
|
+
const w = r.wave;
|
|
36
|
+
if (w)
|
|
37
|
+
return w.applied.length + w.failed.length > 0 || (w.targets !== undefined && Object.keys(w.targets).length > 0);
|
|
38
|
+
return r.op.startsWith("pr-") || r.op.startsWith("green-");
|
|
39
|
+
}
|
|
40
|
+
const t = (iso) => Date.parse(iso);
|
|
41
|
+
/** Whether `who` is one of `principals`: the same string, or an assumed-role ARN whose session or role is it. */
|
|
42
|
+
function samePrincipal(who, principals) {
|
|
43
|
+
const low = who.toLowerCase();
|
|
44
|
+
return principals.some((p) => {
|
|
45
|
+
const q = p.toLowerCase();
|
|
46
|
+
return low === q || low.endsWith(`/${q}`) || low.includes(`:assumed-role/${q}/`);
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
/** Judge each write against the apply windows. Pure. */
|
|
50
|
+
export function judgeWrites(writes, windows, at) {
|
|
51
|
+
const now = (at.now ?? new Date()).getTime();
|
|
52
|
+
const settle = (at.settleSeconds ?? UNRECORDED_SETTLE_SECONDS) * 1000;
|
|
53
|
+
const keep = at.resources?.length ? new Set(at.resources) : undefined;
|
|
54
|
+
const report = { since: at.since, until: at.until, unrecorded: [], recorded: 0, controller: [], pending: 0 };
|
|
55
|
+
for (const w of [...writes].sort((a, b) => a.at.localeCompare(b.at))) {
|
|
56
|
+
if (keep && !w.resources.some((r) => keep.has(r) || [...keep].some((k) => r.endsWith(`/${k}`) || r.endsWith(`:${k}`))))
|
|
57
|
+
continue;
|
|
58
|
+
if (w.actor === "controller") {
|
|
59
|
+
report.controller.push(w);
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
const when = t(w.at);
|
|
63
|
+
if (!Number.isFinite(when) || now - when < settle) {
|
|
64
|
+
report.pending++;
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
const inside = windows.filter((x) => when >= t(x.started) - 1000 && when <= t(x.ended) + 1000);
|
|
68
|
+
const by = inside.filter((x) => !x.principals || samePrincipal(w.who, x.principals));
|
|
69
|
+
if (by.length > 0) {
|
|
70
|
+
report.recorded++;
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
const why = inside.length > 0
|
|
74
|
+
? `${inside.map((x) => x.run).join(", ")} ran then as ${[...new Set(inside.flatMap((x) => x.principals ?? []))].join(", ")}, not ${w.who}`
|
|
75
|
+
: "no recorded apply ran then";
|
|
76
|
+
report.unrecorded.push({ ...w, why });
|
|
77
|
+
}
|
|
78
|
+
return report;
|
|
79
|
+
}
|
|
80
|
+
/** Read the log's writes over the window and judge them. Never throws for the log. */
|
|
81
|
+
export async function unrecordedWrites(log, windows, at) {
|
|
82
|
+
const read = await log.writes({ since: at.since, until: at.until });
|
|
83
|
+
if (read.status === "unavailable")
|
|
84
|
+
return { since: at.since, until: at.until, unrecorded: [], recorded: 0, controller: [], pending: 0, unavailable: read.reason };
|
|
85
|
+
return judgeWrites(read.writes, windows, at);
|
|
86
|
+
}
|
|
87
|
+
/** The report as lines for an issue or a log. */
|
|
88
|
+
export function renderUnrecorded(report) {
|
|
89
|
+
if (report.unavailable)
|
|
90
|
+
return `The audit log could not be read, so no write was judged: ${report.unavailable}.`;
|
|
91
|
+
const lines = [`Between ${report.since} and ${report.until}: ${report.unrecorded.length} write${report.unrecorded.length === 1 ? "" : "s"} no recorded apply made, ${report.recorded} recorded, ${report.controller.length} by a controller, ${report.pending} too recent to judge.`];
|
|
92
|
+
for (const w of report.unrecorded)
|
|
93
|
+
lines.push(`- ${w.at} ${w.event} by ${w.who}${w.resources.length ? ` on ${w.resources.join(", ")}` : ""}: ${w.why}`);
|
|
94
|
+
return lines.join("\n");
|
|
95
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ci-audit.d.ts","sourceRoot":"","sources":["../src/ci-audit.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,cAAc,kBAAkB,CAAC"}
|
package/dist/ci-audit.js
ADDED
package/dist/ci-control.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci-control.d.ts","sourceRoot":"","sources":["../src/ci-control.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;
|
|
1
|
+
{"version":3,"file":"ci-control.d.ts","sourceRoot":"","sources":["../src/ci-control.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAGH,kEAAkE;AAClE,eAAO,MAAM,gBAAgB,aAAa,CAAC;AAE3C,oKAAoK;AACpK,eAAO,MAAM,qBAAqB,aAAa,CAAC;AAEhD,oJAAoJ;AACpJ,eAAO,MAAM,2BAA2B,aAAa,CAAC;AAEtD,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,uBAAuB,EACvB,KAAK,mBAAmB,EACxB,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,EACpB,kBAAkB,EAClB,YAAY,EACZ,cAAc,EACd,sBAAsB,EACtB,yBAAyB,EACzB,WAAW,EACX,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EACvB,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cAAc,EACd,iBAAiB,EACjB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,GAC5B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,cAAc,EACd,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,2BAA2B,EAC3B,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,GAC1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,eAAe,EACf,uBAAuB,EACvB,eAAe,EACf,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,cAAc,GACpB,MAAM,iBAAiB,CAAC"}
|
package/dist/ci-control.js
CHANGED
|
@@ -27,13 +27,12 @@
|
|
|
27
27
|
* `controlDispatchRequest`, `putControlEntry` and `reconcileProjects`
|
|
28
28
|
* present means the rest is too.
|
|
29
29
|
*/
|
|
30
|
-
import { NEXT_RELEASE } from "./release-floors.js";
|
|
31
30
|
/** The first chant with `@intentius/chant/ci-control` (#4568). */
|
|
32
|
-
export const CI_CONTROL_FLOOR =
|
|
31
|
+
export const CI_CONTROL_FLOOR = "0.124.55";
|
|
33
32
|
/** The first chant that records the applies a dispatch carries and marks cross-stack edges (#4617). `recordControlAppliedFromEnv` present means the rest is too. */
|
|
34
|
-
export const CONTROL_APPLIED_FLOOR =
|
|
33
|
+
export const CONTROL_APPLIED_FLOOR = "0.124.55";
|
|
35
34
|
/** The first chant whose note jobs read the control repo for the cross-stack edges (#4619). `controlNoteCheckout` present means the rest is too. */
|
|
36
|
-
export const CONTROL_NOTE_CHECKOUT_FLOOR =
|
|
35
|
+
export const CONTROL_NOTE_CHECKOUT_FLOOR = "0.124.55";
|
|
37
36
|
export { CONTROL_APPLY_OUTCOMES, CONTROL_OUTCOME_VAR, CONTROL_RUNS_DEPENDENTS, CONTROL_CHANT_COMMAND, CONTROL_DEPENDENTS_FLOOR, CONTROL_DISPATCH_JOB, CONTROL_MEMBER_VAR, CONTROL_NAME, CONTROL_OP_VAR, CONTROL_READ_TOKEN_ENV, CONTROL_READ_TOKEN_SECRET, CONTROL_REF, CONTROL_REF_DEFAULT, CONTROL_SECRET_NAME, CONTROL_SHA_VAR, CONTROL_TOKEN_ENV, CONTROL_TOKEN_SECRET, CONTROL_TOKEN_VARS, ControlConfigError, ControlDispatchError, controlDependentsScript, controlDispatchEvent, controlDispatchJob, controlDispatchRequest, controlDispatchScript, controlNoteCheckout, controlPipelineFileName, controlPipelinePath, controlPipelineSpec, controlSettingsProblems, controlStatusContext, dispatchControl, forgeApiBase, forgeFromHost, parseProjectKey, resolveControlTarget, } from "./control/dispatch.js";
|
|
38
37
|
export { CONTROL_ENTRY_KIND, CONTROL_ENTRY_KINDS, CONTROL_ID_PREFIX, CONTROL_LEDGER_DIR, CONTROL_LEDGER_FILE, ControlEntryConflict, ControlRecordsError, controlConfig, controlEntryDigest, controlEntryRecordProblems, currentControlEntries, estateClaims, gitControlLedger, importControlConfig, parseControlEntries, putControlEntry, readControlEntries, retireControlEntry, } from "./control/records.js";
|
|
39
38
|
export { cloneUrlOf, commandGit, describeReconcile, gitAuthEnv, reconcileBranch, reconcileProjects, reconcileTokenEnv, } from "./control/reconcile.js";
|
package/dist/ci-estate.d.ts
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@intentius/chant/ci-estate` (#4612): the estate page, overdue drift
|
|
3
|
+
* checks and delivery metrics, shared by the CI products built on chant
|
|
4
|
+
* (terragucci, plywood, sql-yodeler).
|
|
5
|
+
*
|
|
6
|
+
* Everything is read from the workspace ledger through the read contract's
|
|
7
|
+
* tables (`runs`, `gates`, `applies`, `pr_envs`; ./lifecycle/query.ts), so
|
|
8
|
+
* a Terraform member and a Pulumi member come out of the same code:
|
|
9
|
+
*
|
|
10
|
+
* - {@link ledgerOverdue}: each member whose scheduled drift check missed
|
|
11
|
+
* its window, by chant's two-fires rule, in the product's words.
|
|
12
|
+
* - {@link buildDelivery}: the four DORA metrics, written as `dora.json` in
|
|
13
|
+
* terragucci's shape, and {@link deliveryGauges} for OTLP
|
|
14
|
+
* ({@link sendOtlpGauges}, ./otlp-metrics.ts).
|
|
15
|
+
* - {@link buildEstate} and {@link renderEstateHtml}: `estate.json` and
|
|
16
|
+
* `estate.html`, a section per member, with room for a product's own
|
|
17
|
+
* sections.
|
|
18
|
+
* - {@link writeEstate}: all three files to the report store (`ci.reportUrl`,
|
|
19
|
+
* ./pr-report-url.ts, #4554), and the gauges when an endpoint is set.
|
|
20
|
+
*
|
|
21
|
+
* A product feature-detects this entry until the chant release that carries
|
|
22
|
+
* {@link CI_ESTATE_FLOOR} is its floor: `buildLedgerEstate` present means the
|
|
23
|
+
* rest is too. Before it, the product keeps its own estate code.
|
|
24
|
+
*/
|
|
1
25
|
import { type CiProductWords } from "./ci-product-words.js";
|
|
2
26
|
import type { QueryLoad } from "./lifecycle/query.js";
|
|
3
27
|
import type { ReportPut } from "./pr-report-url.js";
|
package/dist/ci-estate.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci-estate.d.ts","sourceRoot":"","sources":["../src/ci-estate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ci-estate.d.ts","sourceRoot":"","sources":["../src/ci-estate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAe,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,gBAA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AAmB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAM1L;AAED,MAAM,WAAW,kBAAkB;IACjC,0EAA0E;IAC1E,GAAG,EAAE,SAAS,CAAC;IACf,6DAA6D;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,SAAS,GAAG,MAAM,CAAC,CAAC;IACjD,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,6EAA6E;IAC7E,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,8CAA8C;IAC9C,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,4EAA4E;IAC5E,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAED,iHAAiH;AACjH,wBAAsB,WAAW,CAAC,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,QAAQ,GAAG,MAAM,CAAC,EAAE,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAYnI;AAED;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,SAAS,CAAC,CAInG"}
|
package/dist/ci-estate.js
CHANGED
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
* {@link CI_ESTATE_FLOOR} is its floor: `buildLedgerEstate` present means the
|
|
23
23
|
* rest is too. Before it, the product keeps its own estate code.
|
|
24
24
|
*/
|
|
25
|
-
import { NEXT_RELEASE } from "./release-floors.js";
|
|
26
25
|
import { CHANT_WORDS } from "./ci-product-words.js";
|
|
27
26
|
import { sendOtlpGauges } from "./otlp-metrics.js";
|
|
28
27
|
import { buildDelivery, deliveryGauges } from "./ci-estate/delivery.js";
|
|
@@ -30,7 +29,7 @@ import { ledgerOverdue } from "./ci-estate/overdue.js";
|
|
|
30
29
|
import { buildEstate, ESTATE_FILES, renderEstateHtml } from "./ci-estate/page.js";
|
|
31
30
|
import { estateRows } from "./ci-estate/rows.js";
|
|
32
31
|
/** The first chant with `@intentius/chant/ci-estate` (#4612). */
|
|
33
|
-
export const CI_ESTATE_FLOOR =
|
|
32
|
+
export const CI_ESTATE_FLOOR = "0.124.55";
|
|
34
33
|
export { estateRows } from "./ci-estate/rows.js";
|
|
35
34
|
export { appliesOf, buildDelivery, deliveryGauges, doraMetricNames, doraSchema, driftIncidents, duration, median, spanLabel, weekStart, DORA_FILE, DORA_MIN_SPAN_SECONDS, DORA_WEEKS, DRIFT_WINDOW_SECONDS, } from "./ci-estate/delivery.js";
|
|
36
35
|
export { ledgerOverdue } from "./ci-estate/overdue.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci-identity.d.ts","sourceRoot":"","sources":["../src/ci-identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;
|
|
1
|
+
{"version":3,"file":"ci-identity.d.ts","sourceRoot":"","sources":["../src/ci-identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AAIH,qDAAqD;AACrD,eAAO,MAAM,MAAM,YAAI,KAAK,EAAE,KAAK,EAAE,OAAO,CAAU,CAAC;AACvD,MAAM,MAAM,KAAK,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5C;;;;GAIG;AACH,eAAO,MAAM,eAAe,4CAAiC,CAAC;AAC9D,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7D,wHAAwH;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IAAI,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAwC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAgBtM;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,EAAE,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEzJ;AAED,0EAA0E;AAC1E,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAwC,GAAG,gBAAgB,CAShI"}
|
package/dist/ci-identity.js
CHANGED
|
@@ -58,7 +58,6 @@
|
|
|
58
58
|
* No long-lived Pulumi token sits in the forge's secrets.
|
|
59
59
|
*/
|
|
60
60
|
import { readFileSync } from "node:fs";
|
|
61
|
-
import { NEXT_RELEASE } from "./release-floors.js";
|
|
62
61
|
/** The cloud providers `ci.identity.cloud` names. */
|
|
63
62
|
export const CLOUDS = ["aws", "gcp", "azure"];
|
|
64
63
|
/**
|
|
@@ -68,13 +67,13 @@ export const CLOUDS = ["aws", "gcp", "azure"];
|
|
|
68
67
|
*/
|
|
69
68
|
export const IDENTITY_CLOUDS = [...CLOUDS, "pulumi"];
|
|
70
69
|
/** The first chant that reads `ci.identity.cloud.pulumi` (#4549): a declaration that sets it needs this `minReader`. */
|
|
71
|
-
export const PULUMI_CLOUD_IDENTITY_FLOOR =
|
|
70
|
+
export const PULUMI_CLOUD_IDENTITY_FLOOR = "0.124.55";
|
|
72
71
|
/**
|
|
73
72
|
* The first chant that reads `ci.identity.cloud.azure.database` (#4572): the
|
|
74
73
|
* trade also asks Entra for a token Azure Database for PostgreSQL accepts.
|
|
75
74
|
* A declaration that sets it needs this `minReader`.
|
|
76
75
|
*/
|
|
77
|
-
export const AZURE_DATABASE_TOKEN_FLOOR =
|
|
76
|
+
export const AZURE_DATABASE_TOKEN_FLOOR = "0.124.55";
|
|
78
77
|
/** The Entra scope of Azure Database for PostgreSQL's sign-in tokens (#4572). */
|
|
79
78
|
export const AZURE_DATABASE_SCOPE = "https://ossrdbms-aad.database.windows.net/.default";
|
|
80
79
|
/** The variable the trade sets to the database token with `azure.database` (#4572); the sql lexicon's `entra` token source reads it. */
|