Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/agent-core-v2/src/features/tower/towerService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ export class AgentTowerService extends Disposable implements IAgentTowerService
}
return;
}
void this.exit('foreign-reconcile');
await this.exit('foreign-reconcile');
}

private async resolveTowerOwner(): Promise<string | undefined> {
Expand Down
6 changes: 2 additions & 4 deletions packages/agent-core-v2/src/human/test/utils/watch.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,9 @@ describe('watch signal mode', () => {

const file = join(root, 'a.txt');
await writeFile(file, 'v1');
await wait(300);

await expect.poll(() => events.some((e) => e.path === file && e.action === 'created')).toBe(true);
expect(events[0]).toEqual({ path: root, action: 'modified', kind: 'directory' });
expect(events.some((e) => e.path === file && e.action === 'created')).toBe(true);
} finally {
await rm(root, { recursive: true, force: true });
}
Expand Down Expand Up @@ -366,10 +365,9 @@ describe('watch signal mode', () => {

const file = join(root, 'a.txt');
await writeFile(file, 'v1');
await wait(300);

await expect.poll(() => events.some((e) => e.path === file && e.action === 'created')).toBe(true);
expect(nativeCalls).toBe(0);
expect(events.some((e) => e.path === file && e.action === 'created')).toBe(true);
} finally {
await rm(root, { recursive: true, force: true });
}
Expand Down
11 changes: 11 additions & 0 deletions packages/agent-core-v2/test/features/tower/towerService.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,7 @@ describe('AgentTowerService', () => {
]);

const ix2 = disposables.add(new TestInstantiationService());
ix2.stub(ILogService, stubLog());
ix2.stub(IFileSystemStorageService, new InMemoryStorageService());
ix2.set(IAppendLogStore, new SyncDescriptor(AppendLogStore));
registerTestAgentWire(ix2, testWireScope('wire', 'tower-replay'), {
Expand All @@ -1011,6 +1012,7 @@ describe('AgentTowerService', () => {
];

const ix2 = disposables.add(new TestInstantiationService());
ix2.stub(ILogService, stubLog());
ix2.stub(IFileSystemStorageService, new InMemoryStorageService());
ix2.set(IAppendLogStore, new SyncDescriptor(AppendLogStore));
registerTestAgentWire(ix2, testWireScope('wire', 'tower-legacy'), {
Expand Down Expand Up @@ -1722,6 +1724,7 @@ describe('AgentTowerService', () => {
]);

const ix2 = disposables.add(new TestInstantiationService());
ix2.stub(ILogService, stubLog());
ix2.stub(IFileSystemStorageService, new InMemoryStorageService());
ix2.set(IAppendLogStore, new SyncDescriptor(AppendLogStore));
ix2.set(IEventBus, new SyncDescriptor(EventBusService));
Expand Down Expand Up @@ -1824,6 +1827,7 @@ describe('AgentTowerService', () => {
}

const ix2 = disposables.add(new TestInstantiationService());
ix2.stub(ILogService, stubLog());
ix2.stub(IFileSystemStorageService, new InMemoryStorageService());
ix2.set(IAppendLogStore, new SyncDescriptor(AppendLogStore));
ix2.set(IEventBus, new SyncDescriptor(EventBusService));
Expand Down Expand Up @@ -1891,6 +1895,7 @@ describe('AgentTowerService', () => {
}

const ix2 = disposables.add(new TestInstantiationService());
ix2.stub(ILogService, stubLog());
ix2.stub(IFileSystemStorageService, new InMemoryStorageService());
ix2.set(IAppendLogStore, new SyncDescriptor(AppendLogStore));
ix2.set(IEventBus, new SyncDescriptor(EventBusService));
Expand Down Expand Up @@ -1965,6 +1970,7 @@ describe('AgentTowerService', () => {
await new TowerStore(repo).init('session-original');

const ix2 = disposables.add(new TestInstantiationService());
ix2.stub(ILogService, stubLog());
ix2.stub(IFileSystemStorageService, new InMemoryStorageService());
ix2.set(IAppendLogStore, new SyncDescriptor(AppendLogStore));
ix2.set(IEventBus, new SyncDescriptor(EventBusService));
Expand Down Expand Up @@ -2076,6 +2082,7 @@ describe('AgentTowerService', () => {
});

const ix2 = disposables.add(new TestInstantiationService());
ix2.stub(ILogService, stubLog());
ix2.stub(IFileSystemStorageService, new InMemoryStorageService());
ix2.set(IAppendLogStore, new SyncDescriptor(AppendLogStore));
ix2.set(IEventBus, new SyncDescriptor(EventBusService));
Expand Down Expand Up @@ -2268,6 +2275,7 @@ describe('AgentTowerService', () => {
ix2.stub(IAgentToolExecutorService, stubToolExecutorEvents().executor);
ix2.stub(IAgentToolApprovalService, { formatDenyMessage });
ix2.stub(ITelemetryService, { track2: () => {} });
ix2.stub(ILogService, stubLog());
ix2.stub(IFlagService, stubFlag(() => false));
ix2.stub(ISessionManager, {
get: (id: string) => (id === 'session-original' ? {} : undefined),
Expand Down Expand Up @@ -2343,6 +2351,7 @@ describe('AgentTowerService', () => {
}

const ix2 = disposables.add(new TestInstantiationService());
ix2.stub(ILogService, stubLog());
ix2.stub(IFileSystemStorageService, new InMemoryStorageService());
ix2.set(IAppendLogStore, new SyncDescriptor(AppendLogStore));
ix2.set(IEventBus, new SyncDescriptor(EventBusService));
Expand Down Expand Up @@ -2420,6 +2429,7 @@ describe('AgentTowerService', () => {
}

const ix2 = disposables.add(new TestInstantiationService());
ix2.stub(ILogService, stubLog());
ix2.stub(IFileSystemStorageService, new InMemoryStorageService());
ix2.set(IAppendLogStore, new SyncDescriptor(AppendLogStore));
ix2.set(IEventBus, new SyncDescriptor(EventBusService));
Expand Down Expand Up @@ -2478,6 +2488,7 @@ describe('AgentTowerService', () => {

it('restore does not touch the profile tool overlay while tower mode is inactive', async () => {
const ix2 = disposables.add(new TestInstantiationService());
ix2.stub(ILogService, stubLog());
ix2.stub(IFileSystemStorageService, new InMemoryStorageService());
ix2.set(IAppendLogStore, new SyncDescriptor(AppendLogStore));
ix2.set(IEventBus, new SyncDescriptor(EventBusService));
Expand Down
Loading