Skip to content

Navigation Menu

Sign in
Sign up

fix(identifier): make session detection deterministic - #18

Open
Rahul-2k4 wants to merge 2 commits into
sandptel:main from
Rahul-2k4:rahul/cosmolith-session-detection-20260811
Open

fix(identifier): make session detection deterministic #18
Rahul-2k4 wants to merge 2 commits into
sandptel:main from
Rahul-2k4:rahul/cosmolith-session-detection-20260811

Conversation

@Rahul-2k4

@Rahul-2k4 Rahul-2k4 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Harden get_current_session() so empty or whitespace-only environment markers are ignored, and add deterministic tests around that logic.

The old check treated any set variable as a hit, including empty values, which made detection flaky and order-dependent. Tests now serialize env mutation with a mutex and restore values afterward. COSMIC-on-Sway is reported as Sway so the compositor path matches the backend that is actually running.

Fixes #1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Improve session detection robustness in identifier::get_current_session()

1 participant

AltStyle によって変換されたページ (->オリジナル) /