@intentius/chant 0.124.62 → 0.124.64
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/cli/handlers/approve.d.ts +26 -0
- package/dist/cli/handlers/approve.d.ts.map +1 -1
- package/dist/cli/handlers/approve.js +167 -18
- package/dist/cli/handlers/plan.d.ts +10 -0
- package/dist/cli/handlers/plan.d.ts.map +1 -0
- package/dist/cli/handlers/plan.js +71 -0
- package/dist/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/handlers/pr.js +2 -1
- package/dist/cli/handlers/release.d.ts +11 -7
- package/dist/cli/handlers/release.d.ts.map +1 -1
- package/dist/cli/handlers/release.js +93 -20
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +48 -7
- package/dist/cli/mcp/workspace-tools.d.ts.map +1 -1
- package/dist/cli/mcp/workspace-tools.js +2 -1
- package/dist/cli/parse-args.d.ts.map +1 -1
- package/dist/cli/parse-args.js +43 -0
- package/dist/cli/registry.d.ts +18 -2
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/config.d.ts +50 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +1 -0
- package/dist/gate-decision.d.ts +1 -1
- package/dist/gate-decision.d.ts.map +1 -1
- package/dist/gate-decision.js +4 -2
- package/dist/gate-statement.schema.json +46 -0
- package/dist/lifecycle/__fixtures__/publish-fakes.d.ts +20 -0
- package/dist/lifecycle/__fixtures__/publish-fakes.d.ts.map +1 -1
- package/dist/lifecycle/__fixtures__/publish-fakes.js +119 -3
- package/dist/lifecycle/gate-ledger.d.ts +28 -5
- package/dist/lifecycle/gate-ledger.d.ts.map +1 -1
- package/dist/lifecycle/gate-ledger.js +6 -0
- package/dist/lifecycle/gate-seal.d.ts +59 -7
- package/dist/lifecycle/gate-seal.d.ts.map +1 -1
- package/dist/lifecycle/gate-seal.js +68 -15
- package/dist/lifecycle/gate-statement.d.ts +95 -0
- package/dist/lifecycle/gate-statement.d.ts.map +1 -0
- package/dist/lifecycle/gate-statement.js +110 -0
- package/dist/lifecycle/gate-webauthn.d.ts +79 -0
- package/dist/lifecycle/gate-webauthn.d.ts.map +1 -0
- package/dist/lifecycle/gate-webauthn.js +105 -0
- package/dist/lifecycle/git.d.ts +1 -1
- package/dist/lifecycle/git.d.ts.map +1 -1
- package/dist/lifecycle/git.js +24 -19
- package/dist/lifecycle/ledger-remote.d.ts +37 -0
- package/dist/lifecycle/ledger-remote.d.ts.map +1 -0
- package/dist/lifecycle/ledger-remote.js +42 -0
- package/dist/lifecycle/plan-stale.d.ts +76 -0
- package/dist/lifecycle/plan-stale.d.ts.map +1 -0
- package/dist/lifecycle/plan-stale.js +120 -0
- package/dist/lifecycle/publish-credentials.d.ts +1 -1
- package/dist/lifecycle/publish-credentials.d.ts.map +1 -1
- package/dist/lifecycle/publish-credentials.js +2 -0
- package/dist/lifecycle/publish-declaration.d.ts +107 -0
- package/dist/lifecycle/publish-declaration.d.ts.map +1 -1
- package/dist/lifecycle/publish-declaration.js +110 -1
- package/dist/lifecycle/publish-forge.d.ts +5 -1
- package/dist/lifecycle/publish-forge.d.ts.map +1 -1
- package/dist/lifecycle/publish-forge.js +13 -4
- package/dist/lifecycle/publish-git-ssh.d.ts +82 -0
- package/dist/lifecycle/publish-git-ssh.d.ts.map +1 -0
- package/dist/lifecycle/publish-git-ssh.js +180 -0
- package/dist/lifecycle/publish-github.d.ts +69 -0
- package/dist/lifecycle/publish-github.d.ts.map +1 -0
- package/dist/lifecycle/publish-github.js +153 -0
- package/dist/lifecycle/publish-homebrew.d.ts +77 -0
- package/dist/lifecycle/publish-homebrew.d.ts.map +1 -0
- package/dist/lifecycle/publish-homebrew.js +265 -0
- package/dist/lifecycle/publish-marketplace.d.ts +85 -0
- package/dist/lifecycle/publish-marketplace.d.ts.map +1 -0
- package/dist/lifecycle/publish-marketplace.js +398 -0
- package/dist/lifecycle/publish-targets.d.ts +6 -0
- package/dist/lifecycle/publish-targets.d.ts.map +1 -1
- package/dist/lifecycle/publish-targets.js +15 -0
- package/dist/lifecycle/publish-tauri.d.ts +61 -0
- package/dist/lifecycle/publish-tauri.d.ts.map +1 -0
- package/dist/lifecycle/publish-tauri.js +181 -0
- package/dist/lifecycle/release-cut.d.ts +51 -5
- package/dist/lifecycle/release-cut.d.ts.map +1 -1
- package/dist/lifecycle/release-cut.js +165 -16
- package/dist/lifecycle/release-publish.d.ts +18 -2
- package/dist/lifecycle/release-publish.d.ts.map +1 -1
- package/dist/lifecycle/release-publish.js +5 -0
- package/dist/lifecycle/release-revocation.d.ts +4 -3
- package/dist/lifecycle/release-revocation.d.ts.map +1 -1
- package/dist/lifecycle/release-revocation.js +5 -4
- package/dist/lifecycle/release-store.d.ts +32 -0
- package/dist/lifecycle/release-store.d.ts.map +1 -1
- package/dist/lifecycle/release-store.js +11 -0
- package/dist/lifecycle/snapshot-store.d.ts.map +1 -1
- package/dist/lifecycle/snapshot-store.js +17 -9
- package/dist/lifecycle/test-passkey.d.ts +25 -0
- package/dist/lifecycle/test-passkey.d.ts.map +1 -0
- package/dist/lifecycle/test-passkey.js +39 -0
- package/dist/notify.d.ts +23 -3
- package/dist/notify.d.ts.map +1 -1
- package/dist/notify.js +8 -2
- package/dist/notify.schema.json +12 -3
- package/dist/op/gate.d.ts +1 -1
- package/dist/op/gate.d.ts.map +1 -1
- package/dist/op/gate.js +2 -1
- package/dist/pr-forge.d.ts +20 -0
- package/dist/pr-forge.d.ts.map +1 -1
- package/dist/pr-forge.js +87 -8
- package/dist/release-floors.d.ts +1 -1
- package/dist/release-floors.js +1 -1
- package/dist/wave-runtime.mjs +333 -331
- package/dist/workspace/ci-builds.d.ts +21 -0
- package/dist/workspace/ci-builds.d.ts.map +1 -1
- package/dist/workspace/ci-builds.js +14 -0
- package/dist/workspace/ci-green.d.ts +45 -2
- package/dist/workspace/ci-green.d.ts.map +1 -1
- package/dist/workspace/ci-green.js +123 -5
- package/dist/workspace/ci-quarantine-report.d.ts +80 -0
- package/dist/workspace/ci-quarantine-report.d.ts.map +1 -0
- package/dist/workspace/ci-quarantine-report.js +204 -0
- package/dist/workspace/ci-quarantine.d.ts +73 -0
- package/dist/workspace/ci-quarantine.d.ts.map +1 -0
- package/dist/workspace/ci-quarantine.js +170 -0
- package/dist/workspace/ci-serve.d.ts.map +1 -1
- package/dist/workspace/ci-serve.js +7 -4
- package/dist/workspace/class-data.d.ts +3 -1
- package/dist/workspace/class-data.d.ts.map +1 -1
- package/dist/workspace/class-data.js +4 -1
- package/dist/workspace/declaration.d.ts +45 -2
- package/dist/workspace/declaration.d.ts.map +1 -1
- package/dist/workspace/declaration.js +45 -2
- package/dist/workspace/declaration.schema.json +51 -3
- package/dist/workspace/forge-work.d.ts +76 -0
- package/dist/workspace/forge-work.d.ts.map +1 -0
- package/dist/workspace/forge-work.js +160 -0
- package/dist/workspace/identity-gate-rule.d.ts +3 -2
- package/dist/workspace/identity-gate-rule.d.ts.map +1 -1
- package/dist/workspace/identity-gate-rule.js +5 -7
- package/dist/workspace/identity.d.ts +3 -2
- package/dist/workspace/identity.d.ts.map +1 -1
- package/dist/workspace/identity.js +6 -3
- package/dist/workspace/intent-cli.d.ts +3 -2
- package/dist/workspace/intent-cli.d.ts.map +1 -1
- package/dist/workspace/intent-cli.js +26 -5
- package/dist/workspace/intent-record.d.ts +3 -0
- package/dist/workspace/intent-record.d.ts.map +1 -1
- package/dist/workspace/intent-record.schema.json +32 -0
- package/dist/workspace/intent.d.ts +9 -0
- package/dist/workspace/intent.d.ts.map +1 -1
- package/dist/workspace/intent.js +2 -0
- package/dist/workspace/intent.schema.json +32 -0
- package/dist/workspace/kind-readers.d.ts.map +1 -1
- package/dist/workspace/kind-readers.js +2 -1
- package/dist/workspace/kinds.d.ts +6 -1
- package/dist/workspace/kinds.d.ts.map +1 -1
- package/dist/workspace/kinds.js +8 -3
- package/dist/workspace/plan-stale.schema.json +286 -0
- package/dist/workspace/release-candidates.d.ts +42 -7
- package/dist/workspace/release-candidates.d.ts.map +1 -1
- package/dist/workspace/release-candidates.js +64 -23
- package/dist/workspace/release-candidates.schema.json +55 -2
- package/dist/workspace/releases.schema.json +47 -0
- package/dist/workspace/trust/policy.d.ts +10 -0
- package/dist/workspace/trust/policy.d.ts.map +1 -1
- package/dist/workspace/trust/policy.js +19 -1
- package/dist/workspace/trust/run-commits.d.ts.map +1 -1
- package/dist/workspace/trust/run-commits.js +2 -1
- package/dist/workspace/trust/seal.d.ts.map +1 -1
- package/dist/workspace/trust/seal.js +34 -3
- package/dist/workspace/trust/trust-files.d.ts.map +1 -1
- package/dist/workspace/trust/trust-files.js +6 -1
- package/package.json +2 -1
- package/src/cli/handlers/approve-external-signature.test.ts +328 -0
- package/src/cli/handlers/approve.ts +206 -18
- package/src/cli/handlers/plan.ts +74 -0
- package/src/cli/handlers/pr.ts +2 -1
- package/src/cli/handlers/release.ts +84 -20
- package/src/cli/main.ts +48 -7
- package/src/cli/mcp/workspace-tools.ts +2 -1
- package/src/cli/parse-args.ts +33 -0
- package/src/cli/registry.ts +18 -2
- package/src/config.ts +8 -0
- package/src/gate-decision-bundle.test.ts +4 -2
- package/src/gate-decision.ts +11 -2
- package/src/gate-statement.schema.json +46 -0
- package/src/lifecycle/__fixtures__/publish-fakes.ts +125 -5
- package/src/lifecycle/gate-ledger.ts +34 -5
- package/src/lifecycle/gate-seal.ts +86 -15
- package/src/lifecycle/gate-statement.ts +144 -0
- package/src/lifecycle/gate-webauthn.test.ts +77 -0
- package/src/lifecycle/gate-webauthn.ts +133 -0
- package/src/lifecycle/git.ts +23 -19
- package/src/lifecycle/ledger-remote.test.ts +183 -0
- package/src/lifecycle/ledger-remote.ts +46 -0
- package/src/lifecycle/plan-stale.test.ts +149 -0
- package/src/lifecycle/plan-stale.ts +172 -0
- package/src/lifecycle/publish-credentials.ts +2 -0
- package/src/lifecycle/publish-declaration.ts +116 -1
- package/src/lifecycle/publish-forge.ts +14 -4
- package/src/lifecycle/publish-git-ssh.ts +202 -0
- package/src/lifecycle/publish-github.ts +174 -0
- package/src/lifecycle/publish-homebrew.test.ts +358 -0
- package/src/lifecycle/publish-homebrew.ts +283 -0
- package/src/lifecycle/publish-marketplace.test.ts +406 -0
- package/src/lifecycle/publish-marketplace.ts +421 -0
- package/src/lifecycle/publish-resume.test.ts +40 -0
- package/src/lifecycle/publish-target-context.test.ts +2 -2
- package/src/lifecycle/publish-targets.test.ts +23 -0
- package/src/lifecycle/publish-targets.ts +15 -0
- package/src/lifecycle/publish-tauri.test.ts +163 -0
- package/src/lifecycle/publish-tauri.ts +198 -0
- package/src/lifecycle/release-cut-lane.test.ts +177 -0
- package/src/lifecycle/release-cut-override.test.ts +213 -0
- package/src/lifecycle/release-cut.ts +198 -17
- package/src/lifecycle/release-publish.ts +23 -3
- package/src/lifecycle/release-revocation.ts +5 -4
- package/src/lifecycle/release-store.ts +44 -0
- package/src/lifecycle/snapshot-store.ts +16 -9
- package/src/lifecycle/test-passkey.ts +55 -0
- package/src/notify-bundle.test.ts +3 -1
- package/src/notify.schema.json +12 -3
- package/src/notify.ts +20 -3
- package/src/op/gate.ts +2 -1
- package/src/override-gate-bundle.test.ts +2 -0
- package/src/pr-forge-bundle.test.ts +2 -2
- package/src/pr-forge.test.ts +38 -0
- package/src/pr-forge.ts +93 -11
- package/src/pr-requires.test.ts +9 -0
- package/src/release-floors.ts +1 -1
- package/src/stage-hooks-bundle.test.ts +2 -0
- package/src/wave-runtime-bundle.test.ts +3 -2
- package/src/workspace/ci-builds.ts +27 -0
- package/src/workspace/ci-green-stale.test.ts +193 -0
- package/src/workspace/ci-green.ts +137 -6
- package/src/workspace/ci-quarantine-report.test.ts +145 -0
- package/src/workspace/ci-quarantine-report.ts +234 -0
- package/src/workspace/ci-quarantine.test.ts +160 -0
- package/src/workspace/ci-quarantine.ts +188 -0
- package/src/workspace/ci-serve.ts +7 -4
- package/src/workspace/class-data.ts +5 -1
- package/src/workspace/declaration.schema.json +51 -3
- package/src/workspace/declaration.test.ts +1 -0
- package/src/workspace/declaration.ts +88 -5
- package/src/workspace/forge-work.test.ts +143 -0
- package/src/workspace/forge-work.ts +195 -0
- package/src/workspace/identity-gate-rule.ts +6 -8
- package/src/workspace/identity.ts +6 -3
- package/src/workspace/intent-cli.ts +24 -5
- package/src/workspace/intent-record.schema.json +32 -0
- package/src/workspace/intent-record.ts +3 -0
- package/src/workspace/intent.schema.json +32 -0
- package/src/workspace/intent.ts +9 -0
- package/src/workspace/kind-readers.ts +2 -1
- package/src/workspace/kinds.test.ts +13 -0
- package/src/workspace/kinds.ts +12 -3
- package/src/workspace/plan-stale.schema.json +286 -0
- package/src/workspace/release-candidates.schema.json +55 -2
- package/src/workspace/release-candidates.test.ts +77 -4
- package/src/workspace/release-candidates.ts +80 -23
- package/src/workspace/releases.schema.json +47 -0
- package/src/workspace/trust/gate-seal.test.ts +44 -0
- package/src/workspace/trust/policy.ts +24 -1
- package/src/workspace/trust/run-commits.ts +2 -1
- package/src/workspace/trust/seal.ts +35 -3
- package/src/workspace/trust/trust-files.test.ts +5 -0
- package/src/workspace/trust/trust-files.ts +15 -1
|
@@ -2,6 +2,7 @@ import type { GateResolutionRecord, PendingGateRecord } from "../../lifecycle/ga
|
|
|
2
2
|
import { type GateOrigin } from "../../lifecycle/gate-origin.js";
|
|
3
3
|
import { type GatePolicyEvaluator, type ResolvedGateApproval } from "../../op/gate-approval.js";
|
|
4
4
|
import { type GateQuorumJudge } from "../../op/gate-quorum.js";
|
|
5
|
+
import { type GateStatement } from "../../lifecycle/gate-statement.js";
|
|
5
6
|
import type { CommandContext } from "../registry.js";
|
|
6
7
|
export declare function runApprove(ctx: CommandContext): Promise<number>;
|
|
7
8
|
/** What a caller supplies alongside the op and gate names. */
|
|
@@ -61,6 +62,23 @@ export interface GateApprovalOptions {
|
|
|
61
62
|
* the declaration's `identity.gates` names counts only sealed approvals.
|
|
62
63
|
*/
|
|
63
64
|
sign?: string | true;
|
|
65
|
+
/**
|
|
66
|
+
* `--signature <file>` (#4646): a signature made outside chant over the
|
|
67
|
+
* approval's statement (`--statement`), an armored ssh signature or a
|
|
68
|
+
* WebAuthn assertion in JSON; `-` reads it from stdin. Checked against the
|
|
69
|
+
* keys and passkeys listed at base for the approver, and kept as the seal.
|
|
70
|
+
*/
|
|
71
|
+
signature?: string;
|
|
72
|
+
/** `--at <timestamp>` (#4646): the statement's time, which `--statement` fixes and `--signature` records. */
|
|
73
|
+
at?: string;
|
|
74
|
+
/**
|
|
75
|
+
* `--binding <text>` (#4697): a line the relay sets for the approver's
|
|
76
|
+
* signature to cover as well, such as a platform's deploy id and an
|
|
77
|
+
* expiry. Signed last (seal version 3) and recorded as `binding`. It goes
|
|
78
|
+
* with `--statement`, `--signature` or `--sign`, and must be the same on
|
|
79
|
+
* `--statement` and `--signature`.
|
|
80
|
+
*/
|
|
81
|
+
binding?: string;
|
|
64
82
|
/** Where the workspace and the key file are looked up from. Defaults to the process's directory. */
|
|
65
83
|
cwd?: string;
|
|
66
84
|
/** Replaces the lexicon evaluator a gate policy is loaded from. For tests. */
|
|
@@ -89,6 +107,14 @@ export type GateApprovalOutcome = {
|
|
|
89
107
|
* approval mean "the next run" instead of "this plan".
|
|
90
108
|
*/
|
|
91
109
|
export declare function recordGateApproval(opName: string, gate: string, opts: GateApprovalOptions): Promise<GateApprovalOutcome>;
|
|
110
|
+
/**
|
|
111
|
+
* The statement an approval of this gate would sign (#4646), for a signature
|
|
112
|
+
* made outside chant: what `chant approve <op> <gate> --statement` prints.
|
|
113
|
+
* It runs every check {@link recordGateApproval} runs before signing, with
|
|
114
|
+
* the same options, and writes nothing. Null when a check refuses, which it
|
|
115
|
+
* prints.
|
|
116
|
+
*/
|
|
117
|
+
export declare function gateApprovalStatement(opName: string, gate: string, opts: GateApprovalOptions): Promise<GateStatement | null>;
|
|
92
118
|
/**
|
|
93
119
|
* What a just-recorded approval did to a gate with an `approval` block
|
|
94
120
|
* (#2508): the policy's decision and whether it binds, then the quorum count
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approve.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/approve.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAC3F,OAAO,EACuE,KAAK,UAAU,EAC5F,MAAM,6BAA6B,CAAC;AAOrC,OAAO,EAEuC,KAAK,mBAAmB,EAAE,KAAK,oBAAoB,EAChG,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAiE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAO3H,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAkDlD,wBAAsB,UAAU,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"approve.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/approve.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAC3F,OAAO,EACuE,KAAK,UAAU,EAC5F,MAAM,6BAA6B,CAAC;AAOrC,OAAO,EAEuC,KAAK,mBAAmB,EAAE,KAAK,oBAAoB,EAChG,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAiE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAO3H,OAAO,EAA4D,KAAK,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAM9H,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAkDlD,wBAAsB,UAAU,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAoKrE;AAED,8DAA8D;AAC9D,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,sEAAsE;IACtE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kC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QAAQ,EAAE,oBAAoB,EAC9B,MAAM,EAAE,oBAAoB,EAC5B,KAAK,EAAE,oBAAoB,EAAE,EAC7B,QAAQ,EAAE,iBAAiB,GAAG,SAAS,EACvC,OAAO,GAAE,SAAS,iBAAiB,EAA+B,EAClE,KAAK,GAAE,eAAgC,GACtC,MAAM,EAAE,CAuCV"}
|
|
@@ -17,6 +17,10 @@ import { PR_GATE_OP } from "../../pr-loop.js";
|
|
|
17
17
|
import { pushLifecycleReport, requireLifecycleLedger } from "../../lifecycle/git.js";
|
|
18
18
|
import { LIFECYCLE_LOCAL_NOTE, isLifecycleLocalNote } from "../../lifecycle/local-note.js";
|
|
19
19
|
import { ledgerRecordingOff, NO_RECORD_ENV } from "../../lifecycle/no-record.js";
|
|
20
|
+
import { checkGateSignature, gateSealPayload, gateSealVersion, WEBAUTHN_SEAL_KIND } from "../../lifecycle/gate-seal.js";
|
|
21
|
+
import { gateBindingProblem, gateStatement, readExternalSignature } from "../../lifecycle/gate-statement.js";
|
|
22
|
+
import { readFileSync } from "node:fs";
|
|
23
|
+
import { resolve as resolvePath } from "node:path";
|
|
20
24
|
import { formatError, formatWarning, formatSuccess, formatInfo } from "../format.js";
|
|
21
25
|
// ── chant approve <op> <gate> ───────────────────────────────────────────────
|
|
22
26
|
/**
|
|
@@ -137,12 +141,41 @@ export async function runApprove(ctx) {
|
|
|
137
141
|
// has applied since #2126 (`../handlers/run.ts`'s `runOpApprove`). Reading
|
|
138
142
|
// only `--actor` here meant every README that teaches `--approver you`
|
|
139
143
|
// recorded the shell user instead (#2192).
|
|
144
|
+
// #4646: the statement for a signature made elsewhere, on stdout, with nothing recorded.
|
|
145
|
+
if (ctx.args.statement) {
|
|
146
|
+
if (ctx.args.sign !== undefined || ctx.args.signature !== undefined) {
|
|
147
|
+
console.error(formatError({ message: "--statement prints what to sign and records nothing, so it takes neither --sign nor --signature" }));
|
|
148
|
+
return 1;
|
|
149
|
+
}
|
|
150
|
+
const shared = {
|
|
151
|
+
actor: ctx.args.approver ?? ctx.args.actor,
|
|
152
|
+
...(ctx.args.plan !== undefined ? { plan: ctx.args.plan } : {}),
|
|
153
|
+
...(ctx.args.env !== undefined ? { environment: ctx.args.env } : {}),
|
|
154
|
+
...(ctx.args.relayedBy !== undefined ? { relayedBy: ctx.args.relayedBy } : {}),
|
|
155
|
+
...(ctx.args.at !== undefined ? { at: ctx.args.at } : {}),
|
|
156
|
+
...(ctx.args.binding !== undefined ? { binding: ctx.args.binding } : {}),
|
|
157
|
+
allowSameOrigin: ctx.args.allowSameOrigin,
|
|
158
|
+
};
|
|
159
|
+
const statement = await gateApprovalStatement(opName, gate, shared);
|
|
160
|
+
if (!statement)
|
|
161
|
+
return 1;
|
|
162
|
+
console.log(JSON.stringify(statement, null, 2));
|
|
163
|
+
console.error(formatInfo(`Have ${statement.resolvedBy} sign these bytes (an ssh key in the ${statement.namespace} namespace, or a passkey with challenge ${statement.challenge}), ` +
|
|
164
|
+
`then record it: chant approve ${opName} ${gate} --actor ${statement.resolvedBy}` +
|
|
165
|
+
(statement.relayedBy !== null ? ` --relayed-by ${statement.relayedBy}` : "") +
|
|
166
|
+
(statement.planDigest !== null ? ` --plan ${statement.planDigest}` : "") +
|
|
167
|
+
(statement.environment !== null ? ` --env ${statement.environment}` : "") +
|
|
168
|
+
(statement.binding !== null ? ` --binding ${shellQuote(statement.binding)}` : "") +
|
|
169
|
+
` --at ${statement.timestamp} --signature <file>`));
|
|
170
|
+
return 0;
|
|
171
|
+
}
|
|
140
172
|
// #4575: a person at a terminal sees the plan and types the target's name
|
|
141
173
|
// first, and the approval binds the digest they were shown. --yes, --json,
|
|
142
174
|
// CI and no terminal record as before.
|
|
143
175
|
let plan = ctx.args.plan;
|
|
144
176
|
const confirm = await import("./approve-confirm.js");
|
|
145
|
-
|
|
177
|
+
// #4646: an approval signed elsewhere was confirmed where it was signed.
|
|
178
|
+
if (ctx.args.signature === undefined && (await confirm.interactiveApproval(ctx.args))) {
|
|
146
179
|
const answered = await confirm.confirmApproval(opName, gate, {
|
|
147
180
|
...(plan !== undefined ? { plan } : {}),
|
|
148
181
|
...(ctx.args.env !== undefined ? { environment: ctx.args.env } : {}),
|
|
@@ -162,6 +195,9 @@ export async function runApprove(ctx) {
|
|
|
162
195
|
...(ctx.args.roles ? { roles: ctx.args.roles } : {}),
|
|
163
196
|
...(ctx.args.agent ? { agent: true } : {}),
|
|
164
197
|
...(ctx.args.sign !== undefined ? { sign: ctx.args.sign } : {}),
|
|
198
|
+
...(ctx.args.signature !== undefined ? { signature: ctx.args.signature } : {}),
|
|
199
|
+
...(ctx.args.at !== undefined ? { at: ctx.args.at } : {}),
|
|
200
|
+
...(ctx.args.binding !== undefined ? { binding: ctx.args.binding } : {}),
|
|
165
201
|
...(ctx.args.relayedBy !== undefined ? { relayedBy: ctx.args.relayedBy } : {}),
|
|
166
202
|
});
|
|
167
203
|
if (!outcome.ok)
|
|
@@ -240,8 +276,23 @@ async function refuseRevokedRelease(opName, gate, releaseDigest, cwd) {
|
|
|
240
276
|
* approval mean "the next run" instead of "this plan".
|
|
241
277
|
*/
|
|
242
278
|
export async function recordGateApproval(opName, gate, opts) {
|
|
279
|
+
const r = await approveGate(opName, gate, opts, false);
|
|
280
|
+
return "statement" in r ? { ok: false } : r;
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* The statement an approval of this gate would sign (#4646), for a signature
|
|
284
|
+
* made outside chant: what `chant approve <op> <gate> --statement` prints.
|
|
285
|
+
* It runs every check {@link recordGateApproval} runs before signing, with
|
|
286
|
+
* the same options, and writes nothing. Null when a check refuses, which it
|
|
287
|
+
* prints.
|
|
288
|
+
*/
|
|
289
|
+
export async function gateApprovalStatement(opName, gate, opts) {
|
|
290
|
+
const r = await approveGate(opName, gate, opts, true);
|
|
291
|
+
return "statement" in r ? r.statement : null;
|
|
292
|
+
}
|
|
293
|
+
async function approveGate(opName, gate, opts, statementOnly) {
|
|
243
294
|
// #3955: with recording off the approval would be dropped with the process.
|
|
244
|
-
if (ledgerRecordingOff()) {
|
|
295
|
+
if (!statementOnly && ledgerRecordingOff()) {
|
|
245
296
|
console.error(formatError({
|
|
246
297
|
message: `Cannot record the approval of "${gate}": ${NO_RECORD_ENV} is set, so nothing is written to chant/lifecycle`,
|
|
247
298
|
hint: `Unset ${NO_RECORD_ENV} to approve the gate.`,
|
|
@@ -446,35 +497,83 @@ export async function recordGateApproval(opName, gate, opts) {
|
|
|
446
497
|
}));
|
|
447
498
|
return { ok: false };
|
|
448
499
|
}
|
|
500
|
+
// #4646: --statement prints the bytes a signature made elsewhere signs, at
|
|
501
|
+
// a time it fixes; --signature records that signature with the same time.
|
|
502
|
+
const refuse = (message, hint) => {
|
|
503
|
+
console.error(formatError({ message: `Gate "${gate}" on "${opName}" was not approved: ${message}`, ...(hint ? { hint } : {}) }));
|
|
504
|
+
return { ok: false };
|
|
505
|
+
};
|
|
506
|
+
if (opts.signature !== undefined && opts.sign !== undefined) {
|
|
507
|
+
return refuse("--sign signs here and --signature brings a signature made elsewhere; pass one of them");
|
|
508
|
+
}
|
|
509
|
+
if (opts.at !== undefined && !statementOnly && opts.signature === undefined) {
|
|
510
|
+
return refuse("--at sets the time of a statement signed elsewhere, so it goes with --statement or --signature");
|
|
511
|
+
}
|
|
512
|
+
if (opts.signature !== undefined && opts.at === undefined) {
|
|
513
|
+
return refuse("--signature needs --at <timestamp>, the statement's time, since the signature covers it", `Pass the timestamp \`chant approve ${opName} ${gate} --statement\` printed.`);
|
|
514
|
+
}
|
|
515
|
+
if (opts.binding !== undefined) {
|
|
516
|
+
if (!statementOnly && opts.signature === undefined && opts.sign === undefined) {
|
|
517
|
+
return refuse("--binding is a line the approver's signature covers, so it goes with --statement, --signature or --sign");
|
|
518
|
+
}
|
|
519
|
+
const problem = gateBindingProblem(opts.binding);
|
|
520
|
+
if (problem !== null)
|
|
521
|
+
return refuse(`--binding takes one line of printable text, and ${problem}`);
|
|
522
|
+
}
|
|
523
|
+
let timestamp = new Date().toISOString();
|
|
524
|
+
if (opts.at !== undefined) {
|
|
525
|
+
const at = Date.parse(opts.at);
|
|
526
|
+
if (!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(opts.at) || Number.isNaN(at) || new Date(at).toISOString() !== opts.at) {
|
|
527
|
+
return refuse(`--at takes a UTC time as chant writes one, such as ${timestamp}, not ${JSON.stringify(opts.at)}`);
|
|
528
|
+
}
|
|
529
|
+
if (at > Date.now() + AT_SKEW_MS)
|
|
530
|
+
return refuse(`--at ${opts.at} is in the future`);
|
|
531
|
+
if (standing && opts.at < standing.timestamp) {
|
|
532
|
+
return refuse(`--at ${opts.at} is before the pending fact it answers (${standing.timestamp}), and a run counts only approvals newer than that`, `Take a fresh statement: chant approve ${opName} ${gate} --statement.`);
|
|
533
|
+
}
|
|
534
|
+
timestamp = opts.at;
|
|
535
|
+
}
|
|
536
|
+
const sealed = {
|
|
537
|
+
op: opName,
|
|
538
|
+
gate,
|
|
539
|
+
...(environment !== undefined ? { environment } : {}),
|
|
540
|
+
...(planDigest !== undefined ? { planDigest } : {}),
|
|
541
|
+
resolvedBy,
|
|
542
|
+
...(relayedBy ? { relayedBy } : {}),
|
|
543
|
+
timestamp,
|
|
544
|
+
...(checkpointDigest !== undefined ? { checkpointDigest } : {}),
|
|
545
|
+
...(opts.binding !== undefined ? { binding: opts.binding } : {}),
|
|
546
|
+
};
|
|
547
|
+
if (statementOnly) {
|
|
548
|
+
const { CHANT_VERSION } = await import("../../chant-version.js");
|
|
549
|
+
return { statement: gateStatement(sealed, CHANT_VERSION) };
|
|
550
|
+
}
|
|
449
551
|
const rule = identity.gateAdmissionFrom(scope, gate);
|
|
450
|
-
if (rule && opts.sign === undefined) {
|
|
552
|
+
if (rule && opts.sign === undefined && opts.signature === undefined) {
|
|
451
553
|
console.error(formatError({
|
|
452
554
|
message: `Gate "${gate}" needs a signed approval: chant.workspace.json at base names it in identity.gates` +
|
|
453
555
|
(rule.requirement.class !== null ? `, from the class ${rule.requirement.class}` : "") +
|
|
454
556
|
`, and this approval is not signed`,
|
|
455
|
-
hint: `chant approve ${opName} ${gate} --actor <principal> --sign [<key file>], with a key ${scope.policy.signersPath} at base lists for that principal
|
|
557
|
+
hint: `chant approve ${opName} ${gate} --actor <principal> --sign [<key file>], with a key ${scope.policy.signersPath} at base lists for that principal, ` +
|
|
558
|
+
`or --signature <file> --at <timestamp> with a signature made elsewhere over the statement --statement prints.`,
|
|
456
559
|
}));
|
|
457
560
|
return { ok: false };
|
|
458
561
|
}
|
|
459
|
-
const timestamp = new Date().toISOString();
|
|
460
562
|
let seal;
|
|
563
|
+
if (opts.signature !== undefined) {
|
|
564
|
+
const made = externalSeal(opts.signature, sealed, scope.policy, cwd);
|
|
565
|
+
if ("refused" in made)
|
|
566
|
+
return refuse(made.refused);
|
|
567
|
+
seal = made.seal;
|
|
568
|
+
}
|
|
461
569
|
if (opts.sign !== undefined) {
|
|
462
570
|
const { resolveSigningKey, sealGateApproval, gateSealVersion, SealError } = await import("../../workspace/trust/seal.js");
|
|
463
571
|
try {
|
|
464
572
|
const key = resolveSigningKey(opts.sign, cwd);
|
|
465
573
|
try {
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
...(environment !== undefined ? { environment } : {}),
|
|
470
|
-
...(planDigest !== undefined ? { planDigest } : {}),
|
|
471
|
-
resolvedBy,
|
|
472
|
-
...(relayedBy ? { relayedBy } : {}),
|
|
473
|
-
timestamp,
|
|
474
|
-
...(checkpointDigest !== undefined ? { checkpointDigest } : {}),
|
|
475
|
-
};
|
|
476
|
-
// #3947: a seal over a checkpoint digest is seal version 2.
|
|
477
|
-
seal = { ...sealGateApproval(key.file, sealed), ...(gateSealVersion(sealed) === 2 ? { version: 2 } : {}) };
|
|
574
|
+
// #3947, #4697: a seal over a checkpoint digest is seal version 2, and one over a binding 3.
|
|
575
|
+
const version = gateSealVersion(sealed);
|
|
576
|
+
seal = { ...sealGateApproval(key.file, sealed), ...(version !== 1 ? { version } : {}) };
|
|
478
577
|
}
|
|
479
578
|
finally {
|
|
480
579
|
key.cleanup();
|
|
@@ -497,6 +596,7 @@ export async function recordGateApproval(opName, gate, opts) {
|
|
|
497
596
|
...(relayedBy ? { relayedBy } : {}),
|
|
498
597
|
timestamp,
|
|
499
598
|
...(checkpointDigest !== undefined ? { checkpointDigest } : {}),
|
|
599
|
+
...(opts.binding !== undefined ? { binding: opts.binding } : {}),
|
|
500
600
|
seal,
|
|
501
601
|
});
|
|
502
602
|
if (why !== null) {
|
|
@@ -526,6 +626,7 @@ export async function recordGateApproval(opName, gate, opts) {
|
|
|
526
626
|
...(relayedBy ? { relayedBy } : {}),
|
|
527
627
|
timestamp,
|
|
528
628
|
...(checkpointDigest !== undefined ? { checkpointDigest } : {}),
|
|
629
|
+
...(opts.binding !== undefined ? { binding: opts.binding } : {}),
|
|
529
630
|
...(seal ? { seal } : {}),
|
|
530
631
|
}).roles;
|
|
531
632
|
let policyDecision;
|
|
@@ -572,6 +673,7 @@ export async function recordGateApproval(opName, gate, opts) {
|
|
|
572
673
|
...(url ? { url } : {}),
|
|
573
674
|
...(planDigest !== undefined ? { planDigest } : {}),
|
|
574
675
|
...(checkpointDigest !== undefined ? { checkpointDigest } : {}),
|
|
676
|
+
...(opts.binding !== undefined ? { binding: opts.binding } : {}),
|
|
575
677
|
...(environment !== undefined ? { environment } : {}),
|
|
576
678
|
...(releaseDigest !== undefined ? { releaseDigest } : {}),
|
|
577
679
|
...(changeSet !== undefined ? { changeSet } : {}),
|
|
@@ -587,8 +689,10 @@ export async function recordGateApproval(opName, gate, opts) {
|
|
|
587
689
|
(record.relayedBy ? `, relayed by ${record.relayedBy},` : "") +
|
|
588
690
|
` at ${record.timestamp}` +
|
|
589
691
|
(record.url ? ` (${record.url})` : "") +
|
|
590
|
-
(record.seal ? `, signed with ${record.seal.key}` : "") +
|
|
692
|
+
(record.seal ? `, signed with ${record.seal.kind === WEBAUTHN_SEAL_KIND ? "passkey " : ""}${record.seal.key}` : "") +
|
|
591
693
|
push.suffix));
|
|
694
|
+
if (record.binding !== undefined)
|
|
695
|
+
console.error(formatInfo(`The signature also binds ${JSON.stringify(record.binding)} (--binding).`));
|
|
592
696
|
if (record.planDigest) {
|
|
593
697
|
console.error(formatInfo(`This approves the plan ${record.planDigest}` +
|
|
594
698
|
(record.environment !== undefined ? ` in environment "${record.environment}"` : "") +
|
|
@@ -611,6 +715,51 @@ export async function recordGateApproval(opName, gate, opts) {
|
|
|
611
715
|
}
|
|
612
716
|
return { ok: true, record, pushed: push.pushed };
|
|
613
717
|
}
|
|
718
|
+
/** How far in the future `--at` may be (#4646), for a clock that runs a little ahead of this one. */
|
|
719
|
+
const AT_SKEW_MS = 5 * 60 * 1000;
|
|
720
|
+
/**
|
|
721
|
+
* The seal for a signature made outside chant (#4646): the file `--signature`
|
|
722
|
+
* names (`-` for stdin), read as an armored ssh signature or a WebAuthn
|
|
723
|
+
* assertion, and checked over `sealed`'s statement against the keys and
|
|
724
|
+
* passkeys listed at base for the approver. A signature nothing at base
|
|
725
|
+
* vouches for is refused rather than recorded.
|
|
726
|
+
*/
|
|
727
|
+
function externalSeal(from, sealed, policy, cwd) {
|
|
728
|
+
let text;
|
|
729
|
+
try {
|
|
730
|
+
text = from === "-" ? readFileSync(0, "utf-8") : readFileSync(resolvePath(cwd, from), "utf-8");
|
|
731
|
+
}
|
|
732
|
+
catch (err) {
|
|
733
|
+
return { refused: `--signature ${from} can't be read: ${err instanceof Error ? err.message : String(err)}` };
|
|
734
|
+
}
|
|
735
|
+
const sig = readExternalSignature(text);
|
|
736
|
+
if ("problem" in sig)
|
|
737
|
+
return { refused: `--signature ${from}: ${sig.problem}` };
|
|
738
|
+
const candidate = sig.kind === "ssh"
|
|
739
|
+
? { signer: sealed.resolvedBy, key: "", signature: sig.signature }
|
|
740
|
+
: {
|
|
741
|
+
kind: WEBAUTHN_SEAL_KIND,
|
|
742
|
+
signer: sealed.resolvedBy,
|
|
743
|
+
key: sig.assertion.id,
|
|
744
|
+
signature: sig.assertion.signature,
|
|
745
|
+
clientDataJSON: sig.assertion.clientDataJSON,
|
|
746
|
+
authenticatorData: sig.assertion.authenticatorData,
|
|
747
|
+
};
|
|
748
|
+
const r = checkGateSignature(policy, sealed.resolvedBy, candidate, gateSealPayload(sealed));
|
|
749
|
+
if (!r.ok) {
|
|
750
|
+
return {
|
|
751
|
+
refused: r.unlisted
|
|
752
|
+
? `${sealed.resolvedBy} has no ${sig.kind === "ssh" ? `key in ${policy.signersPath}` : "passkey in .chant/trust.json"} at base, so a signature made elsewhere can't be checked`
|
|
753
|
+
: `the ${sig.kind === "ssh" ? "ssh signature" : "passkey's assertion"} does not verify for ${sealed.resolvedBy} over this approval's statement: ${r.reason}`,
|
|
754
|
+
};
|
|
755
|
+
}
|
|
756
|
+
const version = gateSealVersion(sealed);
|
|
757
|
+
return { seal: { ...candidate, key: r.key, ...(version !== 1 ? { version } : {}) } };
|
|
758
|
+
}
|
|
759
|
+
/** `text` quoted for a POSIX shell, for a command line a hint prints. */
|
|
760
|
+
function shellQuote(text) {
|
|
761
|
+
return /^[\w@%+=:,./-]+$/.test(text) ? text : `'${text.replace(/'/g, `'\\''`)}'`;
|
|
762
|
+
}
|
|
614
763
|
/**
|
|
615
764
|
* What a just-recorded approval did to a gate with an `approval` block
|
|
616
765
|
* (#2508): the policy's decision and whether it binds, then the quorum count
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CommandContext } from "../registry.js";
|
|
2
|
+
import type { PlanStaleDocument } from "../../lifecycle/plan-stale.js";
|
|
3
|
+
/** The `plan-stale` document for `digest`, read from the ledgers at `cwd`: every member's, or the ones `members` names. */
|
|
4
|
+
export declare function planStaleDocument(req: {
|
|
5
|
+
cwd: string;
|
|
6
|
+
digest: string;
|
|
7
|
+
members?: readonly string[];
|
|
8
|
+
}): Promise<PlanStaleDocument>;
|
|
9
|
+
export declare function runPlanStale(ctx: CommandContext): Promise<number>;
|
|
10
|
+
//# sourceMappingURL=plan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/plan.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAKpE,2HAA2H;AAC3H,wBAAsB,iBAAiB,CAAC,GAAG,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAkBrI;AAED,wBAAsB,YAAY,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAiCvE"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `chant plan stale <digest> [--member <name>] [--json]` (#4648): whether
|
|
3
|
+
* anything applied to a plan's targets after the plan was recorded, and
|
|
4
|
+
* which applies. The rule is `../../lifecycle/plan-stale.ts`; the ledgers
|
|
5
|
+
* are read as `chant ledger` reads them (`./query.ts` {@link queryLedgers}),
|
|
6
|
+
* from the local `chant/lifecycle` branch. It never fetches and never writes,
|
|
7
|
+
* so a platform can call it before it asks a person to approve. Exit 0 when
|
|
8
|
+
* the plan is current, 2 when it is stale, 1 when no pending gate fact
|
|
9
|
+
* records the digest or the ledger can't be read.
|
|
10
|
+
*/
|
|
11
|
+
import { execFileSync } from "node:child_process";
|
|
12
|
+
import { resolve } from "node:path";
|
|
13
|
+
import { formatError } from "../format.js";
|
|
14
|
+
import { queryLedgers } from "./query.js";
|
|
15
|
+
const USAGE = "chant plan stale <digest> [--member <name>] [--json]";
|
|
16
|
+
/** The `plan-stale` document for `digest`, read from the ledgers at `cwd`: every member's, or the ones `members` names. */
|
|
17
|
+
export async function planStaleDocument(req) {
|
|
18
|
+
const { planStaleness, planStaleHead } = await import("../../lifecycle/plan-stale.js");
|
|
19
|
+
const { readerVersion } = await import("../../workspace/declaration.js");
|
|
20
|
+
const head = planStaleHead(readerVersion());
|
|
21
|
+
try {
|
|
22
|
+
execFileSync("git", ["rev-parse", "--git-dir"], { cwd: req.cwd, stdio: "ignore" });
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
return { ...head, error: { code: "not-a-git-repository", message: "plans are read from the chant/lifecycle branch, and this directory is not in a git repository" } };
|
|
26
|
+
}
|
|
27
|
+
const { loadQueryData } = await import("../../lifecycle/query.js");
|
|
28
|
+
try {
|
|
29
|
+
// No snapshot is read: an empty snapshot port stands in, so the snapshot files on the branch are skipped too.
|
|
30
|
+
const none = { read: async () => null, list: async () => [], trees: async () => [] };
|
|
31
|
+
const ledgers = (await queryLedgers(req.cwd, req.members)).map((l) => ({ ...l, snapshots: none }));
|
|
32
|
+
return planStaleness((await loadQueryData(ledgers)).data, req.digest, readerVersion());
|
|
33
|
+
}
|
|
34
|
+
catch (err) {
|
|
35
|
+
return { ...head, error: { code: "ledger-unreadable", message: `reading the ledger failed: ${err instanceof Error ? err.message : String(err)}` } };
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
export async function runPlanStale(ctx) {
|
|
39
|
+
const { args } = ctx;
|
|
40
|
+
const digest = args.extraPositional;
|
|
41
|
+
if (!digest || digest.startsWith("-")) {
|
|
42
|
+
console.error(formatError({ message: "plan stale needs the plan digest a gate's pending fact records", hint: USAGE }));
|
|
43
|
+
return 1;
|
|
44
|
+
}
|
|
45
|
+
const doc = await planStaleDocument({ cwd: resolve("."), digest, members: args.members });
|
|
46
|
+
if (args.json) {
|
|
47
|
+
console.log(JSON.stringify(doc, null, 2));
|
|
48
|
+
return "error" in doc || doc.plan === null ? 1 : doc.stale ? 2 : 0;
|
|
49
|
+
}
|
|
50
|
+
if ("error" in doc) {
|
|
51
|
+
console.error(formatError({ message: `${doc.error.code}: ${doc.error.message}`, hint: USAGE }));
|
|
52
|
+
return 1;
|
|
53
|
+
}
|
|
54
|
+
if (doc.plan === null) {
|
|
55
|
+
console.error(formatError({ message: `no pending gate fact records the plan ${digest}`, hint: "Fetch chant/lifecycle first if the run that made the plan ran elsewhere: git fetch origin chant/lifecycle:chant/lifecycle" }));
|
|
56
|
+
return 1;
|
|
57
|
+
}
|
|
58
|
+
const where = doc.plan.targets.map((t) => `${t.member ? `${t.member}/` : ""}${t.op} at ${t.gate}${t.environment ? ` in ${t.environment}` : ""}`).join(", ");
|
|
59
|
+
console.log(`Plan ${digest}, recorded ${doc.plan.recordedAt} for ${where}.`);
|
|
60
|
+
if (!doc.stale) {
|
|
61
|
+
console.log("Nothing has applied to its targets since.");
|
|
62
|
+
return 0;
|
|
63
|
+
}
|
|
64
|
+
console.log(`Stale: ${doc.applies.length} ${doc.applies.length === 1 ? "apply" : "applies"} since.`);
|
|
65
|
+
for (const a of doc.applies) {
|
|
66
|
+
const what = a.source === "deploys" ? `deploy of ${a.component} to ${a.environment}` : `apply under ${a.op}/${a.gate} of ${a.planDigest}`;
|
|
67
|
+
const who = [a.actor ? `by ${a.actor}` : null, a.approvedBy ? `approved by ${a.approvedBy}` : null, a.runId ? `run ${a.runId}` : null].filter(Boolean).join(", ");
|
|
68
|
+
console.log(` ${a.at} ${what}${who ? ` (${who})` : ""}${a.result ? `: ${a.result}` : ""}`);
|
|
69
|
+
}
|
|
70
|
+
return 2;
|
|
71
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pr.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/pr.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AAOH,OAAO,EAA+C,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAI7F,OAAO,EACL,UAAU,EAUV,KAAK,SAAS,EACf,MAAM,yBAAyB,CAAC;AASjC,OAAO,EAA0C,KAAK,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AAI,CAAC,SAAS,EAAE,OAAO,CAAC,EAAE,KAAK,SAAe,GAAG,OAAO,CAAC;IAAE,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAsClM;AAED,uGAAuG;AACvG,wBAAgB,cAAc,CAAC,CAAC,EAAE,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAErH;AAkOD,mKAAmK;AACnK,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAGxE;AAqJD,8NAA8N;AAC9N,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAgBzE;AAgfD,uKAAuK;AACvK,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAG1E;AA09BD;;;;;;;;GAQG;AACH,wBAAsB,qBAAqB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAMhF;AAED;;;;;;;GAOG;AACH,wBAAsB,sBAAsB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAMjF;AA4LD;;;;;;;;;;GAUG;AACH,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAsC9E"}
|
package/dist/cli/handlers/pr.js
CHANGED
|
@@ -1442,8 +1442,9 @@ async function beforeMergeChecks(ctx) {
|
|
|
1442
1442
|
return early({ requires: [] }, "before-merge-off", `The declaration at base sets ci.workflow to ${workflow ?? "nothing"}${member ? ` for ${member}` : ""}, and only apply-before-merge applies a pull request before it merges (ws-106). Nothing was applied.`, 1);
|
|
1443
1443
|
}
|
|
1444
1444
|
// The apply's own statuses never hold it back: chant ci run's, and the report's.
|
|
1445
|
+
// Nor does the plan's: a policy denial fails it, and the denial is only recorded when the apply judges it (plywood#66).
|
|
1445
1446
|
// #4550: under a product's words its own prefix too.
|
|
1446
|
-
const ignore = [...new Set([productContext(activeProductWords(), gate), productContext(activeProductWords(), PR_APPLY_GATE), `chant/${gate}`, `chant/${PR_APPLY_GATE}`, prStatusContext("apply", member)])];
|
|
1447
|
+
const ignore = [...new Set([productContext(activeProductWords(), gate), productContext(activeProductWords(), PR_APPLY_GATE), `chant/${gate}`, `chant/${PR_APPLY_GATE}`, prStatusContext("apply", member), prStatusContext("plan"), `${prStatusContext("plan")}/`])];
|
|
1447
1448
|
// ws-106 gives the declaration no way to leave a check out, so with no --requires all four are asked (#4336, #4607).
|
|
1448
1449
|
const requires = await checkPrRequires(forge, args.pr, head, { ignore, ...(only ? { only: only.checks } : {}) });
|
|
1449
1450
|
for (const r of requires)
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `chant release` (#4026, ws-104): the release is what graduates.
|
|
3
3
|
*
|
|
4
|
-
* release cut [<label>] [--at <sha>] [--yes] [--build <command>] [--param k=v]... [--params-file <file>] [--src <dir>] [-o <file>] [--lexicon <name>] [--actor <name>] [--sign [<key file>]] [--json]
|
|
4
|
+
* release cut [<label>] [--at <sha>] [--yes] [--build <command>] [--param k=v]... [--params-file <file>] [--src <dir>] [-o <file>] [--lexicon <name>] [--actor <name>] [--sign [<key file>]] [--lane <name>] [--json]
|
|
5
5
|
* a dry run of a cut of this member from the checkout's HEAD, which must be
|
|
6
|
-
* clean, on trunk and pushed, and green (#4027)
|
|
6
|
+
* clean, on trunk and pushed, and green (#4027), or green in a lane with
|
|
7
|
+
* `--lane` or `release.lane` (#4692); `--yes` cuts, records,
|
|
7
8
|
* and tags the commit `release/<label>` locally;
|
|
8
|
-
* --sign signs the cut with the actor's ssh key (#4031); `--
|
|
9
|
+
* --sign signs the cut with the actor's ssh key (#4031); `--override-green`
|
|
10
|
+
* cuts a commit that is not green under a person's override (#4693); `--src`, `-o` and
|
|
9
11
|
* `--lexicon` shape the build of a project with no components (#4046)
|
|
10
12
|
* release publish <label|digest> [--yes] [--allow-unsigned] [--require-provenance] [--json]
|
|
11
13
|
* publish a cut release (#4027) to the targets release.publish declares
|
|
@@ -17,7 +19,7 @@
|
|
|
17
19
|
* release verify <label|digest> [--json]
|
|
18
20
|
* check the release's signature offline against .chant/allowed_signers
|
|
19
21
|
* at the release's commit (#4049)
|
|
20
|
-
* release candidates [--env <env>] [--json]
|
|
22
|
+
* release candidates [--env <env>] [--lane <name>] [--forge-issues] [--json]
|
|
21
23
|
* the green commits of trunk a release can be cut from, each with what it
|
|
22
24
|
* would ship, and what each environment runs (#4168 4.2)
|
|
23
25
|
* release compose <name> [--base <label|sha>] (--pr <n> | --work <id>)... [--yes] [--json]
|
|
@@ -90,9 +92,11 @@ export declare function runReleasePublish(ctx: CommandContext): Promise<number>;
|
|
|
90
92
|
*/
|
|
91
93
|
export declare function runReleaseVerify(ctx: CommandContext): Promise<number>;
|
|
92
94
|
/**
|
|
93
|
-
* `release candidates [--env <env>] [--json]` (#4168 4.2):
|
|
94
|
-
* of trunk a release can be cut from, newest first, each
|
|
95
|
-
* ship since the previous one, and what each environment
|
|
95
|
+
* `release candidates [--env <env>] [--forge-issues] [--json]` (#4168 4.2):
|
|
96
|
+
* the green commits of trunk a release can be cut from, newest first, each
|
|
97
|
+
* with what it would ship since the previous one, and what each environment
|
|
98
|
+
* runs. `--forge-issues` (#4649) asks the forge which issues each pull
|
|
99
|
+
* request closes and groups the changes no work id names by them. `--json`
|
|
96
100
|
* prints the read contract's `release-candidates` document.
|
|
97
101
|
*/
|
|
98
102
|
export declare function runReleaseCandidates(ctx: CommandContext): Promise<number>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/release.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/release.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAOH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAyBlD,0HAA0H;AAC1H,wBAAgB,YAAY,CAAC,GAAG,EAAE;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,uFAAuF;IACvF,YAAY,EAAE,OAAO,CAAC;CACvB,GAAG,MAAM,EAAE,CASX;AAED,wGAAwG;AACxG,wBAAgB,WAAW,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAG3D;AAkCD;;;;;;;;;;;;GAYG;AACH,wBAAsB,aAAa,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAmRxE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA6G5E;AAQD;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAkC3E;AAED;;;;;;;GAOG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAkD/E;AAED,wBAAsB,cAAc,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAmCzE;AAED;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAyC3E;AAED,gHAAgH;AAChH,wBAA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