@cat-factory/orchestration 0.288.6 → 0.289.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 (31) hide show
  1. package/dist/index.d.ts +1 -1
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +1 -1
  4. package/dist/index.js.map +1 -1
  5. package/dist/modules/execution/AgentDispatchController.d.ts.map +1 -1
  6. package/dist/modules/execution/AgentDispatchController.js +23 -4
  7. package/dist/modules/execution/AgentDispatchController.js.map +1 -1
  8. package/dist/modules/execution/DeployFixController.d.ts.map +1 -1
  9. package/dist/modules/execution/DeployFixController.js +3 -0
  10. package/dist/modules/execution/DeployFixController.js.map +1 -1
  11. package/dist/modules/execution/DeployerStepController.d.ts +48 -1
  12. package/dist/modules/execution/DeployerStepController.d.ts.map +1 -1
  13. package/dist/modules/execution/DeployerStepController.js +170 -19
  14. package/dist/modules/execution/DeployerStepController.js.map +1 -1
  15. package/dist/modules/execution/RunDispatcher.d.ts.map +1 -1
  16. package/dist/modules/execution/RunDispatcher.js +8 -0
  17. package/dist/modules/execution/RunDispatcher.js.map +1 -1
  18. package/dist/modules/execution/StepGraph.d.ts.map +1 -1
  19. package/dist/modules/execution/StepGraph.js +3 -0
  20. package/dist/modules/execution/StepGraph.js.map +1 -1
  21. package/dist/modules/execution/advance.d.ts +17 -0
  22. package/dist/modules/execution/advance.d.ts.map +1 -1
  23. package/dist/modules/execution/drive.d.ts +13 -0
  24. package/dist/modules/execution/drive.d.ts.map +1 -1
  25. package/dist/modules/execution/drive.js +28 -2
  26. package/dist/modules/execution/drive.js.map +1 -1
  27. package/dist/modules/execution/environmentDispatch.logic.d.ts +16 -0
  28. package/dist/modules/execution/environmentDispatch.logic.d.ts.map +1 -0
  29. package/dist/modules/execution/environmentDispatch.logic.js +60 -0
  30. package/dist/modules/execution/environmentDispatch.logic.js.map +1 -0
  31. package/package.json +11 -11
