Skip to content

Finish personal->home role rename (gitconfig.sh + fish prompt)#14

Merged
technicalpickles merged 1 commit into
mainfrom
fix/finish-home-role-rename
Jun 22, 2026
Merged

Finish personal->home role rename (gitconfig.sh + fish prompt)#14
technicalpickles merged 1 commit into
mainfrom
fix/finish-home-role-rename

Conversation

@technicalpickles

Copy link
Copy Markdown
Owner

What

Commit e3e5027 renamed DOTPICKLES_ROLE from personal to home but missed two consumers. This finishes the job and documents the why.

The two bugs

gitconfig.sh still had a personal) case and no home) case, so on a home machine it fell through to *) and exited with Unexpected role: home. Renamed the case to home).

The fish prompt showed personal even though the real role was home. Root cause: fish sources conf.d/*.fish before config.fish, but DOTPICKLES_ROLE was set in config.fish. conf.d/starship-init.fish reads the role at init time to build STARSHIP_CTX, so it always saw the var unset and baked in the personal fallback.

Fix:

  • Moved role detection to a new conf.d/dotpickles-role.fish (sorts before starship-init, so the role is set in time)
  • Removed the duplicate block from config.fish
  • Changed the stale or echo personal fallback to or echo home

Docs captured

  • config/fish/CLAUDE.md: new "Load Order Gotcha" section
  • doc/architecture.md: updated fish detection path + conf.d ordering note
  • ADR 0035: added gitconfig.sh and the starship fallback to the known-consumers list, plus a "set the role in conf.d, not config.fish" subsection

Verification

  • bash -n gitconfig.sh passes; case now matches home
  • Fish simulation: DOTPICKLES_ROLE resolves to home, prompt ctx is home
  • Could not run npm run lint (no node_modules in this env); pre-commit Prettier hook handles markdown formatting

🤖 Generated with Claude Code

Commit e3e5027 renamed DOTPICKLES_ROLE personal->home but missed two
consumers:

- gitconfig.sh still had a `personal)` case and no `home)` case, so it
  fell through to `*)` and exited "Unexpected role: home" on a home
  machine. Renamed the case to `home)`.

- config/fish/config.fish set DOTPICKLES_ROLE, but fish sources conf.d/
  before config.fish, and conf.d/starship-init.fish reads the role at
  init time to build STARSHIP_CTX. The role was always unset at
  prompt-build time, so the prompt baked in the `personal` fallback.
  Moved role detection to conf.d/dotpickles-role.fish (sorts before
  starship-init), removed it from config.fish, and fixed the stale
  `personal` fallback to `home`.

Captured the why in docs: a "Load Order Gotcha" section in
config/fish/CLAUDE.md, the conf.d ordering note + updated fish path in
architecture.md, and added the two missed consumers plus the conf.d
placement rule to ADR 0035.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@technicalpickles technicalpickles merged commit a2677d4 into main Jun 22, 2026
1 check passed
@technicalpickles technicalpickles deleted the fix/finish-home-role-rename branch June 22, 2026 02:35
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.

1 participant