mirror of
https://github.com/stablyai/orca.git
synced 2026-09-29 08:03:20 +00:00
fix(worktree): read the stale-cleanup ledger through its module
#17857 and #17829 landed minutes apart: one moved staleCleanupInFlight into worktree-create-preparation-stale-cleanup.ts, the other added hasPendingWorktreeCreatePreparations reading it by name. main fails tc:node at the merge. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
This commit is contained in:
@@ -74,6 +74,10 @@ export async function cleanupStalePreparations(
|
||||
}
|
||||
}
|
||||
|
||||
export function hasStaleCleanupInFlight(): boolean {
|
||||
return staleCleanupInFlight.size > 0
|
||||
}
|
||||
|
||||
export function resetStalePreparationCleanupForTests(): void {
|
||||
staleCleanupInFlight.clear()
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ import {
|
||||
} from './worktree-create-preparation-burst'
|
||||
import {
|
||||
cleanupStalePreparations,
|
||||
hasStaleCleanupInFlight,
|
||||
resetStalePreparationCleanupForTests
|
||||
} from './worktree-create-preparation-stale-cleanup'
|
||||
import { toHostFilesystemPath } from './host-tree-removal'
|
||||
@@ -63,7 +64,7 @@ const preparations = new Map<string, PreparationEntry>()
|
||||
|
||||
/** A prepared checkout is a create that is either in flight or imminent. */
|
||||
export function hasPendingWorktreeCreatePreparations(): boolean {
|
||||
return preparations.size > 0 || staleCleanupInFlight.size > 0
|
||||
return preparations.size > 0 || hasStaleCleanupInFlight()
|
||||
}
|
||||
|
||||
function pathOps(path: string): Pick<typeof posix, 'dirname' | 'join' | 'normalize'> {
|
||||
|
||||
Reference in New Issue
Block a user