Fix tasks server /status browse links for legacy master_plans paths
Problem
On the tasks server /status page, every task row linked to /browse/master_plans/workstreams/<ws>/tasks/<file>.md. After the repo rename to tasks/workstreams/..., those paths 404. Nav “Browse tasks” (/browse/tasks) was fine; the bug was task-row hrefs derived from stale task_path values in the heartbeat snapshot.
Context
- Server:
tasks/tools/tasks_server.py(_task_browse_href,/browse/{path}). - Heartbeat still had
master_plans/prefixes in some environments while markdown on disk is undertasks/.
Possible Solutions
- Recommended — server-side remap: If
task_pathresolves to a missing file and the path starts withmaster_plans/, trytasks/+ suffix when that file exists. Only emit an<a href>when a target file exists (avoids confident 404s). - Normalize paths only in the snapshot writer: requires all heartbeats upgraded before links work everywhere.
Plan
- Add
_resolve_task_browse_target()and use it from_task_browse_href(). - Regression test with snapshot
task_pathundermaster_plans/...and file on disk undertasks/.... - Ensure existing tests create stub
.mdfiles when they assert browse hrefs (links now require an existing file).
Implementation Progress
- Implemented remap and existence check in
tasks/tools/tasks_server.py. - Added
test_status_page_remaps_legacy_master_plans_pathsand_touch_task_fileshelper intests/core/test_tasks_server.py. - Restart
just tasks serve(or your tasks server process) to pick up code changes.
QA Exploration
scripts/qa-explorewith--url http://127.0.0.1:8005/statustimed out (no workersummary.md); completed scripted QA instead: fetched/status, enumeratedhrefs,curlchecked each — all task links were 404 undermaster_plansbefore the fix.- Cursor browser MCP could not load
127.0.0.1:8005(stayedabout:blank); local curl validation used. -
Artifacts:
.qa-explorer/runs/20260323T222012-42860/summary.mdandsummary.json(backfilled). -
[x] QA exploration completed (or N/A for non-UI tasks)
Review Feedback
- [ ] Review cleared