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
4 changes: 1 addition & 3 deletions service.go
Original file line number Diff line number Diff line change
Expand Up @@ -509,9 +509,7 @@ func (s *Service) evictInboxOverflow(dir string) {
slog.Debug("inbox evict: readdir", "dir", dir, "err", err)
return
}
if len(entries) <= maxFiles {
return
}
// Filter out subdirectories — they consume no inbox capacity.
type aged struct {
name string
mod time.Time
Expand Down
5 changes: 2 additions & 3 deletions zz_service_errors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,8 @@ func TestService_Stop_CtxCancelled(t *testing.T) {
// (`len(files) <= cap`) correctly short-circuits so no real file is wrongly
// evicted just because a subdirectory inflated the entry count.
//
// REMOVE THIS COMMENT WHEN PILOT-183 LANDS: the fix will move the
// IsDir() filter ABOVE the first early-return so both checks operate on
// the same population.
// PILOT-183 FIX LANDED: the IsDir() filter now runs before the
// early-return check, so both guards operate on file-only entries.
func TestEvictInboxOverflow_PILOT183_SubdirMixedWithFiles(t *testing.T) {
t.Parallel()
tmp := t.TempDir()
Expand Down
Loading