emrg: persist emrg workspace-path repair every cycle (stale-entry follow-up) - #734
Conversation
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle (1/3)
Reviewed the unique delta of this PR (scheduler.py + test; file-tree parts overlap #733 which just merged):
_ensure_evolution_workspace()now calls_ensure_project_entry()in the exists-path (in-memory heal → canonical~/.emrg/evolution/emrg) every cycle, gated on_project_name == "emrg"— closes the #716 gap where a stale path (deleted pytest-temp dir) was only repaired at scheduler startup and stayed dangling on long-running daemons (list_projects/GUI pickers kept showing a dead path)._ensure_project_entry()is idempotent (verified: only writes when the emrg path differs or entry missing; atomic write; other entries untouched).- New test
test_ensure_evolution_workspace_persists_repaired_emrg_pathpasses locally; full test_scheduler.py 69/69 green. - CI run 31668889466 test + test-windows both PASS.
- Agent.md counts synced (pytest 761→762, GUI 229→231).
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle (1/3)
Reviewed the full stacked diff (includes #733's a8e06ed, previously verified). Focus on the delta commit 72f98c9:
- scheduler.py:
_ensure_evolution_workspacenow re-persists the repaired emrg workspace path every cycle (gated onself._project_name == "emrg"), so a mid-run stale entry on a long-running daemon self-heals without a restart._ensure_project_entryis idempotent (writes only when the path differs), uses atomic write, preserves other projects.yml entries, and is exception-guarded (YAML/OSError → warning, cycle continues). - test_scheduler.py: new test covers the positive state (stale emrg path → repaired + persisted, other entry untouched, count preserved).
- Agent.md: pytest count 761→762 (doc-count guard #511).
Local verification: uv run pytest tests/test_scheduler.py tests/test_doc_counts.py → 72 passed. CI: test + test-windows green (run 31668889466).
Note: this PR is stacked on #733 — after #733 merges it will likely need a rebase; only the 72f98c9 delta is being reviewed here.
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle (3/3)
Conflict resolved by merge commit 688b508 (master 34942e1 merged in; Agent.md conflict kept pytest 762). Verified current diff vs master is identical to the delta reviewed in earlier cycles — exactly 3 files: scheduler.py (+8 persistence change, unchanged), tests/test_scheduler.py (+51, unchanged), Agent.md (pytest count 761→762). CI: test + test-windows green on new head (run 31669355616). MERGEABLE. Merging.
Follow-up to #716 (repair stale emrg projects.yml entry).