daily-fix: task.py audit --repair + reconcile 13 drifted registry tasks
kind: infra#wf-fix#wf-fix-fp:b8b8ac361292#daily-auto-filed
track:Highlight text on any card (body, plan, or an event) to anchor a comment, or leave a whole-task comment here. Mention @claude to summon a reply.
No comments yet.
Overview / Motivation
Auto-filed by the /daily 2026-06-28 problem sweep (route 2 — behavior change, files for independent review). Found while running the nightly living_docs.py check drift pass.
Goal
Add a registry repair/rebuild mode to task.py audit (and the underlying task_workflow) that reconciles tasks/REGISTRY.json to the on-disk task layout, and reconcile the 13 currently-drifted tasks.
Workflow gap
- Bug observed:
uv run python scripts/task.py auditis REPORT-ONLY. Tonight it reported 13 registry/filesystem inconsistencies it cannot fix:#696registry path saystasks/approved/696but the task is attasks/completed/696; and#698, #699, #700, #701, #702, #703, #704, #705, #706, #707, #708, #709are on disk (mostlycompleted/, twoarchived/, oneplanning/) but absent from the registry entirely. Confirmed:697/715are present inREGISTRY.jsonbut706is not. - Why it is a workflow gap:
task.pyis the canonical task-state API andREGISTRY.jsonis the index the dashboard list view + every registry-reader consumes. Drifted/unregistered terminal tasks are permanently invisible there (terminal tasks are never re-mutated, so they never self-heal), and the stale#696PATH crashesliving_docs.py check(now a load-bearing nightly/dailystep per #713).auditnames the problem but offers no reconcile path. - Likely cause: the documented concurrent-repo-root-committer hazard — a
git pull --rebaseflattened away aREGISTRY.jsonupdate from a parallel session (the same class as #711). Worth confirming. - Confidence (emitter): medium
Proposed change (refine in planning)
- Add
task.py audit --repair(or atask_workflow.reconcile_registry()reachable via the canonical API, flock-guarded + single commit) that, for each drift class: rewrites a stalepathto where the task actually is on disk, and adds an on-disk-but-unregistered task to the registry with its disk status. Report what it changed; never delete a task. - Run it once to reconcile the current 13.
- Consider a watcher/cron hook so future drift is auto-reconciled (or at least surfaced) rather than silently accumulating.
Scope / surfaces
- Primary:
scripts/task.py,src/explore_persona_space/task_workflow.py - Add/extend a test under
tests/test_task_workflow*.pypinning the reconcile behavior.
Constraints / invariants
- Workflow-surface only. Registry reconcile points entries to where tasks ALREADY are on disk — it must never move a task or change a task's status.
scripts/workflow_lint.py --check-references+ ruff on touched files pass.- Runs under
EPM_WORKFLOW_FIX_SESSION=1— do NOT auto-route its own subagents' workflow-fix candidates (recursion guard).
Provenance
- workflow_fix_target: scripts/task.py, src/explore_persona_space/task_workflow.py
- fingerprint: b8b8ac361292
Activity