@aviaratech/ai-delivery 0.3.34 → 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 (301) hide show
  1. package/CONTRIBUTING.md +12 -206
  2. package/README.md +57 -506
  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 +1746 -0
  9. package/dist/boardReconcile.test.js.map +7 -0
  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 +406 -485
  15. package/dist/cli.js.map +7 -1
  16. package/dist/cliResult.d.ts +2 -2
  17. package/dist/cliResult.js +42 -25
  18. package/dist/cliResult.js.map +7 -1
  19. package/dist/cliResult.test.js +434 -297
  20. package/dist/cliResult.test.js.map +7 -1
  21. package/dist/config/deliveryConfig.d.ts +320 -14
  22. package/dist/config/deliveryConfig.js +472 -385
  23. package/dist/config/deliveryConfig.js.map +7 -1
  24. package/dist/config/deliveryConfig.test.js +775 -584
  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 -477
  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.d.ts +1 -0
  53. package/dist/deliveryBoard.test.js +649 -0
  54. package/dist/deliveryBoard.test.js.map +7 -0
  55. package/dist/deliveryHealth.test.js +179 -155
  56. package/dist/deliveryHealth.test.js.map +7 -1
  57. package/dist/dependencyCompatibility.test.js +154 -140
  58. package/dist/dependencyCompatibility.test.js.map +7 -1
  59. package/dist/directoryIndependent.test.js +417 -383
  60. package/dist/directoryIndependent.test.js.map +7 -1
  61. package/dist/dispatch.d.ts +17 -12
  62. package/dist/dispatch.js +330 -322
  63. package/dist/dispatch.js.map +7 -1
  64. package/dist/errors.d.ts +16 -3
  65. package/dist/errors.js +104 -82
  66. package/dist/errors.js.map +7 -1
  67. package/dist/fixtures/deliveryBoardReplay.d.ts +56 -0
  68. package/dist/fixtures/deliveryBoardReplay.js +617 -0
  69. package/dist/fixtures/deliveryBoardReplay.js.map +7 -0
  70. package/dist/fixtures/discovery.d.ts +59 -19
  71. package/dist/fixtures/discovery.js +96 -90
  72. package/dist/fixtures/discovery.js.map +7 -1
  73. package/dist/fixtures/inertEntrypointChild.js +57 -56
  74. package/dist/fixtures/inertEntrypointChild.js.map +7 -1
  75. package/dist/fixtures/inertEntrypoints.d.ts +1 -1
  76. package/dist/fixtures/inertEntrypoints.js +321 -276
  77. package/dist/fixtures/inertEntrypoints.js.map +7 -1
  78. package/dist/fixtures/inertTarget.d.ts +78 -7
  79. package/dist/fixtures/inertTarget.js +769 -691
  80. package/dist/fixtures/inertTarget.js.map +7 -1
  81. package/dist/fixtures/issue63.d.ts +4 -3
  82. package/dist/fixtures/issue63.js +260 -274
  83. package/dist/fixtures/issue63.js.map +7 -1
  84. package/dist/fixtures/issueProjectItems.d.ts +20 -0
  85. package/dist/fixtures/issueProjectItems.js +15 -0
  86. package/dist/fixtures/issueProjectItems.js.map +7 -0
  87. package/dist/fixtures/readView.d.ts +120 -0
  88. package/dist/fixtures/readView.js +172 -0
  89. package/dist/fixtures/readView.js.map +7 -0
  90. package/dist/fixtures/recordedGitHubFlows.d.ts +120 -0
  91. package/dist/fixtures/recordedGitHubFlows.js +109 -0
  92. package/dist/fixtures/recordedGitHubFlows.js.map +7 -0
  93. package/dist/genericCompatibility.test.js +64 -55
  94. package/dist/genericCompatibility.test.js.map +7 -1
  95. package/dist/git.js +73 -67
  96. package/dist/git.js.map +7 -1
  97. package/dist/gitProcess.d.ts +1 -1
  98. package/dist/gitProcess.js +58 -53
  99. package/dist/gitProcess.js.map +7 -1
  100. package/dist/github/client.d.ts +2 -2
  101. package/dist/github/client.js +484 -379
  102. package/dist/github/client.js.map +7 -1
  103. package/dist/github/commandIdentityPolicy.js +44 -51
  104. package/dist/github/commandIdentityPolicy.js.map +7 -1
  105. package/dist/github/discovery.d.ts +3 -0
  106. package/dist/github/discovery.js +197 -201
  107. package/dist/github/discovery.js.map +7 -1
  108. package/dist/github/discovery.test.js +223 -177
  109. package/dist/github/discovery.test.js.map +7 -1
  110. package/dist/github/issueHistory.d.ts +2 -2
  111. package/dist/github/issueHistory.js +117 -125
  112. package/dist/github/issueHistory.js.map +7 -1
  113. package/dist/github/machineAuth.d.ts +1 -1
  114. package/dist/github/machineAuth.js +126 -117
  115. package/dist/github/machineAuth.js.map +7 -1
  116. package/dist/github/machineAuth.test.js +755 -639
  117. package/dist/github/machineAuth.test.js.map +7 -1
  118. package/dist/github/nativeIssueMetadata.js +286 -273
  119. package/dist/github/nativeIssueMetadata.js.map +7 -1
  120. package/dist/github/projectDelivery.d.ts +53 -1
  121. package/dist/github/projectDelivery.js +623 -460
  122. package/dist/github/projectDelivery.js.map +7 -1
  123. package/dist/github/relationships.d.ts +5 -2
  124. package/dist/github/relationships.js +434 -333
  125. package/dist/github/relationships.js.map +7 -1
  126. package/dist/github/repo.d.ts +1 -0
  127. package/dist/github/repo.js +123 -96
  128. package/dist/github/repo.js.map +7 -1
  129. package/dist/index.js +3 -3
  130. package/dist/index.js.map +7 -1
  131. package/dist/issue.d.ts +103 -7
  132. package/dist/issue.js +2104 -1547
  133. package/dist/issue.js.map +7 -1
  134. package/dist/issue63History.test.js +40 -42
  135. package/dist/issue63History.test.js.map +7 -1
  136. package/dist/issue63Routes.test.js +154 -143
  137. package/dist/issue63Routes.test.js.map +7 -1
  138. package/dist/issueBatchUpdate.test.js +1004 -683
  139. package/dist/issueBatchUpdate.test.js.map +7 -1
  140. package/dist/issueBlockerGuard.test.js +262 -226
  141. package/dist/issueBlockerGuard.test.js.map +7 -1
  142. package/dist/issueContract.d.ts +23 -4
  143. package/dist/issueContract.js +416 -395
  144. package/dist/issueContract.js.map +7 -1
  145. package/dist/issueContract.test.d.ts +4 -3
  146. package/dist/issueContract.test.js +358 -321
  147. package/dist/issueContract.test.js.map +7 -1
  148. package/dist/issueDates.test.js +235 -233
  149. package/dist/issueDates.test.js.map +7 -1
  150. package/dist/issueInfoReadback.test.js +304 -190
  151. package/dist/issueInfoReadback.test.js.map +7 -1
  152. package/dist/issueIntake.test.js +1945 -1732
  153. package/dist/issueIntake.test.js.map +7 -1
  154. package/dist/issueJournal.d.ts +40 -19
  155. package/dist/issueJournal.js +229 -138
  156. package/dist/issueJournal.js.map +7 -1
  157. package/dist/issueJournal.test.js +605 -422
  158. package/dist/issueJournal.test.js.map +7 -1
  159. package/dist/issueRollup.test.d.ts +1 -0
  160. package/dist/issueRollup.test.js +476 -0
  161. package/dist/issueRollup.test.js.map +7 -0
  162. package/dist/issueTracking.test.js +1088 -593
  163. package/dist/issueTracking.test.js.map +7 -1
  164. package/dist/issueWriteRecovery.test.d.ts +1 -0
  165. package/dist/issueWriteRecovery.test.js +260 -0
  166. package/dist/issueWriteRecovery.test.js.map +7 -0
  167. package/dist/lifecycle.test.js +112 -441
  168. package/dist/lifecycle.test.js.map +7 -1
  169. package/dist/logger.js +80 -74
  170. package/dist/logger.js.map +7 -1
  171. package/dist/mcp/index.js +116 -90
  172. package/dist/mcp/index.js.map +7 -1
  173. package/dist/mcp/tools.d.ts +790 -220
  174. package/dist/mcp/tools.js +267 -333
  175. package/dist/mcp/tools.js.map +7 -1
  176. package/dist/pluginAuthProbe.js +63 -52
  177. package/dist/pluginAuthProbe.js.map +7 -1
  178. package/dist/pluginAuthProbe.test.js +85 -62
  179. package/dist/pluginAuthProbe.test.js.map +7 -1
  180. package/dist/pluginCredentials.test.js +282 -259
  181. package/dist/pluginCredentials.test.js.map +7 -1
  182. package/dist/pluginDoctor.test.js +653 -588
  183. package/dist/pluginDoctor.test.js.map +7 -1
  184. package/dist/pluginInstaller.d.ts +7 -5
  185. package/dist/pluginInstaller.js +1173 -1231
  186. package/dist/pluginInstaller.js.map +7 -1
  187. package/dist/pluginInstaller.test.js +1822 -1283
  188. package/dist/pluginInstaller.test.js.map +7 -1
  189. package/dist/pluginPackaging.test.js +485 -305
  190. package/dist/pluginPackaging.test.js.map +7 -1
  191. package/dist/pr.d.ts +132 -94
  192. package/dist/pr.js +1521 -1323
  193. package/dist/pr.js.map +7 -1
  194. package/dist/pr.test.js +1678 -632
  195. package/dist/pr.test.js.map +7 -1
  196. package/dist/prAssociation.test.js +2419 -1788
  197. package/dist/prAssociation.test.js.map +7 -1
  198. package/dist/prDispatch.test.js +150 -89
  199. package/dist/prDispatch.test.js.map +7 -1
  200. package/dist/readView.d.ts +183 -0
  201. package/dist/readView.js +217 -0
  202. package/dist/readView.js.map +7 -0
  203. package/dist/readView.test.d.ts +1 -0
  204. package/dist/readView.test.js +119 -0
  205. package/dist/readView.test.js.map +7 -0
  206. package/dist/releaseReconciliation.test.js +267 -288
  207. package/dist/releaseReconciliation.test.js.map +7 -1
  208. package/dist/releaseWorkflow.test.js +2493 -422
  209. package/dist/releaseWorkflow.test.js.map +7 -1
  210. package/dist/review.d.ts +738 -2
  211. package/dist/review.js +601 -348
  212. package/dist/review.js.map +7 -1
  213. package/dist/review.test.js +1218 -812
  214. package/dist/review.test.js.map +7 -1
  215. package/dist/reviewSubmit.test.d.ts +1 -0
  216. package/dist/reviewSubmit.test.js +747 -0
  217. package/dist/reviewSubmit.test.js.map +7 -0
  218. package/dist/services/agentReadinessService.js +42 -37
  219. package/dist/services/agentReadinessService.js.map +7 -1
  220. package/dist/services/blockerGuardService.js +188 -188
  221. package/dist/services/blockerGuardService.js.map +7 -1
  222. package/dist/services/boardReconcileService.d.ts +1204 -0
  223. package/dist/services/boardReconcileService.js +1445 -0
  224. package/dist/services/boardReconcileService.js.map +7 -0
  225. package/dist/services/deliveryAdmission.d.ts +2 -0
  226. package/dist/services/deliveryAdmission.js +129 -152
  227. package/dist/services/deliveryAdmission.js.map +7 -1
  228. package/dist/services/deliveryHealthService.js +197 -199
  229. package/dist/services/deliveryHealthService.js.map +7 -1
  230. package/dist/services/legacyIssueMigration.js +263 -277
  231. package/dist/services/legacyIssueMigration.js.map +7 -1
  232. package/dist/services/worktreeRegistry.d.ts +27 -119
  233. package/dist/services/worktreeRegistry.js +765 -1182
  234. package/dist/services/worktreeRegistry.js.map +7 -1
  235. package/dist/stagedChecks.test.js +396 -194
  236. package/dist/stagedChecks.test.js.map +7 -1
  237. package/dist/start.test.js +99 -95
  238. package/dist/start.test.js.map +7 -1
  239. package/dist/stdoutRegression.test.js +354 -350
  240. package/dist/stdoutRegression.test.js.map +7 -1
  241. package/dist/targetPolicyDiscovery.test.js +141 -143
  242. package/dist/targetPolicyDiscovery.test.js.map +7 -1
  243. package/dist/targetPolicyEntrypoints.test.js +308 -269
  244. package/dist/targetPolicyEntrypoints.test.js.map +7 -1
  245. package/dist/targetPolicyLocal.test.js +580 -1051
  246. package/dist/targetPolicyLocal.test.js.map +7 -1
  247. package/dist/targetPolicyRoutes.test.js +305 -281
  248. package/dist/targetPolicyRoutes.test.js.map +7 -1
  249. package/dist/targetRepositoryExecution.test.d.ts +1 -0
  250. package/dist/targetRepositoryExecution.test.js +463 -0
  251. package/dist/targetRepositoryExecution.test.js.map +7 -0
  252. package/dist/terminalMessages.js +41 -35
  253. package/dist/terminalMessages.js.map +7 -1
  254. package/dist/toolOutput.d.ts +2 -0
  255. package/dist/toolOutput.js +36 -0
  256. package/dist/toolOutput.js.map +7 -0
  257. package/dist/toolOutput.test.d.ts +1 -0
  258. package/dist/toolOutput.test.js +240 -0
  259. package/dist/toolOutput.test.js.map +7 -0
  260. package/dist/utils/atomicJson.js +84 -76
  261. package/dist/utils/atomicJson.js.map +7 -1
  262. package/dist/utils/filesystem.js +15 -18
  263. package/dist/utils/filesystem.js.map +7 -1
  264. package/dist/utils/lockfile.js +68 -71
  265. package/dist/utils/lockfile.js.map +7 -1
  266. package/dist/verification.d.ts +1 -19
  267. package/dist/verification.js +1020 -1929
  268. package/dist/verification.js.map +7 -1
  269. package/dist/verificationGate.test.js +127 -117
  270. package/dist/verificationGate.test.js.map +7 -1
  271. package/dist/version.d.ts +6 -0
  272. package/dist/version.js +24 -10
  273. package/dist/version.js.map +7 -1
  274. package/dist/worktree.d.ts +3 -15
  275. package/dist/worktree.js +97 -177
  276. package/dist/worktree.js.map +7 -1
  277. package/package.json +10 -8
  278. package/plugins/ai-delivery/.claude-plugin/plugin.json +2 -2
  279. package/plugins/ai-delivery/README.md +47 -156
  280. package/plugins/ai-delivery/plugin.json +1 -1
  281. package/plugins/ai-delivery/runtime/dist/THIRD-PARTY-NOTICES.md +261 -43
  282. package/plugins/ai-delivery/runtime/dist/cli.js +369 -125
  283. package/plugins/ai-delivery/runtime/package.json +1 -1
  284. package/plugins/ai-delivery/skills/intake-create/SKILL.md +14 -78
  285. package/plugins/ai-delivery/skills/pr-handoff/SKILL.md +35 -36
  286. package/plugins/ai-delivery/skills/worktree-lifecycle/SKILL.md +14 -15
  287. package/dist/investigationCompletion.test.js +0 -728
  288. package/dist/investigationCompletion.test.js.map +0 -1
  289. package/dist/setup.d.ts +0 -60
  290. package/dist/setup.js +0 -585
  291. package/dist/setup.js.map +0 -1
  292. package/dist/setup.test.js +0 -3058
  293. package/dist/setup.test.js.map +0 -1
  294. package/dist/worktreeTransition.d.ts +0 -211
  295. package/dist/worktreeTransition.js +0 -1037
  296. package/dist/worktreeTransition.js.map +0 -1
  297. package/dist/worktreeTransition.test.js +0 -1191
  298. package/dist/worktreeTransition.test.js.map +0 -1
  299. /package/dist/{investigationCompletion.test.d.ts → boardReconcile.test.d.ts} +0 -0
  300. /package/dist/{setup.test.d.ts → build.test.d.ts} +0 -0
  301. /package/dist/{worktreeTransition.test.d.ts → callerErrors.test.d.ts} +0 -0
