Private
Public Access
fix(chronology): add 'mark as completed' + archive-move heuristic for old tracks without state.toml
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user