Skip to content

fix(desktop): dedupe aliased profile databases - #68303

Open
deniqlab wants to merge 1 commit into
NousResearch:mainfrom
deniqlab:fix/desktop-sidebar-session-duplication
Open

fix(desktop): dedupe aliased profile databases#68303
deniqlab wants to merge 1 commit into
NousResearch:mainfrom
deniqlab:fix/desktop-sidebar-session-duplication

Conversation

@deniqlab

Copy link
Copy Markdown
Contributor

Summary\n- Deduplicate profile targets by physical state.db before aggregating /api/profiles/sessions and /api/profiles/sessions/sidebar\n- Preserve first-seen ownership tagging and keep distinct profile databases untouched\n- Add regressions for aliased and distinct profile databases\n\n## Verification\n- python3.11 -m pytest tests/hermes_cli/test_web_server.py -k 'profiles_sessions_dedupes or profiles_sessions_keeps_distinct_profile_databases' -q\n- python3.11 -m pytest tests/hermes_cli/test_web_server.py -q\n- python3.11 -m compileall hermes_cli/web_server.py tests/hermes_cli/test_web_server.py\n- git diff --check\n\nCloses #68299

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard comp/dashboard Web dashboard / control panel UI (dashboard/, landing) area/sessions Session lifecycle, resume, persistence, history area/profiles Multi-profile isolation, HERMES_HOME scoping sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state labels Jul 21, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Related to #50086: both dedupe aliased physical state.db targets. This PR additionally applies the protection to the sidebar endpoint, so these are overlapping alternatives rather than a duplicate relationship.

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for covering both aggregate session paths. The aliased-state.db premise is still live on current main: hermes_cli/web_server.py:4905-4942 and :5063-5090 each scan every listed profile database independently.

Problems

  • The sidebar assertions added in d90a2a529e4 expect sidebar["recents"]["total"] and profile_totals. Current main returns only sessions and profiles_truncated for recents at hermes_cli/web_server.py:5104-5115; those assertions must be updated during salvage.

Suggested changes

  • Preserve the physical-file dedupe for both target loops, then assert the aliased session appears once in sidebar["recents"]["sessions"] with the first profile's ownership tag.

Automated hermes-sweeper review.

@teknium1 teknium1 added the sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform label Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/profiles Multi-profile isolation, HERMES_HOME scoping area/sessions Session lifecycle, resume, persistence, history comp/cli CLI entry point, hermes_cli/, setup wizard comp/dashboard Web dashboard / control panel UI (dashboard/, landing) P3 Low — cosmetic, nice to have sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants