Fix 10 audit bugs: path prefix matching, verdict parsing, CORS, stale-task detection, phase mapping
CI / build (push) Has been cancelled

Batch 1 (High severity):
- Bug 1: --audit cat3 now checks .automaton/tasks/ paths
- Bug 4: Verdict PASS/FAIL uses structured ## Status: line parsing
- Bug 5: register-guards.sh checks .json/.jsonc, writes plugin key, strips comments
- Bug 7: --can-edit/--scope-check path prefix uses os.sep boundary

Batch 2 (Medium/Low severity):
- Bug 2: migrate-project.sh find command parentheses for -prune binding
- Bug 3: vram_detect model prefix matching with known-suffix whitelist
- Bug 6: dashboard reads .state file before artifact heuristic fallback
- Bug 8: removed wildcard CORS, added security headers (nosniff, DENY)
- Bug 9: stale-task detection uses .state.lastedit instead of .state mtime
- Bug 10: TEST_PLAN.md maps to test_design (was implement)

249 tests pass (up from 235). All 10 tasks driven through full workflow to completion.
This commit is contained in:
Lap Tran
2026-06-22 10:40:58 -04:00
parent f32f98575b
commit 81ccf548e5
106 changed files with 1643 additions and 436 deletions
+10
View File
@@ -89,6 +89,16 @@
- Additive extension model: projects extend via extensions/ dir, never copy framework files (#additive-extension-model)
- CHANGELOG.md for release notes tracking (#changelog)
- Framework audit: comprehensive self-consistency check with RESEARCH.md (#framework-audit)
- Audit Bug 1: `--audit` category 3 now checks `.automaton/tasks/` paths (was only checking `tasks/`) (#fix-cat3-audit-paths)
- Audit Bug 2: `migrate-project.sh` find command now has parentheses around `-name` group for correct `-prune` binding (#fix-migrate-find-precedence)
- Audit Bug 3: `_lookup_model_context()` no longer false-matches model prefixes (e.g. `phi-4` matching `phi-4-mini`) — uses three-tier matching with known suffix whitelist (#fix-vram-model-prefix-match)
- Audit Bug 4: Verdict PASS/FAIL inference uses structured `## Status:` line parsing instead of fragile substring search (#fix-verdict-pass-inference)
- Audit Bug 5: `register-guards.sh` now checks both `.json`/`.jsonc`, writes to `plugin` (singular) key, and strips `//` comments before `json.loads()` (#fix-register-guards)
- Audit Bug 6: Dashboard `determine_task_state()` now reads `.state` file (source of truth) before falling back to artifact heuristic (#fix-dashboard-read-state)
- Audit Bug 7: `--can-edit` and `--scope-check` path prefix matching uses `os.sep` boundary to prevent sibling directory false matches (#fix-can-edit-path-prefix)
- Audit Bug 8: Removed wildcard CORS `Access-Control-Allow-Origin: *` from dashboard — replaced with security headers (`X-Content-Type-Options`, `X-Frame-Options`) (#fix-dashboard-cors-origin)
- Audit Bug 9: Stale-task detection uses `.state.lastedit` timestamp (touched on actual edit activity) instead of `.state` mtime (which only reflects phase transitions) (#fix-stale-task-mtime-proxy)
- Audit Bug 10: TEST_PLAN.md now correctly maps to `test_design` phase (was mapping to `implement`) in both `status.py` and dashboard `task.py` (#fix-test-plan-phase-mapping)
### Changed
- All prompts now use the canonical task path `{project}/.automaton/tasks/{task-name}/` (#standardize-task-path-conventions)