@@ -1,77 +1,50 @@
1
- import assert from 'node:assert/strict';
2
- import { execFileSync, spawn, spawnSync } from 'node:child_process';
3
- import { once } from 'node:events';
4
- import { createHash } from 'node:crypto';
5
- import { existsSync, mkdtempSync, readFileSync, readdirSync, realpathSync, rmSync, symlinkSync, writeFileSync, } from 'node:fs';
6
- import { tmpdir } from 'node:os';
7
- import { join } from 'node:path';
8
- import { fileURLToPath } from 'node:url';
9
- import { afterAll, test, vi } from 'vitest';
10
- import { digestValue } from './delivery/common.js';
11
- import { withRuntimeSetupWriter } from './verification.js';
1
+ import assert from "node:assert/strict";
2
+ import { execFileSync, spawn } from "node:child_process";
3
+ import { once } from "node:events";
4
+ import { createHash } from "node:crypto";
5
+ import { existsSync, mkdtempSync, readFileSync, realpathSync, rmSync, symlinkSync, writeFileSync } from "node:fs";
6
+ import { tmpdir } from "node:os";
7
+ import { join } from "node:path";
8
+ import { fileURLToPath } from "node:url";
9
+ import { afterAll, test } from "vitest";
10
+ const qualificationOwner = await import(new URL("../scripts/current-qualification.mjs", import.meta.url).href);
12
11
  let node26Package;
