Private
Public Access
feat(chronology): rewrite classifier to use git-history evidence + 7-status enum + Needs Review section
This commit is contained in:
@@ -149,7 +149,7 @@ def test_classify_status_work_commits_completed(tmp_path: Path) -> None:
|
||||
reports_dir = tmp_path / "docs/reports"
|
||||
reports_dir.mkdir(parents=True)
|
||||
with patch("scripts.audit.generate_chronology._git_log") as mock_log:
|
||||
mock_log.return_value = "feat: add thing\nfix: fix thing\nrefactor: refactor thing\n"
|
||||
mock_log.return_value = "abc1234 feat: add thing\ndef5678 fix: fix thing\nghi9012 refactor: refactor thing\n"
|
||||
result = classify_status(
|
||||
folder_link="conductor/tracks/my_track_20260701",
|
||||
current="active",
|
||||
@@ -162,12 +162,12 @@ def test_classify_status_work_commits_completed(tmp_path: Path) -> None:
|
||||
assert "work commits" in result[2]
|
||||
|
||||
|
||||
def test_classify_status_metadata_commits_not_counted_as_work(tmp_path: Path) -> None:
|
||||
def test_classify_status_metadata_commits_not_countd_as_work(tmp_path: Path) -> None:
|
||||
"""conductor(plan): commits don't count as work commits."""
|
||||
reports_dir = tmp_path / "docs/reports"
|
||||
reports_dir.mkdir(parents=True)
|
||||
with patch("scripts.audit.generate_chronology._git_log") as mock_log:
|
||||
mock_log.return_value = "conductor(plan): mark task\nconductor(state): update\nconductor(track): init\n"
|
||||
mock_log.return_value = "abc1234 conductor(plan): mark task\ndef5678 conductor(state): update\nghi9012 conductor(track): init\n"
|
||||
result = classify_status(
|
||||
folder_link="conductor/tracks/my_track_20260701",
|
||||
current="active",
|
||||
@@ -183,7 +183,7 @@ def test_classify_status_1_2_work_commits_in_progress(tmp_path: Path) -> None:
|
||||
reports_dir = tmp_path / "docs/reports"
|
||||
reports_dir.mkdir(parents=True)
|
||||
with patch("scripts.audit.generate_chronology._git_log") as mock_log:
|
||||
mock_log.return_value = "feat: add thing\nfix: fix thing\n"
|
||||
mock_log.return_value = "abc1234 feat: add thing\ndef5678 fix: fix thing\n"
|
||||
result = classify_status(
|
||||
folder_link="conductor/tracks/my_track_20260701",
|
||||
current="active",
|
||||
@@ -199,7 +199,7 @@ def test_classify_status_archive_no_override_completed_low(tmp_path: Path) -> No
|
||||
reports_dir = tmp_path / "docs/reports"
|
||||
reports_dir.mkdir(parents=True)
|
||||
with patch("scripts.audit.generate_chronology._git_log") as mock_log:
|
||||
mock_log.return_value = "feat: thing\nfix: thing\nrefactor: thing\n"
|
||||
mock_log.return_value = "abc1234 feat: thing\ndef5678 fix: thing\nghi9012 refactor: thing\n"
|
||||
result = classify_status(
|
||||
folder_link="conductor/archive/my_track_20260701",
|
||||
current="active",
|
||||
@@ -212,13 +212,13 @@ def test_classify_status_archive_no_override_completed_low(tmp_path: Path) -> No
|
||||
|
||||
|
||||
def test_classify_status_fallback_needs_review(tmp_path: Path) -> None:
|
||||
"""Inconclusive -> Needs Review."""
|
||||
"""Inconclusive -> Needs Review (path is neither tracks/ nor archive/)."""
|
||||
reports_dir = tmp_path / "docs/reports"
|
||||
reports_dir.mkdir(parents=True)
|
||||
with patch("scripts.audit.generate_chronology._git_log") as mock_log:
|
||||
mock_log.return_value = ""
|
||||
result = classify_status(
|
||||
folder_link="conductor/tracks/my_track",
|
||||
folder_link="some/other/path/my_track",
|
||||
current="",
|
||||
track_id="my_track",
|
||||
repo_root=tmp_path,
|
||||
|
||||
Reference in New Issue
Block a user