@intentius/chant 0.124.2 → 0.124.4

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 (73) hide show
  1. package/dist/cli/handlers/operator.d.ts.map +1 -1
  2. package/dist/cli/handlers/override-approve.d.ts +3 -1
  3. package/dist/cli/handlers/override-approve.d.ts.map +1 -1
  4. package/dist/cli/main.d.ts.map +1 -1
  5. package/dist/cli/registry.d.ts +2 -0
  6. package/dist/cli/registry.d.ts.map +1 -1
  7. package/dist/lifecycle/gate-ledger.d.ts +1 -33
  8. package/dist/lifecycle/gate-ledger.d.ts.map +1 -1
  9. package/dist/lifecycle/gate-pending.d.ts +41 -0
  10. package/dist/lifecycle/gate-pending.d.ts.map +1 -0
  11. package/dist/op/activities/activity-contracts.d.ts +5 -4
  12. package/dist/op/activities/activity-contracts.d.ts.map +1 -1
  13. package/dist/op/activities/decide.d.ts +2 -0
  14. package/dist/op/activities/decide.d.ts.map +1 -1
  15. package/dist/op/gate-point-run.d.ts +5 -77
  16. package/dist/op/gate-point-run.d.ts.map +1 -1
  17. package/dist/op/gate-point.d.ts +18 -0
  18. package/dist/op/gate-point.d.ts.map +1 -1
  19. package/dist/op/gate.d.ts +8 -0
  20. package/dist/op/gate.d.ts.map +1 -1
  21. package/dist/op/index.d.ts +4 -4
  22. package/dist/op/index.d.ts.map +1 -1
  23. package/dist/op/op-waves-notify.d.ts +2 -1
  24. package/dist/op/op-waves-notify.d.ts.map +1 -1
  25. package/dist/op/op-waves-run.d.ts +123 -10
  26. package/dist/op/op-waves-run.d.ts.map +1 -1
  27. package/dist/op/op-waves.d.ts +71 -6
  28. package/dist/op/op-waves.d.ts.map +1 -1
  29. package/dist/op/steward-points.d.ts +7 -0
  30. package/dist/op/steward-points.d.ts.map +1 -1
  31. package/dist/override-gate.d.ts +8 -2
  32. package/dist/override-gate.d.ts.map +1 -1
  33. package/dist/point-decision.d.ts +134 -0
  34. package/dist/point-decision.d.ts.map +1 -0
  35. package/dist/pr-forge.d.ts +37 -2
  36. package/dist/pr-forge.d.ts.map +1 -1
  37. package/dist/workspace/decide.d.ts +3 -1
  38. package/dist/workspace/decide.d.ts.map +1 -1
  39. package/package.json +1 -1
  40. package/src/cli/discovery-skip.e2e.test.ts +4 -1
  41. package/src/cli/handlers/operator.ts +25 -11
  42. package/src/cli/handlers/override-approve.test.ts +16 -0
  43. package/src/cli/handlers/override-approve.ts +6 -2
  44. package/src/cli/main.test.ts +3 -0
  45. package/src/cli/main.ts +9 -2
  46. package/src/cli/registry.ts +2 -0
  47. package/src/lifecycle/gate-ledger.ts +3 -53
  48. package/src/lifecycle/gate-pending.ts +62 -0
  49. package/src/notify-bundle.test.ts +20 -0
  50. package/src/op/activities/activity-contracts.ts +1 -0
  51. package/src/op/activities/decide.ts +3 -0
  52. package/src/op/gate-point-ci.e2e.test.ts +171 -0
  53. package/src/op/gate-point-mcp.e2e.test.ts +2 -0
  54. package/src/op/gate-point-run.ts +18 -149
  55. package/src/op/gate-point.e2e.test.ts +2 -0
  56. package/src/op/gate-point.test.ts +1 -1
  57. package/src/op/gate-point.ts +27 -3
  58. package/src/op/gate.ts +10 -0
  59. package/src/op/index.ts +12 -1
  60. package/src/op/op-waves-notify.ts +19 -2
  61. package/src/op/op-waves-run.ts +541 -76
  62. package/src/op/op-waves.test.ts +229 -0
  63. package/src/op/op-waves.ts +110 -10
  64. package/src/op/steward-points.ts +8 -0
  65. package/src/override-gate.test.ts +5 -0
  66. package/src/override-gate.ts +8 -2
  67. package/src/point-decision-bundle.test.ts +62 -0
  68. package/src/point-decision.e2e.test.ts +95 -0
  69. package/src/point-decision.ts +280 -0
  70. package/src/pr-forge.test.ts +62 -0
  71. package/src/pr-forge.ts +60 -9
  72. package/src/workspace/decide.ts +7 -2
  73. package/src/workspace/points-cli.ts +1 -1
