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
Mutation testing: 8 of 34 mutations survive a green suite, two on memory handling #175
A mutation-testing pass over pipeline/*.py and scripts/log.sh: 34 mutations, ~8 survived (24%) against a green 695-test suite. The survivors cluster on memory/path handling.
1. LRU eviction is never exercised (HIGH)
Deleting sessions.pop(session_id, None) from cmd_save_position survives — includingtest_a_session_that_keeps_saving_is_not_evicted, the regression test for that exact line. The fixture makes exactly _POSITION_SLOTS saves, so the eviction loop never runs.
Without the pop, plain key reassignment does not move the entry to the end of insertion order: an actively-worked session gets evicted, resumes from 0, and re-summarizes everything — the #140 symptom, reintroduced silently.
Fix: fixture must exceed the cap.
2. Truncation direction untested (HIGH)
raw[-max_extract_bytes:] → raw[:max_extract_bytes] survives. The only test touching max_extract_bytes checks the CLI forwards the argument; nothing feeds an oversized extract and checks which end survives. Flipped, the summarizer receives the oldest context instead of the recent tail — inverting #96.
3. TZ="" regression test depends on the wall clock (MEDIUM)
test_log_sh_no_config_falls_back_to_system_local_not_utc compares UTC against America/Los_Angeles, which share a calendar date for most of the day. Removing the [ -n "$REMEMBER_TZ" ] guard — the literal historical bug — passes outside roughly 17:00–24:00 PT. Needs a frozen clock, not a real one.
4. _session_dir HOME-vs-expanduser order unverifiable (MEDIUM)
Swapping the fallback order survives: on POSIX expanduser("~") reads $HOME anyway, so the Windows-specific reason for the ordering has no assertion that can fail on any platform CI runs.
5. Lower severity
is_skip check in consolidate() removable when text both starts with SKIP and contains a valid header
Activity
test: kill the mutations that survived a green suite
test: kill the mutations that survived a green suite
test: kill the mutations that survived a green suite (#192)