Private
Public Access
0
0

fix(chronology): archive = completed (the git mv IS the completion signal; don't guess Abandoned)

This commit is contained in:
2026-07-02 08:56:15 -04:00
parent 2d5ce12c7b
commit 864100b4a7
2 changed files with 49 additions and 120 deletions
+6 -31
View File
@@ -288,37 +288,12 @@ def classify_status(
return ("Active", "medium", "0 work commits in tracks/ (spec/plan only)")
# 3. Directory location
if is_archive:
if work_commits == 0:
# Check for plan-progression commits (old tracks: work was in src/, not the track folder)
full_log: str = _git_log(folder_link, "--oneline")
if folder_link.startswith("conductor/archive/"):
original: str = folder_link.replace("conductor/archive/", "conductor/tracks/", 1)
full_log = _git_log(original, "--oneline") + full_log
plan_progression: int = sum(
1 for line in full_log.splitlines()
if "conductor(plan): Mark phase" in line or "conductor(plan): Mark task" in line
)
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")
# Genuinely ambiguous: no state.toml, no report, no evidence on the track folder.
# The work may have been done in src/ files (commits don't touch the track folder).
# Mark as Needs Review rather than guessing Abandoned.
return ("Needs Review", "low", "archived with no evidence on track folder; work may be in src/")
return ("Completed", "low", "archived but no completion report")
# Archive tracks are almost always completed work — the act of `git mv` to archive/
# IS the completion signal. You don't archive abandoned tracks; you leave them or
# delete them. Default to Completed unless a TRACK_ABORTED report says otherwise
# (already checked above). The work was typically done in src/ files, not the
# track folder, so commit-count heuristics on the track folder are unreliable here.
return ("Completed", "low", "archived (work in src/, not track folder)")
# 4. Fallback
return ("Needs Review", "none", "classifier inconclusive")