13
- const scripts = new Map();
14
- async function fixture(input = {}) {
15
- const root = realpathSync(mkdtempSync(join(tmpdir(), 'ai-delivery-runtime-runner-')));
16
- execFileSync('git', ['init', '-q', root]);
17
- scripts.set(root, input.firstStageScript ?? '');
18
- return { root };
19
- }
20
- async function hostFixtureCheckout(input) {
21
- return { path: input.repoRoot };
22
- }
23
- async function runRuntimeFixture(input) {
24
- return withRuntimeSetupWriter(input.repoRoot, (runner) => runner.run([process.execPath, '-e', scripts.get(input.repoRoot)], input.resourceBounds, input.signal));
25
- }
26
12
  afterAll(() => {
27
- if (node26Package)
28
- rmSync(node26Package.temporary, { recursive: true, force: true });
13
+ if (node26Package) rmSync(node26Package.temporary, { recursive: true, force: true });
29
14
  });
30
15
  function packedNode26Consumer() {
31
- if (node26Package !== undefined)
32
- return node26Package;
33
- assert.equal(process.version, 'v24.21.0', 'canonical verification controller must remain Node 24.21.0');
34
- const executable = process.env['AI_DELIVERY_NODE26_EXECUTABLE'];
35
- assert.ok(executable, 'set AI_DELIVERY_NODE26_EXECUTABLE to the actual Node 26.2.0 executable');
36
- assert.equal(execFileSync(executable, ['--version'], { encoding: 'utf8' }).trim(), 'v26.2.0');
37
- const temporary = realpathSync(mkdtempSync(join(tmpdir(), 'ai-delivery-node26-')));
38
- try {
39
- const source = fileURLToPath(new URL('../', import.meta.url));
40
- const pack = JSON.parse(execFileSync('npm', ['pack', '--json', '--pack-destination', temporary], {
41
- cwd: source,
42
- encoding: 'utf8',
43
- maxBuffer: 4 * 1024 * 1024,
44
- }));
45
- execFileSync('tar', ['-xzf', join(temporary, pack[0].filename), '-C', temporary]);
46
- const root = join(temporary, 'package');
47
- symlinkSync(join(source, 'node_modules'), join(root, 'node_modules'), 'dir');
48
- process.stderr.write(`ai-delivery.node26-consumer ${JSON.stringify({
49
- controller: process.version,
50
- consumer: 'v26.2.0',
51
- archiveSha256: createHash('sha256')
52
- .update(readFileSync(join(temporary, pack[0].filename)))
53
- .digest('hex'),
54
- manifestSha256: createHash('sha256')
55
- .update(readFileSync(join(root, 'package.json')))
56
- .digest('hex'),
57
- })}\n`);
58
- node26Package = { executable: realpathSync(executable), root, temporary };
59
- return node26Package;
60
- }
61
- catch (error) {
62
- rmSync(temporary, { recursive: true, force: true });
63
- throw error;
64
- }
65
- }
66
- function node26ConsumerScript(script) {
67
- const consumer = packedNode26Consumer();
68
- return `
69
- require('node:assert/strict').equal(process.version, 'v24.21.0');
70
- const child = require('node:child_process').spawnSync(${JSON.stringify(consumer.executable)}, ['-e', ${JSON.stringify(script)}], { cwd: ${JSON.stringify(consumer.root)}, stdio: 'inherit' });
71
- if (child.error) throw child.error;
72
- process.exit(child.status ?? 1);`;
16
+ if (node26Package !== void 0) return node26Package;
17
+ assert.equal(process.version, "v24.21.0", "canonical verification controller must remain Node 24.21.0");
18
+ const executable = process.env["AI_DELIVERY_NODE26_EXECUTABLE"];
19
+ assert.ok(executable, "set AI_DELIVERY_NODE26_EXECUTABLE to the actual Node 26.2.0 executable");
20
+ assert.equal(execFileSync(executable, ["--version"], { encoding: "utf8" }).trim(), "v26.2.0");
21
+ const temporary = realpathSync(mkdtempSync(join(tmpdir(), "ai-delivery-node26-")));
22
+ try {
23
+ const source = fileURLToPath(new URL("../", import.meta.url));
24
+ const archive = qualificationOwner.copyReleaseArchive(
25
+ process.env.AI_DELIVERY_RELEASE_CONTRACT ?? "",
26
+ source,
27
+ join(temporary, "qualified.tgz")
28
+ );
29
+ execFileSync("tar", ["-xzf", archive.archivePath, "-C", temporary]);
30
+ const root = join(temporary, "package");
31
+ symlinkSync(join(source, "node_modules"), join(root, "node_modules"), "dir");
32
+ process.stderr.write(
33
+ `ai-delivery.node26-consumer ${JSON.stringify({
34
+ controller: process.version,
35
+ consumer: "v26.2.0",
36
+ archiveSha256: archive.archiveSha256,
37
+ manifestSha256: createHash("sha256").update(readFileSync(join(root, "package.json"))).digest("hex")
38
+ })}
39
+ `
40
+ );
41
+ node26Package = { executable: realpathSync(executable), root, temporary };
42
+ return node26Package;
43
+ } catch (error) {
44
+ rmSync(temporary, { recursive: true, force: true });
45
+ throw error;
46
+ }
73
47
  }
