Route profiles.OverridePath through the app-dir (follow-up from #50) #73

Closed
opened 2026-06-04 11:02:48 +00:00 by coilysiren · 1 comment
Owner

Problem (follow-up from #50)

#50 made the app-dir configurable and routed config/paths.go, the four ttl-cache packages, and the dispatch queue dir through config.SetAppDir. It deliberately left profiles.OverridePath alone because that path couples a second consumer-name axis the app-dir change does not cover.

profiles/profiles.go hardcodes the global profile config at ~/.coily/coily.yaml:

return filepath.Join(home, ".coily", "coily.yaml"), nil

This is the same consumer-collision class #50 fixed: a second consumer (ward) would read coily's ~/.coily/coily.yaml.

Ask

Route the directory through config.GlobalDir() (so it becomes ~/<app-dir>/coily.yaml) to close the collision. Decide separately what to do with the coily.yaml filename, which is its own consumer-name axis (it also appears in repocfg.Filename and repocfg.LocalDirName, which are meant to be consumer-supplied). Either:

  • thread a configurable global-config filename alongside the app-dir, or
  • accept <app-dir>/coily.yaml as the convention and scrub only the dir.

Update profiles tests (they assert ~/.coily/coily.yaml).

Cross-ref

Follow-up from #50. Same generic-library contract: no consumer name as a default in the package.

## Problem (follow-up from #50) #50 made the app-dir configurable and routed `config/paths.go`, the four ttl-cache packages, and the dispatch queue dir through `config.SetAppDir`. It deliberately left `profiles.OverridePath` alone because that path couples a second consumer-name axis the app-dir change does not cover. `profiles/profiles.go` hardcodes the global profile config at `~/.coily/coily.yaml`: ```go return filepath.Join(home, ".coily", "coily.yaml"), nil ``` This is the same consumer-collision class #50 fixed: a second consumer (ward) would read coily's `~/.coily/coily.yaml`. ## Ask Route the **directory** through `config.GlobalDir()` (so it becomes `~/<app-dir>/coily.yaml`) to close the collision. Decide separately what to do with the `coily.yaml` **filename**, which is its own consumer-name axis (it also appears in `repocfg.Filename` and `repocfg.LocalDirName`, which are meant to be consumer-supplied). Either: - thread a configurable global-config filename alongside the app-dir, or - accept `<app-dir>/coily.yaml` as the convention and scrub only the dir. Update `profiles` tests (they assert `~/.coily/coily.yaml`). ## Cross-ref Follow-up from #50. Same generic-library contract: no consumer name as a default in the package.
coilysiren added
P3
and removed
P2
labels 2026-06-17 08:39:56 +00:00
Author
Owner

🔒 Reserved by ward agent claude — container ward-cli-guard-issue-73-claude-3ff320a2 on host kais-macbook-pro.local is carrying this issue (reserved 2026-06-18T07:30:50Z). Concurrent ward agent runs are blocked until it finishes or the reservation goes stale (2h0m0s TTL); --force overrides.

— Claude (she/her), via ward agent

<!-- ward-agent-reservation --> 🔒 Reserved by `ward agent claude` — container `ward-cli-guard-issue-73-claude-3ff320a2` on host `kais-macbook-pro.local` is carrying this issue (reserved 2026-06-18T07:30:50Z). Concurrent `ward agent` runs are blocked until it finishes or the reservation goes stale (2h0m0s TTL); `--force` overrides. <!-- ward-agent-signature --> — Claude (she/her), via `ward agent`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
coilyco-flight-deck/cli-guard#73
No description provided.