- Fix _infer_state_from_artifacts: SPEC-only maps to research (was bug_find) - Fix cmd_validate_folder: corrupted .state files now error instead of silent fallback - Fix upgrade.sh: remove || true, add python3 check, use git rev-parse --git-dir - Update README.md with --project flag, --can-edit modes, --upgrade, enforcement layers - Add 6 new tests for inference and validation fixes - Complete hook-install-process and readme-upgrade-docs tasks
This commit is contained in:
+6
-6
@@ -303,10 +303,8 @@ def _infer_state_from_artifacts(task_path: Path) -> Optional[str]:
|
||||
return "referee"
|
||||
if "ADVERSARIAL_BUG_REPORT.md" in artifacts and "BUG_REPORT.md" in artifacts:
|
||||
return "doc_review"
|
||||
if "BUG_REPORT.md" in artifacts and "SPEC.md" in artifacts:
|
||||
if "BUG_REPORT.md" in artifacts:
|
||||
return "adversarial_bug_find"
|
||||
if "SPEC.md" in artifacts and "BUG_REPORT.md" not in artifacts:
|
||||
return "bug_find"
|
||||
if "IMPLEMENTATION.md" in artifacts:
|
||||
return "bug_find"
|
||||
if "TEST_PLAN.md" in artifacts:
|
||||
@@ -562,9 +560,11 @@ def cmd_validate_folder(args):
|
||||
return 1
|
||||
phase = _read_state(task_path)
|
||||
if phase is None:
|
||||
phase = _infer_state_from_artifacts(task_path)
|
||||
if phase is None:
|
||||
phase = "unknown"
|
||||
print(f"Task: {args.task}")
|
||||
print(f"Phase: unknown (corrupted .state file)")
|
||||
print(f"Folder validation: FAIL — .state file exists but is empty or unreadable.")
|
||||
print(f" Run 'python ~/.automaton/scripts/status.py --upgrade --task {args.task} --project <project-path>' to re-bootstrap .state file.")
|
||||
return 1
|
||||
base = _base_phase(phase)
|
||||
forbidden = _check_forbidden_artifacts(task_path, base)
|
||||
print(f"Task: {args.task}")
|
||||
|
||||
Reference in New Issue
Block a user