fix: nullish coalescing in evaluate-session config, narrow pre-compact glob, add 11 tests

- evaluate-session.js: || 10 → ?? 10 for min_session_length (0 is valid)
- pre-compact.js: *.tmp → *-session.tmp to match only session files
- 11 new tests: config loading (min=0, null, custom path, invalid JSON),
  session-end update path (timestamp, template replace, preserve content),
  pre-compact glob specificity, extractSessionSummary edge cases
This commit is contained in:
Affaan Mustafa
2026-02-13 02:42:01 -08:00
parent 27dce7794a
commit 4ff4872bf3
3 changed files with 347 additions and 2 deletions

View File

@@ -64,7 +64,7 @@ async function main() {
if (configContent) {
try {
const config = JSON.parse(configContent);
minSessionLength = config.min_session_length || 10;
minSessionLength = config.min_session_length ?? 10;
if (config.learned_skills_path) {
// Handle ~ in path