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
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,38 @@ describe('ProjectScanner', () => {
expect(silent.error).not.toHaveBeenCalled();
});

it('silently skips interactive run directories without logging a warning', async () => {
using silent = silencedConsole();
const scanner = new ProjectScanner('/test/projects');

mockReaddirResult(['proj']);
mockStatDirectory();
mockReaddirResult(['tickets']);
mockReaddirResult(['TICKET-1']);
mockStatDirectory(); // stat for TICKET-1 directory
mockReaddirResult(['20260224-1030Z-interactive', 'good-run']);
// No stat call for the interactive directory — it's skipped before stat
mockStatDirectory(); // stat for good-run directory

mockedParseRunData.mockResolvedValueOnce(
createMockStatus({
runId: 'good-run',
startedAt: '2026-03-01T00:00:00Z',
}),
);

const result = await scanner.scan();

expect(result.projects).toHaveLength(1);
const runs = result.projects[0]?.tickets[0]?.runs;
expect(runs).toHaveLength(1);
expect(runs?.[0]?.runId).toBe('good-run');

expect(mockedParseRunData).toHaveBeenCalledOnce();
expect(silent.warn).not.toHaveBeenCalled();
expect(silent.error).not.toHaveBeenCalled();
});

it('does not scan direct entries when tickets/ directory exists', async () => {
const scanner = new ProjectScanner('/test/projects');

Expand Down
1 change: 1 addition & 0 deletions packages/factory/src/server/services/project-scanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ export class ProjectScanner {

for (const runId of runDirs) {
if (runId.startsWith('.')) continue;
if (runId.endsWith('-interactive')) continue;
const runPath = join(ticketPath, runId);

try {
Expand Down