@ordewell/core 0.4.23 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/{ITerminalRunner-CuNYBnqK.d.mts → ITerminalRunner-DCjsa2-I.d.mts} +31 -1
  2. package/dist/{ITerminalRunner-Da1gIAFX.d.ts → ITerminalRunner-H1yT8LTy.d.ts} +31 -1
  3. package/dist/{ModeResolver-mtIWrLXn.d.mts → ModeResolver-DVJ7HV3k.d.mts} +1 -1
  4. package/dist/{ModeResolver-Ob-ihQbI.d.ts → ModeResolver-Dkig8ghQ.d.ts} +1 -1
  5. package/dist/Task-BxQkPlXO.d.mts +664 -0
  6. package/dist/Task-BxQkPlXO.d.ts +664 -0
  7. package/dist/{chunk-O2MFTRHA.mjs → chunk-GWPIYDQW.mjs} +29 -5
  8. package/dist/chunk-GWPIYDQW.mjs.map +1 -0
  9. package/dist/{chunk-T4KGVP4N.mjs → chunk-JVMDEHRQ.mjs} +1 -1
  10. package/dist/chunk-JVMDEHRQ.mjs.map +1 -0
  11. package/dist/chunk-T2S5O36I.mjs +103 -0
  12. package/dist/chunk-T2S5O36I.mjs.map +1 -0
  13. package/dist/{chunk-MKUTJDT2.mjs → chunk-XWOUIA6A.mjs} +2 -2
  14. package/dist/index.d.mts +614 -104
  15. package/dist/index.d.ts +614 -104
  16. package/dist/index.js +3780 -1209
  17. package/dist/index.js.map +1 -1
  18. package/dist/index.mjs +3747 -1291
  19. package/dist/index.mjs.map +1 -1
  20. package/dist/order-labels.d.mts +1 -1
  21. package/dist/order-labels.d.ts +1 -1
  22. package/dist/{parsing-BJoHbA-t.d.ts → parsing-CF_grC29.d.ts} +2 -2
  23. package/dist/{parsing-BWfpLch9.d.mts → parsing-DRp4dPC0.d.mts} +2 -2
  24. package/dist/parsing.d.mts +3 -3
  25. package/dist/parsing.d.ts +3 -3
  26. package/dist/parsing.js.map +1 -1
  27. package/dist/parsing.mjs +2 -2
  28. package/dist/{plan-utils-DJm2a7Zp.d.ts → plan-utils-CkNbqAmS.d.ts} +63 -5
  29. package/dist/{plan-utils-s6VL8NDF.d.mts → plan-utils-CtB3_Ovf.d.mts} +63 -5
  30. package/dist/plan-utils.d.mts +3 -3
  31. package/dist/plan-utils.d.ts +3 -3
  32. package/dist/plan-utils.js +7 -0
  33. package/dist/plan-utils.js.map +1 -1
  34. package/dist/plan-utils.mjs +6 -2
  35. package/dist/testing.d.mts +93 -3
  36. package/dist/testing.d.ts +93 -3
  37. package/dist/testing.js +200 -0
  38. package/dist/testing.js.map +1 -1
  39. package/dist/testing.mjs +179 -0
  40. package/dist/testing.mjs.map +1 -1
  41. package/package.json +1 -1
  42. package/dist/Task-4rDGr8Su.d.mts +0 -271
  43. package/dist/Task-4rDGr8Su.d.ts +0 -271
  44. package/dist/chunk-O2MFTRHA.mjs.map +0 -1
  45. package/dist/chunk-T4KGVP4N.mjs.map +0 -1
  46. /package/dist/{chunk-MKUTJDT2.mjs.map → chunk-XWOUIA6A.mjs.map} +0 -0
package/dist/testing.js CHANGED
@@ -21,10 +21,37 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var testing_exports = {};
22
22
  __export(testing_exports, {
23
23
  FakeTerminalSession: () => FakeTerminalSession,
24
+ FakeWorktreeIsolation: () => FakeWorktreeIsolation,
24
25
  fakeConfig: () => fakeConfig,
25
26
  fakeFileSystem: () => fakeFileSystem
26
27
  });
27
28
  module.exports = __toCommonJS(testing_exports);
