@markjaquith/agency 3.2.13 → 3.2.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@markjaquith/agency",
3
- "version": "3.2.13",
3
+ "version": "3.2.14",
4
4
  "description": "Manage agentic work across repositories with durable workbases",
5
5
  "keywords": [
6
6
  "agents",
@@ -394,6 +394,52 @@ status: done
394
394
  expect(maxActiveGitCommands).toBeGreaterThanOrEqual(3)
395
395
  })
396
396
 
397
+ test("does not load unrelated archived documents for an active target", async () => {
398
+ await write(
399
+ root,
400
+ "archive/tasks/old-task/TASK.md",
401
+ `---
402
+ ticketUrl: null
403
+ repo: agency
404
+ branch: old-task
405
+ base: main
406
+ pr: null
407
+ status: done
408
+ ---
409
+
410
+ # Old task
411
+ `,
412
+ )
413
+ await write(
414
+ root,
415
+ "archive/tasks/old-task/phases/old-phase/PHASE.md",
416
+ `---
417
+ repo: agency
418
+ branch: old-phase
419
+ base: main
420
+ pr: null
421
+ status: done
422
+ ---
423
+
424
+ # Old phase
425
+ `,
426
+ )
427
+
428
+ const archiveReads: string[] = []
429
+ const originalFile = Bun.file
430
+ Bun.file = mock((path: string) => {
431
+ if (path.includes(join(root, "archive", "tasks"))) archiveReads.push(path)
432
+ return originalFile(path)
433
+ }) as unknown as typeof Bun.file
434
+ try {
435
+ await readContext(root, "tasks/agent-contract/phases/context-command")
436
+ } finally {
437
+ Bun.file = originalFile
438
+ }
439
+
440
+ expect(archiveReads).toEqual([])
441
+ })
442
+
397
443
  test("resolves a bare task ID and returns root discovery context", async () => {
398
444
  const task = await readContext(root, "agent-contract")
399
445
  expect(task.target).toMatchObject({