Files
automaton/tasks/complete/fix-cat3-audit-paths/SPEC.md
T

15 lines
1003 B
Markdown
Raw Normal View History

# Spec: fix-cat3-audit-paths
## Problem
`_audit_category3()` in `scripts/status.py:696` checks if changed files are inside task folders using `parts[0] == "tasks"`. This only works for the framework directory (`~/.automaton/`) where git paths are `tasks/mytask/...`. For regular projects, task files have git paths like `.automaton/tasks/mytask/SPEC.md`, where `parts[0]` is `.automaton`, not `tasks`. All task-folder changes are incorrectly flagged as unauthorized.
## Fix
Update the path check at `scripts/status.py:696` to handle both cases:
- Framework mode: `parts[0] == "tasks" and parts[1] in task_names`
- Regular project: `len(parts) >= 3 and parts[0] == ".automaton" and parts[1] == "tasks" and parts[2] in task_names`
## Acceptance Criteria
- `--audit` on a regular project with changes inside `.automaton/tasks/` does NOT flag them as unauthorized
- `--audit` on the framework directory still works correctly
- Add a test in `tests/test_status.py` covering the regular-project path check