@cat-factory/orchestration 0.190.0 → 0.192.0

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 (88) hide show
  1. package/dist/container/dependencies.d.ts +15 -2
  2. package/dist/container/dependencies.d.ts.map +1 -1
  3. package/dist/container/engine-dependent-modules.d.ts.map +1 -1
  4. package/dist/container/engine-dependent-modules.js +1 -1
  5. package/dist/container/engine-dependent-modules.js.map +1 -1
  6. package/dist/container/modules.d.ts +1 -1
  7. package/dist/container/modules.d.ts.map +1 -1
  8. package/dist/container/modules.js +26 -1
  9. package/dist/container/modules.js.map +1 -1
  10. package/dist/container/platform-modules.d.ts.map +1 -1
  11. package/dist/container/platform-modules.js +1 -0
  12. package/dist/container/platform-modules.js.map +1 -1
  13. package/dist/container.d.ts +1 -1
  14. package/dist/index.d.ts +4 -3
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +4 -3
  17. package/dist/index.js.map +1 -1
  18. package/dist/modules/execution/ExecutionServiceDependencies.d.ts +8 -1
  19. package/dist/modules/execution/ExecutionServiceDependencies.d.ts.map +1 -1
  20. package/dist/modules/execution/GateHelperDispatcher.js +1 -1
  21. package/dist/modules/execution/GateHelperDispatcher.js.map +1 -1
  22. package/dist/modules/execution/GateStepController.d.ts +15 -0
  23. package/dist/modules/execution/GateStepController.d.ts.map +1 -1
  24. package/dist/modules/execution/GateStepController.js +19 -0
  25. package/dist/modules/execution/GateStepController.js.map +1 -1
  26. package/dist/modules/execution/HumanTestController.js +1 -1
  27. package/dist/modules/execution/HumanTestController.js.map +1 -1
  28. package/dist/modules/execution/PollRunningController.d.ts +8 -0
  29. package/dist/modules/execution/PollRunningController.d.ts.map +1 -1
  30. package/dist/modules/execution/PollRunningController.js +14 -0
  31. package/dist/modules/execution/PollRunningController.js.map +1 -1
  32. package/dist/modules/execution/RalphController.js +1 -1
  33. package/dist/modules/execution/RalphController.js.map +1 -1
  34. package/dist/modules/execution/RunDispatcher.d.ts +6 -20
  35. package/dist/modules/execution/RunDispatcher.d.ts.map +1 -1
  36. package/dist/modules/execution/RunDispatcher.js +30 -7
  37. package/dist/modules/execution/RunDispatcher.js.map +1 -1
  38. package/dist/modules/execution/RunStateMachine.d.ts.map +1 -1
  39. package/dist/modules/execution/RunStateMachine.js +12 -0
  40. package/dist/modules/execution/RunStateMachine.js.map +1 -1
  41. package/dist/modules/execution/StepGraph.d.ts.map +1 -1
  42. package/dist/modules/execution/StepGraph.js +13 -1
  43. package/dist/modules/execution/StepGraph.js.map +1 -1
  44. package/dist/modules/execution/TesterController.js +2 -2
  45. package/dist/modules/execution/TesterController.js.map +1 -1
  46. package/dist/modules/execution/VisualConfirmationController.js +1 -1
  47. package/dist/modules/execution/VisualConfirmationController.js.map +1 -1
  48. package/dist/modules/execution/step-fold.logic.d.ts +11 -2
  49. package/dist/modules/execution/step-fold.logic.d.ts.map +1 -1
  50. package/dist/modules/execution/step-fold.logic.js +18 -2
  51. package/dist/modules/execution/step-fold.logic.js.map +1 -1
  52. package/dist/modules/observability/GateOutcomeRecorder.d.ts +33 -0
  53. package/dist/modules/observability/GateOutcomeRecorder.d.ts.map +1 -0
  54. package/dist/modules/observability/GateOutcomeRecorder.js +45 -0
  55. package/dist/modules/observability/GateOutcomeRecorder.js.map +1 -0
  56. package/dist/modules/observability/LlmObservabilityService.d.ts +22 -1
  57. package/dist/modules/observability/LlmObservabilityService.d.ts.map +1 -1
  58. package/dist/modules/observability/LlmObservabilityService.js +30 -0
  59. package/dist/modules/observability/LlmObservabilityService.js.map +1 -1
  60. package/dist/modules/observability/PlatformObservabilityService.d.ts +32 -1
  61. package/dist/modules/observability/PlatformObservabilityService.d.ts.map +1 -1
  62. package/dist/modules/observability/PlatformObservabilityService.js +71 -10
  63. package/dist/modules/observability/PlatformObservabilityService.js.map +1 -1
  64. package/dist/modules/observability/platform-health.logic.d.ts +35 -4
  65. package/dist/modules/observability/platform-health.logic.d.ts.map +1 -1
  66. package/dist/modules/observability/platform-health.logic.js +45 -0
  67. package/dist/modules/observability/platform-health.logic.js.map +1 -1
  68. package/dist/modules/observability/platform-observability.logic.d.ts +41 -4
  69. package/dist/modules/observability/platform-observability.logic.d.ts.map +1 -1
  70. package/dist/modules/observability/platform-observability.logic.js +88 -6
  71. package/dist/modules/observability/platform-observability.logic.js.map +1 -1
  72. package/dist/modules/observability/retentionPass.d.ts +22 -0
  73. package/dist/modules/observability/retentionPass.d.ts.map +1 -1
  74. package/dist/modules/observability/retentionPass.js +12 -0
  75. package/dist/modules/observability/retentionPass.js.map +1 -1
  76. package/dist/modules/observability/runTraceSpans.logic.d.ts +20 -0
  77. package/dist/modules/observability/runTraceSpans.logic.d.ts.map +1 -0
  78. package/dist/modules/observability/runTraceSpans.logic.js +127 -0
  79. package/dist/modules/observability/runTraceSpans.logic.js.map +1 -0
  80. package/dist/modules/recurring/RecurringPipelineService.d.ts +79 -14
  81. package/dist/modules/recurring/RecurringPipelineService.d.ts.map +1 -1
  82. package/dist/modules/recurring/RecurringPipelineService.js +157 -24
  83. package/dist/modules/recurring/RecurringPipelineService.js.map +1 -1
  84. package/dist/modules/recurring/issueIntake.logic.d.ts +43 -0
  85. package/dist/modules/recurring/issueIntake.logic.d.ts.map +1 -0
  86. package/dist/modules/recurring/issueIntake.logic.js +69 -0
  87. package/dist/modules/recurring/issueIntake.logic.js.map +1 -0
  88. package/package.json +11 -11