@@ -0,0 +1,60 @@
1
+ import { runsAgainstEphemeralEnvironment } from '@cat-factory/agents';
2
+ // ---------------------------------------------------------------------------
3
+ // The last guard between "this run provisioned no reachable environment" and an agent being told
4
+ // to test one.
5
+ //
6
+ // The prompt for a step in ephemeral-environment mode says "test against the environment
7
+ // described above" and then prints `URL: (pending)`. Those two are contradictory, and the same
8
+ // prompt's bail-out instruction ("if you cannot run a meaningful test at all, set abort") is not
9
+ // a bound: the run this guard was written for reasoned "rather than abort with nothing, I
10
+ // exercised the change against the actual deployment artifacts locally", reconstructed the
11
+ // Dockerfile's stages by hand, tested THAT, and returned `greenlight: true` with the environment
12
+ // recorded as skipped. On a task whose entire brief was "stand up the API", the single unverified
13
+ // thing was the deliverable.
14
+ //
15
+ // That rationalization is predictable and will recur, which is the argument for refusing in the
16
+ // engine rather than for a sterner prompt: a step told to test a URL it was not given has no good
17
+ // move. The deployer's readiness wait is what normally makes this unreachable; this covers what a
18
+ // wait cannot (an environment that expired mid-run, a chain with no `deployer` in it at all).
19
+ // ---------------------------------------------------------------------------
20
+ /**
21
+ * The refusal for an env-consuming step with no reachable environment, or null when there is
22
+ * nothing to refuse.
23
+ *
24
+ * Keyed off the SAME predicate the prompt branches on ({@link runsAgainstEphemeralEnvironment}),
25
+ * so the guard and the instructions cannot disagree about which steps are in ephemeral mode: one
26
+ * keyed off a near-miss condition would either refuse a step the prompt was going to let stand up
27
+ * its own infra, or let through the exact case it exists to catch.
28
+ *
29
+ * The `environment` failure kind (not `preflight`) because that is where the fix is: the
30
+ * provisioning that did not finish, or the environment that went away.
31
+ */
32
+ export function environmentDispatchRefusal(context) {
33
+ if (!runsAgainstEphemeralEnvironment(context))
34
+ return null;
35
+ if (context.environment?.url)
36
+ return null;
37
+ const status = context.environment?.status;
38
+ // An environment that exists but is not reachable and one that was never provisioned are
39
+ // different faults with different fixes — the provider in the first case, the CHAIN (a tester
40
+ // with no `deployer` ahead of it) in the second — so they carry different codes rather than one
41
+ // "no environment" catch-all.
42
+ if (!status) {
43
+ return {
44
+ kind: 'job_failed',
45
+ error: 'No ephemeral environment was provisioned for this service.',
46
+ failureKind: 'environment',
47
+ detail: 'This step runs against an ephemeral environment, and this run provisioned none. A ' +
48
+ 'service declaring kubernetes/custom provisioning needs a `deployer` step ahead of its tester.',
49
+ reason: 'environment_missing',
50
+ };
51
+ }
52
+ return {
53
+ kind: 'job_failed',
54
+ error: 'The ephemeral environment for this step is not reachable.',
55
+ failureKind: 'environment',
56
+ detail: `The service's environment is '${status}' and carries no URL, so there is no address to test against.`,
57
+ reason: 'environment_not_ready',
58
+ };
59
+ }
60
+ //# sourceMappingURL=environmentDispatch.logic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environmentDispatch.logic.js","sourceRoot":"","sources":["../../../src/modules/execution/environmentDispatch.logic.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAA;AAGrE,8EAA8E;AAC9E,iGAAiG;AACjG,eAAe;AACf,EAAE;AACF,yFAAyF;AACzF,+FAA+F;AAC/F,iGAAiG;AACjG,0FAA0F;AAC1F,2FAA2F;AAC3F,iGAAiG;AACjG,kGAAkG;AAClG,6BAA6B;AAC7B,EAAE;AACF,gGAAgG;AAChG,kGAAkG;AAClG,kGAAkG;AAClG,8FAA8F;AAC9F,8EAA8E;AAE9E;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,0BAA0B,CAAC,OAAwB;IACjE,IAAI,CAAC,+BAA+B,CAAC,OAAO,CAAC;QAAE,OAAO,IAAI,CAAA;IAC1D,IAAI,OAAO,CAAC,WAAW,EAAE,GAAG;QAAE,OAAO,IAAI,CAAA;IACzC,MAAM,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,MAAM,CAAA;IAC1C,yFAAyF;IACzF,8FAA8F;IAC9F,gGAAgG;IAChG,8BAA8B;IAC9B,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO;YACL,IAAI,EAAE,YAAY;YAClB,KAAK,EAAE,4DAA4D;YACnE,WAAW,EAAE,aAAa;YAC1B,MAAM,EACJ,oFAAoF;gBACpF,+FAA+F;YACjG,MAAM,EAAE,qBAAqB;SAC9B,CAAA;IACH,CAAC;IACD,OAAO;QACL,IAAI,EAAE,YAAY;QAClB,KAAK,EAAE,2DAA2D;QAClE,WAAW,EAAE,aAAa;QAC1B,MAAM,EAAE,iCAAiC,MAAM,+DAA+D;QAC9G,MAAM,EAAE,uBAAuB;KAChC,CAAA;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cat-factory/orchestration",
3
- "version": "0.288.6",
3
+ "version": "0.289.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",
@@ -24,19 +24,19 @@
24
24
  "access": "public"
25
25
  },
26
26
  "dependencies": {
27
- "@cat-factory/agents": "0.145.3",
28
- "@cat-factory/caching": "0.20.49",
29
- "@cat-factory/contracts": "0.332.0",
30
- "@cat-factory/integrations": "0.166.15",
31
- "@cat-factory/kernel": "0.321.3",
32
- "@cat-factory/prompt-fragments": "1.1.11",
33
- "@cat-factory/sandbox": "0.12.22",
34
- "@cat-factory/spend": "0.16.20",
35
- "@cat-factory/workspaces": "0.28.37",
27
+ "@cat-factory/agents": "0.146.0",
28
+ "@cat-factory/caching": "0.20.50",
29
+ "@cat-factory/contracts": "0.333.0",
30
+ "@cat-factory/integrations": "0.166.16",
31
+ "@cat-factory/kernel": "0.322.0",
32
+ "@cat-factory/prompt-fragments": "1.1.12",
33
+ "@cat-factory/sandbox": "0.12.23",
34
+ "@cat-factory/spend": "0.16.21",
35
+ "@cat-factory/workspaces": "0.28.38",
36
36
  "ai": "^7.0.77"
37
37
  },
38
38
  "devDependencies": {
39
- "@cat-factory/sandbox-fixtures": "0.8.13",
39
+ "@cat-factory/sandbox-fixtures": "0.8.14",
40
40
  "typescript": "7.0.2",
41
41
  "vitest": "^4.1.11"
42
42
  },