@intentius/chant 0.124.25 → 0.124.27

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 (113) hide show
  1. package/dist/cli/commands/build.d.ts.map +1 -1
  2. package/dist/cli/commands/build.js +4 -2
  3. package/dist/cli/commands/lint.d.ts.map +1 -1
  4. package/dist/cli/commands/lint.js +4 -2
  5. package/dist/cli/handlers/approve.d.ts.map +1 -1
  6. package/dist/cli/handlers/approve.js +39 -4
  7. package/dist/gate-decision.d.ts +1 -1
  8. package/dist/gate-decision.d.ts.map +1 -1
  9. package/dist/gate-decision.js +1 -1
  10. package/dist/lifecycle/gate-audit.d.ts +7 -1
  11. package/dist/lifecycle/gate-audit.d.ts.map +1 -1
  12. package/dist/lifecycle/gate-audit.js +40 -3
  13. package/dist/lifecycle/gate-checkpoint.d.ts +78 -0
  14. package/dist/lifecycle/gate-checkpoint.d.ts.map +1 -0
  15. package/dist/lifecycle/gate-checkpoint.js +103 -0
  16. package/dist/lifecycle/gate-ledger.d.ts +41 -0
  17. package/dist/lifecycle/gate-ledger.d.ts.map +1 -1
  18. package/dist/lifecycle/gate-ledger.js +18 -0
  19. package/dist/lifecycle/run-ledger.d.ts +2 -0
  20. package/dist/lifecycle/run-ledger.d.ts.map +1 -1
  21. package/dist/lifecycle/run-ledger.js +2 -0
  22. package/dist/lint/rules/op/index.d.ts +6 -2
  23. package/dist/lint/rules/op/index.d.ts.map +1 -1
  24. package/dist/lint/rules/op/index.js +7 -3
  25. package/dist/lint/rules/op/ops016-gate-resume.d.ts +14 -0
  26. package/dist/lint/rules/op/ops016-gate-resume.d.ts.map +1 -0
  27. package/dist/lint/rules/op/ops016-gate-resume.js +31 -0
  28. package/dist/lint/rules/op/ops017-gate-alias.d.ts +30 -0
  29. package/dist/lint/rules/op/ops017-gate-alias.d.ts.map +1 -0
  30. package/dist/lint/rules/op/ops017-gate-alias.js +67 -0
  31. package/dist/op/activity-contract.d.ts +14 -0
  32. package/dist/op/activity-contract.d.ts.map +1 -1
  33. package/dist/op/activity-contract.js +16 -0
  34. package/dist/op/activity-registry.d.ts +6 -3
  35. package/dist/op/activity-registry.d.ts.map +1 -1
  36. package/dist/op/activity-registry.js +7 -5
  37. package/dist/op/builders.d.ts +7 -0
  38. package/dist/op/builders.d.ts.map +1 -1
  39. package/dist/op/builders.js +13 -0
  40. package/dist/op/discover.d.ts.map +1 -1
  41. package/dist/op/discover.js +14 -7
  42. package/dist/op/gate-alias.d.ts +57 -0
  43. package/dist/op/gate-alias.d.ts.map +1 -0
  44. package/dist/op/gate-alias.js +127 -0
  45. package/dist/op/gate-checkpoint.d.ts +123 -0
  46. package/dist/op/gate-checkpoint.d.ts.map +1 -0
  47. package/dist/op/gate-checkpoint.js +280 -0
  48. package/dist/op/gate.d.ts +54 -2
  49. package/dist/op/gate.d.ts.map +1 -1
  50. package/dist/op/gate.js +142 -1
  51. package/dist/op/index.d.ts +4 -1
  52. package/dist/op/index.d.ts.map +1 -1
  53. package/dist/op/index.js +2 -1
  54. package/dist/op/local-executor.d.ts +57 -2
  55. package/dist/op/local-executor.d.ts.map +1 -1
  56. package/dist/op/local-executor.js +136 -6
  57. package/dist/op/local-output.d.ts.map +1 -1
  58. package/dist/op/local-output.js +20 -2
  59. package/dist/op/op-ir.d.ts +4 -0
  60. package/dist/op/op-ir.d.ts.map +1 -1
  61. package/dist/op/op-ir.js +4 -0
  62. package/dist/op/runtime.d.ts +15 -0
  63. package/dist/op/runtime.d.ts.map +1 -1
  64. package/dist/op/runtimes/local.d.ts.map +1 -1
  65. package/dist/op/runtimes/local.js +9 -2
  66. package/dist/op/types.d.ts +31 -0
  67. package/dist/op/types.d.ts.map +1 -1
  68. package/dist/wave-runtime.mjs +225 -245
  69. package/dist/workspace/trust/gate-seal.d.ts +32 -1
  70. package/dist/workspace/trust/gate-seal.d.ts.map +1 -1
  71. package/dist/workspace/trust/gate-seal.js +41 -2
  72. package/dist/workspace/trust/seal.d.ts +1 -1
  73. package/dist/workspace/trust/seal.d.ts.map +1 -1
  74. package/dist/workspace/trust/seal.js +1 -1
  75. package/package.json +1 -1
  76. package/src/cli/commands/build.ts +9 -2
  77. package/src/cli/commands/lint.ts +4 -2
  78. package/src/cli/compiled-cli.e2e.test.ts +31 -6
  79. package/src/cli/handlers/approve.ts +46 -4
  80. package/src/cli/handlers/operator.test.ts +91 -0
  81. package/src/gate-decision.ts +2 -0
  82. package/src/lifecycle/gate-audit.ts +41 -4
  83. package/src/lifecycle/gate-checkpoint.test.ts +128 -0
  84. package/src/lifecycle/gate-checkpoint.ts +133 -0
  85. package/src/lifecycle/gate-ledger.ts +61 -0
  86. package/src/lifecycle/run-ledger.ts +4 -0
  87. package/src/lint/rules/op/index.ts +9 -3
  88. package/src/lint/rules/op/ops016-gate-resume.test.ts +53 -0
  89. package/src/lint/rules/op/ops016-gate-resume.ts +48 -0
  90. package/src/lint/rules/op/ops017-gate-alias.test.ts +85 -0
  91. package/src/lint/rules/op/ops017-gate-alias.ts +89 -0
  92. package/src/op/activity-contract.ts +22 -1
  93. package/src/op/activity-registry.ts +7 -5
  94. package/src/op/builders.ts +21 -1
  95. package/src/op/discover-root.test.ts +39 -0
  96. package/src/op/discover.ts +15 -8
  97. package/src/op/gate-alias.e2e.test.ts +78 -0
  98. package/src/op/gate-alias.test.ts +350 -0
  99. package/src/op/gate-alias.ts +137 -0
  100. package/src/op/gate-checkpoint.test.ts +284 -0
  101. package/src/op/gate-checkpoint.ts +322 -0
  102. package/src/op/gate.ts +198 -4
  103. package/src/op/index.ts +4 -1
  104. package/src/op/local-executor.ts +180 -7
  105. package/src/op/local-output.ts +18 -2
  106. package/src/op/op-ir.test.ts +25 -0
  107. package/src/op/op-ir.ts +8 -0
  108. package/src/op/runtime.ts +8 -0
  109. package/src/op/runtimes/local.ts +9 -2
  110. package/src/op/types.ts +32 -0
  111. package/src/workspace/trust/gate-seal.test.ts +29 -2
  112. package/src/workspace/trust/gate-seal.ts +46 -2
  113. package/src/workspace/trust/seal.ts +1 -1
