Files
core/TODO.md
T
terminarandClaude Sonnet 5 e6b5324ad3 TODO: mark the yet core/paths migration done
yet's internal/store now resolves Home/CacheHome/BinDir via
core/paths (Application{Name: "yet", Kind: core.CLI}) instead of its
own $YETANO_HOME/os.UserConfigDir() logic, split across three
independently overridable categories. See yetano.dev/yetano/yet's
own commit for the actual migration and its new --system scope flag.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-20 15:14:58 +02:00

4.7 KiB

TODO / open architecture questions

Deliberately not resolved in this V1 (see spec section 63 and AGENTS.md's "no over-abstraction" rule) -- tracked here rather than solved speculatively.

Migration

  • Migrate yet onto core/paths/core/config. internal/config already used core/config/core/paths (shared Application{Name: "yetano"}). internal/store's own $YETANO_HOME (formerly os.UserConfigDir()/yetano, one monolithic root) has now been split across three independently overridable core/paths categories for Application{Name: "yet", Kind: core.CLI}: store.Home() (DataDir; store/packages/profiles/sources/credentials/trust-policy/deployments/ share-lib-etc), store.CacheHome() (CacheDir; the blob cache), and store.BinDir() (BinDir; managed command entrypoints, shared across every Yetano application). This is a deliberate default-path and env-var-shape change ($YETANO_HOME no longer exists; see YET_DATA_HOME/YETANO_DATA_HOME, YET_CACHE_HOME/ YETANO_CACHE_HOME, YET_BIN_HOME/YETANO_BIN_HOME instead) -- existing installations are not migrated (see yet's docs/install-store-and-profiles.md).
  • Once yet migrates, evaluate yasta, yamocir, yaiam, and yalsh-adjacent projects the same way (per the original task description) -- each on its own merits, not as a blanket sweep.

Platform tuning

  • FreeBSD's flavor (freebsd.go) is a best-effort first pass. Other BSD and Unix-family GOOS values (openbsd, netbsd, dragonfly, solaris, illumos, ...) currently fall back to the Linux flavor (flavor()'s default case) -- verified to compile and behave sensibly, not verified against each OS's actual convention. Adding a dedicated flavor table for one of them is a small, additive change (a new <os>.go file plus one case in flavor()), never a redesign.
  • macOS Desktop's RuntimeDir() (~/Library/Application Support/<App>/Runtime) is a placeholder -- macOS has no strong native convention for a GUI app's ephemeral runtime directory the way XDG_RUNTIME_DIR does on Linux. Revisit if a real Desktop consumer needs something more specific (e.g. a TemporaryItems-based location).
  • LogAliasDir() (spec section 39: ~/.local/log/<app> as a Unix convenience symlink target) is resolved but never created -- no symlink-creation API exists yet. Decide whether this is worth adding before any consumer actually wants it.

Windows

  • BinDir / installer strategy. paths.BinDir() for Windows resolves %LOCALAPPDATA%\Yetano\bin (user) / %PROGRAMDATA%\Yetano\bin (system) as locations, per spec section 19. Whether/how yet actually adds either to PATH, and how a package gets "activated" there (symlink vs. junction vs. copy/shim launcher, spec section 20) is explicitly out of scope for core -- path resolution and package activation stay separate concerns (spec section 20's own instruction).
  • The native SHGetKnownFolderPath fallback in knownfolders_windows.go has only been verified to compile (GOOS=windows go build/go vet), never run on an actual Windows host. It is a secondary fallback below environment variables, so a latent bug there would only matter in the edge case where APPDATA/LOCALAPPDATA/PROGRAMDATA are all unset in the process environment on real Windows.

Portability / distribution model

  • paths.WithRoot/YETANO_HOME-style portable mode: WithRoot exists and is tested, but there is no ecosystem-wide "portable install" concept wired up yet (spec section 41's "optional later: YETANO_HOME or portable mode").
  • The future yet package store model (spec sections 2/37/38: package store vs. application data vs. config vs. state vs. cache vs. runtime vs. executables, as distinct concepts) is intentionally not implemented here -- core/paths only provides the primitives (scoped, prioritized directories) a future store implementation would sit on top of.
  • Plugin/extension search paths: no dedicated category exists yet; paths.FindFile is generic enough that a caller can build one today (e.g. over DataSearchDirs() with a plugins/ suffix) without needing a new PathKind.
  • Atomic package activation, versioning/rollback for that future store: out of scope, same as above.

Central Yetano config

  • config.WithYetanoDefaults(true) resolves the shared ~/.config/yetano/ (or platform equivalent) via a pseudo-Application {Name: "yetano", Kind: core.CLI}. This is deliberately always CLI-shaped (XDG-flavored everywhere), even for a Desktop or Service caller, since it's a shared, admin/CLI-facing location -- revisit only if a real consumer needs the shared config to follow a different convention on macOS/Windows Desktop apps specifically.