29
+
30
+ // src/services/isolationRecord.ts
31
+ var SELF_REPO = ".";
32
+ function integrationBranchFor(runId) {
33
+ return `ordewell/${runId}/integration`;
34
+ }
35
+ function handoffOf(run) {
36
+ const merged = Object.values(run.tasks).filter((r) => r.status === "merged").sort((a, b) => a.order - b.order);
37
+ const entry = (r) => ({
38
+ taskId: r.taskId,
39
+ order: r.order,
40
+ title: r.title,
41
+ ...r.repairedFiles?.length ? { repairedFiles: r.repairedFiles } : {}
42
+ });
43
+ return {
44
+ repos: run.repos.map((repo) => ({
45
+ path: repo.path,
46
+ integrationBranch: repo.integrationBranch,
47
+ baseRef: repo.baseRef,
48
+ landed: merged.filter((r) => r.repos[repo.path]?.changed).map(entry)
49
+ })),
50
+ landed: merged.map(entry)
51
+ };
52
+ }
53
+
54
+ // src/testing.ts
28
55
  function fakeConfig(overrides = {}) {
29
56
  return {
30
57
  aiProvider: "openrouter",
@@ -46,6 +73,13 @@ function fakeConfig(overrides = {}) {
46
73
  geminiModel: "",
47
74
  planMapEnabled: true,
48
75
  autonomousMode: true,
76
+ // Off so an orchestrator built without an injected isolation never runs
77
+ // real git against whatever repository the tests happen to run in.
78
+ worktreeIsolation: false,
79
+ workspaceRepos: [],
80
+ worktreeLinks: [],
81
+ // Off so a scripted conflict stays a conflict unless a test opts into repairing it.
82
+ conflictRepairAttempts: 0,
49
83
  approvalMode: "ask",
50
84
  approvalPreApproved: [],
51
85
  setProviderModelLists: () => {
@@ -104,9 +138,175 @@ var FakeTerminalSession = class {
104
138
  for (const cb of this.exitCbs) cb(code);
105
139
  }
106
140
  };
141
+ var FakeWorktreeIsolation = class {
142
+ availability = { active: true };
143
+ /** The repo paths `startRun` groups: a group of one at `.` unless set. */
144
+ repos = [SELF_REPO];
145
+ /** Per task id, the repos it changes; every repo of the group when not listed. */
146
+ changes = /* @__PURE__ */ new Map();
147
+ /** Per task id, the repo its landing stops in when its outcome is not `merged`; its first changed repo when not listed. */
148
+ stopsIn = /* @__PURE__ */ new Map();
149
+ /** Per task id, the files a `conflict` outcome names; empty when not listed. */
150
+ conflictFiles = /* @__PURE__ */ new Map();
151
+ /** What `mergeIntoCheckedOut` answers. */
152
+ mergeResult = { outcome: "merged" };
153
+ /** What `startRun` shares and `prepare` copies, to exercise their notices. */
154
+ shared = [];
155
+ sharedRepos = [];
156
+ copied = [];
157
+ /** Set to make `startRun` throw, as git does when no repo of the group can be isolated. */
158
+ startRunError = null;
159
+ /** Set to make `discard` / `sweep` throw after logging the call. */
160
+ discardError = null;
161
+ sweepError = null;
162
+ /** Per task id; a task not listed integrates as `merged`. */
163
+ outcomes = /* @__PURE__ */ new Map();
164
+ /** Per task id, what `verifyRepair` finds; a task not listed passes. */
165
+ repairEvidence = /* @__PURE__ */ new Map();
166
+ calls = [];
167
+ holds = /* @__PURE__ */ new Map();
168
+ runCount = 0;
169
+ log(call) {
170
+ this.calls.push(call);
171
+ }
172
+ /** Task ids in the order `op` was called for them. */
173
+ taskIdsFor(op) {
174
+ return this.calls.flatMap((c) => c.op === op && "taskId" in c ? [c.taskId] : []);
175
+ }
176
+ /** Make `integrate` for this task wait until the returned function is called. */
177
+ holdIntegration(taskId) {
178
+ let open;
179
+ this.holds.set(taskId, new Promise((resolve) => {
180
+ open = resolve;
181
+ }));
182
+ return open;
183
+ }
184
+ async isActive(workspaceRoot) {
185
+ this.log({ op: "isActive", workspaceRoot });
186
+ return this.availability;
187
+ }
188
+ /** Like git: once the tracked changes are stashed, the tree is no longer dirty. */
189
+ async stash(workspaceRoot) {
190
+ this.log({ op: "stash", workspaceRoot });
191
+ if (!this.availability.active && this.availability.reason === "dirty") this.availability = { active: true };
192
+ }
193
+ async startRun(workspaceRoot) {
194
+ this.log({ op: "startRun", workspaceRoot });
195
+ if (this.startRunError) throw this.startRunError;
196
+ const id = `run${++this.runCount}`;
197
+ return {
198
+ id,
199
+ workspaceRoot,
200
+ repos: this.repos.map((repo) => ({
201
+ path: repo,
202
+ root: `${workspaceRoot}/${repo}`.replace(/\/\.$/, ""),
203
+ baseRef: "base0000",
204
+ baseBranch: "main",
205
+ integrationBranch: integrationBranchFor(id)
206
+ })),
207
+ shared: [...this.shared],
208
+ sharedRepos: [...this.sharedRepos],
209
+ tasks: {}
210
+ };
211
+ }
212
+ async prepare(task, run) {
213
+ this.log({ op: "prepare", taskId: task.id });
214
+ const name = `${task.order}-${task.id}`;
215
+ const cwd = `/fake-worktrees/${run.id}/${name}`;
216
+ const branch = `ordewell/${run.id}/${name}`;
217
+ run.tasks[task.id] = {
218
+ taskId: task.id,
219
+ order: task.order,
220
+ title: task.title,
221
+ branch,
222
+ workspace: cwd,
223
+ status: "active",
224
+ repos: Object.fromEntries(run.repos.map((r) => [r.path, { worktree: r.path === SELF_REPO ? cwd : `${cwd}/${r.path}`, linked: [] }]))
225
+ };
226
+ return { cwd, branch, copied: [...this.copied] };
227
+ }
228
+ /** Like git: the same cwd, each changed repo's tip recorded, the repair counted. */
229
+ async reopen(task, run) {
230
+ this.log({ op: "reopen", taskId: task.id });
231
+ const record = run.tasks[task.id];
232
+ if (record?.status !== "conflict") throw new Error(`Task ${task.order} has no conflict to repair`);
233
+ const changed = Object.entries(record.repos).filter(([repo, entry]) => entry.changed || repo === record.conflictRepo).map(([repo]) => repo);
234
+ const files = (record.conflictFiles ?? []).map((file) => record.conflictRepo && record.conflictRepo !== SELF_REPO ? `${record.conflictRepo}/${file}` : file);
235
+ record.repairs = (record.repairs ?? 0) + 1;
236
+ record.repairBase = Object.fromEntries(changed.map((repo) => [repo, `tip-${repo}`]));
237
+ record.repairedFiles = [.../* @__PURE__ */ new Set([...record.repairedFiles ?? [], ...files])];
238
+ record.status = "repairing";
239
+ return { cwd: record.workspace, branch: record.branch, copied: [] };
240
+ }
241
+ async verifyRepair(task, _run) {
242
+ this.log({ op: "verifyRepair", taskId: task.id });
243
+ return this.repairEvidence.get(task.id) ?? { ok: true };
244
+ }
245
+ /** Like git: the landing is recorded and persisted before the (held) merge, and cleared once it settles. */
246
+ async integrate(task, run, persist = () => void 0) {
247
+ this.log({ op: "integrate", taskId: task.id });
248
+ const record = run.tasks[task.id];
249
+ if (!record) return "failed";
250
+ const changed = this.changes.get(task.id) ?? run.repos.map((r) => r.path);
251
+ for (const [repo, entry] of Object.entries(record.repos)) entry.changed = changed.includes(repo) || (entry.changed ?? false);
252
+ if (changed.length > 0) {
253
+ run.landing = { taskId: task.id, tips: Object.fromEntries(changed.map((repo) => [repo, `tip-${repo}`])) };
254
+ persist();
255
+ }
256
+ await this.holds.get(task.id);
257
+ delete run.landing;
258
+ const outcome = this.outcomes.get(task.id) ?? "merged";
259
+ record.status = outcome;
260
+ delete record.repairBase;
261
+ if (outcome === "merged") {
262
+ delete record.conflictRepo;
263
+ delete record.conflictFiles;
264
+ } else {
265
+ record.conflictRepo = this.stopsIn.get(task.id) ?? changed[0] ?? SELF_REPO;
266
+ const files = this.conflictFiles.get(task.id);
267
+ if (files) record.conflictFiles = files;
268
+ else delete record.conflictFiles;
269
+ }
270
+ return outcome;
271
+ }
272
+ async release(run, taskId, opts) {
273
+ this.log({ op: "release", taskId, keep: opts.keep });
274
+ const record = run.tasks[taskId];
275
+ if (!opts.keep) delete run.tasks[taskId];
276
+ else if (record?.status === "active") record.status = "kept";
277
+ else if (record?.status === "repairing") {
278
+ record.status = "conflict";
279
+ delete record.repairBase;
280
+ }
281
+ }
282
+ async handoff(run) {
283
+ this.log({ op: "handoff" });
284
+ return handoffOf(run);
285
+ }
286
+ async pruneOrphans() {
287
+ this.log({ op: "pruneOrphans" });
288
+ }
289
+ async reviewDiff() {
290
+ this.log({ op: "reviewDiff" });
291
+ return "";
292
+ }
293
+ async mergeIntoCheckedOut() {
294
+ this.log({ op: "mergeIntoCheckedOut" });
295
+ return this.mergeResult;
296
+ }
297
+ async discard(_run, opts) {
298
+ this.log({ op: "discard", integration: opts.integration });
299
+ if (this.discardError) throw this.discardError;
300
+ }
301
+ async sweep() {
302
+ this.log({ op: "sweep" });
303
+ if (this.sweepError) throw this.sweepError;
304
+ }
305
+ };
107
306
  // Annotate the CommonJS export names for ESM import in node:
108
307
  0 && (module.exports = {
109
308
  FakeTerminalSession,
309
+ FakeWorktreeIsolation,
110
310
  fakeConfig,
111
311
  fakeFileSystem
112
312
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/testing.ts"],"sourcesContent":["import type { IConfig } from './interfaces/IConfig';\nimport type { IFileSystem, ToolOutcome } from './interfaces/IFileSystem';\nimport type { ITerminalSession } from './interfaces/ITerminalRunner';\n\nexport function fakeConfig(overrides: Partial<IConfig> = {}): IConfig {\n return {\n aiProvider: 'openrouter',\n apiKey: 'sk-test',\n planningModel: 'test-model',\n enabledRunners: ['claude-code'],\n maxParallelSessions: 3,\n researchEnabled: false,\n researchMaxSteps: 10,\n researchMaxFileSize: 100_000,\n openAiBaseUrl: 'https://api.openai.com/v1',\n openAiApiKey: '',\n openrouterKey: '',\n geminiKey: '',\n openaiCompatibleBaseUrl: '',\n openaiCompatibleApiKey: '',\n orchestratorModel: '',\n researchSubagentModel: '',\n geminiModel: '',\n planMapEnabled: true,\n autonomousMode: true,\n approvalMode: 'ask',\n approvalPreApproved: [],\n setProviderModelLists: () => {},\n getProviderBaseUrl: () => '',\n getProviderApiKey: () => '',\n ...overrides,\n };\n}\n\nconst EMPTY_OUTCOME: ToolOutcome = { success: false, output: '', truncated: false };\n\n/**\n * A complete {@link IFileSystem} stub. Lives here rather than in each package's\n * test folder so adding a tool to the interface is one edit, not one per suite.\n */\nexport function fakeFileSystem(overrides: Partial<IFileSystem> = {}): IFileSystem {\n return {\n readFile: async () => EMPTY_OUTCOME,\n readFiles: async () => EMPTY_OUTCOME,\n glob: async () => EMPTY_OUTCOME,\n grep: async () => EMPTY_OUTCOME,\n findSymbol: async () => EMPTY_OUTCOME,\n listDir: async () => EMPTY_OUTCOME,\n bash: async () => EMPTY_OUTCOME,\n getWorkspaceRoot: () => '/workspace',\n ...overrides,\n };\n}\n\nexport class FakeTerminalSession implements ITerminalSession {\n private outputCbs: Array<(text: string) => void> = [];\n private exitCbs: Array<(code: number) => void> = [];\n output = '';\n written: string[] = [];\n killed = false;\n\n constructor(public id = 's1', public taskId = 't1') {}\n\n onOutput(cb: (text: string) => void): void { this.outputCbs.push(cb); }\n onExit(cb: (code: number) => void): void { this.exitCbs.push(cb); }\n kill(): void { this.killed = true; }\n getOutput(): string { return this.output; }\n write(text: string): void { this.written.push(text); }\n\n emitOutput(text: string): void {\n this.output += text;\n for (const cb of this.outputCbs) cb(text);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AAyC,CAAC;AAAA,EAClD,SAAS;AAAA,EACT,UAAoB,CAAC;AAAA,EACrB,SAAS;AAAA,EAIT,SAAS,IAAkC;AAAE,SAAK,UAAU,KAAK,EAAE;AAAA,EAAG;AAAA,EACtE,OAAO,IAAkC;AAAE,SAAK,QAAQ,KAAK,EAAE;AAAA,EAAG;AAAA,EAClE,OAAa;AAAE,SAAK,SAAS;AAAA,EAAM;AAAA,EACnC,YAAoB;AAAE,WAAO,KAAK;AAAA,EAAQ;AAAA,EAC1C,MAAM,MAAoB;AAAE,SAAK,QAAQ,KAAK,IAAI;AAAA,EAAG;AAAA,EAErD,WAAW,MAAoB;AAC7B,SAAK,UAAU;AACf,eAAW,MAAM,KAAK,UAAW,IAAG,IAAI;AAAA,EAC1C;AAAA,EACA,SAAS,MAAoB;AAC3B,eAAW,MAAM,KAAK,QAAS,IAAG,IAAI;AAAA,EACxC;AACF;","names":[]}
1
+ {"version":3,"sources":["../src/testing.ts","../src/services/isolationRecord.ts"],"sourcesContent":["import type { IConfig } from './interfaces/IConfig';\nimport type { IFileSystem, ToolOutcome } from './interfaces/IFileSystem';\nimport type { ITerminalSession } from './interfaces/ITerminalRunner';\nimport type {\n IsolationAvailability,\n IsolationHandoff,\n IsolationMergeResult,\n IsolationOutcome,\n IsolationRun,\n IntegrationDisposal,\n PreparedTask,\n IWorktreeIsolation,\n RepairEvidence,\n} from './interfaces/IWorktreeIsolation';\nimport type { Task } from './models/Task';\nimport { handoffOf, integrationBranchFor, SELF_REPO } from './services/isolationRecord';\n\nexport function fakeConfig(overrides: Partial<IConfig> = {}): IConfig {\n return {\n aiProvider: 'openrouter',\n apiKey: 'sk-test',\n planningModel: 'test-model',\n enabledRunners: ['claude-code'],\n maxParallelSessions: 3,\n researchEnabled: false,\n researchMaxSteps: 10,\n researchMaxFileSize: 100_000,\n openAiBaseUrl: 'https://api.openai.com/v1',\n openAiApiKey: '',\n openrouterKey: '',\n geminiKey: '',\n openaiCompatibleBaseUrl: '',\n openaiCompatibleApiKey: '',\n orchestratorModel: '',\n researchSubagentModel: '',\n geminiModel: '',\n planMapEnabled: true,\n autonomousMode: true,\n // Off so an orchestrator built without an injected isolation never runs\n // real git against whatever repository the tests happen to run in.\n worktreeIsolation: false,\n workspaceRepos: [],\n worktreeLinks: [],\n // Off so a scripted conflict stays a conflict unless a test opts into repairing it.\n conflictRepairAttempts: 0,\n approvalMode: 'ask',\n approvalPreApproved: [],\n setProviderModelLists: () => {},\n getProviderBaseUrl: () => '',\n getProviderApiKey: () => '',\n ...overrides,\n };\n}\n\nconst EMPTY_OUTCOME: ToolOutcome = { success: false, output: '', truncated: false };\n\n/**\n * A complete {@link IFileSystem} stub. Lives here rather than in each package's\n * test folder so adding a tool to the interface is one edit, not one per suite.\n */\nexport function fakeFileSystem(overrides: Partial<IFileSystem> = {}): IFileSystem {\n return {\n readFile: async () => EMPTY_OUTCOME,\n readFiles: async () => EMPTY_OUTCOME,\n glob: async () => EMPTY_OUTCOME,\n grep: async () => EMPTY_OUTCOME,\n findSymbol: async () => EMPTY_OUTCOME,\n listDir: async () => EMPTY_OUTCOME,\n bash: async () => EMPTY_OUTCOME,\n getWorkspaceRoot: () => '/workspace',\n ...overrides,\n };\n}\n\nexport class FakeTerminalSession implements ITerminalSession {\n private outputCbs: Array<(text: string) => void> = [];\n private exitCbs: Array<(code: number) => void> = [];\n output = '';\n written: string[] = [];\n killed = false;\n\n constructor(public id = 's1', public taskId = 't1') {}\n\n onOutput(cb: (text: string) => void): void { this.outputCbs.push(cb); }\n onExit(cb: (code: number) => void): void { this.exitCbs.push(cb); }\n kill(): void { this.killed = true; }\n getOutput(): string { return this.output; }\n write(text: string): void { this.written.push(text); }\n\n emitOutput(text: string): void {\n this.output += text;\n for (const cb of this.outputCbs) cb(text);\n }\n emitExit(code: number): void {\n for (const cb of this.exitCbs) cb(code);\n }\n}\n\nexport type FakeIsolationCall =\n | { op: 'isActive'; workspaceRoot: string }\n | { op: 'stash'; workspaceRoot: string }\n | { op: 'startRun'; workspaceRoot: string }\n | { op: 'prepare' | 'reopen' | 'verifyRepair'; taskId: string }\n | { op: 'integrate'; taskId: string }\n | { op: 'release'; taskId: string; keep: boolean }\n | { op: 'handoff' | 'pruneOrphans' | 'reviewDiff' | 'mergeIntoCheckedOut' | 'sweep' }\n | { op: 'discard'; integration: IntegrationDisposal };\n\n/**\n * An in-memory {@link IWorktreeIsolation} for scheduling tests: no git, no\n * filesystem. Every call is logged in `calls`; `prepare` hands back a\n * deterministic fake cwd. Set `availability` to exercise the fallbacks, `outcomes`\n * to script a conflict, and `holdIntegration` to keep a task un-integrated so a\n * test can observe that its dependents wait. `repos` makes the run a group of\n * several; `changes` and `stopsIn` say which of them a task changes and where\n * its landing stops. `repairEvidence` scripts what a conflict repair's\n * evidence check finds.\n */\nexport class FakeWorktreeIsolation implements IWorktreeIsolation {\n availability: IsolationAvailability = { active: true };\n /** The repo paths `startRun` groups: a group of one at `.` unless set. */\n repos: string[] = [SELF_REPO];\n /** Per task id, the repos it changes; every repo of the group when not listed. */\n changes = new Map<string, string[]>();\n /** Per task id, the repo its landing stops in when its outcome is not `merged`; its first changed repo when not listed. */\n stopsIn = new Map<string, string>();\n /** Per task id, the files a `conflict` outcome names; empty when not listed. */\n conflictFiles = new Map<string, string[]>();\n /** What `mergeIntoCheckedOut` answers. */\n mergeResult: IsolationMergeResult = { outcome: 'merged' };\n /** What `startRun` shares and `prepare` copies, to exercise their notices. */\n shared: string[] = [];\n sharedRepos: string[] = [];\n copied: string[] = [];\n /** Set to make `startRun` throw, as git does when no repo of the group can be isolated. */\n startRunError: Error | null = null;\n /** Set to make `discard` / `sweep` throw after logging the call. */\n discardError: Error | null = null;\n sweepError: Error | null = null;\n /** Per task id; a task not listed integrates as `merged`. */\n outcomes = new Map<string, IsolationOutcome>();\n /** Per task id, what `verifyRepair` finds; a task not listed passes. */\n repairEvidence = new Map<string, RepairEvidence>();\n calls: FakeIsolationCall[] = [];\n private holds = new Map<string, Promise<void>>();\n private runCount = 0;\n\n private log(call: FakeIsolationCall): void { this.calls.push(call); }\n\n /** Task ids in the order `op` was called for them. */\n taskIdsFor(op: 'prepare' | 'reopen' | 'verifyRepair' | 'integrate' | 'release'): string[] {\n return this.calls.flatMap((c) => (c.op === op && 'taskId' in c ? [c.taskId] : []));\n }\n\n /** Make `integrate` for this task wait until the returned function is called. */\n holdIntegration(taskId: string): () => void {\n let open!: () => void;\n this.holds.set(taskId, new Promise<void>((resolve) => { open = resolve; }));\n return open;\n }\n\n async isActive(workspaceRoot: string): Promise<IsolationAvailability> {\n this.log({ op: 'isActive', workspaceRoot });\n return this.availability;\n }\n\n /** Like git: once the tracked changes are stashed, the tree is no longer dirty. */\n async stash(workspaceRoot: string): Promise<void> {\n this.log({ op: 'stash', workspaceRoot });\n if (!this.availability.active && this.availability.reason === 'dirty') this.availability = { active: true };\n }\n\n async startRun(workspaceRoot: string): Promise<IsolationRun> {\n this.log({ op: 'startRun', workspaceRoot });\n if (this.startRunError) throw this.startRunError;\n const id = `run${++this.runCount}`;\n return {\n id,\n workspaceRoot,\n repos: this.repos.map((repo) => ({\n path: repo, root: `${workspaceRoot}/${repo}`.replace(/\\/\\.$/, ''), baseRef: 'base0000', baseBranch: 'main', integrationBranch: integrationBranchFor(id),\n })),\n shared: [...this.shared],\n sharedRepos: [...this.sharedRepos],\n tasks: {},\n };\n }\n\n async prepare(task: Task, run: IsolationRun): Promise<PreparedTask> {\n this.log({ op: 'prepare', taskId: task.id });\n const name = `${task.order}-${task.id}`;\n const cwd = `/fake-worktrees/${run.id}/${name}`;\n const branch = `ordewell/${run.id}/${name}`;\n run.tasks[task.id] = {\n taskId: task.id, order: task.order, title: task.title, branch, workspace: cwd, status: 'active',\n repos: Object.fromEntries(run.repos.map((r) => [r.path, { worktree: r.path === SELF_REPO ? cwd : `${cwd}/${r.path}`, linked: [] }])),\n };\n return { cwd, branch, copied: [...this.copied] };\n }\n\n /** Like git: the same cwd, each changed repo's tip recorded, the repair counted. */\n async reopen(task: Task, run: IsolationRun): Promise<PreparedTask> {\n this.log({ op: 'reopen', taskId: task.id });\n const record = run.tasks[task.id];\n if (record?.status !== 'conflict') throw new Error(`Task ${task.order} has no conflict to repair`);\n const changed = Object.entries(record.repos).filter(([repo, entry]) => entry.changed || repo === record.conflictRepo).map(([repo]) => repo);\n const files = (record.conflictFiles ?? []).map((file) => (record.conflictRepo && record.conflictRepo !== SELF_REPO ? `${record.conflictRepo}/${file}` : file));\n record.repairs = (record.repairs ?? 0) + 1;\n record.repairBase = Object.fromEntries(changed.map((repo) => [repo, `tip-${repo}`]));\n record.repairedFiles = [...new Set([...(record.repairedFiles ?? []), ...files])];\n record.status = 'repairing';\n return { cwd: record.workspace, branch: record.branch, copied: [] };\n }\n\n async verifyRepair(task: Task, _run: IsolationRun): Promise<RepairEvidence> {\n this.log({ op: 'verifyRepair', taskId: task.id });\n return this.repairEvidence.get(task.id) ?? { ok: true };\n }\n\n /** Like git: the landing is recorded and persisted before the (held) merge, and cleared once it settles. */\n async integrate(task: Task, run: IsolationRun, persist: () => void = () => undefined): Promise<IsolationOutcome> {\n this.log({ op: 'integrate', taskId: task.id });\n const record = run.tasks[task.id];\n if (!record) return 'failed';\n const changed = this.changes.get(task.id) ?? run.repos.map((r) => r.path);\n for (const [repo, entry] of Object.entries(record.repos)) entry.changed = changed.includes(repo) || (entry.changed ?? false);\n if (changed.length > 0) {\n run.landing = { taskId: task.id, tips: Object.fromEntries(changed.map((repo) => [repo, `tip-${repo}`])) };\n persist();\n }\n await this.holds.get(task.id);\n delete run.landing;\n const outcome = this.outcomes.get(task.id) ?? 'merged';\n record.status = outcome;\n delete record.repairBase;\n if (outcome === 'merged') {\n delete record.conflictRepo;\n delete record.conflictFiles;\n } else {\n record.conflictRepo = this.stopsIn.get(task.id) ?? changed[0] ?? SELF_REPO;\n const files = this.conflictFiles.get(task.id);\n if (files) record.conflictFiles = files;\n else delete record.conflictFiles;\n }\n return outcome;\n }\n\n async release(run: IsolationRun, taskId: string, opts: { keep: boolean }): Promise<void> {\n this.log({ op: 'release', taskId, keep: opts.keep });\n const record = run.tasks[taskId];\n if (!opts.keep) delete run.tasks[taskId];\n else if (record?.status === 'active') record.status = 'kept';\n else if (record?.status === 'repairing') {\n record.status = 'conflict';\n delete record.repairBase;\n }\n }\n\n async handoff(run: IsolationRun): Promise<IsolationHandoff> {\n this.log({ op: 'handoff' });\n return handoffOf(run);\n }\n\n async pruneOrphans(): Promise<void> { this.log({ op: 'pruneOrphans' }); }\n async reviewDiff(): Promise<string> { this.log({ op: 'reviewDiff' }); return ''; }\n async mergeIntoCheckedOut(): Promise<IsolationMergeResult> { this.log({ op: 'mergeIntoCheckedOut' }); return this.mergeResult; }\n async discard(_run: IsolationRun, opts: { integration: IntegrationDisposal }): Promise<void> {\n this.log({ op: 'discard', integration: opts.integration });\n if (this.discardError) throw this.discardError;\n }\n async sweep(): Promise<void> {\n this.log({ op: 'sweep' });\n if (this.sweepError) throw this.sweepError;\n }\n}\n","import * as path from 'path';\nimport type {\n IsolationHandoff,\n IsolationLandedTask,\n IsolationRepo,\n IsolationRun,\n IsolationTaskRecord,\n IsolationTaskStatus,\n PlanIsolation,\n RepoGroupLayout,\n TaskIsolation,\n} from '../interfaces/IWorktreeIsolation';\n\n/** The path of the repo in a workspace that is itself the repository. */\nexport const SELF_REPO = '.';\n\nexport function integrationBranchFor(runId: string): string {\n return `ordewell/${runId}/integration`;\n}\n\nexport function repoRootOf(workspaceRoot: string, repoPath: string): string {\n return path.join(workspaceRoot, repoPath);\n}\n\n/** The group a run isolates, as the planner is told it. */\nexport function layoutOf(run: IsolationRun): RepoGroupLayout {\n return { repos: run.repos.map((r) => r.path), shared: [...run.shared] };\n}\n\n/** The run's integration branch for a one-line notice: every repo's has the same name. */\nexport function integrationBranchNameOf(run: IsolationRun): string {\n return [...new Set(run.repos.map((r) => r.integrationBranch))].join(', ');\n}\n\nconst ISOLATION_STATE: Record<IsolationTaskStatus, Exclude<TaskIsolation['state'], 'none'>> = {\n active: 'active',\n merged: 'integrated',\n conflict: 'conflict',\n repairing: 'repairing',\n kept: 'kept',\n failed: 'kept',\n};\n\n/** `repairLimit` is `conflictRepairAttempts` as it stands now, which is what the next repair will be held to. */\nexport function taskIsolationOf(record: IsolationTaskRecord, repairLimit: number): TaskIsolation {\n return {\n state: ISOLATION_STATE[record.status],\n branch: record.branch,\n worktree: record.workspace,\n repos: Object.entries(record.repos).filter(([, r]) => r.changed).map(([repoPath]) => repoPath),\n ...(record.conflictRepo ? { conflictRepo: record.conflictRepo } : {}),\n ...(record.conflictFiles?.length ? { conflictFiles: record.conflictFiles } : {}),\n ...(record.repairs ? { repair: { attempt: record.repairs, limit: repairLimit } } : {}),\n ...(record.repairedFiles?.length ? { repairedFiles: record.repairedFiles } : {}),\n };\n}\n\n/** A conflict's files as one surface shows them: every one, up to `max`, then how many more. */\nexport function capConflictFiles(files: string[], max = 5): string {\n return files.length <= max ? files.join(', ') : `${files.slice(0, max).join(', ')}, +${files.length - max} more`;\n}\n\n/** What a run hands over: each repo's integration branch and base, and what landed, in plan order. */\nexport function handoffOf(run: IsolationRun): IsolationHandoff {\n const merged = Object.values(run.tasks)\n .filter((r) => r.status === 'merged')\n .sort((a, b) => a.order - b.order);\n const entry = (r: IsolationTaskRecord): IsolationLandedTask => ({\n taskId: r.taskId, order: r.order, title: r.title,\n ...(r.repairedFiles?.length ? { repairedFiles: r.repairedFiles } : {}),\n });\n return {\n repos: run.repos.map((repo) => ({\n path: repo.path,\n integrationBranch: repo.integrationBranch,\n baseRef: repo.baseRef,\n landed: merged.filter((r) => r.repos[repo.path]?.changed).map(entry),\n })),\n landed: merged.map(entry),\n };\n}\n\n/** A task record as ADR-0013 persisted it, for one repository. */\nexport interface Adr0013TaskRecord {\n taskId: string;\n order: number;\n title: string;\n branch: string;\n worktree: string;\n status: IsolationTaskStatus;\n linked: string[];\n}\n\n/** A run as ADR-0013 persisted it (0.4.23): one repository, its refs on the run itself. */\nexport interface Adr0013IsolationRun {\n id: string;\n workspaceRoot: string;\n baseRef: string;\n baseBranch?: string;\n integrationBranch: string;\n tasks: Record<string, Adr0013TaskRecord>;\n}\n\nexport interface Adr0013PlanIsolation {\n run: Adr0013IsolationRun;\n resolvers: Record<string, string>;\n}\n\nfunction isAdr0013(run: IsolationRun | Adr0013IsolationRun): run is Adr0013IsolationRun {\n return 'integrationBranch' in run && typeof run.integrationBranch === 'string';\n}\n\nfunction fromAdr0013Task(r: Adr0013TaskRecord): IsolationTaskRecord {\n return {\n taskId: r.taskId,\n order: r.order,\n title: r.title,\n branch: r.branch,\n workspace: r.worktree,\n status: r.status,\n // A merged task's branch was merged into the one repo there was; what it\n // changed was never recorded, and landing is what `changed` stands for.\n repos: { [SELF_REPO]: { worktree: r.worktree, linked: r.linked ?? [], ...(r.status === 'merged' ? { changed: true } : {}) } },\n ...(r.status === 'conflict' ? { conflictRepo: SELF_REPO } : {}),\n };\n}\n\n/**\n * A persisted plan isolation in today's shape. A run saved in the ADR-0013\n * format — recognised by its own `integrationBranch` — becomes a group of one\n * at `.`, keeping its branches, so a session saved by 0.4.23 resumes and hands\n * off exactly as it would have.\n */\nexport function migratePlanIsolation(state: PlanIsolation | Adr0013PlanIsolation): PlanIsolation {\n const { run, resolvers } = state;\n if (!isAdr0013(run)) return { run, resolvers: resolvers ?? {} };\n const repo: IsolationRepo = {\n path: SELF_REPO,\n root: repoRootOf(run.workspaceRoot, SELF_REPO),\n baseRef: run.baseRef,\n ...(run.baseBranch ? { baseBranch: run.baseBranch } : {}),\n integrationBranch: run.integrationBranch,\n };\n const tasks = Object.fromEntries(Object.entries(run.tasks ?? {}).map(([id, r]) => [id, fromAdr0013Task(r)]));\n return { run: { id: run.id, workspaceRoot: run.workspaceRoot, repos: [repo], shared: [], sharedRepos: [], tasks }, resolvers: resolvers ?? {} };\n}\n\n/** Bring a loaded plan's isolation record, if any, to today's shape in place. */\nexport function migratePlanStateIsolation(plan: { isolation?: PlanIsolation | Adr0013PlanIsolation }): void {\n if (plan.isolation?.run) pl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,MAAM;AAC/B,QAAI,CAAC,KAAK,KAAM,QAAO,IAAI,MAAM,MAAM;AAAA,aAC9B,QAAQ,WAAW,SAAU,QAAO,SAAS;AAAA,aAC7C,QAAQ,WAAW,aAAa;AACvC,aAAO,SAAS;AAChB,aAAO,OAAO;AAAA,IAChB;AAAA,EACF;AAAA,EAEA,MAAM,QAAQ,KAA8C;AAC1D,SAAK,IAAI,EAAE,IAAI,UAAU,CAAC;AAC1B,WAAO,UAAU,GAAG;AAAA,EACtB;AAAA,EAEA,MAAM,eAA8B;AAAE,SAAK,IAAI,EAAE,IAAI,eAAe,CAAC;AAAA,EAAG;AAAA,EACxE,MAAM,aAA8B;AAAE,SAAK,IAAI,EAAE,IAAI,aAAa,CAAC;AAAG,WAAO;AAAA,EAAI;AAAA,EACjF,MAAM,sBAAqD;AAAE,SAAK,IAAI,EAAE,IAAI,sBAAsB,CAAC;AAAG,WAAO,KAAK;AAAA,EAAa;AAAA,EAC/H,MAAM,QAAQ,MAAoB,MAA2D;AAC3F,SAAK,IAAI,EAAE,IAAI,WAAW,aAAa,KAAK,YAAY,CAAC;AACzD,QAAI,KAAK,aAAc,OAAM,KAAK;AAAA,EACpC;AAAA,EACA,MAAM,QAAuB;AAC3B,SAAK,IAAI,EAAE,IAAI,QAAQ,CAAC;AACxB,QAAI,KAAK,WAAY,OAAM,KAAK;AAAA,EAClC;AACF;","names":[]}
package/dist/testing.mjs CHANGED
@@ -1,3 +1,9 @@
1
+ import {
2
+ SELF_REPO,
3
+ handoffOf,
4
+ integrationBranchFor
5
+ } from "./chunk-T2S5O36I.mjs";
6
+
1
7
  // src/testing.ts
2
8
  function fakeConfig(overrides = {}) {
3
9
  return {
@@ -20,6 +26,13 @@ function fakeConfig(overrides = {}) {
20
26
  geminiModel: "",
21
27
  planMapEnabled: true,
22
28
  autonomousMode: true,
29
+ // Off so an orchestrator built without an injected isolation never runs
30
+ // real git against whatever repository the tests happen to run in.
31
+ worktreeIsolation: false,
32
+ workspaceRepos: [],
33
+ worktreeLinks: [],
34
+ // Off so a scripted conflict stays a conflict unless a test opts into repairing it.
35
+ conflictRepairAttempts: 0,
23
36
  approvalMode: "ask",
24
37
  approvalPreApproved: [],
25
38
  setProviderModelLists: () => {
@@ -78,8 +91,174 @@ var FakeTerminalSession = class {
78
91
  for (const cb of this.exitCbs) cb(code);
79
92
  }
80
93
  };
94
+ var FakeWorktreeIsolation = class {
95
+ availability = { active: true };
96
+ /** The repo paths `startRun` groups: a group of one at `.` unless set. */
97
+ repos = [SELF_REPO];
98
+ /** Per task id, the repos it changes; every repo of the group when not listed. */
99
+ changes = /* @__PURE__ */ new Map();
100
+ /** Per task id, the repo its landing stops in when its outcome is not `merged`; its first changed repo when not listed. */
101
+ stopsIn = /* @__PURE__ */ new Map();
102
+ /** Per task id, the files a `conflict` outcome names; empty when not listed. */
103
+ conflictFiles = /* @__PURE__ */ new Map();
104
+ /** What `mergeIntoCheckedOut` answers. */
105
+ mergeResult = { outcome: "merged" };
106
+ /** What `startRun` shares and `prepare` copies, to exercise their notices. */
107
+ shared = [];
108
+ sharedRepos = [];
109
+ copied = [];
110
+ /** Set to make `startRun` throw, as git does when no repo of the group can be isolated. */
111
+ startRunError = null;
112
+ /** Set to make `discard` / `sweep` throw after logging the call. */
113
+ discardError = null;
114
+ sweepError = null;
115
+ /** Per task id; a task not listed integrates as `merged`. */
116
+ outcomes = /* @__PURE__ */ new Map();
117
+ /** Per task id, what `verifyRepair` finds; a task not listed passes. */
118
+ repairEvidence = /* @__PURE__ */ new Map();
119
+ calls = [];
120
+ holds = /* @__PURE__ */ new Map();
121
+ runCount = 0;
122
+ log(call) {
123
+ this.calls.push(call);
124
+ }
125
+ /** Task ids in the order `op` was called for them. */
126
+ taskIdsFor(op) {
127
+ return this.calls.flatMap((c) => c.op === op && "taskId" in c ? [c.taskId] : []);
128
+ }
129
+ /** Make `integrate` for this task wait until the returned function is called. */
130
+ holdIntegration(taskId) {
131
+ let open;
132
+ this.holds.set(taskId, new Promise((resolve) => {
133
+ open = resolve;
134
+ }));
135
+ return open;
136
+ }
137
+ async isActive(workspaceRoot) {
138
+ this.log({ op: "isActive", workspaceRoot });
139
+ return this.availability;
140
+ }
141
+ /** Like git: once the tracked changes are stashed, the tree is no longer dirty. */
142
+ async stash(workspaceRoot) {
143
+ this.log({ op: "stash", workspaceRoot });
144
+ if (!this.availability.active && this.availability.reason === "dirty") this.availability = { active: true };
145
+ }
146
+ async startRun(workspaceRoot) {
147
+ this.log({ op: "startRun", workspaceRoot });
148
+ if (this.startRunError) throw this.startRunError;
149
+ const id = `run${++this.runCount}`;
150
+ return {
151
+ id,
152
+ workspaceRoot,
153
+ repos: this.repos.map((repo) => ({
154
+ path: repo,
155
+ root: `${workspaceRoot}/${repo}`.replace(/\/\.$/, ""),
156
+ baseRef: "base0000",
157
+ baseBranch: "main",
158
+ integrationBranch: integrationBranchFor(id)
159
+ })),
160
+ shared: [...this.shared],
161
+ sharedRepos: [...this.sharedRepos],
162
+ tasks: {}
163
+ };
164
+ }
165
+ async prepare(task, run) {
166
+ this.log({ op: "prepare", taskId: task.id });
167
+ const name = `${task.order}-${task.id}`;
168
+ const cwd = `/fake-worktrees/${run.id}/${name}`;
169
+ const branch = `ordewell/${run.id}/${name}`;
170
+ run.tasks[task.id] = {
171
+ taskId: task.id,
172
+ order: task.order,
173
+ title: task.title,
174
+ branch,
175
+ workspace: cwd,
176
+ status: "active",
177
+ repos: Object.fromEntries(run.repos.map((r) => [r.path, { worktree: r.path === SELF_REPO ? cwd : `${cwd}/${r.path}`, linked: [] }]))
178
+ };
179
+ return { cwd, branch, copied: [...this.copied] };
180
+ }
181
+ /** Like git: the same cwd, each changed repo's tip recorded, the repair counted. */
182
+ async reopen(task, run) {
183
+ this.log({ op: "reopen", taskId: task.id });
184
+ const record = run.tasks[task.id];
185
+ if (record?.status !== "conflict") throw new Error(`Task ${task.order} has no conflict to repair`);
186
+ const changed = Object.entries(record.repos).filter(([repo, entry]) => entry.changed || repo === record.conflictRepo).map(([repo]) => repo);
187
+ const files = (record.conflictFiles ?? []).map((file) => record.conflictRepo && record.conflictRepo !== SELF_REPO ? `${record.conflictRepo}/${file}` : file);
188
+ record.repairs = (record.repairs ?? 0) + 1;
189
+ record.repairBase = Object.fromEntries(changed.map((repo) => [repo, `tip-${repo}`]));
190
+ record.repairedFiles = [.../* @__PURE__ */ new Set([...record.repairedFiles ?? [], ...files])];
191
+ record.status = "repairing";
192
+ return { cwd: record.workspace, branch: record.branch, copied: [] };
193
+ }
194
+ async verifyRepair(task, _run) {
195
+ this.log({ op: "verifyRepair", taskId: task.id });
196
+ return this.repairEvidence.get(task.id) ?? { ok: true };
197
+ }
198
+ /** Like git: the landing is recorded and persisted before the (held) merge, and cleared once it settles. */
199
+ async integrate(task, run, persist = () => void 0) {
200
+ this.log({ op: "integrate", taskId: task.id });
201
+ const record = run.tasks[task.id];
202
+ if (!record) return "failed";
203
+ const changed = this.changes.get(task.id) ?? run.repos.map((r) => r.path);
204
+ for (const [repo, entry] of Object.entries(record.repos)) entry.changed = changed.includes(repo) || (entry.changed ?? false);
205
+ if (changed.length > 0) {
206
+ run.landing = { taskId: task.id, tips: Object.fromEntries(changed.map((repo) => [repo, `tip-${repo}`])) };
207
+ persist();
208
+ }
209
+ await this.holds.get(task.id);
210
+ delete run.landing;
211
+ const outcome = this.outcomes.get(task.id) ?? "merged";
212
+ record.status = outcome;
213
+ delete record.repairBase;
214
+ if (outcome === "merged") {
215
+ delete record.conflictRepo;
216
+ delete record.conflictFiles;
217
+ } else {
218
+ record.conflictRepo = this.stopsIn.get(task.id) ?? changed[0] ?? SELF_REPO;
219
+ const files = this.conflictFiles.get(task.id);
220
+ if (files) record.conflictFiles = files;
221
+ else delete record.conflictFiles;
222
+ }
223
+ return outcome;
224
+ }
225
+ async release(run, taskId, opts) {
226
+ this.log({ op: "release", taskId, keep: opts.keep });
227
+ const record = run.tasks[taskId];
228
+ if (!opts.keep) delete run.tasks[taskId];
229
+ else if (record?.status === "active") record.status = "kept";
230
+ else if (record?.status === "repairing") {
231
+ record.status = "conflict";
232
+ delete record.repairBase;
233
+ }
234
+ }
235
+ async handoff(run) {
236
+ this.log({ op: "handoff" });
237
+ return handoffOf(run);
238
+ }
239
+ async pruneOrphans() {
240
+ this.log({ op: "pruneOrphans" });
241
+ }
242
+ async reviewDiff() {
243
+ this.log({ op: "reviewDiff" });
244
+ return "";
245
+ }
246
+ async mergeIntoCheckedOut() {
247
+ this.log({ op: "mergeIntoCheckedOut" });
248
+ return this.mergeResult;
249
+ }
250
+ async discard(_run, opts) {
251
+ this.log({ op: "discard", integration: opts.integration });
252
+ if (this.discardError) throw this.discardError;
253
+ }
254
+ async sweep() {
255
+ this.log({ op: "sweep" });
256
+ if (this.sweepError) throw this.sweepError;
257
+ }
258
+ };
81
259
  export {
82
260
  FakeTerminalSession,
261
+ FakeWorktreeIsolation,
83
262
  fakeConfig,
84
263
  fakeFileSystem
85
264
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/testing.ts"],"sourcesContent":["import type { IConfig } from './interfaces/IConfig';\nimport type { IFileSystem, ToolOutcome } from './interfaces/IFileSystem';\nimport type { ITerminalSession } from './interfaces/ITerminalRunner';\n\nexport function fakeConfig(overrides: Partial<IConfig> = {}): IConfig {\n return {\n aiProvider: 'openrouter',\n apiKey: 'sk-test',\n planningModel: 'test-model',\n enabledRunners: ['claude-code'],\n maxParallelSessions: 3,\n researchEnabled: false,\n researchMaxSteps: 10,\n researchMaxFileSize: 100_000,\n openAiBaseUrl: 'https://api.openai.com/v1',\n openAiApiKey: '',\n openrouterKey: '',\n geminiKey: '',\n openaiCompatibleBaseUrl: '',\n openaiCompatibleApiKey: '',\n orchestratorModel: '',\n researchSubagentModel: '',\n geminiModel: '',\n planMapEnabled: true,\n autonomousMode: true,\n approvalMode: 'ask',\n approvalPreApproved: [],\n setProviderModelLists: () => {},\n getProviderBaseUrl: () => '',\n getProviderApiKey: () => '',\n ...overrides,\n };\n}\n\nconst EMPTY_OUTCOME: ToolOutcome = { success: false, output: '', truncated: false };\n\n/**\n * A complete {@link IFileSystem} stub. Lives here rather than in each package's\n * test folder so adding a tool to the interface is one edit, not one per suite.\n */\nexport function fakeFileSystem(overrides: Partial<IFileSystem> = {}): IFileSystem {\n return {\n readFile: async () => EMPTY_OUTCOME,\n readFiles: async () => EMPTY_OUTCOME,\n glob: async () => EMPTY_OUTCOME,\n grep: async () => EMPTY_OUTCOME,\n findSymbol: async () => EMPTY_OUTCOME,\n listDir: async () => EMPTY_OUTCOME,\n bash: async () => EMPTY_OUTCOME,\n getWorkspaceRoot: () => '/workspace',\n ...overrides,\n };\n}\n\nexport class FakeTerminalSession implements ITerminalSession {\n private outputCbs: Array<(text: string) => void> = [];\n private exitCbs: Array<(code: number) => void> = [];\n output = '';\n written: string[] = [];\n killed = false;\n\n constructor(public id = 's1', public taskId = 't1') {}\n\n onOutput(cb: (text: string) => void): void { this.outputCbs.push(cb); }\n onExit(cb: (code: number) => void): void { this.exitCbs.push(cb); }\n kill(): void { this.killed = true; }\n getOutput(): string { return this.output; }\n write(text: string): void { this.written.push(text); }\n\n emitOutput(text: string): void {\n this.output += text;\n for (const cb of this.outputCbs) cb(text);\n }\n emitExit(code: number): void {\n for (const cb of this.exitCbs) cb(code);\n }\n}\n"],"mappings":";AAIO,SAAS,WAAW,YAA8B,CAAC,GAAY;AACpE,SAAO;AAAA,IACL,YAAY;AAAA,IACZ,QAAQ;AAAA,IACR,eAAe;AAAA,IACf,gBAAgB,CAAC,aAAa;AAAA,IAC9B,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,IACjB,kBAAkB;AAAA,IAClB,qBAAqB;AAAA,IACrB,eAAe;AAAA,IACf,cAAc;AAAA,IACd,eAAe;AAAA,IACf,WAAW;AAAA,IACX,yBAAyB;AAAA,IACzB,wBAAwB;AAAA,IACxB,mBAAmB;AAAA,IACnB,uBAAuB;AAAA,IACvB,aAAa;AAAA,IACb,gBAAgB;AAAA,IAChB,gBAAgB;AAAA,IAChB,c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}
1
+ {"version":3,"sources":["../src/testing.ts"],"sourcesContent":["import type { IConfig } from './interfaces/IConfig';\nimport type { IFileSystem, ToolOutcome } from './interfaces/IFileSystem';\nimport type { ITerminalSession } from './interfaces/ITerminalRunner';\nimport type {\n IsolationAvailability,\n IsolationHandoff,\n IsolationMergeResult,\n IsolationOutcome,\n IsolationRun,\n IntegrationDisposal,\n PreparedTask,\n IWorktreeIsolation,\n RepairEvidence,\n} from './interfaces/IWorktreeIsolation';\nimport type { Task } from './models/Task';\nimport { handoffOf, integrationBranchFor, SELF_REPO } from './services/isolationRecord';\n\nexport function fakeConfig(overrides: Partial<IConfig> = {}): IConfig {\n return {\n aiProvider: 'openrouter',\n apiKey: 'sk-test',\n planningModel: 'test-model',\n enabledRunners: ['claude-code'],\n maxParallelSessions: 3,\n researchEnabled: false,\n researchMaxSteps: 10,\n researchMaxFileSize: 100_000,\n openAiBaseUrl: 'https://api.openai.com/v1',\n openAiApiKey: '',\n openrouterKey: '',\n geminiKey: '',\n openaiCompatibleBaseUrl: '',\n openaiCompatibleApiKey: '',\n orchestratorModel: '',\n researchSubagentModel: '',\n geminiModel: '',\n planMapEnabled: true,\n autonomousMode: true,\n // Off so an orchestrator built without an injected isolation never runs\n // real git against whatever repository the tests happen to run in.\n worktreeIsolation: false,\n workspaceRepos: [],\n worktreeLinks: [],\n // Off so a scripted conflict stays a conflict unless a test opts into repairing it.\n conflictRepairAttempts: 0,\n approvalMode: 'ask',\n approvalPreApproved: [],\n setProviderModelLists: () => {},\n getProviderBaseUrl: () => '',\n getProviderApiKey: () => '',\n ...overrides,\n };\n}\n\nconst EMPTY_OUTCOME: ToolOutcome = { success: false, output: '', truncated: false };\n\n/**\n * A complete {@link IFileSystem} stub. Lives here rather than in each package's\n * test folder so adding a tool to the interface is one edit, not one per suite.\n */\nexport function fakeFileSystem(overrides: Partial<IFileSystem> = {}): IFileSystem {\n return {\n readFile: async () => EMPTY_OUTCOME,\n readFiles: async () => EMPTY_OUTCOME,\n glob: async () => EMPTY_OUTCOME,\n grep: async () => EMPTY_OUTCOME,\n findSymbol: async () => EMPTY_OUTCOME,\n listDir: async () => EMPTY_OUTCOME,\n bash: async () => EMPTY_OUTCOME,\n getWorkspaceRoot: () => '/workspace',\n ...overrides,\n };\n}\n\nexport class FakeTerminalSession implements ITerminalSession {\n private outputCbs: Array<(text: string) => void> = [];\n private exitCbs: Array<(code: number) => void> = [];\n output = '';\n written: string[] = [];\n killed = false;\n\n constructor(public id = 's1', public taskId = 't1') {}\n\n onOutput(cb: (text: string) => void): void { this.outputCbs.push(cb); }\n onExit(cb: (code: number) => void): void { this.exitCbs.push(cb); }\n kill(): void { this.killed = true; }\n getOutput(): string { return this.output; }\n write(text: string): void { this.written.push(text); }\n\n emitOutput(text: string): void {\n this.output += text;\n for (const cb of this.outputCbs) cb(text);\n }\n emitExit(code: number): void {\n for (const cb of this.exitCbs) cb(code);\n }\n}\n\nexport type FakeIsolationCall =\n | { op: 'isActive'; workspaceRoot: string }\n | { op: 'stash'; workspaceRoot: string }\n | { op: 'startRun'; workspaceRoot: string }\n | { op: 'prepare' | 'reopen' | 'verifyRepair'; taskId: string }\n | { op: 'integrate'; taskId: string }\n | { op: 'release'; taskId: string; keep: boolean }\n | { op: 'handoff' | 'pruneOrphans' | 'reviewDiff' | 'mergeIntoCheckedOut' | 'sweep' }\n | { op: 'discard'; integration: IntegrationDisposal };\n\n/**\n * An in-memory {@link IWorktreeIsolation} for scheduling tests: no git, no\n * filesystem. Every call is logged in `calls`; `prepare` hands back a\n * deterministic fake cwd. Set `availability` to exercise the fallbacks, `outcomes`\n * to script a conflict, and `holdIntegration` to keep a task un-integrated so a\n * test can observe that its dependents wait. `repos` makes the run a group of\n * several; `changes` and `stopsIn` say which of them a task changes and where\n * its landing stops. `repairEvidence` scripts what a conflict repair's\n * evidence check finds.\n */\nexport class FakeWorktreeIsolation implements IWorktreeIsolation {\n availability: IsolationAvailability = { active: true };\n /** The repo paths `startRun` groups: a group of one at `.` unless set. */\n repos: string[] = [SELF_REPO];\n /** Per task id, the repos it changes; every repo of the group when not listed. */\n changes = new Map<string, string[]>();\n /** Per task id, the repo its landing stops in when its outcome is not `merged`; its first changed repo when not listed. */\n stopsIn = new Map<string, string>();\n /** Per task id, the files a `conflict` outcome names; empty when not listed. */\n conflictFiles = new Map<string, string[]>();\n /** What `mergeIntoCheckedOut` answers. */\n mergeResult: IsolationMergeResult = { outcome: 'merged' };\n /** What `startRun` shares and `prepare` copies, to exercise their notices. */\n shared: string[] = [];\n sharedRepos: string[] = [];\n copied: string[] = [];\n /** Set to make `startRun` throw, as git does when no repo of the group can be isolated. */\n startRunError: Error | null = null;\n /** Set to make `discard` / `sweep` throw after logging the call. */\n discardError: Error | null = null;\n sweepError: Error | null = null;\n /** Per task id; a task not listed integrates as `merged`. */\n outcomes = new Map<string, IsolationOutcome>();\n /** Per task id, what `verifyRepair` finds; a task not listed passes. */\n repairEvidence = new Map<string, RepairEvidence>();\n calls: FakeIsolationCall[] = [];\n private holds = new Map<string, Promise<void>>();\n private runCount = 0;\n\n private log(call: FakeIsolationCall): void { this.calls.push(call); }\n\n /** Task ids in the order `op` was called for them. */\n taskIdsFor(op: 'prepare' | 'reopen' | 'verifyRepair' | 'integrate' | 'release'): string[] {\n return this.calls.flatMap((c) => (c.op === op && 'taskId' in c ? [c.taskId] : []));\n }\n\n /** Make `integrate` for this task wait until the returned function is called. */\n holdIntegration(taskId: string): () => void {\n let open!: () => void;\n this.holds.set(taskId, new Promise<void>((resolve) => { open = resolve; }));\n return open;\n }\n\n async isActive(workspaceRoot: string): Promise<IsolationAvailability> {\n this.log({ op: 'isActive', workspaceRoot });\n return this.availability;\n }\n\n /** Like git: once the tracked changes are stashed, the tree is no longer dirty. */\n async stash(workspaceRoot: string): Promise<void> {\n this.log({ op: 'stash', workspaceRoot });\n if (!this.availability.active && this.availability.reason === 'dirty') this.availability = { active: true };\n }\n\n async startRun(workspaceRoot: string): Promise<IsolationRun> {\n this.log({ op: 'startRun', workspaceRoot });\n if (this.startRunError) throw this.startRunError;\n const id = `run${++this.runCount}`;\n return {\n id,\n workspaceRoot,\n repos: this.repos.map((repo) => ({\n path: repo, root: `${workspaceRoot}/${repo}`.replace(/\\/\\.$/, ''), baseRef: 'base0000', baseBranch: 'main', integrationBranch: integrationBranchFor(id),\n })),\n shared: [...this.shared],\n sharedRepos: [...this.sharedRepos],\n tasks: {},\n };\n }\n\n async prepare(task: Task, run: IsolationRun): Promise<PreparedTask> {\n this.log({ op: 'prepare', taskId: task.id });\n const name = `${task.order}-${task.id}`;\n const cwd = `/fake-worktrees/${run.id}/${name}`;\n const branch = `ordewell/${run.id}/${name}`;\n run.tasks[task.id] = {\n taskId: task.id, order: task.order, title: task.title, branch, workspace: cwd, status: 'active',\n repos: Object.fromEntries(run.repos.map((r) => [r.path, { worktree: r.path === SELF_REPO ? cwd : `${cwd}/${r.path}`, linked: [] }])),\n };\n return { cwd, branch, copied: [...this.copied] };\n }\n\n /** Like git: the same cwd, each changed repo's tip recorded, the repair counted. */\n async reopen(task: Task, run: IsolationRun): Promise<PreparedTask> {\n this.log({ op: 'reopen', taskId: task.id });\n const record = run.tasks[task.id];\n if (record?.status !== 'conflict') throw new Error(`Task ${task.order} has no conflict to repair`);\n const changed = Object.entries(record.repos).filter(([repo, entry]) => entry.changed || repo === record.conflictRepo).map(([repo]) => repo);\n const files = (record.conflictFiles ?? []).map((file) => (record.conflictRepo && record.conflictRepo !== SELF_REPO ? `${record.conflictRepo}/${file}` : file));\n record.repairs = (record.repairs ?? 0) + 1;\n record.repairBase = Object.fromEntries(changed.map((repo) => [repo, `tip-${repo}`]));\n record.repairedFiles = [...new Set([...(record.repairedFiles ?? []), ...files])];\n record.status = 'repairing';\n return { cwd: record.workspace, branch: record.branch, copied: [] };\n }\n\n async verifyRepair(task: Task, _run: IsolationRun): Promise<RepairEvidence> {\n this.log({ op: 'verifyRepair', taskId: task.id });\n return this.repairEvidence.get(task.id) ?? { ok: true };\n }\n\n /** Like git: the landing is recorded and persisted before the (held) merge, and cleared once it settles. */\n async integrate(task: Task, run: IsolationRun, persist: () => void = () => undefined): Promise<IsolationOutcome> {\n this.log({ op: 'integrate', taskId: task.id });\n const record = run.tasks[task.id];\n if (!record) return 'failed';\n const changed = this.changes.get(task.id) ?? run.repos.map((r) => r.path);\n for (const [repo, entry] of Object.entries(record.repos)) entry.changed = changed.includes(repo) || (entry.changed ?? false);\n if (changed.length > 0) {\n run.landing = { taskId: task.id, tips: Object.fromEntries(changed.map((repo) => [repo, `tip-${repo}`])) };\n persist();\n }\n await this.holds.get(task.id);\n delete run.landing;\n const outcome = this.outcomes.get(task.id) ?? 'merged';\n record.status = outcome;\n delete record.repairBase;\n if (outcome === 'merged') {\n delete record.conflictRepo;\n delete record.conflictFiles;\n } else {\n record.conflictRepo = this.stopsIn.get(task.id) ?? changed[0] ?? SELF_REPO;\n const files = this.conflictFiles.get(task.id);\n if (files) record.conflictFiles = files;\n else delete record.conflictFiles;\n }\n return outcome;\n }\n\n async release(run: IsolationRun, taskId: string, opts: { keep: boolean }): Promise<void> {\n this.log({ op: 'release', taskId, keep: opts.keep });\n const record = run.tasks[taskId];\n if (!opts.keep) delete run.tasks[taskId];\n else if (record?.status === 'active') record.status = 'kept';\n else if (record?.status === 'repairing') {\n record.status = 'conflict';\n delete record.repairBase;\n }\n }\n\n async handoff(run: IsolationRun): Promise<IsolationHandoff> {\n this.log({ op: 'handoff' });\n return handoffOf(run);\n }\n\n async pruneOrphans(): Promise<void> { this.log({ op: 'pruneOrphans' }); }\n async reviewDiff(): Promise<string> { this.log({ op: 'reviewDiff' }); return ''; }\n async mergeIntoCheckedOut(): Promise<IsolationMergeResult> { this.log({ op: 'mergeIntoCheckedOut' }); return this.mergeResult; }\n async discard(_run: IsolationRun, opts: { integration: IntegrationDisposal }): Promise<void> {\n this.log({ op: 'discard', integration: opts.integration });\n if (this.discardError) throw this.discardError;\n }\n async sweep(): Promise<void> {\n this.log({ op: 'sweep' });\n if (this.sweepError) throw this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OAAM,KAAK;AAAA,EAClC;AACF;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ordewell/core",
3
- "version": "0.4.23",
3
+ "version": "0.5.1",
4
4
  "description": "Ordewell core — planner, orchestrator, runners and verification engine.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Alessandro Costanzo Ciano",