Menu

#399 chore: remove retired daemon/service artifacts

closed
nobody
None
2026-07-07
2026-07-07
Anonymous
No

Originally created by: Akarsh-Hegde

Summary

Four groups of dead references from earlier retirements are excised in one pass. All dead references go away. One deliberate behavior change: removing cleanup_legacy_ui / retire_legacy_ui_server drops the one-time purge of a leftover pre-Next-fold com.meridiona.ui launchd agent — a passive zombie (dev-only port, no clash), acceptable for the current actively-updating pilot base. The active-conflict purges (screenpipe, mlx-server) are kept.

com.meridiona.ui (retired standalone Node dashboard)

  • scripts/meridian-cli.sh — drop LABEL_UI, the doctor's ui plist row, and _dev_stop_prod_ui
  • scripts/install-from-bundle.sh — drop retire_legacy_ui_server fn + call site
  • tray/src-tauri/src/backend_install.rs — drop cleanup_legacy_ui fn + call site
  • tests/install/test_plist_lint.sh + tests/install/test_plist_render.sh — strip the ui-plist blocks (files stay; they still cover daemon + screenpipe plists)
  • src/health/{ui,platform}.rs — retouch docstrings that named com.meridiona.ui

ui.tar.gz

  • Drop the ui.tar.gz entry from npm/meridian-darwin-arm64/package.json files[] — bundle hasn't shipped it since the tray-embed cutover.

SCREENPIPE_DB (vestigial post in-process capture)

  • src/config.rs — drop screenpipe_db field, env parse, default, tracing site, struct init, and the screenpipe_db_uri() method
  • Trim the four config tests to remove SCREENPIPE_DB set/remove/assert (tests keep their MERIDIAN_DB coverage)
  • scripts/com.meridiona.daemon.plist — drop <key>SCREENPIPE_DB</key> entry
  • .env.example — drop the commented line
  • TESTING.md §3 — rewrite from "screenpipe DB compatibility" to "capture DB compatibility" (empty capture + WAL)
  • tray/src-tauri/src/commands/setup.rs — retouch the docstring line referencing the old proxy check

coding_agent_indexer

Intentionally left alone. What looked like cleanup candidates are all load-bearing:

  • src/coding_agent_session_ingest/db.rs's CATEGORY_METHOD = "coding_agent_indexer" is the DB row provenance label — data continuity.
  • Migration comments in 025-027 are immutable historical text.
  • services/scripts/install-claude-hook.sh's OUR_MARKERS tuple + scripts/uninstall-daemon.sh's legacy boot-out loop are functional upgrade cleanups that still purge pre-port installs.

Test plan

  • [x] cargo check --workspace clean
  • [x] cargo clippy --workspace -- -D warnings clean
  • [x] cargo test -p meridian --lib config:: — 17 config tests pass
  • [x] bash tests/install/test_plist_lint.sh — daemon + screenpipe plists lint
  • [x] bash tests/install/test_plist_render.sh — daemon + screenpipe plists render + lint
  • [ ] Manual: fresh install still boots (no dependence on the removed cleanup helpers)

🤖 Generated with Claude Code

Related

Tickets: #416