74
- // Shared by both readiness producers and the controlled partial-write regression.
75
48
  const readinessPublisher = `async function publishReadiness(file, bytes, pause) {
76
49
  const temporary = file + '.pending';
77
50
  const fd = fs.openSync(temporary, 'wx', 0o600);
@@ -84,13 +57,18 @@ const readinessPublisher = `async function publishReadiness(file, bytes, pause)
84
57
  } finally { fs.closeSync(fd); }
85
58
  fs.renameSync(temporary, file);
86
59
  }`;
87
- for (const name of ['capability', 'pids'])
88
- test(`readiness record ${name} is unavailable during a controlled partial publication`, async ({ signal }) => {
89
- const output = realpathSync(mkdtempSync(join(tmpdir(), 'ai-delivery-readiness-')));
90
- const file = join(output, name);
91
- const child = spawn(process.execPath, [
92
- '-e',
93
- `
60
+ for (const name of ["capability", "pids"])
61
+ test(
62
+ `readiness record ${name} is unavailable during a controlled partial publication`,
63
+ { tags: ["release"] },
64
+ async ({ signal }) => {
65
+ const output = realpathSync(mkdtempSync(join(tmpdir(), "ai-delivery-readiness-")));
66
+ const file = join(output, name);
67
+ const child = spawn(
68
+ process.execPath,
69
+ [
70
+ "-e",
71
+ `
94
72
  const fs = require('node:fs');
95
73
  ${readinessPublisher}
96
74
  publishReadiness(${JSON.stringify(file)}, '{"root":17,"descendant":23}', async () => {
@@ -98,302 +76,40 @@ for (const name of ['capability', 'pids'])
98
76
  process.send('partial');
99
77
  await resumed;
100
78
  }).then(() => process.disconnect());
101
- `,
102
- ], { stdio: ['ignore', 'pipe', 'pipe', 'ipc'], timeout: 5_000 });
103
- const closed = once(child, 'close');
104
- try {
105
- const [message] = (await once(child, 'message', {
106
- signal: AbortSignal.any([signal, AbortSignal.timeout(5_000)]),
107
- }));
108
- assert.equal(message, 'partial');
109
- assert.equal(existsSync(file), false, 'Existence must mean a completely closed readiness record');
110
- }
111
- finally {
112
- if (child.connected)
113
- child.send('complete');
114
- const [code] = (await closed);
115
- try {
116
- assert.equal(code, 0);
117
- assert.deepEqual(JSON.parse(readFileSync(file, 'utf8')), { root: 17, descendant: 23 });
118
- // A fully published malformed record is an immediate failure, never retried.
119
- writeFileSync(file, '{');
120
- assert.throws(() => JSON.parse(readFileSync(file, 'utf8')), SyntaxError);
121
- }
122
- finally {
123
- rmSync(output, { recursive: true, force: true });
124
- }
125
- }
126
- });
127
- function filesystemFixtureScript(output, mode, runtime = 'node24') {
128
- const script = `
129
- (async () => {
130
- const fs = require('node:fs'), cp = require('node:child_process'), path = require('node:path'), assert = require('node:assert/strict');
131
- assert.equal(process.version, ${JSON.stringify(runtime === 'node26' ? 'v26.2.0' : 'v24.21.0')});
132
- const { withVerificationFilesystemFixture } = await import(${JSON.stringify(runtime === 'node26' ? '@aviaratech/ai-delivery/agent' : new URL('./agent.js', import.meta.url).href)});
133
- const { loadValidRepositoryDeliveryEvidence } = await import(${JSON.stringify(runtime === 'node26' ? new URL('./delivery/evidence.js', import.meta.url).href : new URL('./delivery/evidence.js', import.meta.url).href)});
134
- const output = ${JSON.stringify(output)}, fifo = path.join(output, 'fifo'), events = path.join(output, 'events');
135
- const evidenceId = 'sha256:' + 'a'.repeat(64), currentHead = { sha: 'b'.repeat(40), tree: 'c'.repeat(40) };
136
- const evidence = path.join(output, 'ai-delivery', 'receipts', 'delivery@1', currentHead.sha, evidenceId.slice(7) + '.json');
137
- fs.mkdirSync(path.dirname(evidence), { recursive: true });
138
- const rejectPrivateFile = file => {
139
- fs.renameSync(file, evidence);
140
- try { assert.throws(() => loadValidRepositoryDeliveryEvidence({ createInput: { gitCommonDir: output, currentHead }, evidenceId }), /private regular file/); }
141
- finally { fs.renameSync(evidence, file); }
142
- };
143
- const gate = JSON.parse(process.env.AI_DELIVERY_OUTPUT_OBSERVATION_GATE);
144
- ${readinessPublisher}
145
- const trace = value => fs.appendFileSync(events, value + '\\n');
146
- await withVerificationFilesystemFixture(async () => {
147
- cp.execFileSync('mkfifo', ['-m', '600', fifo]);
148
- await publishReadiness(path.join(output, 'capability'), JSON.stringify(gate));
149
- trace('created');
150
- try {
151
- if (${JSON.stringify(mode)} === 'abrupt') process.exit(9);
152
- if (${JSON.stringify(mode)} === 'cancel') await new Promise(() => { setInterval(() => {}, 1000); });
153
- if (${JSON.stringify(mode)} === 'block') fs.readFileSync(fifo);
154
- while (fs.readdirSync(path.join(gate.directory, 'requests')).length === 0) await new Promise(resolve => setTimeout(resolve, 10));
155
- assert.ok(fs.existsSync(fifo)); trace('scan-queued');
156
- rejectPrivateFile(fifo); trace('reader-rejected');
157
- const regular = path.join(output, 'regular'), hard = path.join(output, 'hard'), alias = path.join(output, 'alias');
158
- fs.writeFileSync(regular, 'x'.repeat(128), { mode: 0o600 });
159
- fs.linkSync(regular, hard); rejectPrivateFile(hard); fs.unlinkSync(hard);
160
- fs.symlinkSync('./regular', alias); rejectPrivateFile(alias); fs.unlinkSync(alias);
161
- if (${JSON.stringify(mode)} === 'assertion') throw new Error('synthetic reader assertion failure');
162
- } finally { fs.unlinkSync(fifo); trace('cleaned'); }
163
- });
164
- trace('released');
165
- })().catch(error => { console.error(error.message); process.exitCode = 1; });`;
166
- return runtime === 'node26' ? node26ConsumerScript(script) : script;
167
- }
168
- test.each([
169
- ['pass', 'node24'],
170
- ['assertion', 'node24'],
171
- ['pass', 'node26'],
172
- ['assertion', 'node26'],
173
- ])('filesystem fixture gate deterministically queues a scan through reader rejection and %s teardown on %s', async (mode, runtime) => {
174
- const output = realpathSync(mkdtempSync(join(tmpdir(), 'ai-delivery-fixture-gate-')));
175
- const { root } = await fixture({ firstStageScript: filesystemFixtureScript(output, mode, runtime) });
176
- try {
177
- const row = await hostFixtureCheckout({
178
- baseRef: 'main',
179
- identity: 'synthetic-author',
180
- issueNumber: 17,
181
- repoRoot: root,
182
- });
183
- const run = runRuntimeFixture({
184
- issueNumber: 17,
185
- repoRoot: row.path,
186
- resourceBounds: {
187
- maxAggregateRssBytes: 1_000_000_000,
188
- minFreeDiskBytes: 1,
189
- maxNewOutputBytes: 2048,
190
- outputRoots: [output],
191
- },
192
- });
193
- if (mode === 'assertion')
194
- await assert.rejects(run, /exit 1/u);
195
- else
196
- await run;
197
- assert.equal(existsSync(join(output, 'fifo')), false);
198
- const events = readFileSync(join(output, 'events'), 'utf8').trim().split('\n');
199
- assert.deepEqual(events, mode === 'pass'
200
- ? ['created', 'scan-queued', 'reader-rejected', 'cleaned', 'released']
201
- : ['created', 'scan-queued', 'reader-rejected', 'cleaned']);
202
- const capability = JSON.parse(readFileSync(join(output, 'capability'), 'utf8'));
203
- assert.equal(existsSync(capability.directory), false);
204
- assert.equal(readFileSync(join(output, 'regular'), 'utf8').length, 128);
205
- }
206
- finally {
207
- rmSync(root, { recursive: true, force: true });
208
- rmSync(output, { recursive: true, force: true });
209
- }
210
- });
211
- test.each([
212
- ['abrupt', 'node24'],
213
- ['block', 'node24'],
214
- ['cancel', 'node24'],
215
- ['abrupt', 'node26'],
216
- ['block', 'node26'],
217
- ['cancel', 'node26'],
218
- ])('filesystem fixture gate preserves leaked FIFO and unrelated files after %s on %s', async (mode, runtime) => {
219
- const output = realpathSync(mkdtempSync(join(tmpdir(), 'ai-delivery-fixture-failure-')));
220
- writeFileSync(join(output, 'unrelated'), 'preserved');
221
- const { root } = await fixture({ firstStageScript: filesystemFixtureScript(output, mode, runtime) });
222
- const controller = new AbortController();
223
- let running;
224
- const progress = vi.spyOn(process.stderr, 'write');
225
- try {
226
- const row = await hostFixtureCheckout({
227
- baseRef: 'main',
228
- identity: 'synthetic-author',
229
- issueNumber: 17,
230
- repoRoot: root,
79
+ `
80
+ ],
81
+ { stdio: ["ignore", "pipe", "pipe", "ipc"], timeout: 5e3 }
82
+ );
83
+ const closed = once(child, "close");
84
+ try {
85
+ const [message] = await once(child, "message", {
86
+ signal: AbortSignal.any([signal, AbortSignal.timeout(5e3)])
231
87
  });
232
- const bounds = {
233
- maxAggregateRssBytes: 1_000_000_000,
234
- minFreeDiskBytes: 1,
235
- maxNewOutputBytes: 2048,
236
- outputRoots: [output],
237
- };
238
- running = runRuntimeFixture({
239
- issueNumber: 17,
240
- repoRoot: row.path,
241
- resourceBounds: bounds,
242
- signal: controller.signal,
243
- }).catch((error) => error);
244
- if (mode === 'cancel') {
245
- for (let attempt = 0; attempt < 300 && !existsSync(join(output, 'capability')); attempt++)
246
- await new Promise((resolve) => setTimeout(resolve, 20));
247
- assert.ok(existsSync(join(output, 'capability')));
248
- const cap = JSON.parse(readFileSync(join(output, 'capability'), 'utf8'));
249
- for (let attempt = 0; attempt < 300 && readdirSync(join(cap.directory, 'requests')).length === 0; attempt++)
250
- await new Promise((resolve) => setTimeout(resolve, 20));
251
- assert.ok(readdirSync(join(cap.directory, 'requests')).length > 0);
252
- controller.abort();
253
- }
254
- const failure = String(await running);
255
- assert.match(failure, mode === 'abrupt' ? /exit 9/u : mode === 'block' ? /reader or teardown is stalled/u : /cancelled/u);
256
- assert.doesNotMatch(failure, /cleanup failed|live holder/u);
257
- const capability = JSON.parse(readFileSync(join(output, 'capability'), 'utf8'));
258
- assert.equal(existsSync(capability.directory), false);
259
- assert.ok(existsSync(join(output, 'fifo')));
260
- assert.equal(readFileSync(join(output, 'unrelated'), 'utf8'), 'preserved');
261
- if (mode !== 'abrupt')
262
- assert.ok(progress.mock.calls.filter(([line]) => String(line).includes('sampledAggregateRssBytes')).length > 2);
263
- await assert.rejects(runRuntimeFixture({ issueNumber: 17, repoRoot: row.path, resourceBounds: bounds }), /unsupported file/u);
264
- }
265
- finally {
266
- controller.abort();
267
- await running;
268
- progress.mockRestore();
269
- rmSync(root, { recursive: true, force: true });
270
- rmSync(output, { recursive: true, force: true });
271
- }
272
- });
273
- test.each(['node24', 'node26'])('filesystem fixture gate still enforces positive byte limits after deterministic contention on %s', async (runtime) => {
274
- const output = realpathSync(mkdtempSync(join(tmpdir(), 'ai-delivery-fixture-limit-')));
275
- const { root } = await fixture({ firstStageScript: filesystemFixtureScript(output, 'pass', runtime) });
276
- try {
277
- const row = await hostFixtureCheckout({
278
- baseRef: 'main',
279
- identity: 'synthetic-author',
280
- issueNumber: 17,
281
- repoRoot: root,
282
- });
283
- await assert.rejects(runRuntimeFixture({
284
- issueNumber: 17,
285
- repoRoot: row.path,
286
- resourceBounds: {
287
- maxAggregateRssBytes: 1_000_000_000,
288
- minFreeDiskBytes: 1,
289
- maxNewOutputBytes: 64,
290
- outputRoots: [output],
291
- },
292
- }), /filesystem output.*exceeded/u);
293
- assert.equal(existsSync(join(output, 'fifo')), false);
294
- assert.equal(readFileSync(join(output, 'regular'), 'utf8').length, 128);
295
- }
296
- finally {
297
- rmSync(root, { recursive: true, force: true });
298
- rmSync(output, { recursive: true, force: true });
299
- }
300
- });
301
- test.each(['verification', 'runtime'])('filesystem fixture gate preserves observation and cancellation after direct %s command closure', async (mode) => {
302
- const output = realpathSync(mkdtempSync(join(tmpdir(), 'ai-delivery-fixture-close-')));
303
- writeFileSync(join(output, 'unrelated'), 'preserved');
304
- const script = `
305
- (async () => {
306
- const fs = require('node:fs'), cp = require('node:child_process');
307
- ${readinessPublisher}
308
- const child = cp.spawn(process.execPath, ['-e', ${JSON.stringify(filesystemFixtureScript(output, 'cancel'))}], { stdio: 'ignore' });
309
- child.unref();
310
- await publishReadiness(${JSON.stringify(join(output, 'pids'))}, JSON.stringify({ root: process.pid, descendant: child.pid }));
311
- while (!fs.existsSync(${JSON.stringify(join(output, 'exit-parent'))})) await new Promise(resolve => setTimeout(resolve, 10));
312
- process.exit(0);
313
- })().catch(error => { console.error(error.message); process.exitCode = 1; });`;
314
- const { root } = await fixture({ firstStageScript: script });
315
- const controller = new AbortController();
316
- const progress = vi.spyOn(process.stderr, 'write');
317
- let running;
318
- let completed = false;
319
- try {
320
- const row = await hostFixtureCheckout({
321
- baseRef: 'main',
322
- identity: 'synthetic-author',
323
- issueNumber: 17,
324
- repoRoot: root,
325
- });
326
- const bounds = {
327
- maxAggregateRssBytes: 1_000_000_000,
328
- minFreeDiskBytes: 1,
329
- maxNewOutputBytes: 4096,
330
- outputRoots: [output],
331
- };
332
- const { withRuntimeSetupWriter } = await import('./verification.js');
333
- running = (mode === 'verification'
334
- ? runRuntimeFixture({
335
- issueNumber: 17,
336
- repoRoot: row.path,
337
- resourceBounds: bounds,
338
- signal: controller.signal,
339
- })
340
- : withRuntimeSetupWriter(row.path, (runner) => runner.run([process.execPath, '-e', script], bounds, controller.signal))).catch((error) => error);
341
- for (let attempt = 0; attempt < 300 && (!existsSync(join(output, 'capability')) || !existsSync(join(output, 'pids'))); attempt++)
342
- await new Promise((resolve) => setTimeout(resolve, 20));
343
- assert.ok(existsSync(join(output, 'capability')));
344
- assert.ok(existsSync(join(output, 'pids')));
345
- const cap = JSON.parse(readFileSync(join(output, 'capability'), 'utf8'));
346
- const pids = JSON.parse(readFileSync(join(output, 'pids'), 'utf8'));
347
- assert.equal(typeof cap.directory, 'string');
348
- assert.ok(Number.isSafeInteger(pids.root) && pids.root > 0);
349
- assert.ok(Number.isSafeInteger(pids.descendant) && pids.descendant > 0);
350
- const writerPath = join(root, '.git', 'ai-delivery', 'writers@1', digestValue(row.path).slice(7) + '.json');
351
- const descendantObserved = () => {
352
- const state = JSON.parse(readFileSync(writerPath, 'utf8'));
353
- return state.command.tracked?.some((member) => member.pid === pids.descendant) === true;
354
- };
355
- for (let attempt = 0; attempt < 300 && (!descendantObserved() || readdirSync(join(cap.directory, 'requests')).length === 0); attempt++)
356
- await new Promise((resolve) => setTimeout(resolve, 20));
357
- assert.ok(descendantObserved());
358
- assert.ok(readdirSync(join(cap.directory, 'requests')).length > 0);
359
- writeFileSync(join(output, 'exit-parent'), 'exit');
360
- const parentAlive = () => spawnSync('ps', ['-p', String(pids.root), '-o', 'stat='], { encoding: 'utf8' }).stdout.trim().length > 0;
361
- for (let attempt = 0; attempt < 100 && parentAlive(); attempt++)
362
- await new Promise((resolve) => setTimeout(resolve, 20));
363
- assert.equal(parentAlive(), false);
364
- const samples = () => progress.mock.calls.filter(([line]) => String(line).includes('sampledAggregateRssBytes')).length;
365
- const afterExit = samples();
366
- for (let attempt = 0; attempt < 100 && samples() === afterExit; attempt++)
367
- await new Promise((resolve) => setTimeout(resolve, 20));
368
- const observedAfterExit = samples() > afterExit;
369
- controller.abort();
370
- const failure = String(await running);
371
- assert.match(failure, /cancelled/u);
372
- assert.doesNotMatch(failure, /cleanup failed|live holder/u);
373
- assert.ok(observedAfterExit, 'RSS and disk observation continues while the closed command awaits its scan');
374
- assert.equal(existsSync(cap.directory), false);
375
- assert.ok(existsSync(join(output, 'fifo')));
376
- assert.equal(readFileSync(join(output, 'unrelated'), 'utf8'), 'preserved');
377
- assert.equal(spawnSync('ps', ['-p', String(pids.descendant), '-o', 'stat='], { encoding: 'utf8' }).stdout.trim().length, 0);
378
- assert.equal(progress.mock.calls.some(([line]) => String(line).includes('"state":"completed"')), false);
379
- completed = true;
380
- }
381
- finally {
382
- controller.abort();
383
- await running;
384
- progress.mockRestore();
385
- // Preserve any future failed synthetic readiness bytes in the owned TMPDIR
386
- // for the supervising run's recovery archive; never print capability bytes.
387
- if (completed) {
388
- rmSync(root, { recursive: true, force: true });
389
- rmSync(output, { recursive: true, force: true });
88
+ assert.equal(message, "partial");
89
+ assert.equal(existsSync(file), false, "Existence must mean a completely closed readiness record");
90
+ } finally {
91
+ if (child.connected) child.send("complete");
92
+ const [code] = await closed;
93
+ try {
94
+ assert.equal(code, 0);
95
+ assert.deepEqual(JSON.parse(readFileSync(file, "utf8")), { root: 17, descendant: 23 });
96
+ writeFileSync(file, "{");
97
+ assert.throws(() => JSON.parse(readFileSync(file, "utf8")), SyntaxError);
98
+ } finally {
99
+ rmSync(output, { recursive: true, force: true });
390
100
  }
101
+ }
391
102
  }
392
- });
393
- test('Node 26 packed public exports preserve standalone and malformed-capability behavior', () => {
103
+ );
104
+ test(
105
+ "Node 26 packed public exports preserve standalone and malformed-capability behavior",
106
+ { tags: ["release"] },
107
+ () => {
394
108
  const consumer = packedNode26Consumer();
395
- execFileSync(consumer.executable, [
396
- '-e',
109
+ execFileSync(
110
+ consumer.executable,
111
+ [
112
+ "-e",
397
113
  `
398
114
  (async () => {
399
115
  const assert = require('node:assert/strict');
@@ -418,78 +134,33 @@ test('Node 26 packed public exports preserve standalone and malformed-capability
418
134
  if (prior === undefined) delete process.env.AI_DELIVERY_OUTPUT_OBSERVATION_GATE;
419
135
  else process.env.AI_DELIVERY_OUTPUT_OBSERVATION_GATE = prior;
420
136
  })().catch(error => { console.error(error); process.exitCode = 1; });
421
- `,
422
- ], { cwd: consumer.root, stdio: 'pipe' });
423
- });
424
- test('filesystem fixture helper runs standalone and fails closed on malformed capability', async () => {
425
- const { withVerificationFilesystemFixture } = await import('./agent.js');
426
- assert.equal(await withVerificationFilesystemFixture(() => 'standalone'), 'standalone');
427
- const prior = process.env['AI_DELIVERY_OUTPUT_OBSERVATION_GATE'];
137
+ `
138
+ ],
139
+ { cwd: consumer.root, stdio: "pipe" }
140
+ );
141
+ }
142
+ );
143
+ test(
144
+ "filesystem fixture helper runs standalone and fails closed on malformed capability",
145
+ { tags: ["release"] },
146
+ async () => {
147
+ const { withVerificationFilesystemFixture } = await import("./agent.js");
148
+ assert.equal(await withVerificationFilesystemFixture(() => "standalone"), "standalone");
149
+ const prior = process.env["AI_DELIVERY_OUTPUT_OBSERVATION_GATE"];
428
150
  try {
429
- process.env['AI_DELIVERY_OUTPUT_OBSERVATION_GATE'] = '{}';
430
- let executed = false;
431
- await assert.rejects(withVerificationFilesystemFixture(() => {
432
- executed = true;
433
- }), /invalid or stale/u);
434
- assert.equal(executed, false);
435
- }
436
- finally {
437
- if (prior === undefined)
438
- delete process.env['AI_DELIVERY_OUTPUT_OBSERVATION_GATE'];
439
- else
440
- process.env['AI_DELIVERY_OUTPUT_OBSERVATION_GATE'] = prior;
151
+ process.env["AI_DELIVERY_OUTPUT_OBSERVATION_GATE"] = "{}";
152
+ let executed = false;
153
+ await assert.rejects(
154
+ withVerificationFilesystemFixture(() => {
155
+ executed = true;
156
+ }),
157
+ /invalid or stale/u
158
+ );
159
+ assert.equal(executed, false);
160
+ } finally {
161
+ if (prior === void 0) delete process.env["AI_DELIVERY_OUTPUT_OBSERVATION_GATE"];
162
+ else process.env["AI_DELIVERY_OUTPUT_OBSERVATION_GATE"] = prior;
441
163
  }
442
- });
443
- test('nested runtime setup inherits the outer gate for its baseline and child command', async () => {
444
- const output = realpathSync(mkdtempSync(join(tmpdir(), 'ai-delivery-nested-fixture-')));
445
- const inner = await fixture();
446
- const worker = filesystemFixtureScript(output, 'pass');
447
- const { root } = await fixture({
448
- firstStageScript: `
449
- (async () => {
450
- const fs = require('node:fs'), cp = require('node:child_process'), assert = require('node:assert/strict');
451
- const { withRuntimeSetupWriter } = await import(${JSON.stringify(new URL('./verification.js', import.meta.url).href)});
452
- const capability = process.env.AI_DELIVERY_OUTPUT_OBSERVATION_GATE;
453
- const child = cp.spawn(process.execPath, ['-e', ${JSON.stringify(worker)}], { stdio: ['ignore', 'inherit', 'inherit'] });
454
- const closed = new Promise((resolve, reject) => child.once('exit', code => code === 0 ? resolve() : reject(new Error('fixture child exit ' + code))));
455
- while (!fs.existsSync(${JSON.stringify(join(output, 'capability'))})) await new Promise(resolve => setTimeout(resolve, 10));
456
- assert.equal(fs.readFileSync(${JSON.stringify(join(output, 'capability'))}, 'utf8'), capability);
457
- await withRuntimeSetupWriter(${JSON.stringify(inner.root)}, async runner => {
458
- await runner.run([process.execPath, '-e', 'require("node:assert/strict").equal(process.env.AI_DELIVERY_OUTPUT_OBSERVATION_GATE, ' + JSON.stringify(capability) + ')'], { maxAggregateRssBytes: 1000000000, minFreeDiskBytes: 1, maxNewOutputBytes: 2048, outputRoots: [${JSON.stringify(output)}] });
459
- });
460
- await closed;
461
- })().catch(error => { console.error(error.message); process.exitCode = 1; });`,
462
- });
463
- try {
464
- const row = await hostFixtureCheckout({
465
- baseRef: 'main',
466
- identity: 'synthetic-author',
467
- issueNumber: 17,
468
- repoRoot: root,
469
- });
470
- await runRuntimeFixture({
471
- issueNumber: 17,
472
- repoRoot: row.path,
473
- resourceBounds: {
474
- maxAggregateRssBytes: 1_000_000_000,
475
- minFreeDiskBytes: 1,
476
- maxNewOutputBytes: 2048,
477
- outputRoots: [output],
478
- },
479
- });
480
- assert.deepEqual(readFileSync(join(output, 'events'), 'utf8').trim().split('\n'), [
481
- 'created',
482
- 'scan-queued',
483
- 'reader-rejected',
484
- 'cleaned',
485
- 'released',
486
- ]);
487
- assert.equal(existsSync(join(inner.root, '.git', 'ai-delivery', 'output-observation')), false);
488
- }
489
- finally {
490
- rmSync(root, { recursive: true, force: true });
491
- rmSync(inner.root, { recursive: true, force: true });
492
- rmSync(output, { recursive: true, force: true });
493
- }
494
- });
495
- //# sourceMappingURL=lifecycle.test.js.map
164
+ }
165
+ );
166
+ //# sourceMappingURL=lifecycle.test.js.map