@@ -1,6 +1,7 @@
1
1
  import { assertFound, ConflictError, CredentialRequiredError, getErrorMessage, noopLogger, requireWorkspace, ValidationError, } from '@cat-factory/kernel';
2
- import { issueEventMatchesIntake } from '@cat-factory/integrations';
2
+ import { judgeIssueEventForIntake } from '@cat-factory/integrations';
3
3
  import { assertPipelineLaunchable, pipelineHasEnabledBugIntake, } from '../pipelines/pipelineShape.js';
4
+ import { assertValidIssueIntake, dispatchAdmits, dispatchOf } from './issueIntake.logic.js';
4
5
  import { computeNextRun } from './schedule.logic.js';
5
6
  /**
6
7
  * A schedule can only carry a pipeline that is launchable on a recurring cadence: a
@@ -52,6 +53,7 @@ export class RecurringPipelineService {
52
53
  taskConnectionService;
53
54
  events;
54
55
  log;
56
+ adoptIssueAsTask;
55
57
  constructor(deps) {
56
58
  this.schedules = deps.pipelineScheduleRepository;
57
59
  this.workspaceRepository = deps.workspaceRepository;
@@ -66,6 +68,7 @@ export class RecurringPipelineService {
66
68
  this.taskConnectionService = deps.taskConnectionService;
67
69
  this.events = deps.executionEventPublisher;
68
70
  this.log = deps.logger ?? noopLogger;
71
+ this.adoptIssueAsTask = deps.adoptIssueAsTask;
69
72
  }
70
73
  requireWorkspace(workspaceId) {
71
74
  return requireWorkspace(this.workspaceRepository, workspaceId);
@@ -78,18 +81,29 @@ export class RecurringPipelineService {
78
81
  * carry an `issueIntake` config harmlessly). When no task-connection service is wired (no task
79
82
  * sources on this deployment) the connected-source check is skipped; the presence check stands.
80
83
  */
