Summary
LoadConfigFromPath (pkg/state/config.go) resolves relative file: values by joining them against the config dir:
if b.File != "" && !filepath.IsAbs(b.File) {
b.File = filepath.Join(configDir, b.File)
}
For a value that escapes the config dir, e.g. file: ../shared/tool, the join produces a cleaned absolute-ish path that no longer round-trips back to the original literal. On save, relativizeFiles (added in #159) intentionally keeps such "outside the config dir" paths as-is (the ..-prefix / error guards), so the on-disk file: value can get cosmetically rewritten from ../shared/tool to its resolved form on a load→modify→save cycle.
Impact
Cosmetic only — the resolved path points at the same file, so resolution/behavior is unchanged. It's a churn/readability annoyance, not a correctness bug.
Possible fix
Preserve the user's original literal file: string through the round-trip when it resolves to the same target (e.g. remember the pre-resolution value, or relativize back even for .. paths when they still resolve under a known root).
Notes
Summary
LoadConfigFromPath(pkg/state/config.go) resolves relativefile:values by joining them against the config dir:For a value that escapes the config dir, e.g.
file: ../shared/tool, the join produces a cleaned absolute-ish path that no longer round-trips back to the original literal. On save,relativizeFiles(added in #159) intentionally keeps such "outside the config dir" paths as-is (the..-prefix / error guards), so the on-diskfile:value can get cosmetically rewritten from../shared/toolto its resolved form on a load→modify→save cycle.Impact
Cosmetic only — the resolved path points at the same file, so resolution/behavior is unchanged. It's a churn/readability annoyance, not a correctness bug.
Possible fix
Preserve the user's original literal
file:string through the round-trip when it resolves to the same target (e.g. remember the pre-resolution value, or relativize back even for..paths when they still resolve under a known root).Notes