@aviaratech/ai-delivery 0.3.35 → 0.3.36

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 (297) hide show
  1. package/CONTRIBUTING.md +12 -206
  2. package/README.md +57 -554
  3. package/dist/agent.d.ts +0 -2
  4. package/dist/agent.js +76 -16
  5. package/dist/agent.js.map +7 -1
  6. package/dist/agentReadiness.test.js +73 -67
  7. package/dist/agentReadiness.test.js.map +7 -1
  8. package/dist/boardReconcile.test.js +1651 -1590
  9. package/dist/boardReconcile.test.js.map +7 -1
  10. package/dist/build.test.js +130 -0
  11. package/dist/build.test.js.map +7 -0
  12. package/dist/callerErrors.test.js +105 -0
  13. package/dist/callerErrors.test.js.map +7 -0
  14. package/dist/cli.js +402 -515
  15. package/dist/cli.js.map +7 -1
  16. package/dist/cliResult.d.ts +2 -2
  17. package/dist/cliResult.js +42 -45
  18. package/dist/cliResult.js.map +7 -1
  19. package/dist/cliResult.test.js +424 -369
  20. package/dist/cliResult.test.js.map +7 -1
  21. package/dist/config/deliveryConfig.d.ts +288 -14
  22. package/dist/config/deliveryConfig.js +472 -390
  23. package/dist/config/deliveryConfig.js.map +7 -1
  24. package/dist/config/deliveryConfig.test.js +773 -649
  25. package/dist/config/deliveryConfig.test.js.map +7 -1
  26. package/dist/contributorChecks.test.js +1694 -916
  27. package/dist/contributorChecks.test.js.map +7 -1
  28. package/dist/currentConsumer.test.js +819 -737
  29. package/dist/currentConsumer.test.js.map +7 -1
  30. package/dist/currentTrackingScenario.test.js +499 -479
  31. package/dist/currentTrackingScenario.test.js.map +7 -1
  32. package/dist/delivery/common.js +160 -172
  33. package/dist/delivery/common.js.map +7 -1
  34. package/dist/delivery/delivery.test.js +509 -431
  35. package/dist/delivery/delivery.test.js.map +7 -1
  36. package/dist/delivery/evidence.d.ts +2 -2
  37. package/dist/delivery/evidence.js +133 -120
  38. package/dist/delivery/evidence.js.map +7 -1
  39. package/dist/delivery/index.js +7 -2
  40. package/dist/delivery/index.js.map +7 -1
  41. package/dist/delivery/legacy.js +65 -5
  42. package/dist/delivery/legacy.js.map +7 -1
  43. package/dist/delivery/policy.d.ts +10 -10
  44. package/dist/delivery/policy.js +211 -238
  45. package/dist/delivery/policy.js.map +7 -1
  46. package/dist/delivery/stage.d.ts +18 -18
  47. package/dist/delivery/stage.js +220 -235
  48. package/dist/delivery/stage.js.map +7 -1
  49. package/dist/deliveryBoard.d.ts +74 -0
  50. package/dist/deliveryBoard.js +644 -0
  51. package/dist/deliveryBoard.js.map +7 -0
  52. package/dist/deliveryBoard.test.js +649 -0
  53. package/dist/deliveryBoard.test.js.map +7 -0
  54. package/dist/deliveryHealth.test.js +179 -155
  55. package/dist/deliveryHealth.test.js.map +7 -1
  56. package/dist/dependencyCompatibility.test.js +154 -140
  57. package/dist/dependencyCompatibility.test.js.map +7 -1
  58. package/dist/directoryIndependent.test.js +417 -383
  59. package/dist/directoryIndependent.test.js.map +7 -1
  60. package/dist/dispatch.d.ts +16 -11
  61. package/dist/dispatch.js +329 -353
  62. package/dist/dispatch.js.map +7 -1
  63. package/dist/errors.d.ts +3 -3
  64. package/dist/errors.js +103 -96
  65. package/dist/errors.js.map +7 -1
  66. package/dist/fixtures/deliveryBoardReplay.d.ts +56 -0
  67. package/dist/fixtures/deliveryBoardReplay.js +617 -0
  68. package/dist/fixtures/deliveryBoardReplay.js.map +7 -0
  69. package/dist/fixtures/discovery.d.ts +59 -19
  70. package/dist/fixtures/discovery.js +96 -90
  71. package/dist/fixtures/discovery.js.map +7 -1
  72. package/dist/fixtures/inertEntrypointChild.js +57 -56
  73. package/dist/fixtures/inertEntrypointChild.js.map +7 -1
  74. package/dist/fixtures/inertEntrypoints.d.ts +1 -1
  75. package/dist/fixtures/inertEntrypoints.js +321 -276
  76. package/dist/fixtures/inertEntrypoints.js.map +7 -1
  77. package/dist/fixtures/inertTarget.d.ts +78 -7
  78. package/dist/fixtures/inertTarget.js +769 -691
  79. package/dist/fixtures/inertTarget.js.map +7 -1
  80. package/dist/fixtures/issue63.d.ts +4 -3
  81. package/dist/fixtures/issue63.js +260 -274
  82. package/dist/fixtures/issue63.js.map +7 -1
  83. package/dist/fixtures/issueProjectItems.d.ts +20 -0
  84. package/dist/fixtures/issueProjectItems.js +15 -0
  85. package/dist/fixtures/issueProjectItems.js.map +7 -0
  86. package/dist/fixtures/readView.d.ts +120 -0
  87. package/dist/fixtures/readView.js +172 -0
  88. package/dist/fixtures/readView.js.map +7 -0
  89. package/dist/fixtures/recordedGitHubFlows.d.ts +120 -0
  90. package/dist/fixtures/recordedGitHubFlows.js +109 -0
  91. package/dist/fixtures/recordedGitHubFlows.js.map +7 -0
  92. package/dist/genericCompatibility.test.js +64 -55
  93. package/dist/genericCompatibility.test.js.map +7 -1
  94. package/dist/git.js +73 -67
  95. package/dist/git.js.map +7 -1
  96. package/dist/gitProcess.d.ts +1 -1
  97. package/dist/gitProcess.js +58 -53
  98. package/dist/gitProcess.js.map +7 -1
  99. package/dist/github/client.d.ts +2 -2
  100. package/dist/github/client.js +484 -379
  101. package/dist/github/client.js.map +7 -1
  102. package/dist/github/commandIdentityPolicy.js +44 -52
  103. package/dist/github/commandIdentityPolicy.js.map +7 -1
  104. package/dist/github/discovery.d.ts +1 -0
  105. package/dist/github/discovery.js +197 -215
  106. package/dist/github/discovery.js.map +7 -1
  107. package/dist/github/discovery.test.js +223 -177
  108. package/dist/github/discovery.test.js.map +7 -1
  109. package/dist/github/issueHistory.d.ts +2 -2
  110. package/dist/github/issueHistory.js +117 -125
  111. package/dist/github/issueHistory.js.map +7 -1
  112. package/dist/github/machineAuth.d.ts +1 -1
  113. package/dist/github/machineAuth.js +126 -117
  114. package/dist/github/machineAuth.js.map +7 -1
  115. package/dist/github/machineAuth.test.js +755 -639
  116. package/dist/github/machineAuth.test.js.map +7 -1
  117. package/dist/github/nativeIssueMetadata.js +286 -273
  118. package/dist/github/nativeIssueMetadata.js.map +7 -1
  119. package/dist/github/projectDelivery.d.ts +18 -2
  120. package/dist/github/projectDelivery.js +615 -557
  121. package/dist/github/projectDelivery.js.map +7 -1
  122. package/dist/github/relationships.js +433 -389
  123. package/dist/github/relationships.js.map +7 -1
  124. package/dist/github/repo.d.ts +1 -0
  125. package/dist/github/repo.js +123 -96
  126. package/dist/github/repo.js.map +7 -1
  127. package/dist/index.js +3 -3
  128. package/dist/index.js.map +7 -1
  129. package/dist/issue.d.ts +40 -9
  130. package/dist/issue.js +2102 -1742
  131. package/dist/issue.js.map +7 -1
  132. package/dist/issue63History.test.js +40 -42
  133. package/dist/issue63History.test.js.map +7 -1
  134. package/dist/issue63Routes.test.js +154 -143
  135. package/dist/issue63Routes.test.js.map +7 -1
  136. package/dist/issueBatchUpdate.test.js +989 -885
  137. package/dist/issueBatchUpdate.test.js.map +7 -1
  138. package/dist/issueBlockerGuard.test.js +262 -226
  139. package/dist/issueBlockerGuard.test.js.map +7 -1
  140. package/dist/issueContract.d.ts +23 -4
  141. package/dist/issueContract.js +416 -395
  142. package/dist/issueContract.js.map +7 -1
  143. package/dist/issueContract.test.d.ts +4 -3
  144. package/dist/issueContract.test.js +358 -321
  145. package/dist/issueContract.test.js.map +7 -1
  146. package/dist/issueDates.test.js +235 -233
  147. package/dist/issueDates.test.js.map +7 -1
  148. package/dist/issueInfoReadback.test.js +304 -190
  149. package/dist/issueInfoReadback.test.js.map +7 -1
  150. package/dist/issueIntake.test.js +1945 -1732
  151. package/dist/issueIntake.test.js.map +7 -1
  152. package/dist/issueJournal.d.ts +40 -19
  153. package/dist/issueJournal.js +229 -138
  154. package/dist/issueJournal.js.map +7 -1
  155. package/dist/issueJournal.test.js +605 -422
  156. package/dist/issueJournal.test.js.map +7 -1
  157. package/dist/issueRollup.test.d.ts +1 -0
  158. package/dist/issueRollup.test.js +476 -0
  159. package/dist/issueRollup.test.js.map +7 -0
  160. package/dist/issueTracking.test.js +1059 -989
  161. package/dist/issueTracking.test.js.map +7 -1
  162. package/dist/issueWriteRecovery.test.d.ts +1 -0
  163. package/dist/issueWriteRecovery.test.js +260 -0
  164. package/dist/issueWriteRecovery.test.js.map +7 -0
  165. package/dist/lifecycle.test.js +112 -441
  166. package/dist/lifecycle.test.js.map +7 -1
  167. package/dist/logger.js +80 -74
  168. package/dist/logger.js.map +7 -1
  169. package/dist/mcp/index.js +116 -94
  170. package/dist/mcp/index.js.map +7 -1
  171. package/dist/mcp/tools.d.ts +264 -286
  172. package/dist/mcp/tools.js +267 -340
  173. package/dist/mcp/tools.js.map +7 -1
  174. package/dist/pluginAuthProbe.js +63 -52
  175. package/dist/pluginAuthProbe.js.map +7 -1
  176. package/dist/pluginAuthProbe.test.js +85 -62
  177. package/dist/pluginAuthProbe.test.js.map +7 -1
  178. package/dist/pluginCredentials.test.js +282 -259
  179. package/dist/pluginCredentials.test.js.map +7 -1
  180. package/dist/pluginDoctor.test.js +653 -588
  181. package/dist/pluginDoctor.test.js.map +7 -1
  182. package/dist/pluginInstaller.d.ts +7 -5
  183. package/dist/pluginInstaller.js +1173 -1229
  184. package/dist/pluginInstaller.js.map +7 -1
  185. package/dist/pluginInstaller.test.js +1842 -1423
  186. package/dist/pluginInstaller.test.js.map +7 -1
  187. package/dist/pluginPackaging.test.js +460 -409
  188. package/dist/pluginPackaging.test.js.map +7 -1
  189. package/dist/pr.d.ts +132 -94
  190. package/dist/pr.js +1521 -1323
  191. package/dist/pr.js.map +7 -1
  192. package/dist/pr.test.js +1678 -632
  193. package/dist/pr.test.js.map +7 -1
  194. package/dist/prAssociation.test.js +2419 -1788
  195. package/dist/prAssociation.test.js.map +7 -1
  196. package/dist/prDispatch.test.js +150 -89
  197. package/dist/prDispatch.test.js.map +7 -1
  198. package/dist/readView.d.ts +183 -0
  199. package/dist/readView.js +217 -0
  200. package/dist/readView.js.map +7 -0
  201. package/dist/readView.test.d.ts +1 -0
  202. package/dist/readView.test.js +119 -0
  203. package/dist/readView.test.js.map +7 -0
  204. package/dist/releaseReconciliation.test.js +267 -288
  205. package/dist/releaseReconciliation.test.js.map +7 -1
  206. package/dist/releaseWorkflow.test.js +2493 -422
  207. package/dist/releaseWorkflow.test.js.map +7 -1
  208. package/dist/review.d.ts +738 -2
  209. package/dist/review.js +601 -348
  210. package/dist/review.js.map +7 -1
  211. package/dist/review.test.js +1218 -812
  212. package/dist/review.test.js.map +7 -1
  213. package/dist/reviewSubmit.test.d.ts +1 -0
  214. package/dist/reviewSubmit.test.js +747 -0
  215. package/dist/reviewSubmit.test.js.map +7 -0
  216. package/dist/services/agentReadinessService.js +42 -37
  217. package/dist/services/agentReadinessService.js.map +7 -1
  218. package/dist/services/blockerGuardService.js +188 -188
  219. package/dist/services/blockerGuardService.js.map +7 -1
  220. package/dist/services/boardReconcileService.d.ts +125 -125
  221. package/dist/services/boardReconcileService.js +1295 -1421
  222. package/dist/services/boardReconcileService.js.map +7 -1
  223. package/dist/services/deliveryAdmission.js +131 -154
  224. package/dist/services/deliveryAdmission.js.map +7 -1
  225. package/dist/services/deliveryHealthService.js +197 -199
  226. package/dist/services/deliveryHealthService.js.map +7 -1
  227. package/dist/services/legacyIssueMigration.js +263 -277
  228. package/dist/services/legacyIssueMigration.js.map +7 -1
  229. package/dist/services/worktreeRegistry.d.ts +27 -119
  230. package/dist/services/worktreeRegistry.js +765 -1182
  231. package/dist/services/worktreeRegistry.js.map +7 -1
  232. package/dist/stagedChecks.test.js +396 -194
  233. package/dist/stagedChecks.test.js.map +7 -1
  234. package/dist/start.test.js +99 -95
  235. package/dist/start.test.js.map +7 -1
  236. package/dist/stdoutRegression.test.js +353 -352
  237. package/dist/stdoutRegression.test.js.map +7 -1
  238. package/dist/targetPolicyDiscovery.test.js +141 -143
  239. package/dist/targetPolicyDiscovery.test.js.map +7 -1
  240. package/dist/targetPolicyEntrypoints.test.js +308 -269
  241. package/dist/targetPolicyEntrypoints.test.js.map +7 -1
  242. package/dist/targetPolicyLocal.test.js +580 -1051
  243. package/dist/targetPolicyLocal.test.js.map +7 -1
  244. package/dist/targetPolicyRoutes.test.js +305 -281
  245. package/dist/targetPolicyRoutes.test.js.map +7 -1
  246. package/dist/targetRepositoryExecution.test.d.ts +1 -0
  247. package/dist/targetRepositoryExecution.test.js +463 -0
  248. package/dist/targetRepositoryExecution.test.js.map +7 -0
  249. package/dist/terminalMessages.js +41 -35
  250. package/dist/terminalMessages.js.map +7 -1
  251. package/dist/toolOutput.d.ts +2 -0
  252. package/dist/toolOutput.js +36 -0
  253. package/dist/toolOutput.js.map +7 -0
  254. package/dist/toolOutput.test.d.ts +1 -0
  255. package/dist/toolOutput.test.js +240 -0
  256. package/dist/toolOutput.test.js.map +7 -0
  257. package/dist/utils/atomicJson.js +84 -76
  258. package/dist/utils/atomicJson.js.map +7 -1
  259. package/dist/utils/filesystem.js +15 -18
  260. package/dist/utils/filesystem.js.map +7 -1
  261. package/dist/utils/lockfile.js +68 -71
  262. package/dist/utils/lockfile.js.map +7 -1
  263. package/dist/verification.d.ts +1 -19
  264. package/dist/verification.js +1020 -1939
  265. package/dist/verification.js.map +7 -1
  266. package/dist/verificationGate.test.js +127 -117
  267. package/dist/verificationGate.test.js.map +7 -1
  268. package/dist/version.js +23 -24
  269. package/dist/version.js.map +7 -1
  270. package/dist/worktree.d.ts +3 -15
  271. package/dist/worktree.js +97 -177
  272. package/dist/worktree.js.map +7 -1
  273. package/package.json +9 -8
  274. package/plugins/ai-delivery/.claude-plugin/plugin.json +2 -2
  275. package/plugins/ai-delivery/README.md +47 -156
  276. package/plugins/ai-delivery/plugin.json +1 -1
  277. package/plugins/ai-delivery/runtime/dist/THIRD-PARTY-NOTICES.md +238 -44
  278. package/plugins/ai-delivery/runtime/dist/cli.js +358 -115
  279. package/plugins/ai-delivery/runtime/package.json +1 -1
  280. package/plugins/ai-delivery/skills/intake-create/SKILL.md +14 -78
  281. package/plugins/ai-delivery/skills/pr-handoff/SKILL.md +35 -36
  282. package/plugins/ai-delivery/skills/worktree-lifecycle/SKILL.md +14 -15
  283. package/dist/investigationCompletion.test.js +0 -728
  284. package/dist/investigationCompletion.test.js.map +0 -1
  285. package/dist/setup.d.ts +0 -60
  286. package/dist/setup.js +0 -585
  287. package/dist/setup.js.map +0 -1
  288. package/dist/setup.test.js +0 -3329
  289. package/dist/setup.test.js.map +0 -1
  290. package/dist/worktreeTransition.d.ts +0 -211
  291. package/dist/worktreeTransition.js +0 -1037
  292. package/dist/worktreeTransition.js.map +0 -1
  293. package/dist/worktreeTransition.test.js +0 -1191
  294. package/dist/worktreeTransition.test.js.map +0 -1
  295. /package/dist/{investigationCompletion.test.d.ts → build.test.d.ts} +0 -0
  296. /package/dist/{setup.test.d.ts → callerErrors.test.d.ts} +0 -0
  297. /package/dist/{worktreeTransition.test.d.ts → deliveryBoard.test.d.ts} +0 -0
