@intentius/chant 0.124.63 → 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.
Files changed (123) hide show
  1. package/dist/cli/handlers/approve.d.ts +8 -0
  2. package/dist/cli/handlers/approve.d.ts.map +1 -1
  3. package/dist/cli/handlers/approve.js +27 -4
  4. package/dist/cli/handlers/pr.d.ts.map +1 -1
  5. package/dist/cli/handlers/pr.js +2 -1
  6. package/dist/cli/handlers/release.d.ts +6 -4
  7. package/dist/cli/handlers/release.d.ts.map +1 -1
  8. package/dist/cli/handlers/release.js +83 -16
  9. package/dist/cli/main.d.ts.map +1 -1
  10. package/dist/cli/main.js +18 -6
  11. package/dist/cli/parse-args.d.ts.map +1 -1
  12. package/dist/cli/parse-args.js +12 -0
  13. package/dist/cli/registry.d.ts +5 -1
  14. package/dist/cli/registry.d.ts.map +1 -1
  15. package/dist/config.d.ts +18 -0
  16. package/dist/config.d.ts.map +1 -1
  17. package/dist/config.js +1 -0
  18. package/dist/gate-statement.schema.json +4 -2
  19. package/dist/lifecycle/gate-ledger.d.ts +11 -2
  20. package/dist/lifecycle/gate-ledger.d.ts.map +1 -1
  21. package/dist/lifecycle/gate-ledger.js +6 -0
  22. package/dist/lifecycle/gate-seal.d.ts +20 -4
  23. package/dist/lifecycle/gate-seal.d.ts.map +1 -1
  24. package/dist/lifecycle/gate-seal.js +18 -5
  25. package/dist/lifecycle/gate-statement.d.ts +27 -2
  26. package/dist/lifecycle/gate-statement.d.ts.map +1 -1
  27. package/dist/lifecycle/gate-statement.js +37 -1
  28. package/dist/lifecycle/plan-stale.d.ts.map +1 -1
  29. package/dist/lifecycle/plan-stale.js +1 -2
  30. package/dist/lifecycle/publish-declaration.d.ts +20 -0
  31. package/dist/lifecycle/publish-declaration.d.ts.map +1 -1
  32. package/dist/lifecycle/publish-declaration.js +24 -1
  33. package/dist/lifecycle/publish-forge.d.ts.map +1 -1
  34. package/dist/lifecycle/publish-forge.js +1 -2
  35. package/dist/lifecycle/publish-git-ssh.d.ts +82 -0
  36. package/dist/lifecycle/publish-git-ssh.d.ts.map +1 -0
  37. package/dist/lifecycle/publish-git-ssh.js +180 -0
  38. package/dist/lifecycle/publish-homebrew.d.ts +11 -0
  39. package/dist/lifecycle/publish-homebrew.d.ts.map +1 -1
  40. package/dist/lifecycle/publish-homebrew.js +96 -4
  41. package/dist/lifecycle/publish-marketplace.d.ts +36 -2
  42. package/dist/lifecycle/publish-marketplace.d.ts.map +1 -1
  43. package/dist/lifecycle/publish-marketplace.js +173 -29
  44. package/dist/lifecycle/publish-tauri.d.ts.map +1 -1
  45. package/dist/lifecycle/publish-tauri.js +1 -2
  46. package/dist/lifecycle/release-cut.d.ts +51 -5
  47. package/dist/lifecycle/release-cut.d.ts.map +1 -1
  48. package/dist/lifecycle/release-cut.js +165 -16
  49. package/dist/lifecycle/release-publish.d.ts +13 -0
  50. package/dist/lifecycle/release-publish.d.ts.map +1 -1
  51. package/dist/lifecycle/release-publish.js +5 -0
  52. package/dist/lifecycle/release-revocation.d.ts +4 -3
  53. package/dist/lifecycle/release-revocation.d.ts.map +1 -1
  54. package/dist/lifecycle/release-revocation.js +5 -4
  55. package/dist/lifecycle/release-store.d.ts +32 -0
  56. package/dist/lifecycle/release-store.d.ts.map +1 -1
  57. package/dist/lifecycle/release-store.js +11 -0
  58. package/dist/op/activities/activity-contracts.d.ts +4 -4
  59. package/dist/op/gate.d.ts +1 -1
  60. package/dist/op/gate.d.ts.map +1 -1
  61. package/dist/op/gate.js +2 -1
  62. package/dist/pr-forge.d.ts.map +1 -1
  63. package/dist/pr-forge.js +26 -6
  64. package/dist/release-floors.d.ts +1 -1
  65. package/dist/release-floors.js +1 -1
  66. package/dist/wave-runtime.mjs +284 -283
  67. package/dist/workspace/ci-green.d.ts.map +1 -1
  68. package/dist/workspace/ci-green.js +1 -2
  69. package/dist/workspace/ci-quarantine-report.d.ts.map +1 -1
  70. package/dist/workspace/ci-quarantine-report.js +1 -2
  71. package/dist/workspace/ci-quarantine.d.ts.map +1 -1
  72. package/dist/workspace/ci-quarantine.js +1 -2
  73. package/dist/workspace/intent.d.ts.map +1 -1
  74. package/dist/workspace/intent.js +1 -2
  75. package/dist/workspace/release-candidates.d.ts +9 -1
  76. package/dist/workspace/release-candidates.d.ts.map +1 -1
  77. package/dist/workspace/release-candidates.js +16 -4
  78. package/dist/workspace/release-candidates.schema.json +7 -0
  79. package/dist/workspace/releases.schema.json +47 -0
  80. package/package.json +1 -1
  81. package/src/cli/handlers/approve-external-signature.test.ts +105 -3
  82. package/src/cli/handlers/approve.ts +34 -4
  83. package/src/cli/handlers/pr.ts +2 -1
  84. package/src/cli/handlers/release.ts +75 -16
  85. package/src/cli/main.ts +18 -6
  86. package/src/cli/parse-args.ts +9 -0
  87. package/src/cli/registry.ts +5 -1
  88. package/src/config.ts +8 -0
  89. package/src/gate-statement.schema.json +4 -2
  90. package/src/lifecycle/gate-ledger.ts +17 -2
  91. package/src/lifecycle/gate-seal.ts +24 -6
  92. package/src/lifecycle/gate-statement.ts +40 -3
  93. package/src/lifecycle/plan-stale.test.ts +3 -4
  94. package/src/lifecycle/plan-stale.ts +1 -2
  95. package/src/lifecycle/publish-declaration.ts +24 -1
  96. package/src/lifecycle/publish-forge.ts +1 -2
  97. package/src/lifecycle/publish-git-ssh.ts +202 -0
  98. package/src/lifecycle/publish-homebrew.test.ts +181 -2
  99. package/src/lifecycle/publish-homebrew.ts +101 -5
  100. package/src/lifecycle/publish-marketplace.test.ts +158 -6
  101. package/src/lifecycle/publish-marketplace.ts +192 -30
  102. package/src/lifecycle/publish-resume.test.ts +40 -0
  103. package/src/lifecycle/publish-tauri.ts +1 -2
  104. package/src/lifecycle/release-cut-lane.test.ts +177 -0
  105. package/src/lifecycle/release-cut-override.test.ts +213 -0
  106. package/src/lifecycle/release-cut.ts +198 -17
  107. package/src/lifecycle/release-publish.ts +18 -0
  108. package/src/lifecycle/release-revocation.ts +5 -4
  109. package/src/lifecycle/release-store.ts +44 -0
  110. package/src/op/gate.ts +2 -1
  111. package/src/pr-forge.ts +25 -6
  112. package/src/pr-requires.test.ts +9 -0
  113. package/src/release-floors.ts +1 -1
  114. package/src/workspace/ci-green.ts +1 -2
  115. package/src/workspace/ci-quarantine-report.test.ts +2 -3
  116. package/src/workspace/ci-quarantine-report.ts +1 -2
  117. package/src/workspace/ci-quarantine.test.ts +2 -3
  118. package/src/workspace/ci-quarantine.ts +1 -2
  119. package/src/workspace/intent.ts +1 -2
  120. package/src/workspace/release-candidates.schema.json +7 -0
  121. package/src/workspace/release-candidates.ts +19 -4
  122. package/src/workspace/releases.schema.json +47 -0
  123. package/src/workspace/trust/gate-seal.test.ts +44 -0
