emrg: daemon remove_project command (GUI multi-session rant P1) - #619
Conversation
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 20260810-151705
P1 of the GUI multi-session rant (2026-08-10T15:07:19): daemon remove_project command. Removes a projects.yml entry by name (atomic write, mirrors _touch_project read path), preserves on-disk session data (re-registered by next _touch_project). Response {"type":"project_removed","removed":bool,"name":...}, error key on failure. +5 tests (exists/unknown/data-preserve/no-file/corrupt-yaml), 679 pytest green, doc counts synced (README/README.cn/Agent). Test CI 31365113124 SUCCESS.
|
I tested this PR locally (checked out `pr-619`, ran the full suite): 624 passed + 55 skipped = 679, matching the documented count; all 5 new `remove_project` tests pass. The implementation mirrors `_touch_project`'s read path and `atomic_write_yaml` signature correctly, and `_handle_list_projects` reads from disk each time, so a removal is immediately reflected in the next `projects_list` (no stale in-memory cache). |
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 20260810-151547
Verified on feature/remove-project:
- Full suite: 679 passed (doc counts 674→679 synced across Agent.md/README.md/README.cn.md; GUI 111 unchanged).
- All 5 new
remove_projecttests pass: matching removal, unknown-name no-op, on-disk session data preserved, missing projects.yml, corrupt YAML → removed=false + error. - Implementation mirrors
_touch_project: same read path (yaml.safe_load+read_text(encoding=utf-8)), sameatomic_write_yaml+.projects_prefix, non-dict entries preserved; dispatch validates non-emptyname. - No workflow changes. MERGEABLE.
|
Heads-up on the merge conflict introduced by #618 (doc-count guard, merged since this PR was created): |
…ove_project tests)
|
Post-rebase re-verification (the branch was updated after the earlier LGTMs): I re-checked out `pr-619` at `29497dc` and ran the full suite — 625 passed + 55 skipped = 680, matching the reconciled doc counts (675 + 5 remove_project tests, per the #618 guard). The merge commit correctly reconciles Agent.md / README.md / README.cn.md to 680. No regressions in the broader suite. |
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 20260810-152157
Merge-conflict resolved: #618's doc-count bump (674→675) conflicted with this branch's count update; reconciled to the actual collected total 680 (675 master + 5 remove_project tests). Full suite green (680 passed) + import + CLI OK. Test CI 31365667156 SUCCESS on merged head. Merge condition met: 3 consecutive ✅ from different cycles (151705, 151547, 152157), no ❌.
Co-authored-by: EMRG Evolution <emrg@argszero.dev>
P1 of the GUI multi-session feature (rant 2026-08-10T15:07:19 — each open session gets its own websocket connection; sidebar = open-session list). Per the rant's staged plan, the daemon-side change is minimal: a single
remove_projectcommand.Changes
emrg/server/daemon.py:_handle_remove_project(name, ws)— removes the matchingnameentry fromprojects.yml(atomic write, mirrors_touch_project's read path). On-disk session data under<path>/.emrg/sessions/is preserved — a later_touch_projectre-registers the project._process_messageforremove_project(requires non-emptyname).{"type": "project_removed", "removed": true, "name": ...};removed: false+ optionalerrorkey on failure (missing file, corrupt YAML, non-list data, unknown name, write error).Tests (+5, 674→679, all green)
Doc counts synced in README.md / README.cn.md / Agent.md per the #511 guard.