# Adversarial Bug Report: Inflight Upgrade Path ## Deep Review The upgrade path is designed for backward compatibility. Existing tasks without `.state` get bootstrapped via the artifact heuristic. The version marker in config.md enables future version detection. ## Potential Issues 1. **Bootstrap phase inference may be wrong**: The artifact heuristic determines phase based on which artifacts exist, but this can be ambiguous. For example, if a task has both SPEC.md and IMPLEMENTATION.md (because it was in early implement phase), the heuristic must infer "implement" correctly. The heuristic uses a priority order (latest phase with all required artifacts), which is reasonable but could misidentify tasks that were abandoned mid-phase. 2. **upgrade.sh has no rollback**: If the upgrade script bootstraps a `.state` with an incorrect inferred phase, there's no automatic rollback. The user must manually correct the `.state` file. The script reports inferred phases for review, but doesn't provide a `--dry-run` flag. 3. **Version marker parsing**: `config.md` is a markdown file, so parsing the version marker requires string matching rather than structured format. If someone reformats config.md, the version detection could fail. ## Verdict: PASS — the bootstrap heuristic is reasonable and upgrade.sh reports results for manual review. No critical bugs.