@@ -71,6 +71,14 @@ export interface GateApprovalOptions {
71
71
  signature?: string;
72
72
  /** `--at <timestamp>` (#4646): the statement's time, which `--statement` fixes and `--signature` records. */
73
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;
74
82
  /** Where the workspace and the key file are looked up from. Defaults to the process's directory. */
75
83
  cwd?: string;
76
84
  /** Replaces the lexicon evaluator a gate policy is loaded from. For tests. */
@@ -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,OA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AC,aAAa,GAAG,IAAI,CAAC,CAGlI;AAogBD;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,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"}
@@ -18,7 +18,7 @@ import { pushLifecycleReport, requireLifecycleLedger } from "../../lifecycle/git
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
20
  import { checkGateSignature, gateSealPayload, gateSealVersion, WEBAUTHN_SEAL_KIND } from "../../lifecycle/gate-seal.js";
21
- import { gateStatement, readExternalSignature } from "../../lifecycle/gate-statement.js";
21
+ import { gateBindingProblem, gateStatement, readExternalSignature } from "../../lifecycle/gate-statement.js";
22
22
  import { readFileSync } from "node:fs";
23
23
  import { resolve as resolvePath } from "node:path";
24
24
  import { formatError, formatWarning, formatSuccess, formatInfo } from "../format.js";
@@ -153,6 +153,7 @@ export async function runApprove(ctx) {
153
153
  ...(ctx.args.env !== undefined ? { environment: ctx.args.env } : {}),
154
154
  ...(ctx.args.relayedBy !== undefined ? { relayedBy: ctx.args.relayedBy } : {}),
155
155
  ...(ctx.args.at !== undefined ? { at: ctx.args.at } : {}),
156
+ ...(ctx.args.binding !== undefined ? { binding: ctx.args.binding } : {}),
156
157
  allowSameOrigin: ctx.args.allowSameOrigin,
157
158
  };
158
159
  const statement = await gateApprovalStatement(opName, gate, shared);
@@ -164,6 +165,7 @@ export async function runApprove(ctx) {
164
165
  (statement.relayedBy !== null ? ` --relayed-by ${statement.relayedBy}` : "") +
165
166
  (statement.planDigest !== null ? ` --plan ${statement.planDigest}` : "") +
166
167
  (statement.environment !== null ? ` --env ${statement.environment}` : "") +
168
+ (statement.binding !== null ? ` --binding ${shellQuote(statement.binding)}` : "") +
167
169
  ` --at ${statement.timestamp} --signature <file>`));