Discussion

  • Anonymous

    Anonymous - 2026-07-07

    Originally posted by: coderabbitai[bot]

    [!IMPORTANT]

    Review skipped

    Auto reviews are disabled on base/target branches other than the default branch.

    Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.


    ⚙️ Run configuration

    Configuration used: Organization UI

    Review profile: ASSERTIVE

    Plan: Pro Plus

    Run ID: 54031b91-082f-4061-83a9-621c4fa7e748

    You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

    Use the checkbox below for a quick retry:
    - [ ] 🔍 Trigger review

    ✨ Finishing Touches
    🧪 Generate unit tests (beta) - [ ] Create PR with unit tests - [ ] Commit unit tests in branch `chore/remove-retired-artifacts`

    Comment @coderabbitai help to get the list of available commands.

     
  • Anonymous

    Anonymous - 2026-07-07

    Originally posted by: adityaharishch

    Reviewed the diff and cross-checked the PR branch (chore/remove-retired-artifacts, commit 818311b0) for dangling references to everything it deletes. Overall this is clean, well-scoped dead-code removal — one real doc-staleness issue and one low-severity behavioral note.

    Findings

    • 🟡 CLAUDE.md is now stale (not touched by this diff): the Environment Variables table still has a row for SCREENPIPE_DB that says "Vestigial after the Bucket-2 cutover... Still parsed into Config with a default; slated for removal" (CLAUDE.md:205). After this PR, screenpipe_db is fully removed from Config (src/config.rs) — the row is now factually wrong (nothing parses it anymore) and should either be dropped or reworded to reflect that removal already happened. Since CLAUDE.md is loaded as binding instructions for every future agent/session on this repo, leaving it inaccurate will actively mislead future work. (The other com.meridiona.ui mention at CLAUDE.md:131-132 is fine — it's already phrased in the past tense describing the earlier Next-fold retirement, not affected by this PR.)

    • 🟢 Low-severity: cleanup_legacy_ui removal from backend_install.rs/install-from-bundle.sh drops the one-time zombie-agent purge for pre-Next-fold bundle installs, while the sibling cleanup_legacy_screenpipe/cleanup_legacy_mlx_server purges are kept. If any install has been fully dormant (no updates) since before the Next-fold and jumps straight to a post-#399 build, it will no longer get its leftover com.meridiona.ui launchd agent booted out — a minor zombie-process risk rather than a functional break. Given the Next-fold long since shipped and the small/actively-updating pilot user base, this is probably an acceptable one-time cleanup to finally retire, just flagging for awareness since the PR body's "all live behavior preserved" claim doesn't quite cover this edge case.

    Verified clean (no dangling references found)

    • com.meridiona.ui.plist itself was already deleted in an earlier commit (03323996) — this PR actually fixes a pre-existing dangling reference in tests/install/test_plist_lint.sh/test_plist_render.sh, which referenced a plist file that no longer existed on pre-main before this PR. Nice catch.
    • Grepped the post-PR tree for LABEL_UI, retire_legacy_ui_server, cleanup_legacy_ui, _dev_stop_prod_ui, SCREENPIPE_DB, screenpipe_db/screenpipe_db_uri, and ui.tar.gz — all remaining hits are either historical/changelog prose or comments explicitly documenting that the artifact is no longer shipped (scripts/meridian-npm-setup.sh, scripts/package-release.sh, scripts/verify-release-bundle.sh), not functional dependencies.
    • scripts/uninstall-daemon.sh has no UI-agent references to clean up.
    • The src/etl/text_filter/tests.rs:134 sample log string "...config loaded screenpipe_db=..." is just fixture text for a noise-filter regex test, unrelated to the actual tracing::info! output — harmless, not worth changing.

    Assessment: Solid, well-verified cleanup PR. Fix the CLAUDE.md SCREENPIPE_DB table row before/after merging; the zombie-agent note is optional context, not a blocker.

     
  • Anonymous

    Anonymous - 2026-07-07

    Originally posted by: Akarsh-Hegde

    Thanks — both points addressed.

    🟡 Stale CLAUDE.md SCREENPIPE_DB row (fixed in 52f01ba7)
    Dropped the env-var table row entirely (the var + Config::screenpipe_db field are gone, so it's not "slated for removal" — it's removed), and reworded the capture-source note at the bottom of the Capture section from "SCREENPIPE_DB is now vestigial" to "the SCREENPIPE_DB env var + Config::screenpipe_db field have been removed." Good catch — CLAUDE.md being wrong would actively mislead future sessions.

    🟢 cleanup_legacy_ui / retire_legacy_ui_server removal (zombie-agent purge)
    You're right that this isn't strictly "all live behavior preserved" — I'll correct that overclaim in the PR body. The reasoning for going ahead with the removal:

    • The sibling cleanup_legacy_screenpipe / cleanup_legacy_mlx_server purges are kept because those agents contend for a live resource (Screen Recording prompt, port 7823) — an active conflict. The com.meridiona.ui agent is a passive zombie (its port 3939 is dev-only, no clash), so a leftover is wasted RAM, not a functional break.
    • It only affects an install that has stayed fully dormant since before the Next-fold and then jumps straight to a post-#399 build — for the current small, actively-updating pilot base, everyone has already upgraded through a version that ran the purge.

    If you'd rather keep the one-time purge as belt-and-suspenders, I'm happy to restore just those two functions (they're cheap and self-limiting) and keep the rest of the dead-reference removal — your call. Otherwise I'll leave them retired and fix the PR-body wording.

     
  • Anonymous

    Anonymous - 2026-07-07

    Ticket changed by: Akarsh-Hegde

    • status: open --> closed
     

Log in to post a comment.