fix(minder): mention and uninstall the local session records

Description

glab keeps a record of each agent session under gaig in its configuration directory: the session ID, the agent, the transcript path and a sync cursor, plus cached agent identities, the agent lists and the fallback sync's status. Since !4396 (merged) that includes sessions outside GitLab repositories, which are never uploaded. Setup didn't mention these records, and glab minder setup --uninstall left them behind for good, because only the fallback sync job it removes cleans them up.

  • The setup prompt now says that glab keeps a local record of each agent session, including sessions outside GitLab repositories.
  • --uninstall removes the gaig folder last, after the job and the hooks that write to it, and lists it in its prompt. The help text and flag description say so too.
  • A gaig folder on its own, for example left by an earlier uninstall, is now something to uninstall rather than "Nothing to uninstall".
  • If the Claude Code settings or the OpenCode plugin couldn't be read, their hooks stay installed and could write new records, so the records are kept for a later uninstall. Only a missing folder counts as having no records, and any other error is reported as a warning.

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

How has this been tested?

New tests cover removing the records with the rest of the setup, removing records left on their own, and keeping them when the hooks couldn't be read. Several uninstall tests now use their own config directory, so the package's shared test config can't make them depend on each other's order.

go test ./internal/commands/govern/setup/... -shuffle=on

Merge request reports

Loading
Loading