Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix(cos): load retirement ownership checks at the reaper boundary

atomantica957bd4ecac4
diff --git a/server/services/worktreeManager.js b/server/services/worktreeManager.js
index 9b6b6b8b74..60f22155ce 100644
--- a/server/services/worktreeManager.js
+++ b/server/services/worktreeManager.js
@@ -23,7 +23,6 @@ import { enforceSafeBranchUpstream } from '../lib/branchUpstreamGuard.js';
import { forkRemoteName, normalizeForkHead } from '../lib/forkHead.js';
import { isHumanClaimWorktree, worktreeAgentId, worktreeOwnershipReason } from '../lib/worktreeOwnership.js';
import { ensureInstanceId } from './instanceIdentity.js';
-import { withClaimOwnershipLock, readClaimOwnershipAgents } from './cosClaimOwnership.js';
export { isHumanClaimWorktree } from '../lib/worktreeOwnership.js';
@@ -1627,6 +1626,7 @@ export async function reapMergedWorktrees(sourceWorkspace, {
dryRun = false
} = {}) {
const { getDefaultBranch, hasBranchMergeEvidence } = await import('./git.js');
+ const { withClaimOwnershipLock, readClaimOwnershipAgents } = await import('./cosClaimOwnership.js');
const { readBranchCompletionHold } = await import('./branchCompletionPolicy.js');
// Every entry point (scheduled, reconcile, operator cleanup) needs a trusted
// registry. loadState/getAgents may default a corrupt file to empty state.