Repository navigation
Description
Raised at maintainer review of PR #486 (#483), not by the lane. Not blocking that merge -- the fix it comes from is correct and the cost here is small and bounded per-session -- but it should not go unfiled.
What the fix changes
#483's fix seeds $_END_LOG with a one-line header before the flush subshell starts, so save-session.sh:1022's housekeeping
find "${REMEMBER_DIR}/logs/autonomous" -name "*.log" -empty -delete 2>/dev/null
no longer matches the log its own parent shell is writing into. That is the right fix for the defect.
What it makes worse
I grepped scripts/*.sh and pipeline/*.py for anything else that deletes, prunes or ages out files under logs/autonomous/. That -empty -delete is the only retention mechanism the directory has -- there is no mtime sweep, no count cap, no rotation.
So before the fix, every session-end-*.log from an ordinary successful run was reclaimed on the next flush. After it, every one of them is non-empty by construction and nothing ever removes it. One file per session, forever.
Measured in two live stores on this machine, 2026-09-01:
~/.remember/logs/autonomous 3 files: 3 session-end-*, 0 non-empty
<project>/.remember/logs/autonomous 17 files: 15 save-*, 2 session-end-*, 3 non-empty
The second store is the useful one: 12 of its 15 save-*.log are empty, so the sweep is doing real work on that class and will keep doing it. session-end-*.log is the class this fix moves out of the sweep's reach permanently.
Why it is worth a line rather than a shrug
The files are one line each, so this is not a disk problem on any realistic timescale. It is a legibility problem, and it is the same one #483 is about from the other side: #370's SessionEnd-liveness check in scripts/doctor.sh uses the presence of session-end-*.log as its proof that a flush ran. An unbounded, never-reclaimed pile of those makes "a flush ran recently" progressively harder to read off the directory, and the issue's own report of 164 stale files is what that looks like when it has been accumulating.
Ranked
fails-to-preserve, weakly -- nothing is lost and nothing misreports today. It is a retention gap opened by an otherwise-correct fix, and it is filed so the next person reading that directory knows the sweep no longer covers it.
Direction, not a prescription
A count cap or an mtime sweep over logs/autonomous/ that covers both file classes, rather than a rule keyed to emptiness. Emptiness was always a proxy for staleness and it is the proxy that produced #483 in the first place.
Platform
Measurement observed on macOS/arm64 (Darwin 24.3.0). The mechanism is one find invocation and the absence of any other, so I expect it identically everywhere -- that half is reasoned.
Activity
fix: converted #487/#488 tests invoked bash with a backslash path, so…
fdaviddpt commentedon Sep 1, 2026
Independently reproduced by the v0.25.0 release audit (round 1), which reached this from the other direction -- as a composition defect across #486 and the pre-existing sweep, invisible in either commit alone. Recording its control here because it is stronger evidence than the original filing had.
Exercised, not reasoned:
The seeded log survives, both empty ones are swept, and
rotate_logs(scripts/log.sh:1182) matches nothing here -- its selector is-name "memory-*.log"inREMEMBER_LOG_DIR, which never coverslogs/autonomous/. The auditor also grepped the whole tree forautonomous(38 hits across 16 files) looking for any other cleanup path and found none, which is the negative half this issue asserted but had not measured.One correction to my original text worth having on the record: I ranked this
fails-to-preserve, weakly. The auditor rejected that row and returned the findingunranked, on the grounds that the defect is a failure to remove and that row would send a reviewer to a preservation path that is not involved. It rejectedmisreportstoo --scripts/doctor.sh:453-455reads these files and reads them correctly. Its conclusion was that no row covers unbounded resource growth. I agree, and I am not opening a table row for it on one instance.Not blocking v0.25.0, which ships without the fix. PR #499 carries it and is failing its Windows leg for reasons unrelated to the retention change itself -- see that PR.
fix: PR #499 Windows CI red -- portable retention sweep, unchecked wr…
fix: normalize backslash-separated REMEMBER_DIR before the retention …
fix: gate #487's backslash normalization on $OSTYPE, fix test's arg-q…
log #487 CI iteration trap: $OSTYPE unspoofable on real Windows Git Bash
fix: Windows CI red on PR #499 -- portable retention sweep, NDC/reten…
fix: 7 more Windows glob/pattern-match sites, same class as #487 (#517)…
fix: 2 more Windows backslash-blindness sites found by #517's own sel…
fix: 2 more Windows backslash-blindness sites survive #517's sweep (#519
Triage the 95 Windows CI blanket win32-skip modules against resolve_b…