@oscaner-skills/cdd-engine 2.0.0 → 3.0.1

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 (127) hide show
  1. package/README.md +2 -2
  2. package/README.zh-CN.md +2 -2
  3. package/{src-next/bin.ts → dist/bin.js} +18 -21
  4. package/dist/contract/declare.js +998 -0
  5. package/dist/contract/doc.js +565 -0
  6. package/dist/contract/frontmatter.js +209 -0
  7. package/dist/contract/home-extractors.js +379 -0
  8. package/dist/contract/invariants.js +1030 -0
  9. package/dist/contract/judge.js +109 -0
  10. package/dist/contract/lint.js +206 -0
  11. package/dist/contract/project.js +371 -0
  12. package/dist/contract/skill-anatomy.js +156 -0
  13. package/dist/contract/translate.js +85 -0
  14. package/dist/face/artifacts.js +189 -0
  15. package/dist/face/board-view.js +522 -0
  16. package/dist/face/capsule.js +141 -0
  17. package/dist/face/cli.js +891 -0
  18. package/dist/face/declare.js +241 -0
  19. package/dist/face/gate.js +158 -0
  20. package/dist/face/graph-view.js +66 -0
  21. package/dist/face/host.js +211 -0
  22. package/dist/face/lifecycle.js +603 -0
  23. package/dist/face/preview.js +136 -0
  24. package/dist/face/projection.js +259 -0
  25. package/dist/face/route-render.js +162 -0
  26. package/dist/face/termination.js +482 -0
  27. package/dist/face/words.js +220 -0
  28. package/{src-next/infra/config.ts → dist/infra/config.js} +19 -24
  29. package/dist/infra/doc-roots.js +19 -0
  30. package/dist/infra/git.js +37 -0
  31. package/dist/infra/process.js +22 -0
  32. package/dist/infra/root.js +62 -0
  33. package/dist/infra/runtime.js +85 -0
  34. package/dist/infra/workspace.js +276 -0
  35. package/dist/render/brief.js +82 -0
  36. package/dist/render/issue-body.js +129 -0
  37. package/dist/render/skeleton.js +434 -0
  38. package/dist/render/templates.js +520 -0
  39. package/dist/session/faces.js +38 -0
  40. package/dist/session/graph.js +309 -0
  41. package/dist/session/handoff-schema.js +295 -0
  42. package/dist/session/ledger.js +762 -0
  43. package/dist/session/next.js +211 -0
  44. package/dist/session/preflight.js +194 -0
  45. package/dist/session/round-naming.js +73 -0
  46. package/dist/session/run.js +441 -0
  47. package/dist/session/state.js +8 -0
  48. package/dist/session/wave.js +92 -0
  49. package/package.json +8 -7
  50. package/templates/report/issue-body.json +0 -46
  51. package/src-next/__tests__/bin.test.ts +0 -128
  52. package/src-next/__tests__/smoke.integration.test.ts +0 -202
  53. package/src-next/__tests__/zero-dep.test.ts +0 -134
  54. package/src-next/contract/__tests__/__snapshots__/project.schema.overall-spec.snap +0 -238
  55. package/src-next/contract/__tests__/__snapshots__/project.schema.phase-spec.snap +0 -153
  56. package/src-next/contract/__tests__/__snapshots__/project.schema.plan.snap +0 -173
  57. package/src-next/contract/__tests__/__snapshots__/project.schema.single-spec.snap +0 -89
  58. package/src-next/contract/__tests__/__snapshots__/project.shape.overall-spec.snap +0 -225
  59. package/src-next/contract/__tests__/__snapshots__/project.shape.phase-spec.snap +0 -155
  60. package/src-next/contract/__tests__/__snapshots__/project.shape.plan.snap +0 -175
  61. package/src-next/contract/__tests__/__snapshots__/project.shape.single-spec.snap +0 -85
  62. package/src-next/contract/__tests__/declare.test.ts +0 -242
  63. package/src-next/contract/__tests__/doc.test.ts +0 -358
  64. package/src-next/contract/__tests__/judge.test.ts +0 -873
  65. package/src-next/contract/__tests__/lint.test.ts +0 -314
  66. package/src-next/contract/__tests__/project.test.ts +0 -419
  67. package/src-next/contract/__tests__/translate.test.ts +0 -96
  68. package/src-next/contract/declare.ts +0 -983
  69. package/src-next/contract/doc.ts +0 -753
  70. package/src-next/contract/invariants.ts +0 -1268
  71. package/src-next/contract/judge.ts +0 -142
  72. package/src-next/contract/lint.ts +0 -275
  73. package/src-next/contract/project.ts +0 -596
  74. package/src-next/contract/skill-anatomy.ts +0 -273
  75. package/src-next/contract/translate.ts +0 -113
  76. package/src-next/face/__tests__/board-view.test.ts +0 -948
  77. package/src-next/face/__tests__/capsule.test.ts +0 -276
  78. package/src-next/face/__tests__/channel-closure.guard.test.ts +0 -102
  79. package/src-next/face/__tests__/cli.test.ts +0 -4643
  80. package/src-next/face/__tests__/face.test.ts +0 -289
  81. package/src-next/face/__tests__/graph-view.test.ts +0 -61
  82. package/src-next/face/__tests__/host.test.ts +0 -24
  83. package/src-next/face/__tests__/negation.ts +0 -6
  84. package/src-next/face/__tests__/projection.test.ts +0 -301
  85. package/src-next/face/__tests__/sync-runner.test.ts +0 -70
  86. package/src-next/face/__tests__/words.guard.test.ts +0 -93
  87. package/src-next/face/artifacts.ts +0 -195
  88. package/src-next/face/board-view.ts +0 -662
  89. package/src-next/face/capsule.ts +0 -149
  90. package/src-next/face/cli.ts +0 -819
  91. package/src-next/face/declare.ts +0 -326
  92. package/src-next/face/gate.ts +0 -170
  93. package/src-next/face/graph-view.ts +0 -74
  94. package/src-next/face/host.ts +0 -326
  95. package/src-next/face/lifecycle.ts +0 -700
  96. package/src-next/face/projection.ts +0 -282
  97. package/src-next/face/route-render.ts +0 -160
  98. package/src-next/face/words.ts +0 -296
  99. package/src-next/infra/__tests__/infra.test.ts +0 -287
  100. package/src-next/infra/git.ts +0 -39
  101. package/src-next/infra/process.ts +0 -34
  102. package/src-next/infra/runtime.ts +0 -185
  103. package/src-next/infra/workspace.ts +0 -232
  104. package/src-next/render/__tests__/render.test.ts +0 -499
  105. package/src-next/render/__tests__/skeleton.test.ts +0 -466
  106. package/src-next/render/brief.ts +0 -121
  107. package/src-next/render/issue-body.ts +0 -159
  108. package/src-next/render/skeleton.ts +0 -437
  109. package/src-next/render/templates.ts +0 -650
  110. package/src-next/session/__tests__/graph.test.ts +0 -270
  111. package/src-next/session/__tests__/handoff-plane.guard.test.ts +0 -48
  112. package/src-next/session/__tests__/handoff-schema.test.ts +0 -310
  113. package/src-next/session/__tests__/ledger.test.ts +0 -744
  114. package/src-next/session/__tests__/next.test.ts +0 -368
  115. package/src-next/session/__tests__/preflight.test.ts +0 -491
  116. package/src-next/session/__tests__/run.test.ts +0 -1014
  117. package/src-next/session/__tests__/wave-line-phase.guard.test.ts +0 -49
  118. package/src-next/session/__tests__/wave.test.ts +0 -469
  119. package/src-next/session/faces.ts +0 -110
  120. package/src-next/session/graph.ts +0 -411
  121. package/src-next/session/handoff-schema.ts +0 -373
  122. package/src-next/session/ledger.ts +0 -1004
  123. package/src-next/session/next.ts +0 -192
  124. package/src-next/session/preflight.ts +0 -240
  125. package/src-next/session/run.ts +0 -606
  126. package/src-next/session/state.ts +0 -30
  127. package/src-next/session/wave.ts +0 -139
