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
{{ message }}
Repository navigation
NDC files compressed content by run date — after-midnight compression lands prior-day entries in the new day's today-*.md #141
Observed (production, 0.8.3 via marketplace; mechanism re-verified on main @ 7db7866)
Entries summarized late on day N (still sitting uncompressed in now.md) were compressed by the first save after midnight and appended to today-<N+1>.md — the new day's file opens with the prior day's content, and downstream consolidation attributes it to the wrong day.
Mechanism
scripts/save-session.sh computes the target filename from the run date, not the content dates:
line 67: TODAY_DATE=$(_remember_date +%Y-%m-%d)
line 223: TODAY_FILE="${REMEMBER_DIR}/today-${TODAY_DATE}.md"
NDC only fires on a save (with a 1h cooldown), so now.md routinely carries evening entries across midnight; whatever is in it gets filed under the current date wholesale. (#26 fixed the timezone used for the filename — this is orthogonal: even with the right TZ, content crosses the boundary.)
Suggested fix (cheapest honest one)
At NDC time, if now.md's first entry header predates TODAY_DATE (the entry headers carry HH:MM only, but now.md's mtime-at-first-append or a tiny date stamp written on first append would disambiguate), file the compressed block to the previous day's file — or simplest: run a boundary check on the first save after midnight and flush now.md to today-<yesterday>.md before the new day's appends. A one-line date marker at the top of now.md on first append would make either variant trivial and would also make the file self-describing.
Activity
fix(ndc): file compressed memory under the day it came from (#141) (#164
fix(#225): give today-*.md its own lock so an append cannot race a re…
fix(ndc): commit now.md by rename and gate the day marker on it (#245)
Refuse a non-regular file at every marker WRITE site, and report a no…