20 lines
884 B
Markdown
20 lines
884 B
Markdown
# Fix status.py Bugs
|
|||
|
|
|
||
|
|
## Problem
|
||
|
|
1. **Neutered target-phase artifact check** (status.py:488-492): loop body is `pass`, check never executes
|
||
|
|
2. **Double `continue`** (status.py:1003-1004, 1057-1058): unreachable dead code
|
||
|
|
3. **`cmd_approve` uses `_read_state`** (status.py:521): weaker than `_require_state`, silently handles untracked tasks
|
||
|
|
4. **No `--list-states` command**: agents can't discover valid phases programmatically
|
||
|
|
|
||
|
|
## Fix
|
||
|
|
1. Activate target-phase artifact check (remove `pass`, add actual validation)
|
||
|
|
2. Remove duplicate `continue` statements
|
||
|
|
3. Change `cmd_approve` to use `_require_state` for consistency
|
||
|
|
4. Add `--list-states` argument that prints VALID_PHASES
|
||
|
|
|
||
|
|
## Verification
|
||
|
|
- Target-phase artifact check blocks transitions when target's required artifact is missing
|
||
|
|
- No dead code
|
||
|
|
- `cmd_approve` rejects untracked tasks
|
||
|
|
- `--list-states` prints all valid phases
|