You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cli(chore[privacy]): Contract home paths in JSON/NDJSON output (#475)
why: JSON/NDJSON output had inconsistent path representation where
workspace_root used tilde notation (~/code/) but path used absolute paths
(/home/username/code/repo). This exposed usernames, reduced portability
between machines, and created confusing inconsistency in the API.
what:
- Apply contract_user_home() to path fields in list, status, and sync commands
- JSON/NDJSON now consistently uses ~/... for all home directory paths
- Add 6 comprehensive parametrized tests using NamedTuple pattern
- Document as breaking change in CHANGES with migration guide
- Human-readable output unchanged (only JSON/NDJSON affected)
refs: breaking change - automation consuming JSON/NDJSON output may need
to expand ~ to absolute paths. Most tools handle tilde expansion automatically.
See migration guide in CHANGES for details.
<!-- Maintainers, insert changes / features for the next release here -->
33
33
34
-
_Notes on upcoming releases will be added here_
34
+
### Breaking Changes
35
+
36
+
#### JSON/NDJSON paths now use tilde notation
37
+
38
+
**All commands** (`list`, `status`, `sync`) now contract home directory paths in JSON/NDJSON output for consistency, privacy, and portability.
39
+
40
+
**Before:**
41
+
```json
42
+
{
43
+
"name": "flask",
44
+
"path": "/home/username/code/flask",
45
+
"workspace_root": "~/code/"
46
+
}
47
+
```
48
+
49
+
**After:**
50
+
```json
51
+
{
52
+
"name": "flask",
53
+
"path": "~/code/flask",
54
+
"workspace_root": "~/code/"
55
+
}
56
+
```
57
+
58
+
**Why:** The `workspace_root` field already used tilde notation in JSON output, creating an inconsistency. Full home paths (`/home/username/`) expose usernames and make output less portable between machines.
59
+
60
+
**Impact:** Automation consuming JSON/NDJSON output will need to expand `~` to absolute paths if required. Most tools handle tilde expansion automatically.
0 commit comments