168
170
  return 0;
169
171
  }
@@ -195,6 +197,7 @@ export async function runApprove(ctx) {
195
197
  ...(ctx.args.sign !== undefined ? { sign: ctx.args.sign } : {}),
196
198
  ...(ctx.args.signature !== undefined ? { signature: ctx.args.signature } : {}),
197
199
  ...(ctx.args.at !== undefined ? { at: ctx.args.at } : {}),
200
+ ...(ctx.args.binding !== undefined ? { binding: ctx.args.binding } : {}),
198
201
  ...(ctx.args.relayedBy !== undefined ? { relayedBy: ctx.args.relayedBy } : {}),
199
202
  });
200
203
  if (!outcome.ok)
@@ -509,6 +512,14 @@ async function approveGate(opName, gate, opts, statementOnly) {
509
512
  if (opts.signature !== undefined && opts.at === undefined) {
510
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.`);
511
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
+ }
512
523
  let timestamp = new Date().toISOString();
513
524
  if (opts.at !== undefined) {
514
525
  const at = Date.parse(opts.at);
@@ -531,6 +542,7 @@ async function approveGate(opName, gate, opts, statementOnly) {
531
542
  ...(relayedBy ? { relayedBy } : {}),
532
543
  timestamp,
533
544
  ...(checkpointDigest !== undefined ? { checkpointDigest } : {}),
545
+ ...(opts.binding !== undefined ? { binding: opts.binding } : {}),
534
546
  };
535
547
  if (statementOnly) {
536
548
  const { CHANT_VERSION } = await import("../../chant-version.js");
@@ -559,8 +571,9 @@ async function approveGate(opName, gate, opts, statementOnly) {
559
571
  try {
560
572
  const key = resolveSigningKey(opts.sign, cwd);
561
573
  try {
562
- // #3947: a seal over a checkpoint digest is seal version 2.
563
- 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 } : {}) };
564
577
  }
565
578
  finally {
566
579
  key.cleanup();
@@ -583,6 +596,7 @@ async function approveGate(opName, gate, opts, statementOnly) {
583
596
  ...(relayedBy ? { relayedBy } : {}),
584
597
  timestamp,
585
598
  ...(checkpointDigest !== undefined ? { checkpointDigest } : {}),
599
+ ...(opts.binding !== undefined ? { binding: opts.binding } : {}),
586
600
  seal,
587
601
  });
588
602
  if (why !== null) {
@@ -612,6 +626,7 @@ async function approveGate(opName, gate, opts, statementOnly) {
612
626
  ...(relayedBy ? { relayedBy } : {}),
613
627
  timestamp,
614
628
  ...(checkpointDigest !== undefined ? { checkpointDigest } : {}),
629
+ ...(opts.binding !== undefined ? { binding: opts.binding } : {}),
615
630
  ...(seal ? { seal } : {}),
616
631
  }).roles;
617
632
  let policyDecision;
@@ -658,6 +673,7 @@ async function approveGate(opName, gate, opts, statementOnly) {
658
673
  ...(url ? { url } : {}),
659
674
  ...(planDigest !== undefined ? { planDigest } : {}),
660
675
  ...(checkpointDigest !== undefined ? { checkpointDigest } : {}),
676
+ ...(opts.binding !== undefined ? { binding: opts.binding } : {}),
661
677
  ...(environment !== undefined ? { environment } : {}),
662
678
  ...(releaseDigest !== undefined ? { releaseDigest } : {}),
663
679
  ...(changeSet !== undefined ? { changeSet } : {}),
@@ -675,6 +691,8 @@ async function approveGate(opName, gate, opts, statementOnly) {
675
691
  (record.url ? ` (${record.url})` : "") +
676
692
  (record.seal ? `, signed with ${record.seal.kind === WEBAUTHN_SEAL_KIND ? "passkey " : ""}${record.seal.key}` : "") +
677
693
  push.suffix));
694
+ if (record.binding !== undefined)
695
+ console.error(formatInfo(`The signature also binds ${JSON.stringify(record.binding)} (--binding).`));
678
696
  if (record.planDigest) {
679
697
  console.error(formatInfo(`This approves the plan ${record.planDigest}` +
680
698
  (record.environment !== undefined ? ` in environment "${record.environment}"` : "") +
@@ -735,7 +753,12 @@ function externalSeal(from, sealed, policy, cwd) {
735
753
  : `the ${sig.kind === "ssh" ? "ssh signature" : "passkey's assertion"} does not verify for ${sealed.resolvedBy} over this approval's statement: ${r.reason}`,
736
754
  };
737
755
  }
