You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: inc/Workspace/WorkspaceWorktreeCleanupEngine.php
+19-8Lines changed: 19 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -1524,7 +1524,7 @@ private function revalidate_bounded_cleanup_eligible_candidate( array $candidate
1524
1524
'row_type' => 'protected',
1525
1525
'reason_code' => 'recent_activity',
1526
1526
'protecting_reason' => 'recent_activity',
1527
-
'reason' => sprintf('worktree metadata was seen %d second(s) ago; retention cleanup requires at least %d second(s) without activity', (int) $recent_activity['age_seconds'], self::RETENTION_RECENT_ACTIVITY_SECONDS),
1527
+
'reason' => sprintf('worktree lifecycle %s was updated %d second(s) ago; retention cleanup requires at least %d second(s) without activity', (string) $recent_activity['activity_field'], (int) $recent_activity['age_seconds'], self::RETENTION_RECENT_ACTIVITY_SECONDS),
1528
1528
'metadata' => $metadata,
1529
1529
),
1530
1530
$recent_activity
@@ -1795,19 +1795,29 @@ private function worktree_cleanup_has_removable_lifecycle( array $metadata ): bo
1795
1795
}
1796
1796
1797
1797
/**
1798
-
* Return a recent-activity protection row when metadata heartbeat is fresh.
1798
+
* Return a recent-activity protection row when lifecycle activity is fresh.
1799
+
*
1800
+
* Observation heartbeats are deliberately excluded: inventory and
1801
+
* reconciliation scans refresh them without worktree activity.
retention_apply_protections_assert('recent_activity' === ( $recent['skipped']['reason_code'] ?? null ), 'recent last_seen_at rows are protected from apply removal');
168
+
retention_apply_protections_assert(! isset($recent['skipped']), 'recent observation heartbeats do not protect cleanup-eligible rows from apply removal');
0 commit comments