FN-6312: stabilize checkout leasing AgentStore test

Stabilize the checkout leasing AgentStore regression test setup.

- Recreate the nested checkout-leasing AgentStore with an in-memory database after replacing the TaskStore.
- Keep the disk-backed TaskStore for persistence assertions while avoiding a shared disk-backed AgentStore database lifecycle.
- Let the top-level cleanup own AgentStore closure to avoid double-closing in the nested hook.

Files changed:
 packages/core/src/__tests__/agent-store.test.ts | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Fusion-Task-Id: FN-6312
Fusion-Task-Lineage: a7f95ba4-fe8b-4367-9f65-6696b1a3867a
This commit is contained in:
gsxdsm
2026-06-12 23:06:58 -07:00
parent 1c4ec5f002
commit 007c2ab347

View File

@@ -1846,7 +1846,11 @@ describe("AgentStore", () => {
taskStore = new TaskStore(rootDir, join(rootDir, ".fusion-global-settings"));
await taskStore.init();
store = new AgentStore({ rootDir, taskStore });
// Mirror the top-level AgentStore setup: checkout-leasing assertions need
// the disk-backed TaskStore for task persistence, but not a disk-backed
// AgentStore SQLite database in a shared hook.
store.close();
store = new AgentStore({ rootDir, inMemoryDb: true, taskStore });
await store.init();
const holder = await store.createAgent({ name: "Checkout Holder", role: "executor" });
@@ -1859,7 +1863,6 @@ describe("AgentStore", () => {
});
afterEach(() => {
store.close();
taskStore.close();
});