738
- return { seal: { ...candidate, key: r.key, ...(gateSealVersion(sealed) === 2 ? { version: 2 } : {}) } };
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, `'\\''`)}'`;
739
762
  }
740
763
  /**
741
764
  * What a just-recorded approval did to a gate with an `approval` block
@@ -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,YAAY,EAAuB,MAAM,wBAAwB,CAAC;AAIxH,OAAO,EAYL,KAAK,aAAa,EAGlB,KAAK,cAAc,EAKpB,MAAM,eAAe,CAAC;AACvB,OAAO,EAA+D,KAAK,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAY3G,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD,OAAO,KAAK,EAAE,qBAAqB,EA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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); `--yes` cuts, records,
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); `--src`, `-o` and
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>] [--forge-issues] [--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]
@@ -1 +1 @@
1
- {"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/release.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;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;AAiBD;;;;;;;;;;;;GAYG;AACH,wBAAsB,aAAa,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA0PxE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,iBAAiB,CAAC,GAAG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,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,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAsB5E;AAED,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAG5E;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAsD5E"}
@@ -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); `--yes` cuts, records,
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); `--src`, `-o` and
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>] [--forge-issues] [--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]
@@ -43,7 +45,7 @@ import { existsSync } from "node:fs";
43
45
  import { resolve } from "node:path";
44
46
  import { formatBold, formatError, formatSuccess, formatWarning } from "../format.js";
45
47
  import { parseParamFlags } from "../build-params-cli.js";
46
- const USAGE = "chant 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>]] [--channel <tag>] [--json] | release publish <label|digest> [--yes] [--allow-unsigned] [--require-provenance] [--json] | release verify <label|digest> [--json] | release candidates [--env <env>] [--forge-issues] [--json] | release compose <name> [--base <label|sha>] (--pr <n> | --work <id>)... [--yes] [--json] | release list [--json] | release export <label|digest> --env <env> [-o <dir>] [--json]";
48
+ const USAGE = "chant 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>]] [--channel <tag>] [--lane <name>] [--override-green] [--json] | release publish <label|digest> [--yes] [--allow-unsigned] [--require-provenance] [--json] | release verify <label|digest> [--json] | release candidates [--env <env>] [--lane <name>] [--forge-issues] [--json] | release compose <name> [--base <label|sha>] (--pr <n> | --work <id>)... [--yes] [--json] | release list [--json] | release export <label|digest> --env <env> [-o <dir>] [--json]";
47
49
  /** The build inputs `release cut` and `release compile` share. */