@@ -1,368 +0,0 @@
1
- // packages/cdd-engine/src-next/session/__tests__/next.test.ts
2
- // T7 NextStepRouter suite (design spec §3.2 · v1.20 the closure single verdict) — the C5
3
- // decision table:
4
- // · review zero findings → close(state) — readyBatch empty → done, else next-wave;
5
- // · review findings non-empty (any severity) → the one-way fix hop;
6
- // · fix blocker>0 → a re-review hop (the live tree, no commit identity);
7
- // · fix blocker==0 (warn/nit only or clean) → close(state) — the unified closure, never
8
- // the retired `none`;
9
- // · the review-cycle soft cap → the "BLOCKED: review-cycle-cap" suggestion (outranks the
10
- // blocker row); REVIEW_CYCLE_CAP + the suggestion wording are the pinned constants;
11
- // · the fix-route readback suffix — FIX_READBACK_SUFFIX — the declared single-source
12
- // wording the capsule appends to the fix hop's `next:` render (verbatim, by reference);
13
- // · BLOCKED/TIMEOUT → null (no next line — the failure face), every phase;
14
- // · implement → the group's review (the live tree); branch-review → closure / fix;
15
- // · the `none` route kind is RETIRED (closure renders done / next-wave), and a
16
- // completed non-failed round producing null is a hard error on the dispatch face.
17
- // The type assertions at the bottom pin the public surface compile-time (the brief's
18
- // type-check checkable) — they fail under tsc if the exported signatures drift.
19
-
20
- import { describe, expect, it } from "vitest";
21
- import { Capsule } from "../../face/capsule.ts";
22
- import { CommandTreeBuilder } from "../../face/projection.ts";
23
- import { Words } from "../../face/words.ts";
24
- import type { Round, RoundPhase } from "../ledger.ts";
25
- import type { Route } from "../next.ts";
26
- import {
27
- FIX_READBACK_SUFFIX,
28
- NextStepRouter,
29
- PIPELINE_NEXT,
30
- REVIEW_CYCLE_CAP,
31
- SOFT_CAP_SUGGESTION,
32
- } from "../next.ts";
33
- import type { ExecutionState } from "../state.ts";
34
-
35
- /** A minimal execution-state stub — the router reads only readyBatch(). */
36
- const state = (ready: readonly number[]): ExecutionState => ({
37
- doneTasks: () => new Set(),
38
- readyBatch: () => [...ready],
39
- });
40
-
41
- /** A review finding literal shorthand. */
42
- const finding = (
43
- severity: "blocker" | "warn" | "nit",
44
- summary = "",
45
- ): {
46
- severity: "blocker" | "warn" | "nit";
47
- summary: string;
48
- } => ({ severity, summary });
49
-
50
- /** A round carrier shorthand — the mandated fields default; the case overrides. */
51
- const round = (over: { phase: RoundPhase } & Partial<Omit<Round, "phase">>): Round => ({
52
- findings: [],
53
- consecutiveS1: 0,
54
- ...over,
55
- });
56
-
57
- const router = new NextStepRouter();
58
-
59
- describe("review rounds — zero findings flows the next wave on or closes the run (close)", () => {
60
- it("zero findings + a ready batch → the next wave (close() — the ready task ids)", () => {
61
- expect(router.next(state([3]), round({ phase: "review" }))).toEqual({
62
- kind: "next-wave",
63
- tasks: "3",
64
- });
65
- expect(router.next(state([4, 5]), round({ phase: "review" }))).toEqual({
66
- kind: "next-wave",
67
- tasks: "4,5",
68
- });
69
- });
70
-
71
- it("zero findings + an exhausted run → done (the v1.20 terminal word, never `none`)", () => {
72
- expect(router.next(state([]), round({ phase: "review" }))).toEqual({ kind: "done" });
73
- });
74
-
75
- it("any findings (blocker or warn/nit) → the one-way fix hop carrying the review handoff", () => {
76
- const findings: Round["findings"] = [finding("warn", "drift")];
77
- expect(
78
- router.next(
79
- state([]),
80
- round({ phase: "review", findings, findingsPath: "tasks-7,9-review-1.json" }),
81
- ),
82
- ).toEqual({ kind: "fix", findings: "tasks-7,9-review-1.json" });
83
-
84
- const blockers: Round["findings"] = [finding("blocker", "defect")];
85
- expect(router.next(state([]), round({ phase: "review", findings: blockers }))).toEqual({
86
- kind: "fix",
87
- findings: undefined,
88
- });
89
- });
90
- });
91
-
92
- describe("fix rounds — the re-review / closure decision point (C5-1, close())", () => {
93
- it("input blockers remain → a re-review hop (the live tree, no commit identity)", () => {
94
- expect(
95
- router.next(state([]), round({ phase: "fix", findings: [finding("blocker", "remaining")] })),
96
- ).toEqual({ kind: "review" });
97
- });
98
-
99
- it("warn/nit only → done (closure via close() — the #278 REVIEW_FIX state, no re-review preview)", () => {
100
- expect(
101
- router.next(state([]), round({ phase: "fix", findings: [finding("warn"), finding("nit")] })),
102
- ).toEqual({ kind: "done" });
103
- });
104
-
105
- it("zero findings → done (close() with an exhausted run)", () => {
106
- expect(router.next(state([]), round({ phase: "fix" }))).toEqual({ kind: "done" });
107
- });
108
-
109
- it("a blocker-free fix with a ready batch → next-wave (the close() routing-table row)", () => {
110
- expect(router.next(state([7]), round({ phase: "fix", findings: [finding("warn")] }))).toEqual({
111
- kind: "next-wave",
112
- tasks: "7",
113
- });
114
- });
115
-
116
- it("the soft cap outranks the blocker row — a capped run defers to the user", () => {
117
- expect(
118
- router.next(
119
- state([]),
120
- round({
121
- phase: "fix",
122
- findings: [finding("blocker")],
123
- consecutiveS1: REVIEW_CYCLE_CAP,
124
- }),
125
- ),
126
- ).toEqual({ kind: "soft-cap", message: SOFT_CAP_SUGGESTION });
127
- });
128
-
129
- it("below the cap, blockers still route the re-review", () => {
130
- expect(
131
- router.next(
132
- state([]),
133
- round({ phase: "fix", findings: [finding("blocker")], consecutiveS1: 2 }),
134
- )!.kind,
135
- ).toBe("review");
136
- });
137
- });
138
-
139
- describe("implement / branch-review — the lifecycle rows", () => {
140
- it("implement completes → the group's review (the live tree)", () => {
141
- expect(router.next(state([]), round({ phase: "implement" }))).toEqual({ kind: "review" });
142
- });
143
-
144
- it("branch-review zero findings → done (close()); findings → the fix hop", () => {
145
- expect(router.next(state([]), round({ phase: "branch-review" }))).toEqual({ kind: "done" });
146
- expect(
147
- router.next(state([]), round({ phase: "branch-review", findings: [finding("nit")] }))!.kind,
148
- ).toBe("fix");
149
- });
150
- });
151
-
152
- describe("the failure face — BLOCKED/TIMEOUT produce no next line", () => {
153
- it("a BLOCKED review round → null", () => {
154
- expect(router.next(state([]), round({ phase: "review", status: "BLOCKED" }))).toBeNull();
155
- });
156
- it("a BLOCKED fix round → null (the fix itself BLOCKED keeps the no-next face)", () => {
157
- expect(
158
- router.next(
159
- state([]),
160
- round({ phase: "fix", status: "BLOCKED", findings: [finding("blocker")] }),
161
- ),
162
- ).toBeNull();
163
- });
164
- it("a TIMEOUT round → null", () => {
165
- expect(router.next(state([]), round({ phase: "implement", status: "TIMEOUT" }))).toBeNull();
166
- });
167
- });
168
-
169
- describe("the pinned surface — Route/soft-cap constants (the brief's type-check checkable)", () => {
170
- it("the soft-cap constant is the literal 10 and the wording is stable", () => {
171
- expect(REVIEW_CYCLE_CAP).toBe(10);
172
- expect(SOFT_CAP_SUGGESTION).toBe("BLOCKED: review-cycle-cap — user adjudicates");
173
- });
174
-
175
- it("the fix-route readback suffix is the declared single-source wording", () => {
176
- expect(FIX_READBACK_SUFFIX).toBe(
177
- "(confirm the findings · if a finding needs a ruling, record the ruling in the findings file)",
178
- );
179
- });
180
-
181
- it("the readback suffix keeps its literal type at compile time", () => {
182
- // Compile-time pin — fails under `tsc --noEmit` if the constant's declared type
183
- // drifts from the render the capsule appends verbatim (exact suffix wording).
184
- const suffix: "(confirm the findings · if a finding needs a ruling, record the ruling in the findings file)" =
185
- FIX_READBACK_SUFFIX;
186
- expect(suffix).toBe(FIX_READBACK_SUFFIX);
187
- });
188
-
189
- it("the soft-cap constants keep their literal types at compile time", () => {
190
- // Compile-time pins — this file fails under `tsc --noEmit` if either constant's
191
- // declared type drifts from the decision table's domain (cap == 10, verbatim wording).
192
- const cap: 10 = REVIEW_CYCLE_CAP;
193
- const wording: "BLOCKED: review-cycle-cap — user adjudicates" = SOFT_CAP_SUGGESTION;
194
- expect({ cap, wording }).toEqual({
195
- cap: 10,
196
- wording: "BLOCKED: review-cycle-cap — user adjudicates",
197
- });
198
- });
199
-
200
- it("the router is the single next-generation face — the exported signature is pinned", () => {
201
- const surface: (state: ExecutionState, ref: Round) => Route | null = (s, r) =>
202
- router.next(s, r);
203
- expect(surface(state([]), round({ phase: "review" }))).toEqual({ kind: "done" });
204
- });
205
-
206
- it("the close() routing table — every closure point renders done | next-wave, never `none`", () => {
207
- // review approved → exhausted done / ready next-wave
208
- expect(router.next(state([]), round({ phase: "review" }))).toEqual({ kind: "done" });
209
- expect(router.next(state([2]), round({ phase: "review" }))).toEqual({
210
- kind: "next-wave",
211
- tasks: "2",
212
- });
213
- // fix clean (warn/nit) → done / next-wave — the fix closure is a close(), never `none`
214
- expect(router.next(state([]), round({ phase: "fix", findings: [finding("nit")] }))).toEqual({
215
- kind: "done",
216
- });
217
- expect(router.next(state([2]), round({ phase: "fix", findings: [finding("warn")] }))).toEqual({
218
- kind: "next-wave",
219
- tasks: "2",
220
- });
221
- // branch-review clean → done
222
- expect(router.next(state([]), round({ phase: "branch-review" }))).toEqual({ kind: "done" });
223
- });
224
- });
225
-
226
- describe("the severity-combination space — every blocker/warn/nit MIX rides the same three-type routing (v1.29)", () => {
227
- // The full 2^3 severity mix space (empty through all-three) — the C5 table judges
228
- // severity only by the blocker/non-blocker axis: a review with ANY findings (any
229
- // mix) routes the one-way fix hop; a fix with ANY blocker in its input re-reviews;
230
- // a blocker-free fix (warn/nit in any mix) closes (next-wave when another wave is
231
- // ready, done when the run is exhausted).
232
- const MIXES: readonly (readonly ("blocker" | "warn" | "nit")[])[] = [
233
- [],
234
- ["warn"],
235
- ["nit"],
236
- ["warn", "nit"],
237
- ["blocker"],
238
- ["blocker", "warn"],
239
- ["blocker", "nit"],
240
- ["blocker", "warn", "nit"],
241
- ];
242
-
243
- it.each(MIXES.map((mix) => [mix]))(
244
- "review findings %j — any mix routes fix (or close when empty)",
245
- (mix) => {
246
- const findings = mix.map((severity) => finding(severity));
247
- const route = router.next(state([3]), round({ phase: "review", findings }));
248
- if (mix.length === 0) {
249
- expect(route).toEqual({ kind: "next-wave", tasks: "3" });
250
- expect(router.next(state([]), round({ phase: "review", findings }))).toEqual({
251
- kind: "done",
252
- });
253
- } else {
254
- expect(route!.kind).toBe("fix"); // the one-way hop holding the review handoff
255
- }
256
- },
257
- );
258
-
259
- it.each(MIXES.map((mix) => [mix]))(
260
- "fix findings %j — blocker-any mix re-reviews; warn/nit-only closes",
261
- (mix) => {
262
- const findings = mix.map((severity) => finding(severity));
263
- const fix = round({ phase: "fix", findings });
264
- if (mix.includes("blocker")) {
265
- expect(router.next(state([3]), fix)).toEqual({ kind: "review" });
266
- } else {
267
- expect(router.next(state([3]), fix)).toEqual({ kind: "next-wave", tasks: "3" });
268
- expect(router.next(state([]), fix)).toEqual({ kind: "done" });
269
- }
270
- },
271
- );
272
-
273
- it.each(MIXES.filter((mix) => mix.includes("warn") && mix.includes("nit")).map((mix) => [mix]))(
274
- "a re-review round carrying %j rides the SAME review table — the re-review has no severity exemption",
275
- (mix) => {
276
- const findings = mix.map((severity) => finding(severity));
277
- // re-review = a review round at a new ref — the C5 table applies verbatim
278
- const route = router.next(state([3]), round({ phase: "review", findings }));
279
- expect(route!.kind).toBe("fix");
280
- },
281
- );
282
- });
283
-
284
- // ---------------------------------------------------------------------------
285
- // P4.1 T4 — the route → literal → second-parse roundtrip: every router-route the C5
286
- // table can emit renders a next literal whose argv parses with zero errors (the
287
- // executable command reversal) · done is the bare terminal word, never fed.
288
- // ---------------------------------------------------------------------------
289
-
290
- describe("P4.1 T4 — the router's routes render parseable next literals (zero-error second parse)", () => {
291
- /** The next text of a route rendered against a wave-frame target (the task face —
292
- * the C5 table's real consumer), then the parseable argv (the readback suffix is
293
- * prompt prose, never argv). */
294
- function argvOf(route: Route): string[] {
295
- const lines = new Capsule(new Words()).emit("APPROVED", "0", "/h.json", route, {
296
- type: "wave",
297
- id: "1,2",
298
- plan: "docs/kairos/plans/p3.md",
299
- });
300
- const literal = lines[1]!.slice("next: ".length);
301
- return literal
302
- .replace(new RegExp(`\\s*\\(${FIX_READBACK_SUFFIX.slice(1, -1)}\\)$`), "")
303
- .split(/\s+/);
304
- }
305
-
306
- it.each([
307
- ["implement wave", { kind: "next-wave", tasks: "1,2" } as Route],
308
- ["re-review", { kind: "review" } as Route],
309
- ["the one-way fix hop", { kind: "fix", findings: "tasks-1-review-1.json" } as Route],
310
- ["closure", { kind: "done" } as Route],
311
- ] as const)("%s — the route's literal argv parses", (_label, route) => {
312
- if (route.kind === "done") {
313
- // the bare terminal word: never fed to parse (a bare `done` is not a command)
314
- expect(() => new CommandTreeBuilder().program.parse(["done"], { from: "user" })).toThrow(
315
- /unknown command 'done'/,
316
- );
317
- return;
318
- }
319
- expect(() =>
320
- new CommandTreeBuilder().program.parse(argvOf(route), { from: "user" }),
321
- ).not.toThrow();
322
- });
323
- });
324
-
325
- // ---------------------------------------------------------------------------
326
- // D40 — ONE "next step" concept turned single-resolver + face-to-face handoff.
327
- // ---------------------------------------------------------------------------
328
-
329
- describe("D40 — the face-to-face handoff route + the single resolver", () => {
330
- it("handoff() carries the pipeline entry for a doc-class — the ONE route kind", () => {
331
- expect(NextStepRouter.handoff("phase-spec")).toEqual({
332
- kind: "handoff",
333
- entry: PIPELINE_NEXT["phase-spec"],
334
- });
335
- expect(NextStepRouter.handoff("branch")).toEqual({
336
- kind: "handoff",
337
- entry: PIPELINE_NEXT.branch,
338
- });
339
- });
340
-
341
- it("resolve() passes an ACTIVE C5 hop through untouched (the line is not drained)", () => {
342
- // The line's own C5 frontier decides next until it drains — a review/fix/next-wave
343
- // route is the line's next step, never the face-to-face handoff.
344
- expect(NextStepRouter.resolve({ kind: "review" }, "phase-spec")).toEqual({ kind: "review" });
345
- expect(NextStepRouter.resolve({ kind: "next-wave", tasks: "3" }, "wave")).toEqual({
346
- kind: "next-wave",
347
- tasks: "3",
348
- });
349
- });
350
-
351
- it("resolve() yields the face-to-face handoff when the line's C5 frontier drained (done)", () => {
352
- expect(NextStepRouter.resolve({ kind: "done" }, "plan")).toEqual({
353
- kind: "handoff",
354
- entry: PIPELINE_NEXT.plan,
355
- });
356
- // a null C5 route (a not-yet-started frontier) also hands off to the next face.
357
- expect(NextStepRouter.resolve(null, "branch")).toEqual({
358
- kind: "handoff",
359
- entry: PIPELINE_NEXT.branch,
360
- });
361
- });
362
-
363
- it("resolve() with no face seam (null doc-class) renders the bare terminal `done`", () => {
364
- // The overall line / a bare terminal: no pipeline seam carries it — the terminal word.
365
- expect(NextStepRouter.resolve({ kind: "done" }, null)).toEqual({ kind: "done" });
366
- expect(NextStepRouter.resolve(null, null)).toEqual({ kind: "done" });
367
- });
368
- });