fix(chronology): add 'mark as completed' + archive-move heuristic for old tracks without state.toml

This commit is contained in:
ed
2026-07-02 08:17:54 -04:00
parent ebd4704324
commit cc23a0586d
2 changed files with 50 additions and 36 deletions
+14
View File
@@ -300,6 +300,20 @@ def classify_status(
)
if plan_progression >= 3:
return ("Completed", "low", f"archived with {plan_progression} plan-progression commits (work in src/)")
# Check for "mark ... as completed" in commit messages
mark_completed: int = sum(
1 for line in full_log.splitlines()
if "mark" in line.lower() and "completed" in line.lower()
)
if mark_completed > 0:
return ("Completed", "low", "archived with 'mark as completed' commit")
# Check if the archive-move commit says "completed"
archive_move_completed: bool = any(
"completed" in line.lower() and ("archive" in line.lower() or "move" in line.lower())
for line in full_log.splitlines()[:3] # check the last few commits (newest first)
)
if archive_move_completed:
return ("Completed", "low", "archived with 'completed' in archive-move commit")
return ("Abandoned", "low", "archived with 0 work commits")
return ("Completed", "low", "archived but no completion report")
# 4. Fallback