@aviaratech/ai-delivery 0.3.42 → 0.3.44
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.
- package/README.md +2 -2
- package/dist/agentReadiness.test.js +27 -0
- package/dist/agentReadiness.test.js.map +2 -2
- package/dist/cli.js +2 -1
- package/dist/cli.js.map +2 -2
- package/dist/contributorChecks.test.js +4 -1
- package/dist/contributorChecks.test.js.map +2 -2
- package/dist/currentConsumer.test.js +3 -2
- package/dist/currentConsumer.test.js.map +2 -2
- package/dist/currentTrackingScenario.test.js +3 -2
- package/dist/currentTrackingScenario.test.js.map +2 -2
- package/dist/directoryIndependent.test.js +22 -3
- package/dist/directoryIndependent.test.js.map +3 -3
- package/dist/dispatch.js.map +2 -2
- package/dist/fixtures/builderReady.d.ts +84 -0
- package/dist/fixtures/builderReady.js +58 -0
- package/dist/fixtures/builderReady.js.map +7 -0
- package/dist/fixtures/inertTarget.d.ts +82 -0
- package/dist/fixtures/inertTarget.js +25 -15
- package/dist/fixtures/inertTarget.js.map +2 -2
- package/dist/fixtures/issue63.d.ts +99 -0
- package/dist/fixtures/issue63.js +21 -2
- package/dist/fixtures/issue63.js.map +2 -2
- package/dist/issue.d.ts +23 -2
- package/dist/issue.js +154 -28
- package/dist/issue.js.map +2 -2
- package/dist/issue63Routes.test.js +3 -3
- package/dist/issue63Routes.test.js.map +2 -2
- package/dist/issueBlockerGuard.test.js +16 -5
- package/dist/issueBlockerGuard.test.js.map +2 -2
- package/dist/issueContract.d.ts +247 -2
- package/dist/issueContract.js +188 -24
- package/dist/issueContract.js.map +2 -2
- package/dist/issueContract.test.d.ts +21 -0
- package/dist/issueContract.test.js +276 -17
- package/dist/issueContract.test.js.map +2 -2
- package/dist/issueDates.test.js +5 -6
- package/dist/issueDates.test.js.map +2 -2
- package/dist/issueInfoReadback.test.js +64 -0
- package/dist/issueInfoReadback.test.js.map +2 -2
- package/dist/issueIntake.test.js +190 -35
- package/dist/issueIntake.test.js.map +2 -2
- package/dist/issueJournal.d.ts +13 -9
- package/dist/issueJournal.js +14 -10
- package/dist/issueJournal.js.map +2 -2
- package/dist/issueJournal.test.js +11 -8
- package/dist/issueJournal.test.js.map +2 -2
- package/dist/issueTracking.test.js +135 -2
- package/dist/issueTracking.test.js.map +3 -3
- package/dist/issueWriteRecovery.test.js +12 -12
- package/dist/issueWriteRecovery.test.js.map +2 -2
- package/dist/mcp/index.js +10 -3
- package/dist/mcp/index.js.map +2 -2
- package/dist/mcp/tools.d.ts +186 -27
- package/dist/mcp/tools.js +25 -7
- package/dist/mcp/tools.js.map +2 -2
- package/dist/pluginPackaging.test.js +6 -3
- package/dist/pluginPackaging.test.js.map +2 -2
- package/dist/readView.d.ts +3 -0
- package/dist/readView.js +1 -1
- package/dist/readView.js.map +2 -2
- package/dist/releaseReconciliation.test.js +20 -6
- package/dist/releaseReconciliation.test.js.map +2 -2
- package/dist/releaseWorkflow.test.js +2 -2
- package/dist/releaseWorkflow.test.js.map +2 -2
- package/dist/review.d.ts +8 -0
- package/dist/review.js +30 -2
- package/dist/review.js.map +2 -2
- package/dist/review.test.js +64 -1
- package/dist/review.test.js.map +2 -2
- package/dist/services/agentReadinessService.d.ts +2 -1
- package/dist/services/agentReadinessService.js +6 -0
- package/dist/services/agentReadinessService.js.map +2 -2
- package/dist/stdoutRegression.test.js +27 -15
- package/dist/stdoutRegression.test.js.map +2 -2
- package/dist/targetRepositoryExecution.test.js +11 -3
- package/dist/targetRepositoryExecution.test.js.map +2 -2
- package/package.json +1 -1
- package/plugins/ai-delivery/.claude-plugin/plugin.json +2 -2
- package/plugins/ai-delivery/plugin.json +1 -1
- package/plugins/ai-delivery/runtime/dist/cli.js +156 -124
- package/plugins/ai-delivery/runtime/package.json +1 -1
- package/plugins/ai-delivery/skills/intake-create/SKILL.md +1 -11
- package/plugins/ai-delivery/skills/ticket-design/SKILL.md +30 -0
|
@@ -34,8 +34,8 @@ test("public update/create schemas preserve guard fields and refuse invalid reas
|
|
|
34
34
|
{ issueNumber: 20, blocks: [17], overrideReason: "Reason" }
|
|
35
35
|
);
|
|
36
36
|
const create = getAiDeliveryMcpTool("issue_create").inputSchema;
|
|
37
|
-
assert.equal(create.safeParse({ ...f.
|
|
38
|
-
assert.throws(() => create.parse({ ...f.
|
|
37
|
+
assert.equal(create.safeParse({ ...f.createInput, blocks: [17], overrideReason: "Reason" }).success, true);
|
|
38
|
+
assert.throws(() => create.parse({ ...f.createInput, blocks: [17], overrideReason: " ".repeat(4) }));
|
|
39
39
|
assert.throws(
|
|
40
40
|
() => getAiDeliveryMcpTool("issue_update").inputSchema.parse({ ...input, overrideReason: "x".repeat(2001) })
|
|
41
41
|
);
|
|
@@ -57,7 +57,7 @@ test("actual issue_start recovery executes guarded reciprocal tracking against t
|
|
|
57
57
|
const { f } = routes();
|
|
58
58
|
f.controls.failAdd = true;
|
|
59
59
|
await assert.rejects(
|
|
60
|
-
issues.createIssue(f.context, { ...f.
|
|
60
|
+
issues.createIssue(f.context, { ...f.createInput, blocks: [17], overrideReason: "Recorded prerequisite" })
|
|
61
61
|
);
|
|
62
62
|
assert.ok(f.rows.has(20));
|
|
63
63
|
f.controls.failAdd = false;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/issue63Routes.test.ts"],
|
|
4
|
-
"sourcesContent": ["import assert from 'node:assert/strict';\nimport { spawnSync } from 'node:child_process';\nimport { fileURLToPath } from 'node:url';\nimport { afterEach, test, vi } from 'vitest';\nimport * as settings from './config/deliveryConfig.js';\nimport * as issues from './issue.js';\nimport { executeTool, resumedIssueUpdate } from './dispatch.js';\nimport { getAiDeliveryMcpTool } from './mcp/tools.js';\nimport { issue63Fixture } from './fixtures/issue63.js';\n\nafterEach(() => vi.restoreAllMocks());\nconst execution = { repoRoot: '/unrelated', repo: 'example/widget' };\nfunction routes() {\n const f = issue63Fixture();\n vi.spyOn(settings, 'loadDeliverySettings').mockResolvedValue({\n roles: { author: { identity: 'author', authSource: 'personal' }, reviewer: { identity: 'reviewer' } },\n } as unknown as Awaited<ReturnType<typeof settings.loadDeliverySettings>>);\n const load = vi.spyOn(issues, 'loadDeliveryContext').mockResolvedValue(f.context);\n return { f, load };\n}\ntest('public update/create schemas preserve guard fields and refuse invalid reasons', async () => {\n const { f, load } = routes();\n const input = { issueNumber: 17, blockedBy: [18], overrideReason: 'Explicit prerequisite' };\n await executeTool('issue_update', input, execution);\n assert.equal(f.comments.length, 1);\n assert.equal(load.mock.calls[0]![0].repository, 'example/widget');\n assert.deepEqual(\n resumedIssueUpdate({\n repo: 'example/widget',\n issueNumber: 20,\n blocks: [17],\n overrideReason: 'Reason',\n resumeCreated: true,\n }),\n { issueNumber: 20, blocks: [17], overrideReason: 'Reason' },\n );\n const create = getAiDeliveryMcpTool('issue_create')!.inputSchema;\n assert.equal(create.safeParse({ ...f.
|
|
5
|
-
"mappings": "AAAA,OAAO,YAAY;AACnB,SAAS,iBAAiB;AAC1B,SAAS,qBAAqB;AAC9B,SAAS,WAAW,MAAM,UAAU;AACpC,YAAY,cAAc;AAC1B,YAAY,YAAY;AACxB,SAAS,aAAa,0BAA0B;AAChD,SAAS,4BAA4B;AACrC,SAAS,sBAAsB;AAE/B,UAAU,MAAM,GAAG,gBAAgB,CAAC;AACpC,MAAM,YAAY,EAAE,UAAU,cAAc,MAAM,iBAAiB;AACnE,SAAS,SAAS;AAChB,QAAM,IAAI,eAAe;AACzB,KAAG,MAAM,UAAU,sBAAsB,EAAE,kBAAkB;AAAA,IAC3D,OAAO,EAAE,QAAQ,EAAE,UAAU,UAAU,YAAY,WAAW,GAAG,UAAU,EAAE,UAAU,WAAW,EAAE;AAAA,EACtG,CAAyE;AACzE,QAAM,OAAO,GAAG,MAAM,QAAQ,qBAAqB,EAAE,kBAAkB,EAAE,OAAO;AAChF,SAAO,EAAE,GAAG,KAAK;AACnB;AACA,KAAK,iFAAiF,YAAY;AAChG,QAAM,EAAE,GAAG,KAAK,IAAI,OAAO;AAC3B,QAAM,QAAQ,EAAE,aAAa,IAAI,WAAW,CAAC,EAAE,GAAG,gBAAgB,wBAAwB;AAC1F,QAAM,YAAY,gBAAgB,OAAO,SAAS;AAClD,SAAO,MAAM,EAAE,SAAS,QAAQ,CAAC;AACjC,SAAO,MAAM,KAAK,KAAK,MAAM,CAAC,EAAG,CAAC,EAAE,YAAY,gBAAgB;AAChE,SAAO;AAAA,IACL,mBAAmB;AAAA,MACjB,MAAM;AAAA,MACN,aAAa;AAAA,MACb,QAAQ,CAAC,EAAE;AAAA,MACX,gBAAgB;AAAA,MAChB,eAAe;AAAA,IACjB,CAAC;AAAA,IACD,EAAE,aAAa,IAAI,QAAQ,CAAC,EAAE,GAAG,gBAAgB,SAAS;AAAA,EAC5D;AACA,QAAM,SAAS,qBAAqB,cAAc,EAAG;AACrD,SAAO,MAAM,OAAO,UAAU,EAAE,GAAG,EAAE,
|
|
4
|
+
"sourcesContent": ["import assert from 'node:assert/strict';\nimport { spawnSync } from 'node:child_process';\nimport { fileURLToPath } from 'node:url';\nimport { afterEach, test, vi } from 'vitest';\nimport * as settings from './config/deliveryConfig.js';\nimport * as issues from './issue.js';\nimport { executeTool, resumedIssueUpdate } from './dispatch.js';\nimport { getAiDeliveryMcpTool } from './mcp/tools.js';\nimport { issue63Fixture } from './fixtures/issue63.js';\n\nafterEach(() => vi.restoreAllMocks());\nconst execution = { repoRoot: '/unrelated', repo: 'example/widget' };\nfunction routes() {\n const f = issue63Fixture();\n vi.spyOn(settings, 'loadDeliverySettings').mockResolvedValue({\n roles: { author: { identity: 'author', authSource: 'personal' }, reviewer: { identity: 'reviewer' } },\n } as unknown as Awaited<ReturnType<typeof settings.loadDeliverySettings>>);\n const load = vi.spyOn(issues, 'loadDeliveryContext').mockResolvedValue(f.context);\n return { f, load };\n}\ntest('public update/create schemas preserve guard fields and refuse invalid reasons', async () => {\n const { f, load } = routes();\n const input = { issueNumber: 17, blockedBy: [18], overrideReason: 'Explicit prerequisite' };\n await executeTool('issue_update', input, execution);\n assert.equal(f.comments.length, 1);\n assert.equal(load.mock.calls[0]![0].repository, 'example/widget');\n assert.deepEqual(\n resumedIssueUpdate({\n repo: 'example/widget',\n issueNumber: 20,\n blocks: [17],\n overrideReason: 'Reason',\n resumeCreated: true,\n }),\n { issueNumber: 20, blocks: [17], overrideReason: 'Reason' },\n );\n const create = getAiDeliveryMcpTool('issue_create')!.inputSchema;\n assert.equal(create.safeParse({ ...f.createInput, blocks: [17], overrideReason: 'Reason' }).success, true);\n assert.throws(() => create.parse({ ...f.createInput, blocks: [17], overrideReason: ' '.repeat(4) }));\n assert.throws(() =>\n getAiDeliveryMcpTool('issue_update')!.inputSchema.parse({ ...input, overrideReason: 'x'.repeat(2001) }),\n );\n});\ntest('actual CLI declares guard fields on every alias', { tags: ['release'] }, () => {\n const cli = fileURLToPath(new URL('./cli.js', import.meta.url));\n for (const command of ['create', 'start', 'update']) {\n const result = spawnSync(process.execPath, ['--max-old-space-size=96', cli, command, '--help'], {\n encoding: 'utf8',\n timeout: 5000,\n maxBuffer: 64 * 1024,\n });\n assert.equal(result.status, 0, result.stderr);\n assert.match(result.stdout, /--blocks/u);\n assert.match(result.stdout, /--override-reason/u);\n }\n});\n\ntest('actual issue_start recovery executes guarded reciprocal tracking against the known created issue', async () => {\n const { f } = routes();\n f.controls.failAdd = true;\n await assert.rejects(\n issues.createIssue(f.context, { ...f.createInput, blocks: [17], overrideReason: 'Recorded prerequisite' }),\n );\n assert.ok(f.rows.has(20));\n f.controls.failAdd = false;\n vi.spyOn(issues, 'startIssueBranch').mockResolvedValue({\n issueNumber: 20,\n issueUrl: 'https://github.com/example/widget/issues/20',\n branch: 'issue/20',\n headSha: 'a'.repeat(40),\n reused: false,\n });\n vi.spyOn(issues, 'journalIssueStart').mockResolvedValue({\n commentId: 1,\n url: 'https://github.com/example/widget/issues/20#issuecomment-1',\n body: 'Start',\n reused: false,\n });\n const result = (await executeTool(\n 'issue_start',\n {\n repo: 'example/widget',\n issueNumber: 20,\n resumeCreated: true,\n blocks: [17],\n overrideReason: 'Recorded prerequisite',\n },\n execution,\n )) as { issueNumber: number };\n assert.equal(result.issueNumber, 20);\n assert.equal(f.rows.size, 4);\n assert.deepEqual([...f.edges.get(17)!], [20]);\n assert.equal(f.comments.length, 1);\n});\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,YAAY;AACnB,SAAS,iBAAiB;AAC1B,SAAS,qBAAqB;AAC9B,SAAS,WAAW,MAAM,UAAU;AACpC,YAAY,cAAc;AAC1B,YAAY,YAAY;AACxB,SAAS,aAAa,0BAA0B;AAChD,SAAS,4BAA4B;AACrC,SAAS,sBAAsB;AAE/B,UAAU,MAAM,GAAG,gBAAgB,CAAC;AACpC,MAAM,YAAY,EAAE,UAAU,cAAc,MAAM,iBAAiB;AACnE,SAAS,SAAS;AAChB,QAAM,IAAI,eAAe;AACzB,KAAG,MAAM,UAAU,sBAAsB,EAAE,kBAAkB;AAAA,IAC3D,OAAO,EAAE,QAAQ,EAAE,UAAU,UAAU,YAAY,WAAW,GAAG,UAAU,EAAE,UAAU,WAAW,EAAE;AAAA,EACtG,CAAyE;AACzE,QAAM,OAAO,GAAG,MAAM,QAAQ,qBAAqB,EAAE,kBAAkB,EAAE,OAAO;AAChF,SAAO,EAAE,GAAG,KAAK;AACnB;AACA,KAAK,iFAAiF,YAAY;AAChG,QAAM,EAAE,GAAG,KAAK,IAAI,OAAO;AAC3B,QAAM,QAAQ,EAAE,aAAa,IAAI,WAAW,CAAC,EAAE,GAAG,gBAAgB,wBAAwB;AAC1F,QAAM,YAAY,gBAAgB,OAAO,SAAS;AAClD,SAAO,MAAM,EAAE,SAAS,QAAQ,CAAC;AACjC,SAAO,MAAM,KAAK,KAAK,MAAM,CAAC,EAAG,CAAC,EAAE,YAAY,gBAAgB;AAChE,SAAO;AAAA,IACL,mBAAmB;AAAA,MACjB,MAAM;AAAA,MACN,aAAa;AAAA,MACb,QAAQ,CAAC,EAAE;AAAA,MACX,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,CAAC;AAAA,EAC3G;AACA,SAAO,GAAG,EAAE,KAAK,IAAI,EAAE,CAAC;AACxB,IAAE,SAAS,UAAU;AACrB,KAAG,MAAM,QAAQ,kBAAkB,EAAE,kBAAkB;AAAA,IACrD,aAAa;AAAA,IACb,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,SAAS,IAAI,OAAO,EAAE;AAAA,IACtB,QAAQ;AAAA,EACV,CAAC;AACD,KAAG,MAAM,QAAQ,mBAAmB,EAAE,kBAAkB;AAAA,IACtD,WAAW;AAAA,IACX,KAAK;AAAA,IACL,MAAM;AAAA,IACN,QAAQ;AAAA,EACV,CAAC;AACD,QAAM,SAAU,MAAM;AAAA,IACpB;AAAA,IACA;AAAA,MACE,MAAM;AAAA,MACN,aAAa;AAAA,MACb,eAAe;AAAA,MACf,QAAQ,CAAC,EAAE;AAAA,MACX,gBAAgB;AAAA,IAClB;AAAA,IACA;AAAA,EACF;AACA,SAAO,MAAM,OAAO,aAAa,EAAE;AACnC,SAAO,MAAM,EAAE,KAAK,MAAM,CAAC;AAC3B,SAAO,UAAU,CAAC,GAAG,EAAE,MAAM,IAAI,EAAE,CAAE,GAAG,CAAC,EAAE,CAAC;AAC5C,SAAO,MAAM,EAAE,SAAS,QAAQ,CAAC;AACnC,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -5,7 +5,7 @@ import { issue63Fixture as guardFixture } from "./fixtures/issue63.js";
|
|
|
5
5
|
test("forward creation reads a known Blocked item when its list status projection is empty", async () => {
|
|
6
6
|
const f = guardFixture();
|
|
7
7
|
f.controls.missingProjectStatus = 20;
|
|
8
|
-
const result = await createIssue(f.context, { ...f.
|
|
8
|
+
const result = await createIssue(f.context, { ...f.createInput, blockedBy: [18] });
|
|
9
9
|
assert.equal(result.created.number, 20);
|
|
10
10
|
assert.equal(result.created.url, "https://github.com/example/widget/issues/20");
|
|
11
11
|
assert.deepEqual([...f.edges.get(20)], [18]);
|
|
@@ -24,7 +24,7 @@ test("a forward dependency failure preserves the created issue and update repair
|
|
|
24
24
|
const f = guardFixture();
|
|
25
25
|
f.controls.missingProjectStatus = 20;
|
|
26
26
|
f.controls.failAdd = true;
|
|
27
|
-
await assert.rejects(createIssue(f.context, { ...f.
|
|
27
|
+
await assert.rejects(createIssue(f.context, { ...f.createInput, blockedBy: [18] }), (error) => {
|
|
28
28
|
assert.ok(error instanceof CreatedTrackingIssueError);
|
|
29
29
|
assert.deepEqual(error.created, {
|
|
30
30
|
number: 20,
|
|
@@ -91,7 +91,7 @@ test("new blocker on active work refuses before every affected write without an
|
|
|
91
91
|
test("reciprocal creation preflights the active dependent before creating an issue", async () => {
|
|
92
92
|
const f = guardFixture();
|
|
93
93
|
await assert.rejects(
|
|
94
|
-
createIssue(f.context, { ...f.
|
|
94
|
+
createIssue(f.context, { ...f.createInput, blocks: [17] }),
|
|
95
95
|
/overrideReason/u
|
|
96
96
|
);
|
|
97
97
|
assert.deepEqual(f.writes, []);
|
|
@@ -200,7 +200,7 @@ test("reciprocal create preserves unrelated edges and provides known-created rec
|
|
|
200
200
|
f.edges.get(17).add(19);
|
|
201
201
|
f.controls.failAdd = true;
|
|
202
202
|
await assert.rejects(
|
|
203
|
-
createIssue(f.context, { ...f.
|
|
203
|
+
createIssue(f.context, { ...f.createInput, blocks: [17], overrideReason: "New prerequisite" }),
|
|
204
204
|
(error) => error instanceof CreatedTrackingIssueError && error.created.number === 20
|
|
205
205
|
);
|
|
206
206
|
assert.deepEqual([...f.edges.get(17)], [19]);
|
|
@@ -214,7 +214,7 @@ test("forward create refuses PR and foreign endpoint identities before creation"
|
|
|
214
214
|
for (const bad of [{ pull_request: {} }, { html_url: "https://github.com/foreign/repo/issues/18" }, { number: 19 }]) {
|
|
215
215
|
const f = guardFixture();
|
|
216
216
|
Object.assign(f.rows.get(18), bad);
|
|
217
|
-
await assert.rejects(createIssue(f.context, { ...f.
|
|
217
|
+
await assert.rejects(createIssue(f.context, { ...f.createInput, blockedBy: [18] }), /endpoint|repository issue/u);
|
|
218
218
|
assert.deepEqual(f.writes, []);
|
|
219
219
|
}
|
|
220
220
|
});
|
|
@@ -273,4 +273,15 @@ test("duplicate authority markers are refused before another content write", asy
|
|
|
273
273
|
);
|
|
274
274
|
assert.deepEqual(f.writes, before);
|
|
275
275
|
});
|
|
276
|
+
test("blockedBy with blockers naming each issue succeeds and shows that text", async () => {
|
|
277
|
+
const f = guardFixture();
|
|
278
|
+
const result = await updateIssue(f.context, {
|
|
279
|
+
issueNumber: 17,
|
|
280
|
+
blockedBy: [18, 19],
|
|
281
|
+
status: { blockers: "#19, #18" },
|
|
282
|
+
overrideReason: "Wait for the newly identified prerequisites."
|
|
283
|
+
});
|
|
284
|
+
assert.match(result.body ?? "", /\*\*Blockers:\*\* #19, #18/u);
|
|
285
|
+
assert.deepEqual([...f.edges.get(17)], [18, 19]);
|
|
286
|
+
});
|
|
276
287
|
//# sourceMappingURL=issueBlockerGuard.test.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/issueBlockerGuard.test.ts"],
|
|
4
|
-
"sourcesContent": ["import assert from 'node:assert/strict';\nimport { test } from 'vitest';\nimport { updateIssue, createIssue, CreatedTrackingIssueError } from './issue.js';\nimport { issue63Fixture as guardFixture } from './fixtures/issue63.js';\n\ntest('forward creation reads a known Blocked item when its list status projection is empty', async () => {\n const f = guardFixture();\n f.controls.missingProjectStatus = 20;\n const result = await createIssue(f.context, { ...f.ready, blockedBy: [18] });\n assert.equal(result.created.number, 20);\n assert.equal(result.created.url, 'https://github.com/example/widget/issues/20');\n assert.deepEqual([...f.edges.get(20)!], [18]);\n assert.equal(f.statuses.get(20), 'Waiting');\n assert.ok(f.writes.indexOf('status') < f.writes.indexOf('add'));\n assert.deepEqual(\n f.graphqlCalls.filter((call) => call.query.includes('addBlockedBy')).map((call) => call.variables),\n [{ blocking: 'ISSUE18', issue: 'ISSUE20' }],\n );\n const reads = f.graphqlCalls.filter((call) => call.query.includes('ProjectDeliveryItemReadback'));\n assert.ok(reads.length >= 2, 'Status synchronization and dependency guard must read the exact item.');\n assert.ok(reads.every((call) => call.variables.itemId === 'ITEM20' && call.variables.statusField === 'Flow'));\n assert.equal(f.comments.length, 0);\n});\n\ntest('a forward dependency failure preserves the created issue and update repairs its Blocked item', async () => {\n const f = guardFixture();\n f.controls.missingProjectStatus = 20;\n f.controls.failAdd = true;\n await assert.rejects(createIssue(f.context, { ...f.ready, blockedBy: [18] }), (error) => {\n assert.ok(error instanceof CreatedTrackingIssueError);\n assert.deepEqual(error.created, {\n number: 20,\n title: f.ready.title,\n url: 'https://github.com/example/widget/issues/20',\n });\n assert.match(error.message, /Native add failed/u);\n assert.match(error.message, /Resume this known issue/u);\n return true;\n });\n assert.equal(f.statuses.get(20), 'Waiting');\n assert.deepEqual([...f.edges.get(20)!], []);\n f.controls.failAdd = false;\n const repaired = await updateIssue(f.context, { issueNumber: 20, blockedBy: [18] });\n assert.equal(repaired.issueNumber, 20);\n assert.equal(repaired.projectStatus, 'Blocked');\n assert.deepEqual(repaired.blockedBy, [18]);\n await updateIssue(f.context, { issueNumber: 20, blockedBy: [18] });\n assert.equal(f.writes.filter((write) => write === 'create').length, 1);\n assert.equal(f.writes.filter((write) => write === 'add').length, 1);\n assert.deepEqual([...f.edges.get(20)!], [18]);\n});\n\ntest('an exact active item still requires an override when the list projection is empty', async () => {\n const f = guardFixture();\n f.controls.missingProjectStatus = 17;\n await assert.rejects(updateIssue(f.context, { issueNumber: 17, blockedBy: [18] }), /overrideReason/u);\n assert.deepEqual(f.writes, []);\n await updateIssue(f.context, {\n issueNumber: 17,\n blockedBy: [18],\n overrideReason: 'Wait for the newly identified prerequisite.',\n });\n assert.deepEqual([...f.edges.get(17)!], [18]);\n assert.equal(f.comments.length, 1);\n});\n\ntest('missing or contradictory exact item evidence refuses a dependency without writes', async () => {\n for (const readback of [\n { fieldValueByName: null },\n { isArchived: true },\n { id: 'ITEM18' },\n { project: { id: 'OTHER', number: 1 } },\n { project: { id: 'PROJECT', number: 2 } },\n { content: { id: 'ISSUE18' } },\n { fieldValueByName: { name: 'Waiting', optionId: 'ACTIVE' } },\n ]) {\n const f = guardFixture();\n f.statuses.set(17, 'Waiting');\n f.controls.missingProjectStatus = 17;\n f.controls.projectItemReadback = readback;\n await assert.rejects(updateIssue(f.context, { issueNumber: 17, blockedBy: [18] }), /Project/u);\n assert.deepEqual(f.writes, []);\n assert.deepEqual([...f.edges.get(17)!], []);\n }\n const absent = guardFixture();\n absent.controls.missingProjectIssue = 17;\n await assert.rejects(updateIssue(absent.context, { issueNumber: 17, blockedBy: [18] }), /unresolved/u);\n assert.deepEqual(absent.writes, []);\n});\n\ntest('new blocker on active work refuses before every affected write without an override reason', async () => {\n const f = guardFixture();\n await assert.rejects(updateIssue(f.context, { issueNumber: 17, blockedBy: [18] }), /overrideReason/u);\n assert.deepEqual(f.writes, []);\n});\n\ntest('reciprocal creation preflights the active dependent before creating an issue', async () => {\n const f = guardFixture();\n await assert.rejects(\n createIssue(f.context, { ...f.ready, blocks: [17] } as Parameters<typeof createIssue>[1]),\n /overrideReason/u,\n );\n assert.deepEqual(f.writes, []);\n});\n\ntest('an authorized active addition records verified evidence before the edge and retries once', async () => {\n const f = guardFixture();\n f.controls.failAdd = true;\n await assert.rejects(\n updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Await prerequisite validation.' }),\n /Native add failed/u,\n );\n assert.equal(f.comments.length, 1);\n assert.equal(f.edges.get(17)?.size, 0);\n const evidence = f.comments[0]!.body;\n f.controls.failAdd = false;\n await updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Await prerequisite validation.' });\n assert.equal(f.comments.length, 1);\n assert.equal(f.comments[0]!.body, evidence);\n assert.deepEqual([...f.edges.get(17)!], [18]);\n assert.ok(f.writes.indexOf('comment') < f.writes.indexOf('add'));\n});\ntest('verified evidence conflicts and comment readback drift refuse the native edge', async () => {\n const f = guardFixture();\n f.controls.failAdd = true;\n await assert.rejects(updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Original reason' }));\n f.controls.failAdd = false;\n const priorWrites = [...f.writes];\n await assert.rejects(\n updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Changed reason' }),\n /conflicts/u,\n );\n assert.deepEqual(f.writes, priorWrites);\n assert.equal(f.comments.length, 1);\n assert.equal(f.edges.get(17)?.size, 0);\n const other = guardFixture();\n other.controls.corruptComment = true;\n await assert.rejects(\n updateIssue(other.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Documented prerequisite' }),\n /readback/u,\n );\n assert.equal(other.edges.get(17)?.size, 0);\n});\ntest('actual additions are guarded after an initially existing edge disappears', async () => {\n const f = guardFixture();\n f.edges.get(17)!.add(18);\n f.controls.race = () => f.edges.get(17)!.clear();\n await assert.rejects(updateIssue(f.context, { issueNumber: 17, blockedBy: [18] }), /overrideReason/u);\n assert.equal(f.edges.get(17)?.size, 0);\n assert.ok(!f.writes.includes('add'));\n});\ntest('preflight active observation remains sticky after a concurrent status change', async () => {\n const f = guardFixture();\n f.controls.race = () => f.statuses.set(17, 'Queued');\n await updateIssue(f.context, {\n issueNumber: 17,\n blockedBy: [18],\n overrideReason: 'Required despite concurrent parking',\n });\n assert.equal(f.comments.length, 1);\n assert.match(f.comments[0]!.body, /In Progress/u);\n});\ntest('inactive addition needs no override while a newly active dependent is guarded', async () => {\n const f = guardFixture();\n f.statuses.set(17, 'Queued');\n await updateIssue(f.context, { issueNumber: 17, blockedBy: [18] });\n assert.equal(f.comments.length, 0);\n const race = guardFixture();\n race.statuses.set(17, 'Queued');\n race.controls.race = () => race.statuses.set(17, 'Active');\n await assert.rejects(updateIssue(race.context, { issueNumber: 17, blockedBy: [18] }), /overrideReason/u);\n assert.ok(!race.writes.includes('add'));\n});\ntest('remove and re-add uses a new native removal episode', async () => {\n const f = guardFixture();\n await updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'First episode' });\n f.edges.get(17)!.clear();\n f.statuses.set(17, 'Active');\n f.history.push({\n __typename: 'BlockedByRemovedEvent',\n id: 'REMOVE1',\n createdAt: '2026-01-02T00:00:00Z',\n blockingIssue: { id: 'ISSUE18', number: 18, repository: { nameWithOwner: 'example/widget' } },\n });\n await updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Second episode' });\n assert.equal(f.comments.length, 2);\n assert.match(f.comments[1]!.body, /REMOVE1/u);\n});\ntest('incomplete active history and unavailable author refuse before writes', async () => {\n const f = guardFixture();\n f.controls.timelineIncomplete = true;\n await assert.rejects(\n updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Reason' }),\n /Complete dependency history/u,\n );\n assert.deepEqual(f.writes, []);\n const noAuthor = guardFixture();\n noAuthor.controls.actor = '';\n await assert.rejects(\n updateIssue(noAuthor.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Reason' }),\n /Author unavailable/u,\n );\n assert.deepEqual(noAuthor.writes, []);\n});\ntest('reciprocal create preserves unrelated edges and provides known-created recovery', async () => {\n const f = guardFixture();\n f.edges.get(17)!.add(19);\n f.controls.failAdd = true;\n await assert.rejects(\n createIssue(f.context, { ...f.ready, blocks: [17], overrideReason: 'New prerequisite' }),\n (error) => error instanceof CreatedTrackingIssueError && error.created.number === 20,\n );\n assert.deepEqual([...f.edges.get(17)!], [19]);\n assert.equal(f.comments.length, 1);\n f.controls.failAdd = false;\n await updateIssue(f.context, { issueNumber: 20, blocks: [17], overrideReason: 'New prerequisite' });\n assert.deepEqual([...f.edges.get(17)!], [19, 20]);\n assert.equal(f.comments.length, 1);\n});\n\ntest('forward create refuses PR and foreign endpoint identities before creation', async () => {\n for (const bad of [{ pull_request: {} }, { html_url: 'https://github.com/foreign/repo/issues/18' }, { number: 19 }]) {\n const f = guardFixture();\n Object.assign(f.rows.get(18)!, bad);\n await assert.rejects(createIssue(f.context, { ...f.ready, blockedBy: [18] }), /endpoint|repository issue/u);\n assert.deepEqual(f.writes, []);\n }\n});\ntest('missing blocker identity and ambiguous removal history refuse during preflight', async () => {\n const f = guardFixture();\n f.history.push({\n __typename: 'BlockedByRemovedEvent',\n id: 'R',\n createdAt: '2026-01-01T00:00:00Z',\n blockingIssue: null,\n });\n await assert.rejects(\n updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Reason' }),\n /Complete dependency history/u,\n );\n assert.deepEqual(f.writes, []);\n const ambiguous = guardFixture();\n for (const id of ['R1', 'R2'])\n ambiguous.history.push({\n __typename: 'BlockedByRemovedEvent',\n id,\n createdAt: '2026-01-01T00:00:00Z',\n blockingIssue: { id: 'ISSUE18', number: 18, repository: { nameWithOwner: 'example/widget' } },\n });\n await assert.rejects(\n updateIssue(ambiguous.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Reason' }),\n /ambiguous/u,\n );\n assert.deepEqual(ambiguous.writes, []);\n});\ntest('a removal during comment readback refuses authority from the earlier episode', async () => {\n const f = guardFixture();\n f.controls.commentRace = () =>\n f.history.push({\n __typename: 'BlockedByRemovedEvent',\n id: 'LATER',\n createdAt: '2026-01-03T00:00:00Z',\n blockingIssue: { id: 'ISSUE18', number: 18, repository: { nameWithOwner: 'example/widget' } },\n });\n await assert.rejects(\n updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Reason' }),\n /episode changed/u,\n );\n assert.equal(f.edges.get(17)?.size, 0);\n assert.ok(!f.writes.includes('add'));\n});\n\ntest('duplicate authority markers are refused before another content write', async () => {\n const f = guardFixture();\n f.controls.failAdd = true;\n await assert.rejects(updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Reason' }));\n f.comments.push({ ...f.comments[0]!, id: 999 });\n f.controls.failAdd = false;\n const before = [...f.writes];\n await assert.rejects(\n updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Reason' }),\n /duplicate/u,\n );\n assert.deepEqual(f.writes, before);\n});\n"],
|
|
5
|
-
"mappings": "AAAA,OAAO,YAAY;AACnB,SAAS,YAAY;AACrB,SAAS,aAAa,aAAa,iCAAiC;AACpE,SAAS,kBAAkB,oBAAoB;AAE/C,KAAK,wFAAwF,YAAY;AACvG,QAAM,IAAI,aAAa;AACvB,IAAE,SAAS,uBAAuB;AAClC,QAAM,SAAS,MAAM,YAAY,EAAE,SAAS,EAAE,GAAG,EAAE,
|
|
4
|
+
"sourcesContent": ["import assert from 'node:assert/strict';\nimport { test } from 'vitest';\nimport { updateIssue, createIssue, CreatedTrackingIssueError } from './issue.js';\nimport { issue63Fixture as guardFixture } from './fixtures/issue63.js';\n\ntest('forward creation reads a known Blocked item when its list status projection is empty', async () => {\n const f = guardFixture();\n f.controls.missingProjectStatus = 20;\n const result = await createIssue(f.context, { ...f.createInput, blockedBy: [18] });\n assert.equal(result.created.number, 20);\n assert.equal(result.created.url, 'https://github.com/example/widget/issues/20');\n assert.deepEqual([...f.edges.get(20)!], [18]);\n assert.equal(f.statuses.get(20), 'Waiting');\n assert.ok(f.writes.indexOf('status') < f.writes.indexOf('add'));\n assert.deepEqual(\n f.graphqlCalls.filter((call) => call.query.includes('addBlockedBy')).map((call) => call.variables),\n [{ blocking: 'ISSUE18', issue: 'ISSUE20' }],\n );\n const reads = f.graphqlCalls.filter((call) => call.query.includes('ProjectDeliveryItemReadback'));\n assert.ok(reads.length >= 2, 'Status synchronization and dependency guard must read the exact item.');\n assert.ok(reads.every((call) => call.variables.itemId === 'ITEM20' && call.variables.statusField === 'Flow'));\n assert.equal(f.comments.length, 0);\n});\n\ntest('a forward dependency failure preserves the created issue and update repairs its Blocked item', async () => {\n const f = guardFixture();\n f.controls.missingProjectStatus = 20;\n f.controls.failAdd = true;\n await assert.rejects(createIssue(f.context, { ...f.createInput, blockedBy: [18] }), (error) => {\n assert.ok(error instanceof CreatedTrackingIssueError);\n assert.deepEqual(error.created, {\n number: 20,\n title: f.ready.title,\n url: 'https://github.com/example/widget/issues/20',\n });\n assert.match(error.message, /Native add failed/u);\n assert.match(error.message, /Resume this known issue/u);\n return true;\n });\n assert.equal(f.statuses.get(20), 'Waiting');\n assert.deepEqual([...f.edges.get(20)!], []);\n f.controls.failAdd = false;\n const repaired = await updateIssue(f.context, { issueNumber: 20, blockedBy: [18] });\n assert.equal(repaired.issueNumber, 20);\n assert.equal(repaired.projectStatus, 'Blocked');\n assert.deepEqual(repaired.blockedBy, [18]);\n await updateIssue(f.context, { issueNumber: 20, blockedBy: [18] });\n assert.equal(f.writes.filter((write) => write === 'create').length, 1);\n assert.equal(f.writes.filter((write) => write === 'add').length, 1);\n assert.deepEqual([...f.edges.get(20)!], [18]);\n});\n\ntest('an exact active item still requires an override when the list projection is empty', async () => {\n const f = guardFixture();\n f.controls.missingProjectStatus = 17;\n await assert.rejects(updateIssue(f.context, { issueNumber: 17, blockedBy: [18] }), /overrideReason/u);\n assert.deepEqual(f.writes, []);\n await updateIssue(f.context, {\n issueNumber: 17,\n blockedBy: [18],\n overrideReason: 'Wait for the newly identified prerequisite.',\n });\n assert.deepEqual([...f.edges.get(17)!], [18]);\n assert.equal(f.comments.length, 1);\n});\n\ntest('missing or contradictory exact item evidence refuses a dependency without writes', async () => {\n for (const readback of [\n { fieldValueByName: null },\n { isArchived: true },\n { id: 'ITEM18' },\n { project: { id: 'OTHER', number: 1 } },\n { project: { id: 'PROJECT', number: 2 } },\n { content: { id: 'ISSUE18' } },\n { fieldValueByName: { name: 'Waiting', optionId: 'ACTIVE' } },\n ]) {\n const f = guardFixture();\n f.statuses.set(17, 'Waiting');\n f.controls.missingProjectStatus = 17;\n f.controls.projectItemReadback = readback;\n await assert.rejects(updateIssue(f.context, { issueNumber: 17, blockedBy: [18] }), /Project/u);\n assert.deepEqual(f.writes, []);\n assert.deepEqual([...f.edges.get(17)!], []);\n }\n const absent = guardFixture();\n absent.controls.missingProjectIssue = 17;\n await assert.rejects(updateIssue(absent.context, { issueNumber: 17, blockedBy: [18] }), /unresolved/u);\n assert.deepEqual(absent.writes, []);\n});\n\ntest('new blocker on active work refuses before every affected write without an override reason', async () => {\n const f = guardFixture();\n await assert.rejects(updateIssue(f.context, { issueNumber: 17, blockedBy: [18] }), /overrideReason/u);\n assert.deepEqual(f.writes, []);\n});\n\ntest('reciprocal creation preflights the active dependent before creating an issue', async () => {\n const f = guardFixture();\n await assert.rejects(\n createIssue(f.context, { ...f.createInput, blocks: [17] } as Parameters<typeof createIssue>[1]),\n /overrideReason/u,\n );\n assert.deepEqual(f.writes, []);\n});\n\ntest('an authorized active addition records verified evidence before the edge and retries once', async () => {\n const f = guardFixture();\n f.controls.failAdd = true;\n await assert.rejects(\n updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Await prerequisite validation.' }),\n /Native add failed/u,\n );\n assert.equal(f.comments.length, 1);\n assert.equal(f.edges.get(17)?.size, 0);\n const evidence = f.comments[0]!.body;\n f.controls.failAdd = false;\n await updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Await prerequisite validation.' });\n assert.equal(f.comments.length, 1);\n assert.equal(f.comments[0]!.body, evidence);\n assert.deepEqual([...f.edges.get(17)!], [18]);\n assert.ok(f.writes.indexOf('comment') < f.writes.indexOf('add'));\n});\ntest('verified evidence conflicts and comment readback drift refuse the native edge', async () => {\n const f = guardFixture();\n f.controls.failAdd = true;\n await assert.rejects(updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Original reason' }));\n f.controls.failAdd = false;\n const priorWrites = [...f.writes];\n await assert.rejects(\n updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Changed reason' }),\n /conflicts/u,\n );\n assert.deepEqual(f.writes, priorWrites);\n assert.equal(f.comments.length, 1);\n assert.equal(f.edges.get(17)?.size, 0);\n const other = guardFixture();\n other.controls.corruptComment = true;\n await assert.rejects(\n updateIssue(other.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Documented prerequisite' }),\n /readback/u,\n );\n assert.equal(other.edges.get(17)?.size, 0);\n});\ntest('actual additions are guarded after an initially existing edge disappears', async () => {\n const f = guardFixture();\n f.edges.get(17)!.add(18);\n f.controls.race = () => f.edges.get(17)!.clear();\n await assert.rejects(updateIssue(f.context, { issueNumber: 17, blockedBy: [18] }), /overrideReason/u);\n assert.equal(f.edges.get(17)?.size, 0);\n assert.ok(!f.writes.includes('add'));\n});\ntest('preflight active observation remains sticky after a concurrent status change', async () => {\n const f = guardFixture();\n f.controls.race = () => f.statuses.set(17, 'Queued');\n await updateIssue(f.context, {\n issueNumber: 17,\n blockedBy: [18],\n overrideReason: 'Required despite concurrent parking',\n });\n assert.equal(f.comments.length, 1);\n assert.match(f.comments[0]!.body, /In Progress/u);\n});\ntest('inactive addition needs no override while a newly active dependent is guarded', async () => {\n const f = guardFixture();\n f.statuses.set(17, 'Queued');\n await updateIssue(f.context, { issueNumber: 17, blockedBy: [18] });\n assert.equal(f.comments.length, 0);\n const race = guardFixture();\n race.statuses.set(17, 'Queued');\n race.controls.race = () => race.statuses.set(17, 'Active');\n await assert.rejects(updateIssue(race.context, { issueNumber: 17, blockedBy: [18] }), /overrideReason/u);\n assert.ok(!race.writes.includes('add'));\n});\ntest('remove and re-add uses a new native removal episode', async () => {\n const f = guardFixture();\n await updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'First episode' });\n f.edges.get(17)!.clear();\n f.statuses.set(17, 'Active');\n f.history.push({\n __typename: 'BlockedByRemovedEvent',\n id: 'REMOVE1',\n createdAt: '2026-01-02T00:00:00Z',\n blockingIssue: { id: 'ISSUE18', number: 18, repository: { nameWithOwner: 'example/widget' } },\n });\n await updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Second episode' });\n assert.equal(f.comments.length, 2);\n assert.match(f.comments[1]!.body, /REMOVE1/u);\n});\ntest('incomplete active history and unavailable author refuse before writes', async () => {\n const f = guardFixture();\n f.controls.timelineIncomplete = true;\n await assert.rejects(\n updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Reason' }),\n /Complete dependency history/u,\n );\n assert.deepEqual(f.writes, []);\n const noAuthor = guardFixture();\n noAuthor.controls.actor = '';\n await assert.rejects(\n updateIssue(noAuthor.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Reason' }),\n /Author unavailable/u,\n );\n assert.deepEqual(noAuthor.writes, []);\n});\ntest('reciprocal create preserves unrelated edges and provides known-created recovery', async () => {\n const f = guardFixture();\n f.edges.get(17)!.add(19);\n f.controls.failAdd = true;\n await assert.rejects(\n createIssue(f.context, { ...f.createInput, blocks: [17], overrideReason: 'New prerequisite' }),\n (error) => error instanceof CreatedTrackingIssueError && error.created.number === 20,\n );\n assert.deepEqual([...f.edges.get(17)!], [19]);\n assert.equal(f.comments.length, 1);\n f.controls.failAdd = false;\n await updateIssue(f.context, { issueNumber: 20, blocks: [17], overrideReason: 'New prerequisite' });\n assert.deepEqual([...f.edges.get(17)!], [19, 20]);\n assert.equal(f.comments.length, 1);\n});\n\ntest('forward create refuses PR and foreign endpoint identities before creation', async () => {\n for (const bad of [{ pull_request: {} }, { html_url: 'https://github.com/foreign/repo/issues/18' }, { number: 19 }]) {\n const f = guardFixture();\n Object.assign(f.rows.get(18)!, bad);\n await assert.rejects(createIssue(f.context, { ...f.createInput, blockedBy: [18] }), /endpoint|repository issue/u);\n assert.deepEqual(f.writes, []);\n }\n});\ntest('missing blocker identity and ambiguous removal history refuse during preflight', async () => {\n const f = guardFixture();\n f.history.push({\n __typename: 'BlockedByRemovedEvent',\n id: 'R',\n createdAt: '2026-01-01T00:00:00Z',\n blockingIssue: null,\n });\n await assert.rejects(\n updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Reason' }),\n /Complete dependency history/u,\n );\n assert.deepEqual(f.writes, []);\n const ambiguous = guardFixture();\n for (const id of ['R1', 'R2'])\n ambiguous.history.push({\n __typename: 'BlockedByRemovedEvent',\n id,\n createdAt: '2026-01-01T00:00:00Z',\n blockingIssue: { id: 'ISSUE18', number: 18, repository: { nameWithOwner: 'example/widget' } },\n });\n await assert.rejects(\n updateIssue(ambiguous.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Reason' }),\n /ambiguous/u,\n );\n assert.deepEqual(ambiguous.writes, []);\n});\ntest('a removal during comment readback refuses authority from the earlier episode', async () => {\n const f = guardFixture();\n f.controls.commentRace = () =>\n f.history.push({\n __typename: 'BlockedByRemovedEvent',\n id: 'LATER',\n createdAt: '2026-01-03T00:00:00Z',\n blockingIssue: { id: 'ISSUE18', number: 18, repository: { nameWithOwner: 'example/widget' } },\n });\n await assert.rejects(\n updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Reason' }),\n /episode changed/u,\n );\n assert.equal(f.edges.get(17)?.size, 0);\n assert.ok(!f.writes.includes('add'));\n});\n\ntest('duplicate authority markers are refused before another content write', async () => {\n const f = guardFixture();\n f.controls.failAdd = true;\n await assert.rejects(updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Reason' }));\n f.comments.push({ ...f.comments[0]!, id: 999 });\n f.controls.failAdd = false;\n const before = [...f.writes];\n await assert.rejects(\n updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Reason' }),\n /duplicate/u,\n );\n assert.deepEqual(f.writes, before);\n});\n\ntest('blockedBy with blockers naming each issue succeeds and shows that text', async () => {\n const f = guardFixture();\n const result = await updateIssue(f.context, {\n issueNumber: 17,\n blockedBy: [18, 19],\n status: { blockers: '#19, #18' },\n overrideReason: 'Wait for the newly identified prerequisites.',\n });\n assert.match(result.body ?? '', /\\*\\*Blockers:\\*\\* #19, #18/u);\n assert.deepEqual([...f.edges.get(17)!], [18, 19]);\n});\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,YAAY;AACnB,SAAS,YAAY;AACrB,SAAS,aAAa,aAAa,iCAAiC;AACpE,SAAS,kBAAkB,oBAAoB;AAE/C,KAAK,wFAAwF,YAAY;AACvG,QAAM,IAAI,aAAa;AACvB,IAAE,SAAS,uBAAuB;AAClC,QAAM,SAAS,MAAM,YAAY,EAA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ts
CHANGED
|
@@ -4,6 +4,38 @@ export declare const ISSUE_CONTRACT_VERSION: 'ai-delivery.issue@1';
|
|
|
4
4
|
export declare const ISSUE_BODY_MARKER = "<!-- ai-delivery:issue@1 -->";
|
|
5
5
|
export declare function issueStartFooter(body: string): string;
|
|
6
6
|
export declare function issueTrackingFooter(body: string): string;
|
|
7
|
+
export declare const IssueExample: z.ZodObject<{
|
|
8
|
+
input: z.ZodString;
|
|
9
|
+
expected: z.ZodString;
|
|
10
|
+
failure: z.ZodOptional<z.ZodLiteral<true>>;
|
|
11
|
+
}, z.core.$strict>;
|
|
12
|
+
export declare const FrontierReason: z.ZodEnum<{
|
|
13
|
+
"concurrency-recovery": "concurrency-recovery";
|
|
14
|
+
"risk-semantics": "risk-semantics";
|
|
15
|
+
"state-machine": "state-machine";
|
|
16
|
+
"unprovable-refactor": "unprovable-refactor";
|
|
17
|
+
}>;
|
|
18
|
+
export declare const BuilderTier: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
19
|
+
tier: z.ZodLiteral<"standard">;
|
|
20
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
21
|
+
tier: z.ZodLiteral<"frontier">;
|
|
22
|
+
reason: z.ZodEnum<{
|
|
23
|
+
"concurrency-recovery": "concurrency-recovery";
|
|
24
|
+
"risk-semantics": "risk-semantics";
|
|
25
|
+
"state-machine": "state-machine";
|
|
26
|
+
"unprovable-refactor": "unprovable-refactor";
|
|
27
|
+
}>;
|
|
28
|
+
}, z.core.$strict>], "tier">;
|
|
29
|
+
export type BuilderTierData = z.infer<typeof BuilderTier>;
|
|
30
|
+
export declare const SurfaceEntry: z.ZodObject<{
|
|
31
|
+
path: z.ZodString;
|
|
32
|
+
change: z.ZodEnum<{
|
|
33
|
+
add: "add";
|
|
34
|
+
delete: "delete";
|
|
35
|
+
edit: "edit";
|
|
36
|
+
}>;
|
|
37
|
+
signatures: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
38
|
+
}, z.core.$strict>;
|
|
7
39
|
export declare const IssueDeferral: z.ZodObject<{
|
|
8
40
|
until: z.ZodOptional<z.ZodISODate>;
|
|
9
41
|
trigger: z.ZodOptional<z.ZodString>;
|
|
@@ -31,6 +63,11 @@ export declare const IssueFields: z.ZodObject<{
|
|
|
31
63
|
acceptanceCriteria: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
32
64
|
behavior: z.ZodString;
|
|
33
65
|
verifiedBy: z.ZodString;
|
|
66
|
+
examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
67
|
+
input: z.ZodString;
|
|
68
|
+
expected: z.ZodString;
|
|
69
|
+
failure: z.ZodOptional<z.ZodLiteral<true>>;
|
|
70
|
+
}, z.core.$strict>>>;
|
|
34
71
|
}, z.core.$strict>>>;
|
|
35
72
|
outOfScope: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
36
73
|
openQuestions: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
@@ -51,6 +88,31 @@ export declare const IssueFields: z.ZodObject<{
|
|
|
51
88
|
until: z.ZodOptional<z.ZodISODate>;
|
|
52
89
|
trigger: z.ZodOptional<z.ZodString>;
|
|
53
90
|
}, z.core.$strict>>;
|
|
91
|
+
builder: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
92
|
+
tier: z.ZodLiteral<"standard">;
|
|
93
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
94
|
+
tier: z.ZodLiteral<"frontier">;
|
|
95
|
+
reason: z.ZodEnum<{
|
|
96
|
+
"concurrency-recovery": "concurrency-recovery";
|
|
97
|
+
"risk-semantics": "risk-semantics";
|
|
98
|
+
"state-machine": "state-machine";
|
|
99
|
+
"unprovable-refactor": "unprovable-refactor";
|
|
100
|
+
}>;
|
|
101
|
+
}, z.core.$strict>], "tier">>;
|
|
102
|
+
extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
103
|
+
priorWork: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
104
|
+
decisions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
105
|
+
surface: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
106
|
+
path: z.ZodString;
|
|
107
|
+
change: z.ZodEnum<{
|
|
108
|
+
add: "add";
|
|
109
|
+
delete: "delete";
|
|
110
|
+
edit: "edit";
|
|
111
|
+
}>;
|
|
112
|
+
signatures: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
113
|
+
}, z.core.$strict>>>;
|
|
114
|
+
fences: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
115
|
+
proof: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
54
116
|
legacyBody: z.ZodOptional<z.ZodString>;
|
|
55
117
|
retainLegacyBody: z.ZodOptional<z.ZodBoolean>;
|
|
56
118
|
}, z.core.$strict>;
|
|
@@ -101,6 +163,11 @@ export declare const DraftIssue: z.ZodObject<{
|
|
|
101
163
|
acceptanceCriteria: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
102
164
|
behavior: z.ZodString;
|
|
103
165
|
verifiedBy: z.ZodString;
|
|
166
|
+
examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
167
|
+
input: z.ZodString;
|
|
168
|
+
expected: z.ZodString;
|
|
169
|
+
failure: z.ZodOptional<z.ZodLiteral<true>>;
|
|
170
|
+
}, z.core.$strict>>>;
|
|
104
171
|
}, z.core.$strict>>>;
|
|
105
172
|
outOfScope: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
106
173
|
openQuestions: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
@@ -121,6 +188,31 @@ export declare const DraftIssue: z.ZodObject<{
|
|
|
121
188
|
until: z.ZodOptional<z.ZodISODate>;
|
|
122
189
|
trigger: z.ZodOptional<z.ZodString>;
|
|
123
190
|
}, z.core.$strict>>;
|
|
191
|
+
builder: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
192
|
+
tier: z.ZodLiteral<"standard">;
|
|
193
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
194
|
+
tier: z.ZodLiteral<"frontier">;
|
|
195
|
+
reason: z.ZodEnum<{
|
|
196
|
+
"concurrency-recovery": "concurrency-recovery";
|
|
197
|
+
"risk-semantics": "risk-semantics";
|
|
198
|
+
"state-machine": "state-machine";
|
|
199
|
+
"unprovable-refactor": "unprovable-refactor";
|
|
200
|
+
}>;
|
|
201
|
+
}, z.core.$strict>], "tier">>;
|
|
202
|
+
extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
203
|
+
priorWork: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
204
|
+
decisions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
205
|
+
surface: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
206
|
+
path: z.ZodString;
|
|
207
|
+
change: z.ZodEnum<{
|
|
208
|
+
add: "add";
|
|
209
|
+
delete: "delete";
|
|
210
|
+
edit: "edit";
|
|
211
|
+
}>;
|
|
212
|
+
signatures: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
213
|
+
}, z.core.$strict>>>;
|
|
214
|
+
fences: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
215
|
+
proof: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
124
216
|
legacyBody: z.ZodOptional<z.ZodString>;
|
|
125
217
|
retainLegacyBody: z.ZodOptional<z.ZodBoolean>;
|
|
126
218
|
}, z.core.$strict>;
|
|
@@ -145,6 +237,31 @@ export declare const ReadyIssue: z.ZodObject<{
|
|
|
145
237
|
until: z.ZodOptional<z.ZodISODate>;
|
|
146
238
|
trigger: z.ZodOptional<z.ZodString>;
|
|
147
239
|
}, z.core.$strict>>;
|
|
240
|
+
builder: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
241
|
+
tier: z.ZodLiteral<"standard">;
|
|
242
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
243
|
+
tier: z.ZodLiteral<"frontier">;
|
|
244
|
+
reason: z.ZodEnum<{
|
|
245
|
+
"concurrency-recovery": "concurrency-recovery";
|
|
246
|
+
"risk-semantics": "risk-semantics";
|
|
247
|
+
"state-machine": "state-machine";
|
|
248
|
+
"unprovable-refactor": "unprovable-refactor";
|
|
249
|
+
}>;
|
|
250
|
+
}, z.core.$strict>], "tier">>;
|
|
251
|
+
extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
252
|
+
priorWork: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
253
|
+
decisions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
254
|
+
surface: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
255
|
+
path: z.ZodString;
|
|
256
|
+
change: z.ZodEnum<{
|
|
257
|
+
add: "add";
|
|
258
|
+
delete: "delete";
|
|
259
|
+
edit: "edit";
|
|
260
|
+
}>;
|
|
261
|
+
signatures: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
262
|
+
}, z.core.$strict>>>;
|
|
263
|
+
fences: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
264
|
+
proof: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
148
265
|
legacyBody: z.ZodOptional<z.ZodString>;
|
|
149
266
|
retainLegacyBody: z.ZodOptional<z.ZodBoolean>;
|
|
150
267
|
title: z.ZodString;
|
|
@@ -154,6 +271,11 @@ export declare const ReadyIssue: z.ZodObject<{
|
|
|
154
271
|
acceptanceCriteria: z.ZodArray<z.ZodObject<{
|
|
155
272
|
behavior: z.ZodString;
|
|
156
273
|
verifiedBy: z.ZodString;
|
|
274
|
+
examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
275
|
+
input: z.ZodString;
|
|
276
|
+
expected: z.ZodString;
|
|
277
|
+
failure: z.ZodOptional<z.ZodLiteral<true>>;
|
|
278
|
+
}, z.core.$strict>>>;
|
|
157
279
|
}, z.core.$strict>>;
|
|
158
280
|
outOfScope: z.ZodArray<z.ZodString>;
|
|
159
281
|
openQuestions: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
@@ -173,6 +295,11 @@ export declare const ISSUE_JSON_SCHEMAS: {
|
|
|
173
295
|
acceptanceCriteria: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
174
296
|
behavior: z.ZodString;
|
|
175
297
|
verifiedBy: z.ZodString;
|
|
298
|
+
examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
299
|
+
input: z.ZodString;
|
|
300
|
+
expected: z.ZodString;
|
|
301
|
+
failure: z.ZodOptional<z.ZodLiteral<true>>;
|
|
302
|
+
}, z.core.$strict>>>;
|
|
176
303
|
}, z.core.$strict>>>;
|
|
177
304
|
outOfScope: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
178
305
|
openQuestions: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
@@ -193,6 +320,31 @@ export declare const ISSUE_JSON_SCHEMAS: {
|
|
|
193
320
|
until: z.ZodOptional<z.ZodISODate>;
|
|
194
321
|
trigger: z.ZodOptional<z.ZodString>;
|
|
195
322
|
}, z.core.$strict>>;
|
|
323
|
+
builder: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
324
|
+
tier: z.ZodLiteral<"standard">;
|
|
325
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
326
|
+
tier: z.ZodLiteral<"frontier">;
|
|
327
|
+
reason: z.ZodEnum<{
|
|
328
|
+
"concurrency-recovery": "concurrency-recovery";
|
|
329
|
+
"risk-semantics": "risk-semantics";
|
|
330
|
+
"state-machine": "state-machine";
|
|
331
|
+
"unprovable-refactor": "unprovable-refactor";
|
|
332
|
+
}>;
|
|
333
|
+
}, z.core.$strict>], "tier">>;
|
|
334
|
+
extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
335
|
+
priorWork: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
336
|
+
decisions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
337
|
+
surface: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
338
|
+
path: z.ZodString;
|
|
339
|
+
change: z.ZodEnum<{
|
|
340
|
+
add: "add";
|
|
341
|
+
delete: "delete";
|
|
342
|
+
edit: "edit";
|
|
343
|
+
}>;
|
|
344
|
+
signatures: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
345
|
+
}, z.core.$strict>>>;
|
|
346
|
+
fences: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
347
|
+
proof: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
196
348
|
legacyBody: z.ZodOptional<z.ZodString>;
|
|
197
349
|
retainLegacyBody: z.ZodOptional<z.ZodBoolean>;
|
|
198
350
|
}, z.core.$strict>>;
|
|
@@ -215,6 +367,31 @@ export declare const ISSUE_JSON_SCHEMAS: {
|
|
|
215
367
|
until: z.ZodOptional<z.ZodISODate>;
|
|
216
368
|
trigger: z.ZodOptional<z.ZodString>;
|
|
217
369
|
}, z.core.$strict>>;
|
|
370
|
+
builder: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
371
|
+
tier: z.ZodLiteral<"standard">;
|
|
372
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
373
|
+
tier: z.ZodLiteral<"frontier">;
|
|
374
|
+
reason: z.ZodEnum<{
|
|
375
|
+
"concurrency-recovery": "concurrency-recovery";
|
|
376
|
+
"risk-semantics": "risk-semantics";
|
|
377
|
+
"state-machine": "state-machine";
|
|
378
|
+
"unprovable-refactor": "unprovable-refactor";
|
|
379
|
+
}>;
|
|
380
|
+
}, z.core.$strict>], "tier">>;
|
|
381
|
+
extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
382
|
+
priorWork: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
383
|
+
decisions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
384
|
+
surface: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
385
|
+
path: z.ZodString;
|
|
386
|
+
change: z.ZodEnum<{
|
|
387
|
+
add: "add";
|
|
388
|
+
delete: "delete";
|
|
389
|
+
edit: "edit";
|
|
390
|
+
}>;
|
|
391
|
+
signatures: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
392
|
+
}, z.core.$strict>>>;
|
|
393
|
+
fences: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
394
|
+
proof: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
218
395
|
legacyBody: z.ZodOptional<z.ZodString>;
|
|
219
396
|
retainLegacyBody: z.ZodOptional<z.ZodBoolean>;
|
|
220
397
|
title: z.ZodString;
|
|
@@ -224,6 +401,11 @@ export declare const ISSUE_JSON_SCHEMAS: {
|
|
|
224
401
|
acceptanceCriteria: z.ZodArray<z.ZodObject<{
|
|
225
402
|
behavior: z.ZodString;
|
|
226
403
|
verifiedBy: z.ZodString;
|
|
404
|
+
examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
405
|
+
input: z.ZodString;
|
|
406
|
+
expected: z.ZodString;
|
|
407
|
+
failure: z.ZodOptional<z.ZodLiteral<true>>;
|
|
408
|
+
}, z.core.$strict>>>;
|
|
227
409
|
}, z.core.$strict>>;
|
|
228
410
|
outOfScope: z.ZodArray<z.ZodString>;
|
|
229
411
|
openQuestions: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
@@ -241,6 +423,11 @@ export declare const IssueWriteFields: {
|
|
|
241
423
|
acceptanceCriteria: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
242
424
|
behavior: z.ZodString;
|
|
243
425
|
verifiedBy: z.ZodString;
|
|
426
|
+
examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
427
|
+
input: z.ZodString;
|
|
428
|
+
expected: z.ZodString;
|
|
429
|
+
failure: z.ZodOptional<z.ZodLiteral<true>>;
|
|
430
|
+
}, z.core.$strict>>>;
|
|
244
431
|
}, z.core.$strict>>>;
|
|
245
432
|
outOfScope: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
246
433
|
openQuestions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -256,6 +443,31 @@ export declare const IssueWriteFields: {
|
|
|
256
443
|
reproducibility: z.ZodString;
|
|
257
444
|
environment: z.ZodString;
|
|
258
445
|
}, z.core.$strict>>;
|
|
446
|
+
builder: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
447
|
+
tier: z.ZodLiteral<"standard">;
|
|
448
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
449
|
+
tier: z.ZodLiteral<"frontier">;
|
|
450
|
+
reason: z.ZodEnum<{
|
|
451
|
+
"concurrency-recovery": "concurrency-recovery";
|
|
452
|
+
"risk-semantics": "risk-semantics";
|
|
453
|
+
"state-machine": "state-machine";
|
|
454
|
+
"unprovable-refactor": "unprovable-refactor";
|
|
455
|
+
}>;
|
|
456
|
+
}, z.core.$strict>], "tier">>;
|
|
457
|
+
extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
458
|
+
priorWork: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
459
|
+
decisions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
460
|
+
surface: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
461
|
+
path: z.ZodString;
|
|
462
|
+
change: z.ZodEnum<{
|
|
463
|
+
add: "add";
|
|
464
|
+
delete: "delete";
|
|
465
|
+
edit: "edit";
|
|
466
|
+
}>;
|
|
467
|
+
signatures: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
468
|
+
}, z.core.$strict>>>;
|
|
469
|
+
fences: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
470
|
+
proof: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
259
471
|
draft: z.ZodOptional<z.ZodBoolean>;
|
|
260
472
|
retainLegacyBody: z.ZodOptional<z.ZodBoolean>;
|
|
261
473
|
};
|
|
@@ -269,6 +481,11 @@ export declare const IssueWriteSchema: z.ZodObject<{
|
|
|
269
481
|
acceptanceCriteria: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
270
482
|
behavior: z.ZodString;
|
|
271
483
|
verifiedBy: z.ZodString;
|
|
484
|
+
examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
485
|
+
input: z.ZodString;
|
|
486
|
+
expected: z.ZodString;
|
|
487
|
+
failure: z.ZodOptional<z.ZodLiteral<true>>;
|
|
488
|
+
}, z.core.$strict>>>;
|
|
272
489
|
}, z.core.$strict>>>;
|
|
273
490
|
outOfScope: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
274
491
|
openQuestions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -284,6 +501,31 @@ export declare const IssueWriteSchema: z.ZodObject<{
|
|
|
284
501
|
reproducibility: z.ZodString;
|
|
285
502
|
environment: z.ZodString;
|
|
286
503
|
}, z.core.$strict>>;
|
|
504
|
+
builder: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
505
|
+
tier: z.ZodLiteral<"standard">;
|
|
506
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
507
|
+
tier: z.ZodLiteral<"frontier">;
|
|
508
|
+
reason: z.ZodEnum<{
|
|
509
|
+
"concurrency-recovery": "concurrency-recovery";
|
|
510
|
+
"risk-semantics": "risk-semantics";
|
|
511
|
+
"state-machine": "state-machine";
|
|
512
|
+
"unprovable-refactor": "unprovable-refactor";
|
|
513
|
+
}>;
|
|
514
|
+
}, z.core.$strict>], "tier">>;
|
|
515
|
+
extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
516
|
+
priorWork: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
517
|
+
decisions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
518
|
+
surface: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
519
|
+
path: z.ZodString;
|
|
520
|
+
change: z.ZodEnum<{
|
|
521
|
+
add: "add";
|
|
522
|
+
delete: "delete";
|
|
523
|
+
edit: "edit";
|
|
524
|
+
}>;
|
|
525
|
+
signatures: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
526
|
+
}, z.core.$strict>>>;
|
|
527
|
+
fences: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
528
|
+
proof: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
287
529
|
draft: z.ZodOptional<z.ZodBoolean>;
|
|
288
530
|
retainLegacyBody: z.ZodOptional<z.ZodBoolean>;
|
|
289
531
|
}, z.core.$strict>;
|
|
@@ -299,7 +541,10 @@ export declare class IssueValidationError extends DeliveryError {
|
|
|
299
541
|
readonly failures: IssueDiagnostic[];
|
|
300
542
|
constructor(failures: IssueDiagnostic[]);
|
|
301
543
|
}
|
|
302
|
-
|
|
544
|
+
/** `requireBuilder` is set at Ready create and draft-to-Ready; legacy content updates never set it. */
|
|
545
|
+
export declare function requireIssue(value: unknown, options?: {
|
|
546
|
+
requireBuilder?: true;
|
|
547
|
+
}): DraftIssueData;
|
|
303
548
|
export declare function renderIssueBody(value: DraftIssueData, status?: IssueStatusData, legacyFormatting?: boolean): string;
|
|
304
549
|
/** Lenient conversion retains every legacy byte, and never invents verification or bug evidence. */
|
|
305
550
|
export declare function parseIssueBody(body: string, metadata: {
|
|
@@ -312,6 +557,6 @@ export declare function parseIssueBody(body: string, metadata: {
|
|
|
312
557
|
status?: IssueStatusData;
|
|
313
558
|
legacyFormatting?: boolean;
|
|
314
559
|
};
|
|
315
|
-
export declare function issueWarnings(issue: DraftIssueData
|
|
560
|
+
export declare function issueWarnings(issue: DraftIssueData): IssueDiagnostic[];
|
|
316
561
|
export declare function issueBodyDiff(before: string, after: string): string;
|
|
317
562
|
export {};
|