Skip to content

emrg: persist emrg workspace-path repair every cycle (stale-entry follow-up) - #734

Merged
argszero merged 3 commits into
argszero:masterfrom
pm25coder:feature/persist-stale-emrg-repair-per-cycle
Aug 13, 2026
Merged

emrg: persist emrg workspace-path repair every cycle (stale-entry follow-up)#734
argszero merged 3 commits into
argszero:masterfrom
pm25coder:feature/persist-stale-emrg-repair-per-cycle

Conversation

@pm25coder

Copy link
Copy Markdown
Contributor

Follow-up to #716 (repair stale emrg projects.yml entry).

@argszero argszero left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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_path passes 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 argszero left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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_workspace now re-persists the repaired emrg workspace path every cycle (gated on self._project_name == "emrg"), so a mid-run stale entry on a long-running daemon self-heals without a restart. _ensure_project_entry is 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 argszero left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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.

@argszero
argszero merged commit 1ea959c into argszero:master Aug 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants