emrg: repair stale emrg projects.yml entry + harden scheduler tests against home pollution - #716
Conversation
…ainst home pollution
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle
Independent re-verification on head b99cd21 (3 files, 78+/12-, repair stale emrg projects.yml entry + harden scheduler tests against home pollution):
- Stale-entry repair —
_ensure_self_evolution_tasknow repairs an emrg entry whose path is a dead dir (2026-08-12 incident: pytest temp dir leaked into ~/.emrg/projects.yml, deleted after suite → dangling entry shown in list_projects/GUI pickers forever). Real dev checkouts (is_dir() True) are preserved as-is; dead paths are rewritten to the canonical EVOLUTION_CWD/emrg with last_active refreshed. Only touches the emrg entry — other entries untouched (test asserts both). - Test hardening —
test_ensure_evolution_workspace_dev_repo_untouchednow keeps config_dir patched through _ensure_evolution_workspace() (its clone branch calls _ensure_project_entry → writes config_dir()/projects.yml — an unpatched call would pollute the real ~/.emrg/projects.yml). Preserves-existing test now uses a real dir (was a fake /dev path). +1 new stale-repair test. - Regression — ran scheduler tests with master merged (-X theirs): 68 passed (was 67, +1); code applies cleanly.
⚠️ Merge conflict (trivial) — PR is currently DIRTY: Agent.md pytest count says 745 but master is 746 after #714 merged. Code has no conflict (only the Agent.md count line). Please rebase on master (or push a fix bumping Agent.md 745→746) — then it'll be MERGEABLE.
No code issues found.
argszero
left a comment
There was a problem hiding this comment.
|
Re-opening to re-trigger CI (pull_request push event was dropped — #644). Will re-open immediately. |
…748 (maintainer push)
|
Maintainer push: resolved the Agent.md conflict with master (test count 745 → 748 after #717 merged). The PR was previously unmergeable, which is why no CI checks had fired. I merged master into the fork branch (commit |
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle (1st)
Verified on the merged head 1b50d5e (master 0b03e41 merged into the fork branch to clear the Agent.md conflict):
- Full suite: 748 passed (master 747 + #716's new stale-repair test), incl.
test_ensure_self_evolution_task_repairs_stale_project_entryand the hardened home-pollution guards - doc-count guard: 3/3 ✓ (Agent.md count updated 745 → 748 in the merge)
- Import + CLI checks green
- CI: run 31592968285 PASS (the maintainer push unblocked
pull_requestchecks — previously zero checks due to the conflict)
No code issues found; merge-ready.
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle (2nd)
Re-verified on the synced head 1b50d5e (master merged in by maintainer push to resolve the Agent.md count conflict — author's scheduler.py + test changes identical to b99cd21):
- Diff vs master: 3 files, 78+/12- — scheduler.py stale-entry repair (dead path → canonical EVOLUTION_CWD/emrg, real checkout dirs preserved, only the emrg entry touched), test hardening (config_dir patched through _ensure_evolution_workspace to prevent pytest-temp leakage into real ~/.emrg/projects.yml), +1 new stale-repair test, Agent.md count 748.
- Full suite: 748 passed locally (~13s); scheduler/evolution subset 77 passed.
- CI: Test run 31592968285 SUCCESS on the new head (pull_request checks finally registered after the sync).
No issues found. One more ✅ from a different cycle needed before merge.
Summary