48
50
  function compileInputs(ctx, params, projectDir = resolve("."), releaseLabel) {
49
51
  const { args } = ctx;
@@ -75,6 +77,25 @@ export function sameWithYes(argv) {
75
77
  const quote = (a) => (/^[\w@%+=:,./-]+$/.test(a) ? a : `'${a.replace(/'/g, `'\\''`)}'`);
76
78
  return ["chant", ...argv.filter((a) => a !== "--json" && a !== "--yes"), "--yes"].map(quote).join(" ");
77
79
  }
80
+ /**
81
+ * The green lane a cut or a candidates read checks (#4692): `--lane`, else
82
+ * `release.lane` in the member's chant.config.ts at `cwd`, else none. A
83
+ * config that can't be loaded is warned about and read as naming none, so the
84
+ * full green tag is checked.
85
+ */
86
+ async function laneOf(ctx, cwd) {
87
+ if (ctx.args.lane !== undefined)
88
+ return ctx.args.lane;
89
+ try {
90
+ const { loadChantConfig } = await import("../../config.js");
91
+ return (await loadChantConfig(cwd)).config.release?.lane;
92
+ }
93
+ catch (err) {
94
+ if (!ctx.args.json)
95
+ console.error(formatWarning({ message: `release.lane was not read, so the full green tag is checked: ${err instanceof Error ? err.message : String(err)}` }));
96
+ return undefined;
97
+ }
98
+ }
78
99
  function describeActorSource(source) {
79
100
  switch (source) {
80
101
  case "flag":
@@ -110,6 +131,14 @@ export async function runReleaseCut(ctx) {
110
131
  return 1;
111
132
  }
112
133
  const label = positional ?? args.label ?? null;
134
+ // #4693: the reason is the override's, written by the person who overrides.
135
+ if (args.reason !== undefined) {
136
+ console.error(formatError({
137
+ message: "release cut takes no --reason: an override's reason is on the override itself",
138
+ hint: "Cut with --override-green: it names the chant approve policy-override command that records the override and its reason.",
139
+ }));
140
+ return 1;
141
+ }
113
142
  const dryRun = args.yes !== true;
114
143
  const cwd = resolve(".");
115
144
  const { spawnTargetCompiler, ReleaseCompileError } = await import("../../components/release-compile.js");
@@ -214,6 +243,8 @@ export async function runReleaseCut(ctx) {
214
243
  checkout = at.checkoutCommit(top, cwd, commit);
215
244
  const cutCwd = checkout?.memberDir ?? cwd;
216
245
  const compiler = spawnTargetCompiler(compileInputs(ctx, params, cutCwd, label));
246
+ // #4692: the lane is the commit's own config's under --at.
247
+ const lane = await laneOf(ctx, cutCwd);
217
248
  const request = {
218
249
  cwd: cutCwd,
219
250
  compiler,
@@ -222,6 +253,8 @@ export async function runReleaseCut(ctx) {
222
253
  ...(args.sign !== undefined ? { sign: args.sign } : {}),
223
254
  ...(composed ? { composed } : {}),
224
255
  ...(args.channel ? { channel: args.channel } : {}),
256
+ ...(lane !== undefined ? { lane } : {}),
257
+ ...(args.overrideGreen ? { overrideGreen: true } : {}),
225
258
  };
226
259
  if (dryRun) {
227
260
  const plan = await planRelease(request);
@@ -254,14 +287,21 @@ export async function runReleaseCut(ctx) {
254
287
  return 0;
255
288
  }
256
289
  const name = plan.label ? formatBold(plan.label) : "an unlabelled release";
290
+ const greenIn = plan.override
291
+ ? `not green: no ${plan.override.tag.slice(0, plan.override.tag.lastIndexOf("/"))} tag`
292
+ : plan.lane !== null
293
+ ? `green in lane ${plan.lane}`
294
+ : "green";
257
295
  const where = composed
258
- ? ` (on ${trunk.remote}/${composed.branch}, composed on ${composed.base.slice(0, 12)} from ${composed.sources.length} trunk commit(s), green)`
296
+ ? ` (on ${trunk.remote}/${composed.branch}, composed on ${composed.base.slice(0, 12)} from ${composed.sources.length} trunk commit(s), ${greenIn})`
259
297
  : trunk
260
- ? ` (on ${trunk.remote}/${trunk.branch}, green)`
298
+ ? ` (on ${trunk.remote}/${trunk.branch}, ${greenIn})`
261
299
  : "";
262
300
  console.log(`Dry run: cut ${name} from commit ${plan.commit.slice(0, 12)}${where}`);
263
301
  if (args.channel)
264
302
  console.log(` channel ${args.channel}: a publish moves ${args.channel}, not latest`);
303
+ if (plan.override)
304
+ console.log(` under the override by ${plan.override.by} at ${plan.override.at}${plan.override.sealed ? ", sealed" : ""}: ${plan.override.reason}; the cut spends it`);
265
305
  if (plan.alreadyCut)
266
306
  console.log(` already cut as ${plan.alreadyCut}: the cut would record nothing new`);
267
307
  console.log(` actor ${actor} (from ${describeActorSource(who.source)})`);
@@ -325,7 +365,7 @@ export async function runReleaseCut(ctx) {
325
365
  noComponents: result.release.targets.every((t) => t.templates.every((tpl) => tpl.component === null)) && result.release.artifactDigests.length === 0,
326
366
  });
327
367
  if (args.json) {
328
- console.log(JSON.stringify({ dryRun: false, release: result.release, label: result.label, cut: result.cut, stored: result.stored, reused: result.reused, actor, actorSource: who.source, tag: tagged, composed: composed ?? null, channel: args.channel ?? null, next }, null, 2));
368
+ console.log(JSON.stringify({ dryRun: false, release: result.release, label: result.label, cut: result.cut, stored: result.stored, reused: result.reused, actor, actorSource: who.source, tag: tagged, composed: composed ?? null, channel: args.channel ?? null, lane: lane ?? null, next }, null, 2));
329
369
  }
330
370
  else {
331
371
  const name = result.label ? formatBold(result.label) : "unlabelled release";
@@ -333,9 +373,11 @@ export async function runReleaseCut(ctx) {
333
373
  console.error(formatSuccess(`Cut ${name}: ${result.release.releaseDigest}`));
334
374
  else
335
375
  console.error(formatSuccess(`Already cut${result.label ? ` as ${formatBold(result.label)}` : ""}: ${result.release.releaseDigest}`));
336
- console.error(` commit ${result.release.commit}${composed ? `, composed on ${composed.base.slice(0, 12)} on ${composed.branch}` : ""}`);
376
+ console.error(` commit ${result.release.commit}${composed ? `, composed on ${composed.base.slice(0, 12)} on ${composed.branch}` : ""}${lane !== undefined ? `, green in lane ${lane}` : ""}`);
337
377
  if (args.channel)
338
378
  console.error(` channel ${args.channel}`);
379
+ if (result.cut?.override)
380
+ console.error(` not green: cut under the override by ${result.cut.override.by}: ${result.cut.override.reason}`);
339
381
  if (result.cut)
340
382
  console.error(` ${result.cut.signature ? `signed by ${result.cut.actor}` : `not signed; actor ${result.cut.actor}`}, run ${result.cut.runId}`);
341
383
  console.error(` artifacts ${result.release.artifactDigests.length}, targets ${result.release.targets.map((t) => `${t.env} (${t.templates.length} template${t.templates.length === 1 ? "" : "s"})`).join(", ")}`);
@@ -356,6 +398,13 @@ export async function runReleaseCut(ctx) {
356
398
  }
357
399
  catch (err) {
358
400
  if (err instanceof ws.WorkstationCheckError || err instanceof ReleaseCutError || err instanceof at.CutAtError) {
401
+ // #4693: a request for an override goes where the person who answers it reads.
402
+ if (err instanceof ReleaseCutError && err.recorded) {
403
+ const { pushLifecycleReport } = await import("../../lifecycle/git.js");
404
+ const push = await pushLifecycleReport({ cwd }).catch(() => ({ pushed: false, pushWarning: undefined }));
405
+ if (push.pushWarning)
406
+ console.error(formatWarning({ message: push.pushWarning }));
407
+ }
359
408
  return fail(err.code, err.message, err.fix);
360
409
  }
361
410
  if (err instanceof ReleaseLabelError)
@@ -500,8 +549,9 @@ export async function runReleasePublish(ctx) {
500
549
  else {
501
550
  for (const p of published)
502
551
  for (const i of p.items)
503
- say(` ${i.present ? "already there" : "published"}: ${describeItem(i)}`);
504
- console.error(formatSuccess(`Published ${name} to ${published.length} target(s)`));
552
+ say(` ${i.refused ? "refused" : i.present ? "already there" : "published"}: ${describeItem(i)}`);
553
+ const refused = published.filter((p) => p.warning);
554
+ console.error(formatSuccess(`Published ${name} to ${published.length - refused.length} target(s)${refused.length > 0 ? `; ${refused.length} refused it, with a warning` : ""}`));
505
555
  }
506
556
  return 0;
507
557
  }
@@ -561,7 +611,14 @@ export async function runReleaseVerify(ctx) {
561
611
  */
562
612
  export async function runReleaseCandidates(ctx) {
563
613
  const { releaseCandidatesDocument } = await import("../../workspace/release-candidates.js");
564
- const doc = await releaseCandidatesDocument({ cwd: resolve("."), ...(ctx.args.env ? { env: ctx.args.env } : {}), ...(ctx.args.branch ? { branch: ctx.args.branch } : {}), ...(ctx.args.forgeIssues ? { forgeIssues: {} } : {}) });
614
+ const lane = await laneOf(ctx, resolve("."));
615
+ const doc = await releaseCandidatesDocument({
616
+ cwd: resolve("."),
617
+ ...(ctx.args.env ? { env: ctx.args.env } : {}),
618
+ ...(ctx.args.branch ? { branch: ctx.args.branch } : {}),
619
+ ...(lane !== undefined ? { lane } : {}),
620
+ ...(ctx.args.forgeIssues ? { forgeIssues: {} } : {}),
621
+ });
565
622
  if (ctx.args.json) {
566
623
  console.log(JSON.stringify(doc, null, 2));
567
624
  return "error" in doc ? 1 : 0;
@@ -578,10 +635,13 @@ export async function runReleaseCandidates(ctx) {
578
635
  console.error(`No candidates: this clone knows no ${doc.branch}. Fetch it: git fetch origin ${doc.branch} --tags`);
579
636
  return 0;
580
637
  }
638
+ const greenIn = doc.lane !== null ? `green in lane ${doc.lane}` : "green";
639
+ if (doc.lane !== null)
640
+ console.log(`Lane ${doc.lane}: candidates carry ci/green-${doc.lane}/<sha>`);
581
641
  if (doc.pending.length > 0)
582
- console.log(`${doc.pending.length} commit(s) on ${doc.branch} after the newest candidate are not green yet`);
642
+ console.log(`${doc.pending.length} commit(s) on ${doc.branch} after the newest candidate are not ${greenIn} yet`);
583
643
  if (doc.candidates.length === 0)
584
- console.log(`No green commit on ${doc.branch}${doc.since ? ` since ${doc.since.slice(0, 12)}` : ""} to cut from.`);
644
+ console.log(`No ${greenIn} commit on ${doc.branch}${doc.since ? ` since ${doc.since.slice(0, 12)}` : ""} to cut from.`);
585
645
  for (const c of doc.candidates) {
586
646
  const tags = [...(c.newFor.length > 0 ? [`new for ${c.newFor.join(", ")}`] : []), ...(c.cut.length > 0 ? [`cut as ${c.cut.join(", ")}`] : [])];
587
647
  console.log(`${c.commit.slice(0, 12)} ${c.subject}${tags.length > 0 ? ` (${tags.join("; ")})` : ""}`);
@@ -605,7 +665,7 @@ export async function runReleaseCandidates(ctx) {
605
665
  for (const r of unread)
606
666
  console.error(`Issues not read from the forge: ${r}`);
607
667
  if (doc.candidates.length > 0)
608
- console.error(`Cut one: chant release cut <label> --at <sha>`);
668
+ console.error(`Cut one: chant release cut <label> --at <sha>${doc.lane !== null && ctx.args.lane !== undefined ? ` --lane ${doc.lane}` : ""}`);
609
669
  return 0;
610
670
  }
611
671
  export async function runReleaseList(ctx) {
@@ -631,9 +691,16 @@ export async function runReleaseList(ctx) {
631
691
  const newest = r.cuts.at(-1);
632
692
  const signature = newest ? (newest.signatureCheck.status === "verified" ? `signed by ${newest.actor}` : newest.signatureCheck.status) : "-";
633
693
  // #4033: a release cut from a revoked commit says so at the end of its line, and why on stderr.
634
- console.log(`${(r.label ?? "-").padEnd(16)} ${r.releaseDigest} ${r.commit.slice(0, 12)} ${signature} ${where}${r.revoked ? " revoked" : ""}`);
694
+ // #4692: a release cut from a lane's green tag names the lane.
695
+ const lane = r.cuts.find((c) => c.lane !== undefined)?.lane;
696
+ const overridden = r.cuts.some((c) => c.override !== undefined);
697
+ console.log(`${(r.label ?? "-").padEnd(16)} ${r.releaseDigest} ${r.commit.slice(0, 12)} ${signature} ${where}${lane !== undefined ? ` lane ${lane}` : ""}${overridden ? " not green" : ""}${r.revoked ? " revoked" : ""}`);
635
698
  if (newest?.signatureCheck.status === "unverified")
636
699
  console.error(` ${r.label ?? r.releaseDigest}: ${newest.signatureCheck.reason}`);
700
+ // #4693: a release cut under an override says the commit was not green.
701
+ for (const c of r.cuts)
702
+ if (c.override)
703
+ console.error(` ${r.label ?? r.releaseDigest}: not green (no ${c.override.tag}), cut under the override by ${c.override.by}: ${c.override.reason}`);
637
704
  if (r.revoked) {
638
705
  const { describeRevocation } = await import("../../lifecycle/release-revocation.js");
639
706
  console.error(` ${r.label ?? r.releaseDigest}: revoked by ${r.revoked.tag}, ${describeRevocation(r.revoked)}`);
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/cli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AAqB,EAAE,cAAc,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,2BAA2B,EAAE,eAAe,CAAA;CAAO,GAC7K,OAAO,CAAC,MAAM,CAAC,CAuCjB;AAID;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAAE,UAAU,EAmQvC,CAAC"}
package/dist/cli/main.js CHANGED
@@ -438,7 +438,8 @@ CI:
438
438
  Releases:
439
439
  release cut [<label>] [--at <sha>] [--yes] [--build <command>] [--param <k=v>]
440
440
  [--params-file <file>] [--src <dir>] [-o <file>] [--lexicon <name>]
441
- [--actor <name>] [--sign [<key file>]] [--channel <tag>] [--json]
441
+ [--actor <name>] [--sign [<key file>]] [--channel <tag>]
442
+ [--lane <name>] [--override-green] [--json]
442
443
  A dry run of a cut of this member from HEAD, which
443
444
  must be clean, on trunk and pushed, and carry a
444
445
  ci/green tag: compile every environment in the
@@ -462,7 +463,13 @@ Releases:
462
463
  A green commit of a pushed chant/compose/<name>
463
464
  branch is cut too, recording its base and sources.
464
465
  --channel <tag> records the tag a publish moves in
465
- place of latest.
466
+ place of latest. --lane <name> (or release.lane in
467
+ chant.config.ts) checks a ci.green lane's tag,
468
+ ci/green-<lane>/<sha>, in place of ci/green.
469
+ --override-green cuts a commit that is not green
470
+ under a person's override, recorded with chant
471
+ approve policy-override release-<sha12>; the cut
472
+ spends it and records who and why.
466
473
  release compose <name> [--base <label|sha>] (--pr <n> | --work <id>)...
467
474
  [--yes] [--json]
468
475
  Cherry-pick the chosen trunk changes, in trunk order,
@@ -471,12 +478,14 @@ Releases:
471
478
  that exists; stops on a conflict, naming the change
472
479
  and files, and writes nothing. A dry run unless --yes,
473
480
  which moves the branch and pushes it.
474
- release candidates [--env <env>] [--forge-issues] [--json]
481
+ release candidates [--env <env>] [--lane <name>] [--forge-issues] [--json]
475
482
  The green commits of trunk a release can be cut from,
476
483
  newest first, each with the commits, work items, pull
477
484
  requests and flags it would ship, and what each
478
- environment runs. --forge-issues asks the forge which
479
- issues each pull request closes, once per pull request
485
+ environment runs. --lane reads a lane's green tags,
486
+ as release cut --lane checks them. --forge-issues asks
487
+ the forge which issues each pull request closes, once
488
+ per pull request
480
489
  release publish <label|digest> [--yes] [--allow-unsigned]
481
490
  [--require-provenance] [--json]
482
491
  Publish a cut release to the targets release.publish
@@ -655,7 +664,10 @@ Ops:
655
664
  <file|-> --at <time> then records a signature made
656
665
  elsewhere over them (an ssh signature, or a passkey's
657
666
  WebAuthn assertion checked against .chant/trust.json's
658
- passkeys), which counts as --sign does (#4646)
667
+ passkeys), which counts as --sign does (#4646).
668
+ --binding <text> adds a line the relay sets (a deploy
669
+ id and an expiry, say) that the signature covers too;
670
+ pass the same on --statement and --signature (#4697)
659
671
  --resume then starts the CI job that waits at the
660
672
  gate again (GitHub re-run, GitLab retry, Forgejo
661
673
  dispatch) with CHANT_FORGE_TOKEN
@@ -1 +1 @@
1
- {"version":3,"file":"parse-args.d.ts","sourceRoot":"","sources":["../../src/cli/parse-args.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAsG7C;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,CAopCpD"}
1
+ {"version":3,"file":"parse-args.d.ts","sourceRoot":"","sources":["../../src/cli/parse-args.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAuG7C;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,CA4pCpD"}
@@ -91,6 +91,7 @@ const BOOLEAN_FLAGS = new Set([
91
91
  "--allow-code",
92
92
  "--allow-skip",
93
93
  "--allow-unsigned",
94
+ "--override-green",
94
95
  "--require-provenance",
95
96
  "--root-only",
96
97
  "--generated",
@@ -726,6 +727,10 @@ export function parseArgs(args) {
726
727
  if (!result.statusUrl || result.statusUrl.startsWith("-"))
727
728
  throw new Error("--status-url needs a URL template: --status-url https://host/reports/{key}");
728
729
  }
730
+ else if (arg === "--override-green") {
731
+ // `chant release cut --override-green` (#4693): cut a commit that is not green under a person's override.
732
+ result.overrideGreen = true;
733
+ }
729
734
  else if (arg === "--allow-unsigned") {
730
735
  // `chant release publish --allow-unsigned` (#4049).
731
736
  result.allowUnsigned = true;
@@ -1312,6 +1317,12 @@ export function parseArgs(args) {
1312
1317
  throw new Error("--signature needs a file holding the signature, or - for stdin: --signature <file|->");
1313
1318
  }
1314
1319
  }
1320
+ else if (arg === "--binding") {
1321
+ // `chant approve <op> <gate> --statement|--signature|--sign --binding <text>` (#4697): a line the relay sets for the signature to cover.
1322
+ result.binding = args[++i];
1323
+ if (!result.binding || result.binding.startsWith("-"))
1324
+ throw new Error("--binding needs the line the signature binds, which does not start with -: --binding <text>");
1325
+ }
1315
1326
  else if (arg === "--relayed-by") {
1316
1327
  // `chant approve <op> <gate> --relayed-by <principal>` and `workspace points answer <id> --relayed-by <principal>` (#3402):
1317
1328
  // who carried the approval or answer to chant for the person it names.
@@ -1634,6 +1645,7 @@ export function parseArgs(args) {
1634
1645
  }
1635
1646
  else if (arg === "--lane") {
1636
1647
  // `chant ci last-green --lane <name>` and `chant ci base --lane <name>` (#4662): a green lane's tags and phases.
1648
+ // `chant release cut|candidates --lane <name>` (#4692): a cut from that lane's green tag.
1637
1649
  result.lane = args[++i];
1638
1650
  }
1639
1651
  else if (arg === "--runner") {
@@ -376,6 +376,8 @@ export interface ParsedArgs {
376
376
  prs?: number[];
377
377
  /** `chant release cut --channel <tag>` (#4168 4.3): the tag a publish of the release moves in place of `latest`. */
378
378
  channel?: string;
379
+ /** `chant release cut --override-green` (#4693): cut a commit that is not green under a person's override on the override ledger. */
380
+ overrideGreen?: boolean;
379
381
  /**
380
382
  * `chant components pr-plan|pr-apply --forge github|gitlab|forgejo` (#3183)
381
383
  * — post the note and the commit status on this forge, with the client
@@ -706,6 +708,8 @@ export interface ParsedArgs {
706
708
  statement?: boolean;
707
709
  /** `chant approve <op> <gate> --signature <file|->` (#4646): a signature made elsewhere over the statement. */
708
710
  signature?: string;
711
+ /** `chant approve <op> <gate> --binding <text>` (#4697): a line the relay sets, signed last with the statement. */
712
+ binding?: string;
709
713
  /**
710
714
  * `chant approve <op> <gate> --relayed-by <principal>` and `chant workspace
711
715
  * points answer <id> --relayed-by <principal>` (#3402): the principal that
@@ -923,7 +927,7 @@ export interface ParsedArgs {
923
927
  since?: string;
924
928
  /** `chant ci verdict --wait` (#4644) — read again until no required phase is pending. */
925
929
  ciWait?: boolean;
926
- /** `chant ci last-green --lane <name>` and `chant ci base --lane <name>` (#4662) — a ci.green lane. */
930
+ /** `chant ci last-green --lane <name>` and `chant ci base --lane <name>` (#4662) — a ci.green lane. `chant release cut --lane <name>` and `chant release candidates --lane <name>` (#4692) — check that lane's green tags. */
927
931
  lane?: string;
928
932
  /** `chant ci base --phase <name>` (#4643) — the ci.green phase whose base to find. `chant ci quarantine filter --phase <name>` (#4677) — the phase whose runner takes the filter. */
929
933
  phase?: string;