@@ -14,6 +14,12 @@
14
14
  * ledger, so `chant approve <op> <gate>` followed by `chant run <op>` is the
15
15
  * whole loop.
16
16
  *
17
+ * A gate with `resume: true` (#3947) also stores a checkpoint of the step
18
+ * outputs the steps after it read, and the next run after the approval starts
19
+ * at the gate instead of the first phase. It re-runs the step that produced
20
+ * the gate's plan first, and starts at the first phase after all when the
21
+ * plan moved. See `./gate-checkpoint.ts`.
22
+ *
17
23
  * The executor is deliberately decoupled from any lexicon: activity
18
24
  * implementations and profiles are passed in (loaded dynamically by the CLI),
19
25
  * so core never statically depends on one.
@@ -28,6 +34,7 @@ import { stepLabel, withRunConsole, withStepConsole } from "./step-console.js";
28
34
  import { stepTimeoutProblem } from "./activity-profiles.js";
29
35
  import { describeGateMismatch, evaluateGate, gateIsSealed, gitGateLedgerPort } from "./gate.js";
30
36
  import { gateName } from "./gate-name.js";
37
+ import { resolveGateAliases } from "./gate-alias.js";
31
38
  import { gatePointOf } from "./gate-point.js";
32
39
  import { evaluatePointGate, workspaceGatePointAsker } from "./gate-point-run.js";
33
40
  import { GATE_PLAN_CONTEXT_KEY, gatePlanSummaryOfResult } from "./gate-plan-context.js";
@@ -41,6 +48,9 @@ import { RunWorkLease, LEASE_LOST, workLeaseProblems, workLeaseNeedsRunItem } fr
41
48
  import { WORK_LEASE_STEP_ID } from "./types.js";
42
49
  import { LiveRun, currentLiveRun, withLiveRun } from "./run-live.js";
43
50
  import { runEnvOf } from "../lifecycle/run-ledger.js";
51
+ import { getHeadCommit } from "../lifecycle/git.js";
52
+ import { describePlanDigest, samePlanDigest } from "../lifecycle/plan-digest.js";
53
+ import { buildGateCheckpoint, decideGateResume, resumeGatesOf } from "./gate-checkpoint.js";
44
54
  export { parseDuration } from "./duration.js";
45
55
  // ── Errors ────────────────────────────────────────────────────────────────��─
46
56
  /**
@@ -490,6 +500,24 @@ async function runGateStep(step, phaseName, gates, resultsById = new Map()) {
490
500
  const resolvedPlan = resolveStepOutputRefs(step.plan, resultsById);
491
501
  const planDigest = typeof resolvedPlan === "string" && resolvedPlan !== "" ? resolvedPlan : undefined;
492
502
  const approval = resolveGateApproval(step, resultsById);
503
+ // #3947: a gate that resumes stores the outputs the steps after it read.
504
+ const resumeAt = gates.resume?.gates.get(step);
505
+ let checkpoint;
506
+ let blocked;
507
+ if (resumeAt && gates.resume) {
508
+ const built = buildGateCheckpoint(gates.resume.config, resumeAt, {
509
+ runId: gates.runId ?? "",
510
+ commit: gates.resume.commit,
511
+ ...(gates.env !== undefined ? { environment: gates.env } : {}),
512
+ ...(planDigest !== undefined ? { planDigest } : {}),
513
+ outputs: resultsById,
514
+ ...(gates.resume.contracts ? { contracts: gates.resume.contracts } : {}),
515
+ });
516
+ if ("blocked" in built)
517
+ blocked = built.blocked;
518
+ else
519
+ checkpoint = built.checkpoint;
520
+ }
493
521
  let check;
494
522
  try {
495
523
  check = await evaluateGate(gates.port, {
@@ -501,6 +529,8 @@ async function runGateStep(step, phaseName, gates, resultsById = new Map()) {
501
529
  ...(planDigest !== undefined ? { planDigest } : {}),
502
530
  ...(approval ? { approval } : {}),
503
531
  ...(gates.now ? { now: gates.now } : {}),
532
+ ...(checkpoint ? { checkpoint } : {}),
533
+ ...(step.aliases?.length ? { aliases: resolveGateAliases(step, gates.op) } : {}),
504
534
  });
505
535
  }
506
536
  catch (err) {
@@ -532,6 +562,9 @@ async function runGateStep(step, phaseName, gates, resultsById = new Map()) {
532
562
  ...(resolution.url ? { url: resolution.url } : {}),
533
563
  ...(check.via ? { via: check.via } : {}),
534
564
  ...(check.approvals ? { approvers: check.approvals.map((r) => r.resolvedBy) } : {}),
565
+ ...(check.carried?.length
566
+ ? { carriedFrom: check.carried.map((r) => ({ op: r.carriedFrom.op, gate: r.carriedFrom.gate, resolvedBy: r.resolvedBy, timestamp: r.carriedFrom.timestamp })) }
567
+ : {}),
535
568
  };
536
569
  // #2522: a later step reads this gate's approval from the run context
537
570
  // rather than re-tallying the ledger, so it sees the decision this run made.
@@ -547,6 +580,8 @@ async function runGateStep(step, phaseName, gates, resultsById = new Map()) {
547
580
  },
548
581
  };
549
582
  }
583
+ if (blocked)
584
+ gates.resume?.note(`gate "${gateName(step)}" stored no checkpoint, so it won't resume: ${blocked}`);
550
585
  const refusal = check.mismatch
551
586
  ? { refusal: describeGateMismatch(gates.op, gateName(step), check.mismatch, await gateIsSealed(gateName(step))) }
552
587
  : {};
@@ -726,8 +761,10 @@ async function runEffectStep(step, phaseName, activities, profiles, resultsById,
726
761
  /**
727
762
  * Run a phase. Throws `PhaseFailure` (with the records so far) if any step
728
763
  * fails, or `GateStop` if a `gate` step in it is still pending approval.
764
+ * `from` starts a sequential phase at that step, for a run that resumes at a
765
+ * gate in it (#3947); the steps before it are the caller's to record.
729
766
  */
730
- async function runPhase(phase, activities, profiles, resultsById, gates, signal) {
767
+ async function runPhase(phase, activities, profiles, resultsById, gates, signal, from = 0) {
731
768
  if (phase.parallel) {
732
769
  const eff = phase.steps.find(isEffect);
733
770
  if (eff) {
@@ -807,7 +844,7 @@ async function runPhase(phase, activities, profiles, resultsById, gates, signal)
807
844
  }
808
845
  }
809
846
  };
810
- for (let i = 0; i < steps.length; i++) {
847
+ for (let i = from; i < steps.length; i++) {
811
848
  const step = steps[i];
812
849
  // The work lease (#2748): claimed here when it is due, and checked before
813
850
  // every step, so no step starts once the lease is lost.
@@ -1020,12 +1057,12 @@ async function runOpInTurn(config, activities, profiles, signal, options, run) {
1020
1057
  const start = Date.now();
1021
1058
  // Each phase's wall-clock time, for the run record and the in-flight one.
1022
1059
  const phaseDurations = {};
1023
- const timedPhase = async (phase, ctx, phaseSignal) => {
1060
+ const timedPhase = async (phase, ctx, phaseSignal, from = 0) => {
1024
1061
  const live = currentLiveRun();
1025
1062
  const t0 = Date.now();
1026
1063
  live?.phaseStarted(phase.name);
1027
1064
  try {
1028
- const ran = await runPhase(phase, activities, profiles, resultsById, ctx, phaseSignal);
1065
+ const ran = await runPhase(phase, activities, profiles, resultsById, ctx, phaseSignal, from);
1029
1066
  live?.phaseEnded(phase.name, phaseVerdict(ran), Date.now() - t0);
1030
1067
  return ran;
1031
1068
  }
@@ -1049,6 +1086,7 @@ async function runOpInTurn(config, activities, profiles, signal, options, run) {
1049
1086
  ...(gate ? { gate: { name: gate.gate, since: gate.timestamp, ...(gate.op !== config.name ? { op: gate.op } : {}) } } : {}),
1050
1087
  ...(point ? { point: { ...point, since: ended } } : {}),
1051
1088
  ...(options.steward ? { steward: options.steward } : {}),
1089
+ ...(resumed ? { resumed } : {}),
1052
1090
  phaseDurations,
1053
1091
  });
1054
1092
  const record = { version: 1, ...input, id: runId };
@@ -1066,11 +1104,98 @@ async function runOpInTurn(config, activities, profiles, signal, options, run) {
1066
1104
  // steps finish, so a later step's step-output references resolve to real
1067
1105
  // values before reaching an activity function — see `runStep`.
1068
1106
  const resultsById = new Map();
1107
+ // #3947: the gates that resume. Each stores a checkpoint when the run stops
1108
+ // at it, and the run may start at one of them.
1109
+ let resumed;
1110
+ const resumeNotes = [];
1111
+ const resumeGates = resumeGatesOf(config);
1112
+ if (resumeGates.length > 0) {
1113
+ gates.resume = {
1114
+ config,
1115
+ gates: new Map(resumeGates.map((g) => [g.step, g])),
1116
+ commit: options.commit ?? (await getHeadCommit(options.cwd ? { cwd: options.cwd } : undefined).catch(() => undefined)),
1117
+ ...(options.contracts ? { contracts: options.contracts } : {}),
1118
+ note: (line) => resumeNotes.push(line),
1119
+ };
1120
+ }
1121
+ const resumeFields = () => ({
1122
+ ...(resumed ? { resumed } : {}),
1123
+ ...(resumeNotes.length > 0 ? { resumeNotes: [...resumeNotes] } : {}),
1124
+ });
1125
+ /**
1126
+ * Resume at the gate `decision` names (#3947): seed the checkpoint's
1127
+ * outputs, record every step before the gate as resumed, and run the step
1128
+ * that produced the gate's plan again. Returns where the phases pick up, or
1129
+ * undefined when the plan moved and the run starts at the first phase.
1130
+ */
1131
+ const resumeAt = async (decision) => {
1132
+ const { gate, checkpoint } = decision;
1133
+ for (const [id, value] of Object.entries(checkpoint.outputs))
1134
+ resultsById.set(id, value);
1135
+ const marker = { run: checkpoint.runId, gate: gate.name };
1136
+ const prefix = [];
1137
+ for (const [pi, phase] of config.phases.entries()) {
1138
+ if (pi > gate.phaseIndex)
1139
+ break;
1140
+ const steps = pi < gate.phaseIndex ? phase.steps : phase.parallel ? [] : phase.steps.slice(0, gate.stepIndex);
1141
+ for (const [si, step] of steps.entries()) {
1142
+ if (gate.planStep && pi === gate.planStep.phaseIndex && si === gate.planStep.stepIndex) {
1143
+ const ran = await runStep(gate.planStep.step, phase.name, activities, profiles, resultsById, stepSignal);
1144
+ prefix.push(ran.record);
1145
+ if (ran.record.status === "fail" || ran.pending || ran.record.point) {
1146
+ for (const r of prefix)
1147
+ gates.onRecord?.(r);
1148
+ if (ran.pending)
1149
+ throw new GateStop(prefix, ran.pending, phase.name);
1150
+ if (ran.record.point)
1151
+ throw new PointStop(prefix, ran.record.point, phase.name);
1152
+ throw new PhaseFailure(prefix);
1153
+ }
1154
+ continue;
1155
+ }
1156
+ const skipped = isEffect(step)
1157
+ ? skippedRecord(phase.name, `effect:${step.receipt.name}`)
1158
+ : isGate(step)
1159
+ ? skippedRecord(phase.name, gateFn(step))
1160
+ : skippedRecord(phase.name, step.fn, step.args);
1161
+ prefix.push({ ...skipped, resumed: marker });
1162
+ }
1163
+ }
1164
+ // The plan the run would approve now against the one approved: a moved
1165
+ // plan is live drift since the approval, and starts the run over.
1166
+ const resolved = resolveStepOutputRefs(gate.step.plan, resultsById);
1167
+ const planned = typeof resolved === "string" && resolved !== "" ? resolved : undefined;
1168
+ if (!samePlanDigest(planned, decision.pending.planDigest)) {
1169
+ resultsById.clear();
1170
+ resumeNotes.push(`gate "${gate.name}" is approved, and the run starts at the first phase: the plan moved since the approval ` +
1171
+ `(approved ${describePlanDigest(decision.pending.planDigest)}, planned ${planned ?? "(none)"})`);
1172
+ return undefined;
1173
+ }
1174
+ records.push(...prefix);
1175
+ for (const r of prefix)
1176
+ gates.onRecord?.(r);
1177
+ resumed = { gate: gate.name, run: checkpoint.runId, checkpoint: decision.digest };
1178
+ return { phaseIndex: gate.phaseIndex, stepIndex: config.phases[gate.phaseIndex].parallel ? 0 : gate.stepIndex };
1179
+ };
1069
1180
  try {
1070
- for (const phase of config.phases) {
1181
+ let from;
1182
+ if (gates.resume) {
1183
+ const decision = await decideGateResume(gates.port, config, {
1184
+ now: options.now ?? new Date().toISOString(),
1185
+ commit: gates.resume.commit,
1186
+ ...(options.env !== undefined ? { environment: options.env } : {}),
1187
+ });
1188
+ if (decision.kind === "refused") {
1189
+ resumeNotes.push(`gate "${decision.gate}" is approved, and the run starts at the first phase: ${decision.reason}`);
1190
+ }
1191
+ else if (decision.kind === "resume") {
1192
+ from = await resumeAt(decision);
1193
+ }
1194
+ }
1195
+ for (let pi = from?.phaseIndex ?? 0; pi < config.phases.length; pi++) {
1071
1196
  if (signal?.aborted)
1072
1197
  throw new PhaseFailure([]);
1073
- records.push(...(await timedPhase(phase, gates, stepSignal)));
1198
+ records.push(...(await timedPhase(config.phases[pi], gates, stepSignal, pi === from?.phaseIndex ? from.stepIndex : 0)));
1074
1199
  }
1075
1200
  // The last renewal before the run is recorded (#2748): a run whose lease
1076
1201
  // was lost is never recorded as done.
@@ -1092,6 +1217,7 @@ async function runOpInTurn(config, activities, profiles, signal, options, run) {
1092
1217
  startedAt,
1093
1218
  record,
1094
1219
  ...(await finishWork("ok")),
1220
+ ...resumeFields(),
1095
1221
  };
1096
1222
  }
1097
1223
  // An open decision point ends the run the way a pending gate does (#2749):
@@ -1109,6 +1235,7 @@ async function runOpInTurn(config, activities, profiles, signal, options, run) {
1109
1235
  point: err.question,
1110
1236
  record,
1111
1237
  ...(await finishWork("waiting")),
1238
+ ...resumeFields(),
1112
1239
  };
1113
1240
  }
1114
1241
  // A pending gate ends the run where it stands: no later phase, and no
@@ -1128,6 +1255,7 @@ async function runOpInTurn(config, activities, profiles, signal, options, run) {
1128
1255
  ...(err.pushWarning ? { gatePushWarning: err.pushWarning } : {}),
1129
1256
  record,
1130
1257
  ...(await finishWork("gated")),
1258
+ ...resumeFields(),
1131
1259
  };
1132
1260
  }
1133
1261
  if (err instanceof WorkStop) {
@@ -1202,6 +1330,7 @@ async function runOpInTurn(config, activities, profiles, signal, options, run) {
1202
1330
  startedAt,
1203
1331
  record: failed,
1204
1332
  ...(await finishWork("fail")),
1333
+ ...resumeFields(),
1205
1334
  }, { cause: err });
1206
1335
  }
1207
1336
  const record = await settle(records, "ok");
@@ -1213,6 +1342,7 @@ async function runOpInTurn(config, activities, profiles, signal, options, run) {
1213
1342
  startedAt,
1214
1343
  record,
1215
1344
  ...(await finishWork("ok")),
1345
+ ...resumeFields(),
1216
1346
  };
1217
1347
  }
1218
1348
  /** A finished phase's verdict, as the run ledger folds it: `fail`, `skipped` when every step was, else `ok`. */
@@ -1 +1 @@
1
- {"version":3,"file":"local-output.d.ts","sourceRoot":"","sources":["../../src/op/local-output.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAIhE,KAAK,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;AAerC;;;GAGG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,GAAE,MAAe,EAAE,MAAM,UAAQ,GAAG,IAAI,CA2F7F;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,GAAE,MAAe,EAAE,MAAM,UAAQ,GAAG,IAAI,CAS5F;AAED,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC;AAExC,wEAAwE;AACxE,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAErD"}
1
+ {"version":3,"file":"local-output.d.ts","sourceRoot":"","sources":["../../src/op/local-output.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAIhE,KAAK,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;AAerC;;;GAGG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,GAAE,MAAe,EAAE,MAAM,UAAQ,GAAG,IAAI,CAyG7F;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,GAAE,MAAe,EAAE,MAAM,UAAQ,GAAG,IAAI,CAW5F;AAED,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC;AAExC,wEAAwE;AACxE,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAErD"}
@@ -20,6 +20,10 @@ function formatDuration(ms) {
20
20
  * stays clean for piping (the `--json` renderer owns stdout).
21
21
  */
22
22
  export function renderHuman(result, write = stderr, sealed = false) {
23
+ // #3947: a run that resumed at a gate says where it picked up.
24
+ if (result.resumed) {
25
+ write(`[resume] at gate "${result.resumed.gate}", from run ${result.resumed.run}'s checkpoint ${result.resumed.checkpoint}`);
26
+ }
23
27
  let currentPhase;
24
28
  for (const record of result.records) {
25
29
  if (record.phase !== currentPhase) {
@@ -28,7 +32,10 @@ export function renderHuman(result, write = stderr, sealed = false) {
28
32
  }
29
33
  const mark = record.status === "ok" ? "✓" : record.status === "fail" ? "✗" : "•";
30
34
  const call = `${record.fn}(${formatArgs(record.args ?? {})})`;
31
- if (record.status === "skipped") {
35
+ if (record.status === "skipped" && record.resumed) {
36
+ write(` ${mark} ${call} from run ${record.resumed.run}`);
37
+ }
38
+ else if (record.status === "skipped") {
32
39
  write(` ${mark} ${call} skipped`);
33
40
  }
34
41
  else {
@@ -40,6 +47,10 @@ export function renderHuman(result, write = stderr, sealed = false) {
40
47
  if (record.approval) {
41
48
  write(` [approved] ${record.approval.resolvedBy} at ${record.approval.timestamp}` +
42
49
  (record.approval.url ? ` (${record.approval.url})` : ""));
50
+ // #3949: an approval carried from one of the gate's aliases names where it came from.
51
+ for (const c of record.approval.carriedFrom ?? []) {
52
+ write(` [carried] ${c.resolvedBy}'s approval of ${c.op}/${c.gate} at ${c.timestamp}`);
53
+ }
43
54
  }
44
55
  if (record.refusal) {
45
56
  write(` [refused] ${record.refusal}`);
@@ -64,6 +75,8 @@ export function renderHuman(result, write = stderr, sealed = false) {
64
75
  else if (work?.refusal) {
65
76
  write(`[work] nothing claimed: ${work.refusal}`);
66
77
  }
78
+ for (const note of result.resumeNotes ?? [])
79
+ write(`[resume] ${note}`);
67
80
  const total = `${(result.totalMs / 1000).toFixed(1)}s`;
68
81
  if (result.status === "ok") {
69
82
  write(`Op "${result.op}" completed in ${total}`);
@@ -99,6 +112,9 @@ export function renderHuman(result, write = stderr, sealed = false) {
99
112
  if (gate.url)
100
113
  write(` approve at: ${gate.url}`);
101
114
  write(` expires : ${gate.expiresAt}`);
115
+ // #3947: the approval also lets the next run start here.
116
+ if (gate.checkpointDigest)
117
+ write(` resume : once approved, the next run starts at this gate (checkpoint ${gate.checkpointDigest})`);
102
118
  // #2310: this run's own append reached only the local chant/lifecycle
103
119
  // branch, not the remote. The pending fact is still correct — the gate is
104
120
  // still right to stand — but an operator working from a clone of the
@@ -132,7 +148,9 @@ export function renderJson(result, write = stdout, sealed = false) {
132
148
  const push = result.gatePushed === false
133
149
  ? { pushed: false, pushWarning: result.gatePushWarning ?? "the pending fact was recorded locally only" }
134
150
  : {};
135
- write(JSON.stringify({ ...result.record, ...approve, ...push }));
151
+ // #3947: why a gate that resumes did not, beside the record like `push`.
152
+ const notes = result.resumeNotes ? { resumeNotes: result.resumeNotes } : {};
153
+ write(JSON.stringify({ ...result.record, ...approve, ...push, ...notes }));
136
154
  }
137
155
  /** The command a person answers an open decision point with (#2749). */
138
156
  export function pointAnswerCommand(id) {
@@ -133,6 +133,10 @@ export interface OpIRGateStep {
133
133
  approval?: GateStep["approval"];
134
134
  /** The decision point the gate asks (#3170), carried as authored. Absent on a gate that `chant approve` passes. */
135
135
  point?: GateStep["point"];
136
+ /** The gate resumes once approved (#3947). Absent on a gate that starts its run again at the first phase. */
137
+ resume?: true;
138
+ /** The gate's old names (#3949), carried as authored. Absent on a gate that has none. */
139
+ aliases?: GateStep["aliases"];
136
140
  }
137
141
  export interface OpIREffectStep {
138
142
  kind: "effect";
@@ -1 +1 @@
1
- {"version":3,"file":"op-ir.d.ts","sourceRoot":"","sources":["../../src/op/op-ir.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiFG;AAGH,OAAO,KAAK,EACV,gBAAgB,EAChB,QAAQ,EACR,UAAU,EACV,WAAW,EAIX,QAAQ,EAET,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAG9E;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,QAAQ,CAAC;AAI1C,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,UAAU,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,iGAAiG;IACjG,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,oFAAoF;IACpF,OAAO,EAAE,MAAM,CAAC;IAChB,kGAAkG;IAClG,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,yEAAyE;IACzE,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,gBAAgB,EAAE,CAAC;CAC1D;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,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,0JAA0J;IAC1J,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAClD;;;;OAIG;IACH,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;CACzD;AAyGD;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CACvB,MAAM,EAAE,QAAQ,EAChB,gBAAgB,GAAE,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAgB,EACtE,eAAe,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAqB,GAC7E,IAAI,CA+CN;AAED,sLAAsL;AACtL,wBAAgB,aAAa,CAC3B,MAAM,EAAE,QAAQ,EAChB,gBAAgB,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,EACxD,eAAe,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,GAC1D,MAAM,CAER;AAoDD,qDAAqD;AACrD,wBAAgB,cAAc,CAAC,EAAE,EAAE,IAAI,GAAG,QAAQ,CAoBjD"}
package/dist/op/op-ir.js CHANGED
@@ -137,6 +137,8 @@ function irGateStep(step) {
137
137
  ...(step.plan !== undefined ? { plan: step.plan } : {}),
138
138
  ...(step.approval !== undefined ? { approval: step.approval } : {}),
139
139
  ...(step.point !== undefined ? { point: step.point } : {}),
140
+ ...(step.resume ? { resume: true } : {}),
141
+ ...(step.aliases !== undefined && step.aliases.length > 0 ? { aliases: step.aliases } : {}),
140
142
  };
141
143
  }
142
144
  function irEffectStep(step, contracts) {
@@ -278,6 +280,8 @@ function opStepFromIR(step) {
278
280
  ...(step.plan !== undefined ? { plan: step.plan } : {}),
279
281
  ...(step.approval !== undefined ? { approval: step.approval } : {}),
280
282
  ...(step.point !== undefined ? { point: step.point } : {}),
283
+ ...(step.resume ? { resume: true } : {}),
284
+ ...(step.aliases !== undefined && step.aliases.length > 0 ? { aliases: step.aliases } : {}),
281
285
  };
282
286
  }
283
287
  return {
@@ -64,6 +64,11 @@ export interface OpRunStepRecord {
64
64
  op: string;
65
65
  gate: string;
66
66
  };
67
+ /** The run whose checkpoint supplied this step's output, for a step a resumed run skipped (#3947). */
68
+ resumed?: {
69
+ run: string;
70
+ gate: string;
71
+ };
67
72
  }
68
73
  /** One phase's steps and the verdict they add up to. */
69
74
  export interface OpRunPhaseRecord {
@@ -165,6 +170,16 @@ export interface OpRunRecord {
165
170
  };
166
171
  /** The steward whose turn the run was, when a steward ran it (#2749). */
167
172
  steward?: string;
173
+ /**
174
+ * The gate this run resumed at (#3947), the run whose checkpoint it carried
175
+ * on from, and the checkpoint's digest. Absent on a run that started at the
176
+ * first phase.
177
+ */
178
+ resumed?: {
179
+ gate: string;
180
+ run: string;
181
+ checkpoint: string;
182
+ };
168
183
  }
169
184
  /** An {@link OpRunRecord} before the ledger stamps its version and mints an id. */
170
185
  export type OpRunRecordInput = Omit<OpRunRecord, "version" | "id"> & {
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/op/runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAE3F;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,WAAW,CAAC;AAEhG,wEAAwE;AACxE,wBAAgB,UAAU,CAAC,MAAM,EAAE,WAAW,CAAC,QAAQ,C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,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAErH;;;OAGG;IACH,aAAa,CAAC,CACZ,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACjC"}
@@ -1 +1 @@
1
- {"version":3,"file":"local.d.ts","sourceRoot":"","sources":["../../../src/op/runtimes/local.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAWH,OAAO,EAML,KAAK,iBAAiB,EACvB,MAAM,YAAY,CAAC;AA0CpB;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,GAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,iBAAiB,CA2J3F"}
1
+ {"version":3,"file":"local.d.ts","sourceRoot":"","sources":["../../../src/op/runtimes/local.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAYH,OAAO,EAML,KAAK,iBAAiB,EACvB,MAAM,YAAY,CAAC;AA0CpB;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,GAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,iBAAiB,CAiK3F"}
@@ -21,8 +21,9 @@ import { lexiconNames } from "../../lexicon-module.js";
21
21
  import { loadChantConfig } from "../../config.js";
22
22
  import { loadActivities, loadProfiles } from "../activity-registry.js";
23
23
  import { runOpLocally, OpRunFailure } from "../local-executor.js";
24
+ import { loadActivityContracts } from "../activity-contract-registry.js";
25
+ import { resumeGatesOf } from "../gate-checkpoint.js";
24
26
  import { stepHeartbeatMs } from "../step-console.js";
25
- import { runComponents } from "../../components/cli-support.js";
26
27
  import { discoverOps } from "../discover.js";
27
28
  import { readRunLedger, runEnvOf, DEFAULT_RUN_ENV } from "../../lifecycle/run-ledger.js";
28
29
  import { runStateOf, } from "../runtime.js";
@@ -119,6 +120,8 @@ export function createLocalOpRuntime(opts = {}) {
119
120
  // No/invalid chant.config — base activities only.
120
121
  }
121
122
  const [activities, profiles] = await Promise.all([loadActivities(lexicons), loadProfiles()]);
123
+ // #3947: a gate that resumes stores no output a contract marks secret.
124
+ const contracts = resumeGatesOf(op).length > 0 ? await loadActivityContracts(lexicons) : undefined;
122
125
  // A caller that names the run (#3539: `chant acp` on fountain passes the
123
126
  // conversation id) gets its id on the record; otherwise one is minted.
124
127
  const runId = startOpts.runId ?? `local-${Date.now()}`;
@@ -149,6 +152,7 @@ export function createLocalOpRuntime(opts = {}) {
149
152
  stepOutput: (line) => process.stderr.write(`${line}\n`),
150
153
  stepHeartbeatMs: stepHeartbeatMs(process.env, (message) => process.stderr.write(`warning: ${message}\n`)),
151
154
  ...(startOpts.work ? { work: startOpts.work } : {}),
155
+ ...(contracts ? { contracts } : {}),
152
156
  onWorkLeaseWarning: (message) => process.stderr.write(`warning: "${op.name}" could not renew its work lease, retrying at the next beat: ${message}\n`),
153
157
  });
154
158
  const status = statusFrom(op.name, runId, startedAt, result);
@@ -194,7 +198,10 @@ export function createLocalOpRuntime(opts = {}) {
194
198
  throw new Error(`the local runtime runs "${op}" in the foreground — there is no detached run to cancel. ` +
195
199
  `Press Ctrl-C in the terminal running it, or pass --on <lexicon> for a hosted run.`);
196
200
  },
197
- runComponents(path, selector, options) {
201
+ async runComponents(path, selector, options) {
202
+ // Imported here, not at the top: the components driver is most of core's components tree, and this module is
203
+ // re-exported by `@intentius/chant/op`, which every `*.op.ts` imports (#3982).
204
+ const { runComponents } = await import("../../components/cli-support.js");
198
205
  return runComponents(path, selector, options);
199
206
  },
200
207
  };
@@ -283,6 +283,37 @@ export interface GateStepBase {
283
283
  * `./gate-point.ts`.
284
284
  */
285
285
  point?: string | GatePoint;
286
+ /**
287
+ * A run that stops at this gate can be resumed here once it is approved
288
+ * (#3947), rather than starting again at the first phase. The run stores
289
+ * the step outputs a later step references in a checkpoint on
290
+ * `chant/lifecycle`, and the next run after `chant approve` re-runs the
291
+ * step that produced the gate's `plan`, checks the checkpoint, and carries
292
+ * on from the gate. Any check that fails starts the run at the first phase,
293
+ * and the run says why. See `./gate-checkpoint.ts`.
294
+ *
295
+ * Only a gate at the top of a main phase resumes, and not one that asks a
296
+ * decision point or sits in an Op with a `workLease`. OPS016 refuses the
297
+ * rest at build.
298
+ */
299
+ resume?: boolean;
300
+ /**
301
+ * The names this gate had before an Op was restructured (#3949), so the
302
+ * approvals already recorded under them still count. `op` defaults to this
303
+ * Op. An approval recorded under an alias counts toward this gate when it
304
+ * answers that name's standing pending fact, the fact hasn't expired, it
305
+ * is for the plan this run planned and the same environment, it hasn't
306
+ * been spent, it passes this gate's `identity.gates` rule, and a person
307
+ * made it. The run then writes it again under this gate's name, citing
308
+ * the line it came from (`carriedFrom`). Only a gate bound to a `plan`
309
+ * takes aliases, and OPS017 refuses an alias that is still a gate.
310
+ */
311
+ aliases?: GateAlias[];
312
+ }
313
+ /** A name a gate had before (#3949): a gate of `op`, or of the gate's own Op when `op` is absent. */
314
+ export interface GateAlias {
315
+ op?: string;
316
+ gate: string;
286
317
  }
287
318
  /**
288
319
  * A human approval decided against the gate ledger. The name lives on `gate`;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/op/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,WAAW,QAAQ;IACvB,2JAA2J;IAC3J,IAAI,EAAE,MAAM,CAAC;IACb,mFAAmF;IACnF,QAAQ,EAAE,MAAM,CAAC;IACj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