@@ -80,6 +80,23 @@ export interface FoundComment {
80
80
  /** Its web URL, when the forge's answer carries one (GitHub and Forgejo do; a GitLab note does not). */
81
81
  url?: string;
82
82
  }
83
+ /** What {@link PrForge.addComment} posted. */
84
+ export interface AddedComment {
85
+ /** The new comment's or note's id. */
86
+ id: number;
87
+ /** Its web URL, when the forge's answer carries one (GitHub and Forgejo do; a GitLab note does not). */
88
+ url?: string;
89
+ }
90
+ /** An open tracking issue {@link PrForge.findIssue} read back. */
91
+ export interface FoundIssue {
92
+ /** The issue's number (GitHub, Forgejo) or iid (GitLab). */
93
+ number: number;
94
+ title: string;
95
+ body: string;
96
+ /** When the issue was opened: the forge's `created_at`, an ISO 8601 string. */
97
+ created?: string;
98
+ url?: string;
99
+ }
83
100
  /** A finding to keep in a tracking issue. `body` carries the marker. */
84
101
  export interface IssueFinding {
85
102
  title: string;
@@ -116,6 +133,8 @@ export interface IssueResult {
116
133
  /** The issue's number (GitHub, Forgejo) or iid (GitLab). */
117
134
  number?: number;
118
135
  url?: string;
136
+ /** When the issue was opened (the forge's `created_at`, ISO 8601), for an issue that exists after the call or was just closed. */
137
+ created?: string;
119
138
  }
120
139
  export interface PrForge {
121
140
  kind: ForgeKind;
@@ -147,6 +166,13 @@ export interface PrForge {
147
166
  * GitLab's system notes are skipped.
148
167
  */
149
168
  findComment(pr: number, marker: string, opts?: MarkerMatch): Promise<FoundComment | undefined>;
169
+ /**
170
+ * Post a new comment on pull request `pr` (a new note on merge request
171
+ * `pr`). No marker is looked for or required, and an earlier comment is
172
+ * never edited: every call adds one. For replies, where
173
+ * {@link upsertComment} would overwrite the last.
174
+ */
175
+ addComment(pr: number, body: string): Promise<AddedComment>;
150
176
  setStatus(sha: string, status: ForgeStatus): Promise<void>;
151
177
  /**
152
178
  * Keep one OPEN tracking issue for `marker` in line with `finding`: open
@@ -156,6 +182,13 @@ export interface PrForge {
156
182
  * taken for issues. When several match, the oldest is kept.
157
183
  */
158
184
  trackIssue(marker: string, finding: IssueFinding | null, opts?: TrackIssueOptions): Promise<IssueResult>;
185
+ /**
186
+ * The OPEN issue {@link trackIssue} would keep for `marker`: the oldest one
187
+ * {@link MarkerMatch} finds, `author` honoured, pull requests left out.
188
+ * Undefined when there is none. Writes nothing, so a client built without a
189
+ * token reads a public repository's issue with it.
190
+ */
191
+ findIssue(marker: string, opts?: MarkerMatch): Promise<FoundIssue | undefined>;
159
192
  /**
160
193
  * {@link trackIssue} by prefix for a finding, without the body check,
161
194
  * resolving to the issue's web URL. `reconcilePr`'s `issue` mode's form.
@@ -184,7 +217,8 @@ export interface GithubForgeOptions {
184
217
  apiBase: string;
185
218
  /** `owner/name`. */
186
219
  repo: string;
187
- token: string;
220
+ /** Without one, no credential is sent: enough to read a public repository ({@link PrForge.findComment}, {@link PrForge.findIssue}). */
221
+ token?: string;
188
222
  /** The forge's host, for naming reviewers. Default github.com. */
189
223
  host?: string;
190
224
  runUrl?: string;
@@ -201,7 +235,8 @@ export interface GitlabForgeOptions {
201
235
  apiBase: string;
202
236
  /** `$CI_PROJECT_ID`, or the URL-encoded path. */
203
237
  project: string;
204
- token: string;
238
+ /** Without one, no credential is sent: enough to read a public project ({@link PrForge.findComment}, {@link PrForge.findIssue}). */
239
+ token?: string;
205
240
  /**
206
241
  * The header the token goes in: `PRIVATE-TOKEN` (the default) for an
207
242
  * access token, `JOB-TOKEN` for `CI_JOB_TOKEN`. One in the other's header
@@ -1 +1 @@
1
- {"version":3,"file":"pr-forge.d.ts","sourceRoot":"","sources":["../src/pr-forge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAIH,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAExD,eAAO,MAAM,WAAW,EAAE,SAAS,SAAS,EAAoC,CAAC;AAEjF,wDAAwD;AACxD,MAAM,MAAM,UAAU,GAAG,CACvB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,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AAG,WAAW,CAAC;IAC5C,6DAA6D;IAC7D,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,uFAAuF;IACvF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC,kDAAkD;IAClD,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CACrC;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAIlE,CAAC;AAoBF;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,GAAE,GAAiB,EAAE,IAAI,GAAE,kBAAuB,GAAG,WAAW,CAuErG;AAED,8FAA8F;AAC9F,wBAAgB,WAAW,CAAC,MAAM,EAAE,WAAW,EAAE,SAAS,CAAC,EAAE,UAAU,GAAG,OAAO,CAgBhF"}
@@ -236,7 +236,9 @@ export interface AskPointOptions {
236
236
  * or the lifecycle ledger (#2786). Defaults to the ledger in a steward's
237
237
  * turn (`steward` given, or this process a steward's turn), since a steward
238
238
  * never writes the checkout, and to the tree otherwise. A question already
239
- * held on the ledger is rewritten there whatever this says.
239
+ * held on the ledger is rewritten there whatever this says. Outside a
240
+ * steward's turn, `points ask --store ledger` and a gate's `point.store`
241
+ * reach it (#3815), for a checkout that does not outlive the run.
240
242
  */
241
243
  store?: "tree" | "ledger";
242
244
  /** The date written as asked_on, and answered_on for a table's answer, YYYY-MM-DD. Defaults to today, in UTC. */
@@ -1 +1 @@
1
- {"version":3,"file":"decide.d.ts","sourceRoot":"","sources":["../../src/workspace/decide.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AAO,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAIzI;AAkBD;;;;GAIG;AACH,wBAAgB,WAAW,CACzB,EAAE,EAAE,MAAM,EAAE,EACZ,MAAM,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,EAC3C,MAAM,EAAE,WAAW;AACnB,sFAAsF;AACtF,OAAO,CAAC,EAAE,MAAM,GACf;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAAC,GAAG,EAAE,OAAO,CAAA;CAAE,CA0B5E;AAsHD;;;;;;GAMG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAMxF;AAuGD,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,8BAA8B;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,uFAAuF;IACvF,EAAE,EAAE,MAAM,EAAE,CAAC;IACb,uCAAuC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,iFAAiF;IACjF,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB;AAED;;;;;;;;;GASG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAM5F"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant",
3
- "version": "0.124.2",
3
+ "version": "0.124.4",
4
4
  "description": "Declarative infrastructure-as-code toolkit — TypeScript on Node.js",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://intentius.io/chant",
@@ -161,8 +161,11 @@ describe("CLI end-to-end — discovery skips a side-effecting script (#2519)", (
161
161
  // No lexicon, so lint runs its source rules only. With a lexicon that ships
162
162
  // post-synth checks, `chant lint` also builds the target (#3750) and imports
163
163
  // the script, which ends the process before any diagnostic prints; the next
164
- // test covers that.
164
+ // test covers that. An empty `lexicons` list falls back to detecting them
165
+ // from source imports, so the k8s declaration goes too, or k8s is found
166
+ // and loaded anyway.
165
167
  await writeConfig("", "");
168
+ await rm(join(testDir, "src", "infra.ts"));
166
169
  await writeRunner();
167
170
 
168
171
  const lint = runCli(["lint", testDir, "--format", "json"]);
@@ -276,17 +276,6 @@ export async function runStewardOperator(ctx: CommandContext): Promise<number> {
276
276
  const leaseTtlMs = ctx.args.leaseTtl ? parseDuration(ctx.args.leaseTtl) : DEFAULT_LEASE_TTL_MS;
277
277
  const holder = currentHolderId();
278
278
 
279
- // Refuse a second local operator up front rather than letting it loop on
280
- // `steward-busy` rounds: one steward is one writer.
281
- const first = await acquireStewardLease(steward.name, holder, { ttlMs: leaseTtlMs });
282
- if (!first.acquired) {
283
- console.error(formatError({
284
- message: `steward "${steward.name}" is already running (lease held by ${first.heldBy?.holder ?? "another process"} until ${first.heldBy?.expiresAt ?? "?"})`,
285
- hint: "One steward is one writer. Stop the other operator, or wait for its lease to expire.",
286
- }));
287
- return 1;
288
- }
289
-
290
279
  const controller = new AbortController();
291
280
  // `process.on`, not `.once` (#2872): a supervisor that signals both a
292
281
  // process group and a child sends a second SIGTERM close behind the
@@ -297,6 +286,14 @@ export async function runStewardOperator(ctx: CommandContext): Promise<number> {
297
286
  // only once it's over, so a second, third or later signal is a no-op
298
287
  // (`stopping` guards against re-aborting or re-logging) rather than a
299
288
  // fast exit that skips the release.
289
+ //
290
+ // Registered before the steward's lease is taken, not after: the lease is
291
+ // visible to other readers as soon as its ref is written, and the acquire
292
+ // goes on to push it. A SIGTERM in that stretch found no listener and ended
293
+ // the process by signal with the lease still held (the
294
+ // operator-steward-signal e2e test failed this way). Caught here, it aborts
295
+ // the controller, the loop below starts no round, and the `finally`
296
+ // releases the lease.
300
297
  let stopping = false;
301
298
  const onSigint = () => {
302
299
  if (stopping) return;
@@ -307,6 +304,23 @@ export async function runStewardOperator(ctx: CommandContext): Promise<number> {
307
304
  process.on("SIGINT", onSigint);
308
305
  process.on("SIGTERM", onSigint);
309
306
 
307
+ // Refuse a second local operator up front rather than letting it loop on
308
+ // `steward-busy` rounds: one steward is one writer.
309
+ const first = await acquireStewardLease(steward.name, holder, { ttlMs: leaseTtlMs }).catch((err: unknown) => {
310
+ process.removeListener("SIGINT", onSigint);
311
+ process.removeListener("SIGTERM", onSigint);
312
+ throw err;
313
+ });
314
+ if (!first.acquired) {
315
+ console.error(formatError({
316
+ message: `steward "${steward.name}" is already running (lease held by ${first.heldBy?.holder ?? "another process"} until ${first.heldBy?.expiresAt ?? "?"})`,
317
+ hint: "One steward is one writer. Stop the other operator, or wait for its lease to expire.",
318
+ }));
319
+ process.removeListener("SIGINT", onSigint);
320
+ process.removeListener("SIGTERM", onSigint);
321
+ return 1;
322
+ }
323
+
310
324
  const printRound = (events: OperatorTickEvent[]) => {
311
325
  for (const event of events) console.error(formatInfo(formatRoundLine(event)));
312
326
  };
@@ -84,4 +84,20 @@ describe("chant approve policy-override", () => {
84
84
  expect(await runOverrideApprove(ctx({ rules: ["no-drop", "no-lock"], reason: "why", plan: PLAN }))).toBe(0);
85
85
  expect(await runOverrideApprove(ctx({ rules: ["no-drop", "no-lock"], reason: "why", plan: DENIAL.planDigest }))).toBe(0);
86
86
  });
87
+
88
+ describe("the overriders check (#3824)", () => {
89
+ const args = { rules: ["no-drop", "no-lock"], reason: "why" };
90
+ test("warns when this checkout lists no overriders", async () => {
91
+ vi.stubEnv("CHANT_OVERRIDERS_FROM", "");
92
+ expect(await runOverrideApprove(ctx(args))).toBe(0);
93
+ expect(printed()).toMatch(/has no \.chant\/overriders/);
94
+ });
95
+ test("is skipped when the caller says where it reads its overriders", async () => {
96
+ vi.stubEnv("CHANT_OVERRIDERS_FROM", "policy.override in terragucci.config.ts");
97
+ expect(await runOverrideApprove(ctx(args))).toBe(0);
98
+ expect(printed()).toMatch(/overrides the denial of prod/);
99
+ expect(printed()).not.toMatch(/overriders/);
100
+ vi.unstubAllEnvs();
101
+ });
102
+ });
87
103
  });
@@ -10,7 +10,9 @@
10
10
  * recorded: the approver says what they are letting through. Whether the
11
11
  * override counts is decided by the run, against the overriders and signers
12
12
  * at base; this command only warns when the checkout's own overriders file
13
- * would not count it.
13
+ * would not count it. A product that keeps its overriders in its own config
14
+ * sets `CHANT_OVERRIDERS_FROM` (to where it reads them, e.g. `policy.override
15
+ * in terragucci.config.ts`), and the checkout check is skipped (#3824).
14
16
  */
15
17
 
16
18
  import { currentGateOrigin, isModelAuthored } from "../../lifecycle/gate-origin";
@@ -93,9 +95,11 @@ export async function runOverrideApprove(ctx: CommandContext): Promise<number> {
93
95
  `This overrides the denial of ${subject} by ${rules.join(", ")} for the plan ${denial.plan || denial.planDigest}. ` +
94
96
  `The next run that plans it applies it once; a plan that moves, or rules that change, need their own override.`,
95
97
  ));
98
+ const from = process.env.CHANT_OVERRIDERS_FROM?.trim();
99
+ if (from) return 0;
96
100
  const here = overridersAt(process.cwd(), "HEAD");
97
101
  if (!here.active) {
98
- console.error(formatWarning({ message: `This checkout has no ${OVERRIDERS_PATH}: unless the run reads its overriders from elsewhere at base, no override counts` }));
102
+ console.error(formatWarning({ message: `This checkout has no ${OVERRIDERS_PATH}: unless the run reads its overriders from elsewhere at base, no override counts (a tool that does sets CHANT_OVERRIDERS_FROM to say so)` }));
99
103
  } else if (!here.principals.map(norm).includes(norm(outcome.record.resolvedBy))) {
100
104
  console.error(formatWarning({ message: `${outcome.record.resolvedBy} is not in ${OVERRIDERS_PATH} here (${here.principals.join(", ") || "nobody"}), so a run that reads it at base does not count this override` }));
101
105
  }
@@ -874,6 +874,9 @@ describe("workspace points (ws-058, #2739)", () => {
874
874
  expect(answer).toMatchObject({ extraPositional: "answer", answer: "medium", bys: ["alice", "bob"] });
875
875
  expect(parseArgs(["workspace", "points", "--open", "--json"])).toMatchObject({ open: true, json: true });
876
876
  expect(() => parseArgs(["workspace", "points", "ask", "p", "--response", "--json"])).toThrow(/--response needs a JSON file/);
877
+ // #3815: --store ledger holds the question on chant/lifecycle.
878
+ expect(parseArgs(["workspace", "points", "ask", "p", "--inputs", "-", "--store", "ledger"]).store).toBe("ledger");
879
+ expect(() => parseArgs(["workspace", "points", "ask", "p", "--store", "git"])).toThrow(/--store is tree .* or ledger/);
877
880
  });
878
881
  });
879
882
 
package/src/cli/main.ts CHANGED
@@ -546,6 +546,11 @@ export function parseArgs(args: string[]): ParsedArgs {
546
546
  // `chant workspace points ask <point> --subject <id>` (#2739): what the question is about.
547
547
  result.subject = args[++i];
548
548
  if (!result.subject || result.subject.startsWith("-")) throw new Error("--subject needs what the question is about, such as a work item id: --subject <id>");
549
+ } else if (arg === "--store") {
550
+ // `chant workspace points ask <point> --store ledger` (#3815): where a new question goes.
551
+ const store = args[++i];
552
+ if (store !== "tree" && store !== "ledger") throw new Error("--store is tree (the answer kind's directory in the working tree) or ledger (chant/lifecycle): --store <tree|ledger>");
553
+ result.store = store;
549
554
  } else if (arg === "--answer") {
550
555
  // `chant workspace points answer <id> --answer <value>` (#2739)
551
556
  result.answer = args[++i];
@@ -1212,13 +1217,15 @@ Workspace (level 1, #2524):
1212
1217
  List the decision points the declared answer kinds'
1213
1218
  points files declare, and the questions asked of them;
1214
1219
  --open keeps the escalated and proposed ones (ws-058)
1215
- workspace points ask <point> --inputs <file|-|json> [--candidates <file|-|json>] [--response <file>] [--subject <id>] [--kind <kind file>] [--dry-run]
1220
+ workspace points ask <point> --inputs <file|-|json> [--candidates <file|-|json>] [--response <file>] [--subject <id>] [--store <tree|ledger>] [--kind <kind file>] [--dry-run]
1216
1221
  Ask a point's table, model and quorum deciders and
1217
1222
  record the answer: proposed from a model, escalated to
1218
1223
  people below its threshold. --response is a POST
1219
1224
  /v1/systemone response the caller got; chant calls no model.
1220
1225
  --candidates gives an ad-hoc point's question and
1221
- candidates, { question, criteria }
1226
+ candidates, { question, criteria }. --store ledger
1227
+ holds the question on chant/lifecycle and pushes it,
1228
+ for a checkout that does not outlive the run (CI)
1222
1229
  workspace points answer <id> --answer <value> --by <name>... [--note <text>] [--relayed-by <principal>] [--kind <kind file>] [--dry-run]
1223
1230
  Record people's answer to an open question, or confirm
1224
1231
  a model's proposal, once the point's quorum is met,
@@ -366,6 +366,8 @@ export interface ParsedArgs {
366
366
  response?: string;
367
367
  /** `chant workspace points ask <point> --subject <id>` (#2739): what the question is about. */
368
368
  subject?: string;
369
+ /** `chant workspace points ask <point> --store ledger` (#3815): hold the question on chant/lifecycle rather than in the working tree. */
370
+ store?: "tree" | "ledger";
369
371
  /** `chant workspace points answer <id> --answer <value>` (#2739): the people's answer. */
370
372
  answer?: string;
371
373
  /** `chant workspace graph --no-cache` (#2876): read every member, bypassing the per-member cache. */
@@ -48,6 +48,9 @@ import type { GateApprover, GatePolicyDecision, ResolvedGateApproval } from "../
48
48
  import type { GateRunLocator } from "../op/gate-resume";
49
49
  import { readBlobFromPath, readPathSha, readBlobBySha, writeBlobToPath, RefCASConflictError } from "./git";
50
50
 
51
+ // The facts a pending record is written with live apart, so a bundle can import them without git (#3816).
52
+ export { DEFAULT_GATE_EXPIRY, isApprovalUrl, resolveApprovalUrl } from "./gate-pending";
53
+
51
54
  // The selection rules a gate decides by live apart, so a bundle can import them without git (#3763).
52
55
  export {
53
56
  isPendingGateExpired,
@@ -63,57 +66,6 @@ const DIR = "_gates";
63
66
  export const GATES_DIR = DIR;
64
67
  const APPEND_RETRY_ATTEMPTS = 5;
65
68
 
66
- /**
67
- * The address of the approval surface for a gate, resolved from the CI
68
- * environment (#2028).
69
- *
70
- * #1485's argument for gate-as-fact was that approval gets an address:
71
- * "gate-as-PR gives approval a URL, a review surface, and CODEOWNERS as the
72
- * authorization model." What shipped recorded the gate and not the address,
73
- * so a pending-approval card had nothing to link to and gate-as-PR stayed a
74
- * convention. This is the narrow, honest half of that: when a tick (or a
75
- * `chant approve`) runs inside the PR/MR job that carries the change, the
76
- * loop genuinely knows where approval happens, and says so. Anywhere else it
77
- * returns `undefined` and the field is simply absent — never a guess, never a
78
- * synthesized link.
79
- *
80
- * The env-var fallback chain is the same one `--actor` and `--run-id` already
81
- * use (`../cli/handlers/components.ts`): GitHub Actions first, then GitLab CI.
82
- *
83
- * - GitHub Actions on a `pull_request` event: `GITHUB_SERVER_URL` +
84
- * `GITHUB_REPOSITORY` + the PR number, which `GITHUB_REF_NAME` carries as
85
- * `<n>/merge`. A push-event run has no PR, so it resolves to nothing.
86
- * - GitLab CI on a merge-request pipeline: `CI_MERGE_REQUEST_PROJECT_URL` +
87
- * `CI_MERGE_REQUEST_IID`.
88
- */
89
- export function resolveApprovalUrl(env: NodeJS.ProcessEnv = process.env): string | undefined {
90
- const prNumber = /^(\d+)\/(merge|head)$/.exec(env.GITHUB_REF_NAME ?? "")?.[1];
91
- if (prNumber && env.GITHUB_REPOSITORY) {
92
- const server = (env.GITHUB_SERVER_URL ?? "https://github.com").replace(/\/$/, "");
93
- return `${server}/${env.GITHUB_REPOSITORY}/pull/${prNumber}`;
94
- }
95
-
96
- if (env.CI_MERGE_REQUEST_PROJECT_URL && env.CI_MERGE_REQUEST_IID) {
97
- return `${env.CI_MERGE_REQUEST_PROJECT_URL.replace(/\/$/, "")}/-/merge_requests/${env.CI_MERGE_REQUEST_IID}`;
98
- }
99
-
100
- return undefined;
101
- }
102
-
103
- /**
104
- * Whether `raw` is an address worth recording as one: an absolute `http`/
105
- * `https` URL. A gate's address is a link a reader is expected to follow, so
106
- * a relative path or a `file:`/`javascript:` scheme is refused at the CLI
107
- * boundary rather than written into an immutable record.
108
- */
109
- export function isApprovalUrl(raw: string): boolean {
110
- try {
111
- const parsed = new URL(raw);
112
- return parsed.protocol === "http:" || parsed.protocol === "https:";
113
- } catch {
114
- return false;
115
- }
116
- }
117
69
 
118
70
  /**
119
71
  * The answer record a gate that asks a decision point cites (#3170): the
@@ -342,8 +294,6 @@ export type PendingGateInput = Omit<PendingGateRecord, "version" | "kind">;
342
294
  /** Either kind of line in `_gates/<op>.jsonl`. */
343
295
  export type GateLedgerRecord = GateResolutionRecord | PendingGateRecord;
344
296
 
345
- /** The default a gate's pending fact expires after when its `GateStep` declares no `timeout` — the same 48h `GateStep.timeout` documents as its own default. */
346
- export const DEFAULT_GATE_EXPIRY = "48h";
347
297
 
348
298
  function filename(op: string): string {
349
299
  return `${op}.jsonl`;
@@ -0,0 +1,62 @@
1
+ /**
2
+ * What a pending gate fact is written with, apart from the ledger's git code
3
+ * (#3816): its default expiry and the address of its approval surface. A
4
+ * bundle that records a pending fact through its own port, such as
5
+ * `@intentius/chant/point-decision`, imports these without git.
6
+ * `./gate-ledger.ts` re-exports them.
7
+ */
8
+
9
+ /** The default a gate's pending fact expires after when its `GateStep` declares no `timeout` — the same 48h `GateStep.timeout` documents as its own default. */
10
+ export const DEFAULT_GATE_EXPIRY = "48h";
11
+
12
+ /**
13
+ * The address of the approval surface for a gate, resolved from the CI
14
+ * environment (#2028).
15
+ *
16
+ * #1485's argument for gate-as-fact was that approval gets an address:
17
+ * "gate-as-PR gives approval a URL, a review surface, and CODEOWNERS as the
18
+ * authorization model." What shipped recorded the gate and not the address,
19
+ * so a pending-approval card had nothing to link to and gate-as-PR stayed a
20
+ * convention. This is the narrow, honest half of that: when a tick (or a
21
+ * `chant approve`) runs inside the PR/MR job that carries the change, the
22
+ * loop genuinely knows where approval happens, and says so. Anywhere else it
23
+ * returns `undefined` and the field is simply absent — never a guess, never a
24
+ * synthesized link.
25
+ *
26
+ * The env-var fallback chain is the same one `--actor` and `--run-id` already
27
+ * use (`../cli/handlers/components.ts`): GitHub Actions first, then GitLab CI.
28
+ *
29
+ * - GitHub Actions on a `pull_request` event: `GITHUB_SERVER_URL` +
30
+ * `GITHUB_REPOSITORY` + the PR number, which `GITHUB_REF_NAME` carries as
31
+ * `<n>/merge`. A push-event run has no PR, so it resolves to nothing.
32
+ * - GitLab CI on a merge-request pipeline: `CI_MERGE_REQUEST_PROJECT_URL` +
33
+ * `CI_MERGE_REQUEST_IID`.
34
+ */
35
+ export function resolveApprovalUrl(env: NodeJS.ProcessEnv = process.env): string | undefined {
36
+ const prNumber = /^(\d+)\/(merge|head)$/.exec(env.GITHUB_REF_NAME ?? "")?.[1];
37
+ if (prNumber && env.GITHUB_REPOSITORY) {
38
+ const server = (env.GITHUB_SERVER_URL ?? "https://github.com").replace(/\/$/, "");
39
+ return `${server}/${env.GITHUB_REPOSITORY}/pull/${prNumber}`;
40
+ }
41
+
42
+ if (env.CI_MERGE_REQUEST_PROJECT_URL && env.CI_MERGE_REQUEST_IID) {
43
+ return `${env.CI_MERGE_REQUEST_PROJECT_URL.replace(/\/$/, "")}/-/merge_requests/${env.CI_MERGE_REQUEST_IID}`;
44
+ }
45
+
46
+ return undefined;
47
+ }
48
+
49
+ /**
50
+ * Whether `raw` is an address worth recording as one: an absolute `http`/
51
+ * `https` URL. A gate's address is a link a reader is expected to follow, so
52
+ * a relative path or a `file:`/`javascript:` scheme is refused at the CLI
53
+ * boundary rather than written into an immutable record.
54
+ */
55
+ export function isApprovalUrl(raw: string): boolean {
56
+ try {
57
+ const parsed = new URL(raw);
58
+ return parsed.protocol === "http:" || parsed.protocol === "https:";
59
+ } catch {
60
+ return false;
61
+ }
62
+ }
@@ -9,6 +9,7 @@
9
9
  * esbuild's own list of what went in.
10
10
  */
11
11
 
12
+ import { spawnSync } from "node:child_process";
12
13
  import { join } from "node:path";
13
14
  import { build } from "esbuild";
14
15
  import { describe, expect, test } from "vitest";
@@ -48,3 +49,22 @@ describe("the notify bundle", () => {
48
49
  expect(bytes).toBeLessThan(4 * 1024);
49
50
  });
50
51
  });
52
+
53
+ describe("the compiled notify entries inside this repository (#3803)", () => {
54
+ // `./notify` and `./notify-verify` resolve their `import` condition to
55
+ // dist/*.js so plain Node can load an installed package. A checkout has no
56
+ // dist JS (the package build keeps it only for `npm pack`), so a lexicon or
57
+ // package here that imports either entry fails to load under `chant build`.
58
+ // The github lexicon's wave pipeline did, and the release suites' delivery
59
+ // project could not build. Source here imports from `src` paths instead.
60
+ test("no source outside packages/core imports @intentius/chant/notify or notify-verify", () => {
61
+ const found = spawnSync(
62
+ "git",
63
+ ["grep", "-l", "-E", "from [\"']@intentius/chant/notify(-verify)?[\"']", "--", "*.ts", "*.mts", "*.mjs", ":!packages/core/**"],
64
+ { cwd: REPO, encoding: "utf-8" },
65
+ );
66
+ // git grep exits 1 when nothing matches.
67
+ expect(found.status, found.stderr).toBe(1);
68
+ expect(found.stdout).toBe("");
69
+ });
70
+ });
@@ -320,6 +320,7 @@ export const decideContract = activityContract(
320
320
  cwd: z.string().optional(),
321
321
  backends: z.record(z.string(), backendSchema).optional(),
322
322
  dryRun: z.boolean().optional(),
323
+ store: z.enum(["tree", "ledger"]).optional(),
323
324
  }),
324
325
  z.strictObject({
325
326
  id: z.string(),
@@ -65,6 +65,8 @@ export interface DecideArgs {
65
65
  backends?: Record<string, DecideBackend>;
66
66
  /** Ask, but write nothing, and return the question whatever its state: an open one does not stop the run. */
67
67
  dryRun?: boolean;
68
+ /** Where a new question goes (#3815): `"ledger"` holds it on chant/lifecycle, for a run whose checkout does not outlive it. Default: the ledger in a steward's turn, the tree otherwise. */
69
+ store?: "tree" | "ledger";
68
70
  }
69
71
 
70
72
  export interface DecideResult {
@@ -234,6 +236,7 @@ export async function runDecide(args: DecideArgs, deps: DecideDeps = {}, signal?
234
236
  inputs,
235
237
  ...(args.subject !== undefined ? { subject: args.subject } : {}),
236
238
  ...(args.kind !== undefined ? { kind: args.kind } : {}),
239
+ ...(args.store !== undefined ? { store: args.store } : {}),
237
240
  ...(deps.on ? { on: deps.on } : {}),
238
241
  };
239
242