fix(minder): report discovered sessions without a GitLab remote

Description

Follow-up to !4396 (merged), which reports hook-synced sessions that ran in a folder where glab could not identify a GitLab project. Codex and Cursor sessions that discovery finds in such a folder were still skipped with only a debug line, so glab minder doctor said nothing about them.

  • discoverSessions now reports them under "not synced", with the same reason as hook sessions: <agent> sessions in a folder where glab could not identify a GitLab project. The reason moves into withoutRemoteReason, which both paths use.
  • Discovery finds these sessions again on every run, so one is only reported while its transcript changed in the last 24 hours. That is the same window after which a hook session without a project is completed.

Related to https://gitlab.com/gitlab-org/cli/-/work_items/8722

How has this been tested?

TestSyncAll_SkipsDiscoveredSessionsOnOtherHosts now checks that the reason is reported, and TestSyncAll_DoesNotReportIdleDiscoveredSessionOnOtherHost checks that an idle session is not. The first fails without the change.

go test ./internal/commands/govern/audit/sync/...
Edited by Jean van der Walt

Merge request reports

Loading
Loading