mirror of
https://github.com/Jeuners/ECC.git
synced 2026-09-09 15:02:30 +02:00
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:
parent
27dce7794a
commit
4ff4872bf3
3 changed files with 347 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ async function main() {
|
|||
appendFile(compactionLog, `[${timestamp}] Context compaction triggered\n`);
|
||||
|
||||
// If there's an active session file, note the compaction
|
||||
const sessions = findFiles(sessionsDir, '*.tmp');
|
||||
const sessions = findFiles(sessionsDir, '*-session.tmp');
|
||||
|
||||
if (sessions.length > 0) {
|
||||
const activeSession = sessions[0].path;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue