Skip to content

docs: explain the profile model and why 'default' stays - #176

Merged
piekstra merged 1 commit into
mainfrom
docs/profile-model
Aug 12, 2026
Merged

docs: explain the profile model and why 'default' stays#176
piekstra merged 1 commit into
mainfrom
docs/profile-model

Conversation

@piekstra

Copy link
Copy Markdown
Contributor

Why

Closes out the headline question from the credential-UX review: should the default profile exist at all? It was reconsidered seriously — the incident that prompted it was real (a silently-stale active profile misread as "gro is dead").

Decision: keep default; fix the failure mode mechanically

  • <service>/default is the codified family-wide convention (cli-common working-with-secrets.md §2.1, credstore.DefaultProfile — same as atlassian-cli/default). Removing or renaming it is a breaking change for every existing install and diverges gro from its siblings, for no mechanical gain.
  • Requiring an explicit profile on every invocation punishes the single-account majority to protect the multi-account minority.
  • Naming profiles after accounts can't be the default: emails aren't valid ref segments ([A-Za-z0-9_-]), and the account is only known after authentication. Users who want purposeful names already have them: gro init --profile work.
  • The actual failure mode was never the name — it was an invisible pointer that silently went stale. That's now fixed mechanically (feat: profiles list/use, attributed auth errors, init target naming, mail list #175 / google-cli-common v0.3.0): profiles list (visibility), attributed auth errors (blames the right profile, points at the list), init target naming + --profile (no silent overwrites), profiles use (deliberate binding).

What

A README section ("Profiles: how gro handles multiple Google accounts") making the model explicit: profiles are independent; the active binding is visible and deliberate; adding an account never overwrites one. Placed directly above the existing per-invocation --ref section.

Docs only; no code changes.

Closes out the headline question from the credential-UX review: should the
'default' profile exist at all? Decision: yes - documented here so the
reasoning survives.

- '<service>/default' is the codified family-wide convention
  (cli-common working-with-secrets.md par.2.1, credstore.DefaultProfile);
  removing or renaming it breaks every existing install and diverges gro
  from its siblings for no mechanical gain.
- Naming profiles after accounts can't be the default: emails aren't valid
  ref segments ([A-Za-z0-9_-]), and the account is only known AFTER auth.
  Users who want purposeful names have them: init --profile work.
- The actual failure mode was never the name - it was an invisible pointer
  that silently went stale. That is fixed mechanically: profiles list
  (visibility), attributed auth errors (blame the right profile), init
  target naming + --profile (no silent overwrites), profiles use
  (deliberate binding).

This section makes the model explicit for users: profiles are independent,
the active binding is inspectable and deliberate, adding never overwrites.

@piekstra-dev piekstra-dev left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated PR Review

Reviewed commit: c8b12737f08d
Profile: reviewer - Posting as: piekstra-dev

Summary

Reviewer Findings
documentation:docs 0

Reviewer Coverage

Reviewer Status Inspected Skipped Constraints
documentation:docs complete_broad README.md unavailable The new section's claim that profile names allow only letters, digits, -, and _ reflects a validation rule presumed to live in the sibling cli-common repo, which is not checked out here; not independently verifiable from this repo's source.

0 PR discussion threads considered. 0 summarized; 0 resolved.


Completed in 1m 46s | $0.81 | claude-sonnet-5 | cr 0.10.268
Field Value
Model claude-sonnet-5
Reviewers documentation:docs
Engine claude_cli · claude-sonnet-5
Reviewed by cr · piekstra-dev
Duration 1m 46s wall · 1m 35s compute
Cost $0.81
Tokens 44 in / 7.3k out

Per-workstream usage

Workstream Model In Out Cache read Cache create Cost Duration
orchestrator-selection claude-sonnet-5 6 655 58.9k 11.9k $0.10 14s
documentation:docs claude-sonnet-5 32 6.3k 737.4k 47.2k $0.60 1m 12s
orchestrator-rollup claude-sonnet-5 6 366 65.8k 14.0k $0.11 9s

@piekstra
piekstra merged commit 27af786 into main Aug 12, 2026
11 checks passed
@piekstra
piekstra deleted the docs/profile-model branch August 12, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants