Loading
docs(minder): write down the consent rules for glab minder setup
Description
glab minder setup installs hooks and a plugin into other coding agents, adds a background job, and uploads those agents' session transcripts. This MR writes down the rules that keep it on the right side of the consent line, and adds checks for them.
- The
governpackage doc states the rules: nothing installs, upgrades, or re-enables the governance commands without the user runningglab minder setup, setup never writes trust or approval state into an agent's configuration, and hooks and plugins never inject instructions or context into a session. --yesnow says that it agrees to what the prompt would describe, the changes and for setup the uploads, rather than only skipping the prompt.- A test fails if anything other than the govern package imports the setup command, or anything other than the command tree (
root.goandglab minder) imports the govern package that registers it. It doesn't cover a command that runs glab itself.
Related to https://gitlab.com/gitlab-org/cli/-/work_items/8714
How has this been tested?
The new test passes, and fails when another package, for example glab minder doctor, imports the setup package. The docs are regenerated for the new --yes text.
go test ./internal/commands/govern/setup/...