81
- async assertIntakeConfigured(workspaceId, pipeline, issueIntake) {
82
- if (!pipelineHasEnabledBugIntake(pipeline.agentKinds, pipeline.enabled))
83
- return;
84
- if (!issueIntake) {
84
+ async assertIntakeConfigured(workspaceId, pipeline, issueIntake, onDemand) {
85
+ const hasBugIntakeStep = pipelineHasEnabledBugIntake(pipeline.agentKinds, pipeline.enabled);
86
+ if (hasBugIntakeStep && !issueIntake) {
85
87
  throw new ValidationError("A 'bug-intake' pipeline needs an issue-intake configuration (source, board and predicates) on its schedule.");
86
88
  }
89
+ // Nothing to validate when the schedule carries no intake config and its pipeline needs none.
90
+ if (!issueIntake)
91
+ return;
92
+ assertValidIssueIntake({ config: issueIntake, onDemand, hasBugIntakeStep });
93
+ // The connected-source check applies exactly when something will actually READ the config: a
94
+ // `bug-intake` step searching the board, or a per-ticket dispatch importing the pushed ticket.
95
+ // A `queue` config on a pipeline with no intake step is inert by design (an unrelated schedule
96
+ // may carry one harmlessly), and refusing THAT would reject a save for a source the schedule
97
+ // never touches.
98
+ //
87
99
  // `isOffered` (available AND enabled), NOT `isEnabled`: the toggle defaults ON for a
88
100
  // never-connected source (no settings row), so `isEnabled` would wave through a source that
89
101
  // has no connection to search — the exact silent-no-op this guard exists to reject.
90
- if (this.taskConnectionService &&
102
+ const configIsRead = hasBugIntakeStep || dispatchOf(issueIntake) === 'per-ticket';
103
+ if (configIsRead &&
104
+ this.taskConnectionService &&
91
105
  !(await this.taskConnectionService.isOffered(workspaceId, issueIntake.source))) {
92
- throw new ValidationError(`The '${issueIntake.source}' task source is not connected for this workspace — connect it before scheduling bug intake from it.`);
106
+ throw new ValidationError(`The '${issueIntake.source}' task source is not connected for this workspace — connect it before scheduling issue intake from it.`);
93
107
  }
94
108
  }
95
109
  async list(workspaceId) {
@@ -135,7 +149,7 @@ export class RecurringPipelineService {
135
149
  }
136
150
  const pipeline = assertFound(await this.pipelineRepository.get(workspaceId, input.pipelineId), 'Pipeline', input.pipelineId);
137
151
  assertSchedulable(pipeline);
138
- await this.assertIntakeConfigured(workspaceId, pipeline, input.issueIntake);
152
+ await this.assertIntakeConfigured(workspaceId, pipeline, input.issueIntake, input.onDemand);
139
153
  // A CADENCE schedule is defined by its cadence: reject a missing one (before any block is
140
154
  // materialised) rather than silently inventing a hidden every-24h/UTC schedule that fires
141
155
  // at a time the user never chose. Only an on-demand schedule may omit a recurrence.
@@ -239,10 +253,13 @@ export class RecurringPipelineService {
239
253
  // the EFFECTIVE pipeline (the patched one, else the existing schedule's) and the merged config
240
254
  // — so clearing `issueIntake` on a bug-intake schedule (or pointing it at a disconnected source)
241
255
  // is rejected up front rather than silently no-opping every future fire.
256
+ //
257
+ // `onDemand` needs no place in this condition: it is fixed at create time (there is no patch
258
+ // field for it), so the per-ticket rule that depends on it cannot be invalidated by an update.
242
259
  if (patch.pipelineId !== undefined || patch.issueIntake !== undefined) {
243
260
  const effectivePipeline = changedPipeline ??
244
261
  assertFound(await this.pipelineRepository.get(workspaceId, existing.pipelineId), 'Pipeline', existing.pipelineId);
245
- await this.assertIntakeConfigured(workspaceId, effectivePipeline, updated.issueIntake);
262
+ await this.assertIntakeConfigured(workspaceId, effectivePipeline, updated.issueIntake, updated.onDemand);
246
263
  }
247
264
  await this.schedules.upsert(workspaceId, updated);
248
265
  if (patch.name !== undefined) {
@@ -309,20 +326,31 @@ export class RecurringPipelineService {
309
326
  * A tracker pushed an issue event: fire every ENABLED schedule in the workspace whose
310
327
  * issue-intake configuration that event plausibly qualifies for. Returns how many started.
311
328
  *
312
- * This is the whole of push-driven intake (D3 of `docs/initiatives/tracker-webhook-intake.md`).
313
- * It imports nothing and links nothing the fired run's `bug-intake` step does all of that
314
- * through the unchanged `BugIntakeService`, so there is exactly ONE intake implementation and a
315
- * pushed pickup is byte-for-byte a cadence pickup that simply happened sooner. Consequently the
316
- * run may legitimately pick a DIFFERENT, older issue than the one that triggered it: intake is
317
- * oldest-first fair queueing, and the webhook's job is to drain the queue promptly, not reorder
318
- * it.
329
+ * This is the whole of push-driven intake (D3 + D8 of
330
+ * `backend/docs/adr/0032-tracker-webhook-intake.md`), and what a qualifying event DOES depends on the
331
+ * schedule's dispatch mode:
332
+ *
333
+ * - **`queue`** (the default, and every pre-existing schedule) imports nothing and links
334
+ * nothing: {@link fire} runs the schedule's reused block and the `bug-intake` step does all of
335
+ * it through the unchanged `BugIntakeService`, so there is exactly ONE intake implementation
336
+ * and a pushed pickup is byte-for-byte a cadence pickup that happened sooner. The run may
337
+ * legitimately pick a DIFFERENT, older issue than the one that triggered it: intake is
338
+ * oldest-first fair queueing, and the webhook's job is to drain the queue promptly, not
339
+ * reorder it.
340
+ * - **`per-ticket`** dispatches the pushed ticket itself ({@link firePerTicket}), which DOES
341
+ * import and link.
319
342
  *
320
- * Deliberately NOT forced. `force` is the human run-now lever it throws on overlap and bypasses
321
- * the on-demand guard and a webhook has no human present to unlock a personal credential, which
322
- * is exactly the situation the unattended-fire guards exist for. So an on-demand schedule is never
323
- * webhook-fired, an individual-usage model still refuses, and a burst of deliveries cannot start a
324
- * second run over one that is already running or parked (`fire` returns false and leaves
325
- * `nextRunAt` for the sweeper).
343
+ * Neither path is FORCED. `force` is the human run-now lever (it throws on overlap and bypasses
344
+ * the on-demand guard) and a webhook has no human present to unlock a personal credential, which
345
+ * is exactly the situation the unattended-fire guards exist for. So a burst of deliveries cannot
346
+ * start a second run over one already running or parked (`fire` returns false and leaves
347
+ * `nextRunAt` for the sweeper), and an individual-usage model still refuses on BOTH paths.
348
+ *
349
+ * The on-demand guard reads differently per mode, and deliberately so. `fire` refuses an
350
+ * on-demand schedule outright, so a queue schedule is never webhook-fired unattended. A
351
+ * per-ticket schedule is REQUIRED to be on-demand (it has no cadence to be driven by), so
352
+ * `firePerTicket` does not consult that guard and applies the individual-usage check itself,
353
+ * against the block it just created rather than a reused one.
326
354
  *
327
355
  * ONE schedule read for the workspace, filtered in memory — never a point-read per schedule.
328
356
  */
@@ -333,13 +361,33 @@ export class RecurringPipelineService {
333
361
  for (const schedule of schedules) {
334
362
  if (!schedule.enabled || !schedule.issueIntake)
335
363
  continue;
336
- if (!issueEventMatchesIntake(schedule.issueIntake, event))
364
+ const dispatch = dispatchOf(schedule.issueIntake);
365
+ const verdict = judgeIssueEventForIntake(schedule.issueIntake, event);
366
+ if (!dispatchAdmits(verdict, dispatch)) {
367
+ // A withheld PER-TICKET dispatch is REPORTED, never merely skipped. A per-ticket schedule
368
+ // is on-demand, so no cadence sweep will pick the ticket up later: "the delivery could not
369
+ // confirm the labels you scoped on" and "no delivery ever arrived" are opposite facts with
370
+ // the same silence, and only this line tells them apart. A `miss` needs no line: that is
371
+ // the predicate doing its job on an unrelated issue, which is most of the traffic.
372
+ if (dispatch === 'per-ticket' && verdict.outcome === 'unconfirmed') {
373
+ this.log.warn('per-ticket dispatch withheld: the delivery could not confirm a predicate', {
374
+ workspaceId,
375
+ scheduleId: schedule.id,
376
+ source: event.source,
377
+ externalId: event.externalId,
378
+ unconfirmed: verdict.predicates.join(','),
379
+ });
380
+ }
337
381
  continue;
382
+ }
338
383
  // Best-effort per schedule: one schedule whose pipeline fails to start (a disconnected
339
384
  // source, a missing model) must not stop the others — the same isolation `runDue` gets from
340
385
  // `fire`'s own internal error handling, extended to the errors it deliberately rethrows.
341
386
  try {
342
- if (await this.fire(workspaceId, schedule, { now }))
387
+ const started = dispatch === 'per-ticket'
388
+ ? await this.firePerTicket(workspaceId, schedule, event, now)
389
+ : await this.fire(workspaceId, schedule, { now });
390
+ if (started)
343
391
  fired++;
344
392
  }
345
393
  catch (error) {
@@ -362,6 +410,91 @@ export class RecurringPipelineService {
362
410
  }
363
411
  return fired;
364
412
  }
413
+ /**
414
+ * PER-TICKET dispatch: import the pushed ticket, materialise it as its own task under the
415
+ * schedule's frame, and start the schedule's pipeline on THAT task. Returns whether a run
416
+ * started.
417
+ *
418
+ * The contrast with {@link fire} is the whole feature. `fire` re-runs one reused block and the
419
+ * run's `bug-intake` step decides what to work; this creates a block per ticket and the ticket
420
+ * IS the work, so a feature request enters the platform from the tracker it was filed in
421
+ * instead of through an API call.
422
+ *
423
+ * Three properties are load-bearing:
424
+ *
425
+ * - **Idempotency is the issue's existing single `linkedBlockId`**, not a new marker. A
426
+ * redelivery (or the `updated` event that follows a `created` one) finds the issue already
427
+ * linked, and `adoptIssueAsTask` reports that as `null`. The link already guarantees what a
428
+ * claim table would have bought. It is read off the row the import returns rather than by
429
+ * catching `createTaskFromIssue`'s conflict, because that refusal is PROSE: matching it would
430
+ * start double-dispatching the day someone rewords the message. A genuine RACE (two deliveries
431
+ * interleaving between that read and the create) still lands on the conflict and propagates,
432
+ * which is correct: the caller's per-schedule isolation logs it and the winner has already
433
+ * dispatched the ticket.
434
+ * - **The unattended-fire guard is the SAME one `fire` applies.** A webhook has no human present
435
+ * to unlock a personal credential, so an individual-usage model must refuse here too — checked
436
+ * against the CREATED block, which is the block that will actually run, rather than the
437
+ * schedule's reused one.
438
+ * - **`origin: 'manual'`**, because this run IS a one-off task run: a dedicated block, started
439
+ * once, never reused. That also makes `assertPipelineLaunchable` refuse a `recurring`-only
440
+ * pipeline, which is exactly right — a `bug-intake` pipeline would go and pick a DIFFERENT
441
+ * ticket — and it is the run-time half of the create-time `assertValidIssueIntake` rule.
442
+ */
443
+ async firePerTicket(workspaceId, schedule, event, now) {
444
+ const adopt = this.adoptIssueAsTask;
445
+ if (!adopt) {
446
+ // No task-source services on this deployment: per-ticket dispatch cannot import anything.
447
+ // Stated rather than silently counted as "not fired", because the config asks for something
448
+ // this deployment structurally cannot do.
449
+ this.log.warn('per-ticket dispatch skipped: task-source adoption is not wired', {
450
+ workspaceId,
451
+ scheduleId: schedule.id,
452
+ source: event.source,
453
+ externalId: event.externalId,
454
+ });
455
+ return false;
456
+ }
457
+ const adopted = await adopt({
458
+ workspaceId,
459
+ source: event.source,
460
+ externalId: event.externalId,
461
+ containerId: schedule.frameId,
462
+ pipelineId: schedule.pipelineId,
463
+ });
464
+ // `null` = the issue is already linked to a block, i.e. this ticket has already been
465
+ // dispatched. Not an error and not a fire: the delivery is acked and nothing is duplicated.
466
+ if (!adopted)
467
+ return false;
468
+ const individualVendor = (await this.executionService.individualVendorsForBlock(workspaceId, adopted.blockId, schedule.pipelineId))[0] ?? null;
469
+ if (individualVendor) {
470
+ // The ticket is already on the board as a task, which is the useful half: a human can start
471
+ // it after switching the model. Record WHY it did not auto-start rather than leaving a task
472
+ // that mysteriously never ran.
473
+ await this.schedules.insertRun(workspaceId, {
474
+ id: this.idGenerator.next('schr'),
475
+ scheduleId: schedule.id,
476
+ executionId: null,
477
+ status: 'skipped',
478
+ startedAt: now,
479
+ finishedAt: now,
480
+ outcome: `${event.externalId} was imported as a task, but an individual-usage ${individualVendor} model cannot start unattended. Start it manually, or pick an API-key or coding-plan model.`,
481
+ });
482
+ return false;
483
+ }
484
+ const instance = await this.executionService.start(workspaceId, adopted.blockId, schedule.pipelineId, { initiatedBy: null, origin: 'manual' });
485
+ await this.schedules.insertRun(workspaceId, {
486
+ id: this.idGenerator.next('schr'),
487
+ scheduleId: schedule.id,
488
+ executionId: instance.id,
489
+ status: 'running',
490
+ startedAt: now,
491
+ finishedAt: null,
492
+ outcome: `Dispatched ${event.externalId} as its own task.`,
493
+ });
494
+ // Deliberately NO `advanceCadence`: a per-ticket schedule is on-demand, so it has no cadence
495
+ // to advance, and moving `nextRunAt` would misreport a webhook dispatch as a scheduled fire.
496
+ return true;
497
+ }
365
498
  /**
366
499
  * Start a schedule's pipeline against its reused block. Finalises the prior run's
367
500
  * history row (its execution is about to be replaced), records a new running row,
@@ -1 +1 @@
1
- {"version":3,"file":"RecurringPipelineService.js","sourceRoot":"","sources":["../../../src/modules/recurring/RecurringPipelineService.ts"],"names":[],"mappings":"AAuBA,OAAO,EACL,WAAW,EACX,aAAa,EACb,uBAAuB,EACvB,eAAe,EACf,UAAU,EACV,gBAAgB,EAChB,eAAe,GAChB,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EAAE,uBAAuB,EAA8B,MAAM,2BAA2B,CAAA;AAE/F,OAAO,EACL,wBAAwB,EACxB,2BAA2B,GAC5B,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AA0CpD;;;;;;;GAOG;AACH,SAAS,iBAAiB,CAAC,QAAkB;IAC3C,wBAAwB,CACtB,QAAQ,CAAC,UAAU,EACnB,QAAQ,CAAC,YAAY,EACrB,WAAW,EACX,QAAQ,CAAC,OAAO,CACjB,CAAA;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,kBAAkB,GAAe;IACrC,aAAa,EAAE,EAAE;IACjB,QAAQ,EAAE,EAAE;IACZ,eAAe,EAAE,IAAI;IACrB,aAAa,EAAE,IAAI;IACnB,QAAQ,EAAE,KAAK;CAChB,CAAA;AAED,oEAAoE;AACpE,MAAM,qBAAqB,GAAqC;IAC9D,YAAY,EACV,2KAA2K;IAC7K,WAAW,EACT,6JAA6J;IAC/J,YAAY,EACV,uUAAuU;IACzU,MAAM,EAAE,EAAE;CACX,CAAA;AAED;;;;;;GAMG;AACH,MAAM,OAAO,wBAAwB;IAClB,SAAS,CAA4B;I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,CAAC,CAAA;QACF,MAAM,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAA;QACrD,OAAO,IAAI,CAAA;IACb,CAAC;IAEO,KAAK,CAAC,cAAc,CAC1B,WAAmB,EACnB,QAA0B,EAC1B,GAAW;QAEX,MAAM,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,EAAE;YACvC,GAAG,QAAQ;YACX,SAAS,EAAE,GAAG;YACd,SAAS,EAAE,cAAc,CAAC,GAAG,EAAE,QAAQ,CAAC,UAAU,CAAC;SACpD,CAAC,CAAA;IACJ,CAAC;IAED,wEAAwE;IAChE,gBAAgB,CACtB,QAA2B;QAE3B,IAAI,QAAQ,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;YAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,CAAA;QAC/E,CAAC;QACD,IAAI,QAAQ,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;YACjC,OAAO;gBACL,MAAM,EAAE,QAAQ;gBAChB,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE;gBAC5B,OAAO,EAAE,QAAQ,CAAC,OAAO,EAAE,OAAO,IAAI,QAAQ;aAC/C,CAAA;QACH,CAAC;QACD,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAA;IAC/D,CAAC;CACF"}
1
+ {"version":3,"file":"RecurringPipelineService.js","sourceRoot":"","sources":["../../../src/modules/recurring/RecurringPipelineService.ts"],"names":[],"mappings":"AAwBA,OAAO,EACL,WAAW,EACX,aAAa,EACb,uBAAuB,EACvB,eAAe,EACf,UAAU,EACV,gBAAgB,EAChB,eAAe,GAChB,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EAAE,wBAAwB,EAA8B,MA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,QAAQ,CAAC,OAAO,EAAE,OAAO,IAAI,QAAQ;aAC/C,CAAA;QACH,CAAC;QACD,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAA;IAC/D,CAAC;CACF"}
@@ -0,0 +1,43 @@
1
+ import type { IntakeMatchVerdict } from '@cat-factory/integrations';
2
+ import { type IssueIntakeConfig } from '@cat-factory/kernel';
3
+ /** How a pushed issue event is dispatched. Absent on a stored config ⇒ `queue`. */
4
+ export type IntakeDispatch = NonNullable<IssueIntakeConfig['dispatch']>;
5
+ /**
6
+ * The dispatch mode a config asks for, defaulting an absent one to `queue`.
7
+ *
8
+ * Every reader goes through this rather than reading `config.dispatch` directly: the field is
9
+ * optional precisely so pre-existing schedules keep their behaviour, and an `undefined` treated as
10
+ * anything but `queue` would silently re-point every one of them.
11
+ */
12
+ export declare function dispatchOf(config: Pick<IssueIntakeConfig, 'dispatch'>): IntakeDispatch;
13
+ /**
14
+ * Whether a mode acts on a verdict from `judgeIssueEventForIntake`. The matcher states what the
15
+ * delivery does and does not establish; this is where the COST of being wrong picks a side, so the
16
+ * fail-open rule that is right for a queue cannot silently govern per-ticket dispatch.
17
+ *
18
+ * - A `miss` is never acted on: a predicate is definitively violated.
19
+ * - A `match` is always acted on.
20
+ * - An `unconfirmed` verdict (the delivery does not carry a field the configuration asks about)
21
+ * splits. `queue` fires: the run's `searchIssues` is the authority and re-checks every predicate
22
+ * against the vendor, so the worst case is one no-op run. `per-ticket` does NOT: this verdict is
23
+ * the last check before a real block and a real agent run on that ticket, and dispatching an
24
+ * untriaged or out-of-scope ticket is a worse failure than the latency of waiting for a delivery
25
+ * that does carry the field (the `updated` event a labelling fires is exactly that delivery).
26
+ *
27
+ * The caller REPORTS a withheld dispatch rather than dropping it: a per-ticket schedule is
28
+ * on-demand, so no cadence sweep will come along later and a silent skip is indistinguishable from
29
+ * a delivery that never arrived.
30
+ */
31
+ export declare function dispatchAdmits(verdict: IntakeMatchVerdict, dispatch: IntakeDispatch): boolean;
32
+ /**
33
+ * Validate an intake config against the schedule and pipeline it is being attached to.
34
+ *
35
+ * `hasBugIntakeStep` is the pipeline's own answer (`pipelineHasEnabledBugIntake`), passed in so
36
+ * this stays pure.
37
+ */
38
+ export declare function assertValidIssueIntake(input: {
39
+ config: IssueIntakeConfig;
40
+ onDemand: boolean;
41
+ hasBugIntakeStep: boolean;
42
+ }): void;
43
+ //# sourceMappingURL=issueIntake.logic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"issueIntake.logic.d.ts","sourceRoot":"","sources":["../../../src/modules/recurring/issueIntake.logic.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AACnE,OAAO,EAAmB,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAU7E,mFAAmF;AACnF,MAAM,MAAM,cAAc,GAAG,WAAW,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC,CAAA;AAEvE;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,GAAG,cAAc,CAEtF;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,cAAc,GAAG,OAAO,CAI7F;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAC5C,MAAM,EAAE,iBAAiB,CAAA;IACzB,QAAQ,EAAE,OAAO,CAAA;IACjB,gBAAgB,EAAE,OAAO,CAAA;CAC1B,GAAG,IAAI,CAyBP"}
@@ -0,0 +1,69 @@
1
+ import { ValidationError } from '@cat-factory/kernel';
2
+ /**
3
+ * The dispatch mode a config asks for, defaulting an absent one to `queue`.
4
+ *
5
+ * Every reader goes through this rather than reading `config.dispatch` directly: the field is
6
+ * optional precisely so pre-existing schedules keep their behaviour, and an `undefined` treated as
7
+ * anything but `queue` would silently re-point every one of them.
8
+ */
9
+ export function dispatchOf(config) {
10
+ return config.dispatch ?? 'queue';
11
+ }
12
+ /**
13
+ * Whether a mode acts on a verdict from `judgeIssueEventForIntake`. The matcher states what the
14
+ * delivery does and does not establish; this is where the COST of being wrong picks a side, so the
15
+ * fail-open rule that is right for a queue cannot silently govern per-ticket dispatch.
16
+ *
17
+ * - A `miss` is never acted on: a predicate is definitively violated.
18
+ * - A `match` is always acted on.
19
+ * - An `unconfirmed` verdict (the delivery does not carry a field the configuration asks about)
20
+ * splits. `queue` fires: the run's `searchIssues` is the authority and re-checks every predicate
21
+ * against the vendor, so the worst case is one no-op run. `per-ticket` does NOT: this verdict is
22
+ * the last check before a real block and a real agent run on that ticket, and dispatching an
23
+ * untriaged or out-of-scope ticket is a worse failure than the latency of waiting for a delivery
24
+ * that does carry the field (the `updated` event a labelling fires is exactly that delivery).
25
+ *
26
+ * The caller REPORTS a withheld dispatch rather than dropping it: a per-ticket schedule is
27
+ * on-demand, so no cadence sweep will come along later and a silent skip is indistinguishable from
28
+ * a delivery that never arrived.
29
+ */
30
+ export function dispatchAdmits(verdict, dispatch) {
31
+ if (verdict.outcome === 'miss')
32
+ return false;
33
+ if (verdict.outcome === 'match')
34
+ return true;
35
+ return dispatch === 'queue';
36
+ }
37
+ /**
38
+ * Validate an intake config against the schedule and pipeline it is being attached to.
39
+ *
40
+ * `hasBugIntakeStep` is the pipeline's own answer (`pipelineHasEnabledBugIntake`), passed in so
41
+ * this stays pure.
42
+ */
43
+ export function assertValidIssueIntake(input) {
44
+ const dispatch = dispatchOf(input.config);
45
+ if (dispatch !== 'per-ticket')
46
+ return;
47
+ // A CADENCE tick carries no triggering ticket, so a per-ticket schedule that could also fire on
48
+ // cadence would quietly fall back to draining the queue onto its reused block: the `queue`
49
+ // behaviour, under a config that says `per-ticket`. Requiring `onDemand` removes the fallback
50
+ // rather than documenting it.
51
+ if (!input.onDemand) {
52
+ throw new ValidationError('A per-ticket issue-intake schedule must be on-demand: it is driven by tracker webhooks, and a cadence tick has no ticket to dispatch.', refusal('per_ticket_requires_on_demand'));
53
+ }
54
+ // Per-ticket dispatch has ALREADY chosen the ticket. A `bug-intake` step would then run its own
55
+ // board search and adopt a DIFFERENT issue onto the block created for this one, so the run would
56
+ // work a ticket nobody pushed while the pushed one sat linked to it. The two are alternative
57
+ // ways to pick work, and a pipeline may only use one.
58
+ if (input.hasBugIntakeStep) {
59
+ throw new ValidationError("A per-ticket issue-intake schedule cannot run a 'bug-intake' pipeline: the pushed ticket is already the work, so the intake step would pick a different one.", refusal('per_ticket_conflicts_with_bug_intake'));
60
+ }
61
+ }
62
+ /**
63
+ * The `details` payload of an intake refusal, typed against the contracts union so a reason the SPA
64
+ * has no copy for cannot be invented here.
65
+ */
66
+ function refusal(reason) {
67
+ return { reason };
68
+ }
69
+ //# sourceMappingURL=issueIntake.logic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"issueIntake.logic.js","sourceRoot":"","sources":["../../../src/modules/recurring/issueIntake.logic.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAA0B,MAAM,qBAAqB,CAAA;AAa7E;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CAAC,MAA2C;IACpE,OAAO,MAAM,CAAC,QAAQ,IAAI,OAAO,CAAA;AACnC,CAAC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,cAAc,CAAC,OAA2B,EAAE,QAAwB;IAClF,IAAI,OAAO,CAAC,OAAO,KAAK,MAAM;QAAE,OAAO,KAAK,CAAA;IAC5C,IAAI,OAAO,CAAC,OAAO,KAAK,OAAO;QAAE,OAAO,IAAI,CAAA;IAC5C,OAAO,QAAQ,KAAK,OAAO,CAAA;AAC7B,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CAAC,KAItC;IACC,MAAM,QAAQ,GAAG,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IACzC,IAAI,QAAQ,KAAK,YAAY;QAAE,OAAM;IAErC,gGAAgG;IAChG,2FAA2F;IAC3F,8FAA8F;IAC9F,8BAA8B;IAC9B,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;QACpB,MAAM,IAAI,eAAe,CACvB,uIAAuI,EACvI,OAAO,CAAC,+BAA+B,CAAC,CACzC,CAAA;IACH,CAAC;IAED,gGAAgG;IAChG,iGAAiG;IACjG,6FAA6F;IAC7F,sDAAsD;IACtD,IAAI,KAAK,CAAC,gBAAgB,EAAE,CAAC;QAC3B,MAAM,IAAI,eAAe,CACvB,8JAA8J,EAC9J,OAAO,CAAC,sCAAsC,CAAC,CAChD,CAAA;IACH,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,SAAS,OAAO,CAAC,MAAgC;IAC/C,OAAO,EAAE,MAAM,EAAE,CAAA;AACnB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cat-factory/orchestration",
3
- "version": "0.190.0",
3
+ "version": "0.192.0",
4
4
  "description": "Delivery-workflow engine for the Agent Architecture Board (execution, bootstrap, pipelines, board, boardScan, requirements, and composition root).",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,20 +25,20 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "ai": "^7.0.47",
28
- "@cat-factory/agents": "0.106.6",
29
- "@cat-factory/caching": "0.13.7",
30
- "@cat-factory/contracts": "0.219.0",
31
- "@cat-factory/integrations": "0.120.1",
32
- "@cat-factory/kernel": "0.221.1",
33
- "@cat-factory/prompt-fragments": "0.15.44",
34
- "@cat-factory/sandbox": "0.11.38",
35
- "@cat-factory/spend": "0.13.9",
36
- "@cat-factory/workspaces": "0.21.31"
28
+ "@cat-factory/agents": "0.106.8",
29
+ "@cat-factory/caching": "0.13.9",
30
+ "@cat-factory/contracts": "0.221.0",
31
+ "@cat-factory/integrations": "0.121.1",
32
+ "@cat-factory/kernel": "0.223.0",
33
+ "@cat-factory/prompt-fragments": "0.15.46",
34
+ "@cat-factory/sandbox": "0.11.40",
35
+ "@cat-factory/spend": "0.13.11",
36
+ "@cat-factory/workspaces": "0.21.33"
37
37
  },
38
38
  "devDependencies": {
39
39
  "typescript": "7.0.2",
40
40
  "vitest": "^4.1.10",
41
- "@cat-factory/sandbox-fixtures": "0.7.252"
41
+ "@cat-factory/sandbox-fixtures": "0.7.254"
42
42
  },
43
43
  "scripts": {
44
44
  "build": "tsc -b tsconfig.build.json",