@@ -0,0 +1,649 @@
1
+ import assert from "node:assert/strict";
2
+ import { randomUUID } from "node:crypto";
3
+ import { Command } from "commander";
4
+ import { Client } from "@modelcontextprotocol/sdk/client/index.js";
5
+ import { InMemoryTransport } from "@modelcontextprotocol/sdk/inMemory.js";
6
+ import { createAiDeliveryMcpServer } from "./mcp/index.js";
7
+ import { test, vi } from "vitest";
8
+ import * as board from "./deliveryBoard.js";
9
+ import {
10
+ boardReplayAsOf,
11
+ boardReplayRepos,
12
+ deliveryBoardReplay
13
+ } from "./fixtures/deliveryBoardReplay.js";
14
+ function collector() {
15
+ const collect = Reflect.get(board, "collectDeliveryBoard");
16
+ assert.equal(typeof collect, "function", "read-only board collector is available");
17
+ return collect;
18
+ }
19
+ function parser() {
20
+ const parse = Reflect.get(board, "parseDeliveryBoardRequest");
21
+ assert.equal(typeof parse, "function", "board request validation is available");
22
+ return parse;
23
+ }
24
+ const request = () => ({ repos: [...boardReplayRepos], decisionLabels: ["needs-decision"] });
25
+ test("board request is explicit, ordered, case-insensitive and validated before access", () => {
26
+ const parse = parser();
27
+ assert.deepEqual(parse({ repos: ["Example/Beta", "example/ALPHA", "EXAMPLE/beta"] }), {
28
+ repos: ["example/beta", "example/alpha"],
29
+ decisionLabels: []
30
+ });
31
+ assert.deepEqual(
32
+ parse({ repos: ["example/alpha"], decisionLabels: [" Needs-Decision ", "needs-decision"] }).decisionLabels,
33
+ ["Needs-Decision"]
34
+ );
35
+ for (const raw of [
36
+ void 0,
37
+ {},
38
+ { repos: [] },
39
+ { repos: [""] },
40
+ { repos: ["example"] },
41
+ { repos: ["a/b/c"] },
42
+ { repos: ["a/b\nother"] },
43
+ { repos: ["a/b"], decisionLabels: [" "] },
44
+ { repos: ["a/b"], decisionLabels: ["bad\nlabel"] },
45
+ { repos: ["a/b"], decisionLabels: ["bad\x85label"] }
46
+ ])
47
+ assert.throws(() => parse(raw));
48
+ });
49
+ test("two-repo board collects five sections with observed-null readiness and one six-page inventory", async () => {
50
+ const collect = collector();
51
+ const f = deliveryBoardReplay();
52
+ const result = await collect(request(), f.execution);
53
+ assert.equal(result.schemaVersion, "ai-delivery.board@1");
54
+ assert.equal(result.collection.asOf, boardReplayAsOf);
55
+ assert.equal(
56
+ result.complete,
57
+ true,
58
+ JSON.stringify(
59
+ result.repositories.map((repository) => ({
60
+ repository: repository.repository,
61
+ humanAttention: repository.humanAttention.map((row) => ({
62
+ number: row.number,
63
+ labels: row.labels,
64
+ journal: row.journal.state
65
+ })),
66
+ coverage: Object.fromEntries(
67
+ Object.entries(repository.coverage).map(([section, coverage]) => [
68
+ section,
69
+ {
70
+ status: coverage.status,
71
+ reasons: coverage.reasons,
72
+ unknown: coverage.unknownRows.map((row) => ({ number: row.number, reasons: row.reasons }))
73
+ }
74
+ ])
75
+ ),
76
+ metrics: repository.metrics
77
+ }))
78
+ )
79
+ );
80
+ assert.deepEqual(
81
+ result.repositories.map((r) => r.repository),
82
+ boardReplayRepos
83
+ );
84
+ let rows = 0;
85
+ for (const r of result.repositories) {
86
+ assert.equal(r.access, "readable");
87
+ assert.deepEqual(
88
+ [r.humanAttention.length, r.readyPrs.length, r.blockedPrs.length, r.staleIssues.length],
89
+ [5, 5, 5, 5]
90
+ );
91
+ rows += r.humanAttention.length + r.readyPrs.length + r.blockedPrs.length + r.staleIssues.length;
92
+ assert.ok(r.readyPrs.every((pr) => pr.ready && pr.review.observed === true && pr.review.reviewDecision === null));
93
+ assert.equal(r.humanAttention.find((i) => i.number === 5)?.journal.state, "clear");
94
+ assert.ok(r.humanAttention.find((i) => i.number === 5)?.labels.includes("needs-decision"));
95
+ for (const number of [21, 22, 23, 24, 25])
96
+ assert.equal(
97
+ r.humanAttention.some((i) => i.number === number),
98
+ false,
99
+ "latest lifecycle/full numeric ID clears the older request"
100
+ );
101
+ assert.ok(
102
+ r.staleIssues.some((i) => i.number === 6),
103
+ "exact 72-hour boundary is stale"
104
+ );
105
+ assert.equal(r.metrics.opened.marked, 2);
106
+ assert.equal(r.metrics.opened.total, 3);
107
+ assert.equal(r.metrics.opened.percentage, 100 * 2 / 3);
108
+ assert.equal(r.metrics.merged.marked, 1);
109
+ assert.equal(r.metrics.merged.total, 3, "merged PRs created before the window remain in the denominator");
110
+ }
111
+ assert.equal(rows, 40);
112
+ assert.equal(f.calls.operations.ProjectDeliveryItems, 6);
113
+ f.assertReadOnly();
114
+ assert.doesNotMatch(
115
+ JSON.stringify(result),
116
+ /SYNTHETIC_PRIVATE|SYNTHETIC_PENDING|SYNTHETIC_GRANT|SYNTHETIC_TOKEN|synthetic-principal|ai-delivery-board-replay-/u
117
+ );
118
+ const again = await collect({ ...request(), repos: [...boardReplayRepos].reverse() }, f.execution);
119
+ assert.deepEqual(
120
+ again.repositories.map((r) => r.repository),
121
+ [...boardReplayRepos].reverse()
122
+ );
123
+ assert.equal(
124
+ f.calls.operations.ProjectDeliveryItems,
125
+ 12,
126
+ "a later request recollects instead of retaining a persistent cache"
127
+ );
128
+ f.assertReadOnly();
129
+ });
130
+ test("Project query count does not multiply between one and fifty selected issues", async () => {
131
+ const collect = collector();
132
+ for (const selectedIssues of [1, 50]) {
133
+ const f = deliveryBoardReplay({ selectedIssues });
134
+ await collect(request(), f.execution);
135
+ assert.equal(f.calls.operations.ProjectDeliveryItems, 6);
136
+ assert.equal(f.calls.perItemStatusReads, 0);
137
+ f.assertReadOnly();
138
+ console.log(
139
+ JSON.stringify({
140
+ selectedIssues,
141
+ ProjectDeliveryItems: 6,
142
+ perItemStatusReads: 0,
143
+ nativeWrites: 0,
144
+ targetExecutions: 0
145
+ })
146
+ );
147
+ f.dispose();
148
+ }
149
+ });
150
+ test("read-only Project visibility is sufficient for stale observations", async () => {
151
+ const collect = collector();
152
+ const f = deliveryBoardReplay({ readOnlyProject: true });
153
+ const result = await collect(request(), f.execution);
154
+ assert.equal(result.complete, true);
155
+ for (const r of result.repositories) {
156
+ assert.equal(r.staleIssues.length, 5);
157
+ }
158
+ f.assertReadOnly();
159
+ });
160
+ test("repo denial and Project-only denial preserve independent readable sections", async () => {
161
+ const collect = collector();
162
+ for (const projectDenied of [false, true]) {
163
+ const f = deliveryBoardReplay(projectDenied ? { projectDenied } : { unreadableRepository: boardReplayRepos[1] });
164
+ const result = await collect(request(), f.execution);
165
+ const alpha = result.repositories[0];
166
+ const beta = result.repositories[1];
167
+ assert.equal(result.complete, false);
168
+ assert.equal(alpha.access, "readable");
169
+ assert.equal(alpha.readyPrs.length, 5);
170
+ assert.equal(alpha.humanAttention.length, 5);
171
+ assert.equal(alpha.metrics.opened.complete, true);
172
+ if (projectDenied) {
173
+ assert.equal(alpha.coverage.staleIssues.status, "unavailable");
174
+ assert.equal(beta.readyPrs.length, 5);
175
+ assert.equal(beta.metrics.merged.complete, true);
176
+ } else {
177
+ assert.equal(beta.access, "unreadable");
178
+ assert.equal(beta.metrics.opened.complete, false);
179
+ assert.equal(beta.metrics.opened.percentage, null);
180
+ assert.equal(
181
+ f.calls.operations["Issues:example/beta"],
182
+ void 0,
183
+ "do not probe subordinate data after repository denial"
184
+ );
185
+ }
186
+ f.assertReadOnly();
187
+ f.dispose();
188
+ }
189
+ });
190
+ test("latest malformed journals, parent identity and backward pagination never expose older requests", async () => {
191
+ const collect = collector();
192
+ const cases = [
193
+ { ambiguousJournal: true },
194
+ { journalDenied: true },
195
+ { wrongJournalParent: true },
196
+ { journalCursorRepeats: true }
197
+ ];
198
+ for (const options of cases) {
199
+ const f2 = deliveryBoardReplay(options);
200
+ const result2 = await collect(request(), f2.execution);
201
+ const alpha = result2.repositories[0];
202
+ assert.equal(
203
+ alpha.humanAttention.some((i) => i.number === 1),
204
+ false
205
+ );
206
+ assert.ok(alpha.coverage.humanAttention.unknownRows.some((i) => i.number === 1));
207
+ if (options.ambiguousJournal)
208
+ assert.deepEqual(alpha.coverage.humanAttention.unknownRows.find((i) => i.number === 1)?.reasons, [
209
+ "journal-ambiguous"
210
+ ]);
211
+ assert.notEqual(alpha.coverage.humanAttention.status, "complete");
212
+ assert.equal(result2.repositories[1].humanAttention.length, 5);
213
+ f2.assertReadOnly();
214
+ f2.dispose();
215
+ }
216
+ const f = deliveryBoardReplay({ journalBackwards: true });
217
+ const result = await collect(request(), f.execution);
218
+ assert.equal(result.repositories[0].humanAttention.find((i) => i.number === 1)?.request, "Approve synthetic design");
219
+ assert.equal(result.repositories[0].coverage.humanAttention.status, "complete");
220
+ f.assertReadOnly();
221
+ });
222
+ test("unknown Project status and repeated cursors remain unknown without per-issue fallback", async () => {
223
+ const collect = collector();
224
+ const cases = [
225
+ { status: "missing" },
226
+ { status: "unsupported" },
227
+ { status: "duplicate" },
228
+ { projectCursorRepeats: true }
229
+ ];
230
+ for (const options of cases) {
231
+ const f = deliveryBoardReplay(options);
232
+ const result = await collect(request(), f.execution);
233
+ const alpha = result.repositories[0];
234
+ assert.equal(
235
+ alpha.staleIssues.some((i) => i.number === 6),
236
+ false
237
+ );
238
+ assert.ok(alpha.coverage.staleIssues.unknownRows.some((i) => i.number === 6));
239
+ assert.notEqual(alpha.coverage.staleIssues.status, "complete");
240
+ assert.equal(alpha.readyPrs.length, 5);
241
+ if (options.projectCursorRepeats)
242
+ assert.ok((f.calls.operations.ProjectDeliveryItems ?? 0) <= 2, "cache one scoped failure for both repos");
243
+ f.assertReadOnly();
244
+ f.dispose();
245
+ }
246
+ });
247
+ test("rolling windows are independent and use exact inclusive lower/exclusive upper bounds", async () => {
248
+ const collect = collector();
249
+ for (const asOf of [boardReplayAsOf, "2026-10-23T12:00:00.500Z"]) {
250
+ const f = deliveryBoardReplay({ windowEdges: true, recentBoundary: true, asOf });
251
+ const result = await collect(request(), f.execution);
252
+ const alpha = result.repositories[0];
253
+ assert.equal(result.collection.asOf, asOf);
254
+ assert.equal(alpha.metrics.opened.total, 1);
255
+ assert.equal(alpha.metrics.opened.marked, 1);
256
+ assert.equal(alpha.metrics.merged.total, 2);
257
+ assert.equal(alpha.metrics.merged.marked, 1);
258
+ assert.ok(alpha.staleIssues.some((i) => i.number === 6));
259
+ assert.equal(
260
+ alpha.staleIssues.some((i) => i.number === 7),
261
+ false
262
+ );
263
+ f.assertReadOnly();
264
+ f.dispose();
265
+ }
266
+ });
267
+ test("search gaps, duplicate IDs, unknown commits and retained-data limits do not report a percentage", async () => {
268
+ const collect = collector();
269
+ const cases = [
270
+ { searchCap: true },
271
+ { searchCursorRepeats: true },
272
+ { duplicateSearchIds: true },
273
+ { unknownMergeCommit: true },
274
+ { retainedLimit: true },
275
+ { lateMetricFailure: true }
276
+ ];
277
+ for (const options of cases) {
278
+ const f = deliveryBoardReplay(options);
279
+ const result = await collect(request(), f.execution);
280
+ const metric = options.lateMetricFailure ? result.repositories[1].metrics.merged : options.unknownMergeCommit ? result.repositories[0].metrics.merged : result.repositories[0].metrics.opened;
281
+ assert.equal(metric.complete, false);
282
+ assert.equal(metric.percentage, null);
283
+ assert.equal(result.complete, false);
284
+ if (options.unknownMergeCommit) assert.equal(metric.unknown, 1);
285
+ if (options.duplicateSearchIds) assert.equal(metric.total, 2);
286
+ if (options.searchCursorRepeats) assert.ok((f.calls.operations.DeliveryBoardSearch ?? 0) <= 6);
287
+ assert.equal(result.repositories[0].humanAttention.length, 5);
288
+ assert.equal(result.repositories[1].readyPrs.length, 5);
289
+ f.assertReadOnly();
290
+ f.dispose();
291
+ }
292
+ });
293
+ test("complete zero denominators are n/a", async () => {
294
+ const collect = collector();
295
+ const f = deliveryBoardReplay({ emptyMetrics: true });
296
+ const result = await collect(request(), f.execution);
297
+ for (const r of result.repositories) {
298
+ assert.deepEqual(
299
+ [r.metrics.opened.marked, r.metrics.opened.total, r.metrics.opened.percentage, r.metrics.opened.complete],
300
+ [0, 0, null, true]
301
+ );
302
+ }
303
+ f.assertReadOnly();
304
+ });
305
+ test("combined retained projections stop at the request bound while independent sections survive", async () => {
306
+ const collect = collector();
307
+ for (const projectDenied of [false, true]) {
308
+ const f = deliveryBoardReplay({ combinedRetainedLimit: true, projectDenied });
309
+ const result = await collect(request(), f.execution);
310
+ assert.equal(result.complete, false);
311
+ assert.equal(result.repositories[0].humanAttention.length, 5);
312
+ const beta = result.repositories[1];
313
+ assert.equal(beta.coverage.humanAttention.status, "partial");
314
+ assert.ok(beta.coverage.humanAttention.reasons.includes("retained-data-limit"));
315
+ assert.equal(beta.readyPrs.length, 5);
316
+ assert.equal(beta.metrics.opened.complete, true);
317
+ assert.ok(Buffer.byteLength(JSON.stringify(result)) < 16 * 1024 * 1024);
318
+ f.assertReadOnly();
319
+ f.dispose();
320
+ }
321
+ });
322
+ test("an oversized PR retains bounded unknown identities without escaping the request limit", async () => {
323
+ const collect = collector();
324
+ const f = deliveryBoardReplay({ oversizedPr: true });
325
+ const result = await collect(request(), f.execution);
326
+ const alpha = result.repositories[0];
327
+ assert.equal(result.complete, false);
328
+ for (const section of ["readyPrs", "blockedPrs"]) {
329
+ assert.equal(alpha.coverage[section].status, "partial");
330
+ assert.ok(alpha.coverage[section].reasons.includes("retained-data-limit"));
331
+ assert.equal(alpha.coverage[section].unknownRows.find((pr) => pr.number === 101)?.title, "");
332
+ }
333
+ assert.equal(alpha.readyPrs.length, 4);
334
+ assert.equal(result.repositories[1].readyPrs.length, 5);
335
+ assert.ok(Buffer.byteLength(JSON.stringify(result)) < 16 * 1024 * 1024);
336
+ f.assertReadOnly();
337
+ });
338
+ test("unavailable PR facts make coverage partial while observed blocked facts remain complete", async () => {
339
+ const collect = collector();
340
+ for (const options of [
341
+ { prReviewUnavailable: true },
342
+ { prNativeUnavailable: true },
343
+ { prChecksFailed: true },
344
+ { movedBase: true }
345
+ ]) {
346
+ const f = deliveryBoardReplay(options);
347
+ const result = await collect(request(), f.execution);
348
+ const alpha = result.repositories[0];
349
+ assert.ok(alpha.blockedPrs.some((pr) => pr.number === 101));
350
+ const known = "prChecksFailed" in options;
351
+ assert.equal(alpha.coverage.readyPrs.status, known ? "complete" : "partial");
352
+ assert.equal(alpha.coverage.blockedPrs.status, known ? "complete" : "partial");
353
+ assert.equal(result.complete, known);
354
+ assert.equal(result.repositories[1].readyPrs.length, 5);
355
+ f.assertReadOnly();
356
+ f.dispose();
357
+ }
358
+ });
359
+ test("Project reuse requires matching verified principals", async () => {
360
+ const collect = collector();
361
+ const cases = [
362
+ { contextPrincipal: "changed" },
363
+ { contextPrincipal: "unavailable" },
364
+ { contextIdentityMismatch: true }
365
+ ];
366
+ for (const options of cases) {
367
+ const f = deliveryBoardReplay(options);
368
+ const result = await collect(request(), f.execution);
369
+ const beta = result.repositories[1];
370
+ assert.equal(result.complete, false);
371
+ assert.equal(beta.coverage.staleIssues.status, "unavailable");
372
+ assert.equal(f.calls.operations.ProjectDeliveryItems, 6);
373
+ assert.equal(beta.humanAttention.length, 5);
374
+ assert.equal(beta.readyPrs.length, 5);
375
+ assert.equal(beta.metrics.opened.complete, true);
376
+ f.assertReadOnly();
377
+ f.dispose();
378
+ }
379
+ });
380
+ test("selector conflicts and cancellation stop before dependent native work", async () => {
381
+ const collect = collector();
382
+ const f = deliveryBoardReplay();
383
+ await assert.rejects(collect(request(), { ...f.execution, repo: boardReplayRepos[0] }), /repo|selector/iu);
384
+ assert.equal(f.calls.clientFactory, 0);
385
+ const initial = new AbortController();
386
+ initial.abort();
387
+ await assert.rejects(collect(request(), { ...f.execution, signal: initial.signal }), /abort/iu);
388
+ assert.equal(f.calls.clientFactory, 0);
389
+ f.assertReadOnly();
390
+ f.dispose();
391
+ const during = new AbortController();
392
+ const g = deliveryBoardReplay({ abortAfterRepository: during });
393
+ await assert.rejects(collect(request(), { ...g.execution, signal: during.signal }), /abort/iu);
394
+ assert.equal(g.calls.operations["Prs:example/alpha"], void 0);
395
+ assert.equal(g.calls.operations["Repo:example/beta"], void 0);
396
+ g.assertReadOnly();
397
+ });
398
+ function rendered(result) {
399
+ const render = Reflect.get(board, "renderDeliveryBoard");
400
+ assert.equal(typeof render, "function", "compact board renderer is available");
401
+ return render(result);
402
+ }
403
+ function boardText(response) {
404
+ const value = response;
405
+ const block = value.content.find((item) => item.type === "text");
406
+ assert.ok(block && typeof block.text === "string");
407
+ return block.text;
408
+ }
409
+ async function nativeBoardMcp(f, args) {
410
+ const server = createAiDeliveryMcpServer(f.execution);
411
+ const client = new Client({ name: "delivery-board-replay", version: "1" });
412
+ const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();
413
+ try {
414
+ await server.connect(serverTransport);
415
+ await client.connect(clientTransport);
416
+ const advertised = (await client.listTools()).tools.find((tool) => tool.name === "delivery_board");
417
+ assert.ok(advertised, "real MCP server advertises the board tool");
418
+ assert.ok(advertised.inputSchema.properties?.repos);
419
+ assert.ok(advertised.inputSchema.properties?.decisionLabels);
420
+ assert.ok(advertised.inputSchema.properties?.verbose);
421
+ assert.ok(advertised.inputSchema.required?.includes("repos"));
422
+ return await client.callTool({ name: "delivery_board", arguments: args });
423
+ } finally {
424
+ try {
425
+ await client.close();
426
+ } finally {
427
+ await server.close();
428
+ }
429
+ }
430
+ }
431
+ async function nativeBoardCli(args) {
432
+ const previousArgv = process.argv, previousExit = process.exitCode;
433
+ let stdout = "", stderr = "";
434
+ const parse = vi.spyOn(Command.prototype, "parseAsync");
435
+ const out = vi.spyOn(process.stdout, "write").mockImplementation((chunk) => {
436
+ stdout += String(chunk);
437
+ return true;
438
+ });
439
+ const err = vi.spyOn(process.stderr, "write").mockImplementation((chunk) => {
440
+ stderr += String(chunk);
441
+ return true;
442
+ });
443
+ const exit = vi.spyOn(process, "exit").mockImplementation((status) => {
444
+ throw new Error(`CLI requested exit ${status}`);
445
+ });
446
+ try {
447
+ process.exitCode = void 0;
448
+ const cli = new URL("./cli.js", import.meta.url).href;
449
+ process.argv = [process.execPath, cli, "--identity", "fixture-author", ...args];
450
+ await import(`${cli}?boardReplay=${randomUUID()}`);
451
+ const command = parse.mock.results[0];
452
+ assert.ok(command?.type === "return", "the actual Commander parser was invoked");
453
+ await command.value.catch(() => void 0);
454
+ await Promise.resolve();
455
+ return { stdout, stderr, status: Number(process.exitCode ?? 0) };
456
+ } finally {
457
+ process.argv = previousArgv;
458
+ process.exitCode = previousExit;
459
+ parse.mockRestore();
460
+ out.mockRestore();
461
+ err.mockRestore();
462
+ exit.mockRestore();
463
+ }
464
+ }
465
+ function compactBoardAssertions(value) {
466
+ for (const heading of [/Human attention/u, /Ready PRs/u, /Blocked PRs/u, /Stale/u]) assert.match(value, heading);
467
+ for (const repository of boardReplayRepos) assert.ok(value.includes(repository));
468
+ assert.ok(value.includes("2/3") && value.includes("1/3"));
469
+ assert.equal(
470
+ (value.match(/https:\/\/github\.com\/example\/(?:alpha|beta)\/(?:issues|pull)\/\d+/gu) ?? []).length,
471
+ 40
472
+ );
473
+ }
474
+ test("actual MCP board route retains real dispatch, collector and six-page zero-write replay", async () => {
475
+ const f = deliveryBoardReplay();
476
+ const response = await nativeBoardMcp(f, request());
477
+ assert.notEqual(response.isError, true);
478
+ const serialized = boardText(response), compact = JSON.parse(serialized);
479
+ compactBoardAssertions(compact);
480
+ assert.ok(serialized.length < 4e3, "actual MCP JSON-string text fits the compact budget");
481
+ assert.equal(f.calls.operations.ProjectDeliveryItems, 6);
482
+ f.assertReadOnly();
483
+ });
484
+ test("actual compiled CLI board route uses the same native replay and compact newline budget", async () => {
485
+ const f = deliveryBoardReplay();
486
+ const response = await nativeBoardCli([
487
+ "board",
488
+ "--repos",
489
+ boardReplayRepos.join(","),
490
+ "--decision-labels",
491
+ "needs-decision"
492
+ ]);
493
+ assert.equal(response.status, 0, response.stderr);
494
+ compactBoardAssertions(response.stdout);
495
+ assert.ok(response.stdout.endsWith("\n") && response.stdout.length < 4e3);
496
+ assert.equal(f.calls.operations.ProjectDeliveryItems, 6);
497
+ f.assertReadOnly();
498
+ });
499
+ test("CLI JSON without verbose and MCP verbose expose identical complete board facts", async () => {
500
+ const f = deliveryBoardReplay();
501
+ const cli = await nativeBoardCli([
502
+ "board",
503
+ "--repos",
504
+ boardReplayRepos.join(","),
505
+ "--decision-labels",
506
+ "needs-decision",
507
+ "--json"
508
+ ]);
509
+ assert.equal(cli.status, 0, cli.stderr);
510
+ const json = JSON.parse(cli.stdout);
511
+ assert.equal(json.schemaVersion, "ai-delivery.board@1");
512
+ assert.equal(f.calls.operations.ProjectDeliveryItems, 6);
513
+ f.assertReadOnly();
514
+ f.dispose();
515
+ const g = deliveryBoardReplay();
516
+ const mcp = await nativeBoardMcp(g, { ...request(), verbose: true });
517
+ assert.notEqual(mcp.isError, true);
518
+ assert.deepEqual(JSON.parse(boardText(mcp)), json);
519
+ assert.equal(g.calls.operations.ProjectDeliveryItems, 6);
520
+ g.assertReadOnly();
521
+ });
522
+ test("partial boards remain successful data through both real routes", async () => {
523
+ for (const options of [{ projectDenied: true }, { unreadableRepository: boardReplayRepos[1] }]) {
524
+ const f = deliveryBoardReplay(options);
525
+ const cli = await nativeBoardCli([
526
+ "board",
527
+ "--repos",
528
+ boardReplayRepos.join(","),
529
+ "--decision-labels",
530
+ "needs-decision",
531
+ "--json"
532
+ ]);
533
+ assert.equal(cli.status, 0, cli.stderr);
534
+ const json = JSON.parse(cli.stdout);
535
+ assert.equal(json.complete, false);
536
+ assert.equal(json.repositories[0].readyPrs.length, 5);
537
+ f.assertReadOnly();
538
+ f.dispose();
539
+ const g = deliveryBoardReplay(options);
540
+ const mcp = await nativeBoardMcp(g, { ...request(), verbose: true });
541
+ assert.notEqual(mcp.isError, true);
542
+ assert.deepEqual(JSON.parse(boardText(mcp)), json);
543
+ g.assertReadOnly();
544
+ g.dispose();
545
+ }
546
+ });
547
+ test("real route invalid selectors are rejected before credential access", async () => {
548
+ const f = deliveryBoardReplay();
549
+ const mcp = await nativeBoardMcp(f, { repos: [] });
550
+ assert.equal(mcp.isError, true);
551
+ assert.equal(f.calls.clientFactory, 0);
552
+ f.assertReadOnly();
553
+ f.dispose();
554
+ const g = deliveryBoardReplay();
555
+ const cli = await nativeBoardCli(["--repo", boardReplayRepos[0], "board", "--repos", boardReplayRepos.join(",")]);
556
+ assert.equal(cli.status, 1);
557
+ assert.equal(g.calls.clientFactory, 0);
558
+ g.assertReadOnly();
559
+ });
560
+ test("compact rendering drops titles then records omissions without mutating full unknown coverage", async () => {
561
+ const f = deliveryBoardReplay({ unreadableRepository: boardReplayRepos[1] });
562
+ const result = await collector()(request(), f.execution);
563
+ for (const repository of result.repositories) {
564
+ for (const rows of [repository.humanAttention, repository.readyPrs, repository.blockedPrs, repository.staleIssues])
565
+ for (const row of rows) {
566
+ row.title = "long title ".repeat(1e3);
567
+ row.url += `?proof=${"x".repeat(500)}`;
568
+ }
569
+ }
570
+ const original = structuredClone(result), compact = rendered(result);
571
+ assert.ok(compact.length + 1 < 4e3 && JSON.stringify(compact).length < 4e3);
572
+ assert.match(compact, /omitt/iu);
573
+ assert.match(compact, /example\/beta/u);
574
+ assert.match(compact, /unreadable|unavailable|unknown/iu);
575
+ assert.deepEqual(result, original);
576
+ const oversizedMetadata = structuredClone(result);
577
+ oversizedMetadata.repositories[0].repository = `example/${"alpha".repeat(1e3)}`;
578
+ const aggregate = rendered(oversizedMetadata);
579
+ assert.ok(aggregate.length + 1 < 4e3 && JSON.stringify(aggregate).length < 4e3);
580
+ assert.match(aggregate, /repository details omitted/iu);
581
+ assert.match(aggregate, /unreadable 1/iu);
582
+ assert.match(aggregate, /coverage unavailable/iu);
583
+ const knownRows = oversizedMetadata.repositories.reduce(
584
+ (sum, repo) => sum + [repo.humanAttention, repo.readyPrs, repo.blockedPrs, repo.staleIssues].flat().length,
585
+ 0
586
+ );
587
+ assert.equal(
588
+ [...aggregate.matchAll(/(\d+) rows omitted/gu)].reduce((sum, match) => sum + Number(match[1]), 0),
589
+ knownRows
590
+ );
591
+ f.assertReadOnly();
592
+ });
593
+ test("real compact omissions preserve their identities and unknown coverage in both full routes", async () => {
594
+ const options = { longLinks: true, projectDenied: true };
595
+ const f = deliveryBoardReplay(options);
596
+ const cliCompact = await nativeBoardCli([
597
+ "board",
598
+ "--repos",
599
+ f.repos.join(","),
600
+ "--decision-labels",
601
+ "needs-decision"
602
+ ]);
603
+ assert.equal(cliCompact.status, 0, cliCompact.stderr);
604
+ assert.ok(cliCompact.stdout.length < 4e3);
605
+ assert.match(cliCompact.stdout, /\d+\s+(?:rows?\s+)?omitted/iu);
606
+ f.assertReadOnly();
607
+ f.dispose();
608
+ const g = deliveryBoardReplay(options);
609
+ const cliFull = await nativeBoardCli([
610
+ "board",
611
+ "--repos",
612
+ g.repos.join(","),
613
+ "--decision-labels",
614
+ "needs-decision",
615
+ "--json"
616
+ ]);
617
+ assert.equal(cliFull.status, 0, cliFull.stderr);
618
+ const full = JSON.parse(cliFull.stdout);
619
+ const rows = full.repositories.flatMap(
620
+ (repo) => [repo.humanAttention, repo.readyPrs, repo.blockedPrs, repo.staleIssues].flat()
621
+ );
622
+ const omitted = rows.filter((row) => !cliCompact.stdout.includes(row.url));
623
+ assert.ok(omitted.length > 0);
624
+ const count = [...cliCompact.stdout.matchAll(/(\d+)\s+(?:rows?\s+)?omitted/giu)].reduce(
625
+ (sum, match) => sum + Number(match[1]),
626
+ 0
627
+ );
628
+ assert.equal(count, omitted.length, "each omitted displayed row is explicitly counted once");
629
+ for (const row of omitted) assert.ok(cliFull.stdout.includes(row.url));
630
+ for (const repo of full.repositories) {
631
+ assert.equal(repo.coverage.staleIssues.status, "unavailable");
632
+ assert.equal(repo.coverage.staleIssues.unknownRows.length, 25);
633
+ }
634
+ g.assertReadOnly();
635
+ g.dispose();
636
+ const h = deliveryBoardReplay(options);
637
+ const mcpCompact = await nativeBoardMcp(h, { repos: h.repos, decisionLabels: ["needs-decision"] });
638
+ assert.notEqual(mcpCompact.isError, true);
639
+ assert.ok(boardText(mcpCompact).length < 4e3);
640
+ assert.equal(JSON.parse(boardText(mcpCompact)), cliCompact.stdout.trimEnd());
641
+ h.assertReadOnly();
642
+ h.dispose();
643
+ const i = deliveryBoardReplay(options);
644
+ const mcpFull = await nativeBoardMcp(i, { repos: i.repos, decisionLabels: ["needs-decision"], verbose: true });
645
+ assert.notEqual(mcpFull.isError, true);
646
+ assert.deepEqual(JSON.parse(boardText(mcpFull)), full);
647
+ i.assertReadOnly();
648
+ });
649
+ //# sourceMappingURL=deliveryBoard.test.js.map