Skip to content

Conversation

tony
Copy link
Member

@tony tony commented Oct 19, 2025

No description provided.

tony added 3 commits October 19, 2025 18:34
why: Fix inconsistency where workspace_root used ~/ but path showed full
/home/username/ paths, exposing usernames and reducing portability
what:
- Apply contract_user_home() to path field in list.py (flat and tree views)
- Apply contract_user_home() to path field in status.py (status dict)
- Apply contract_user_home() to path field in sync.py (PlanEntry and events)
- All JSON/NDJSON output now consistently uses ~/... notation
- Human output already used tilde notation (unchanged)

Before:
  {"path": "/home/username/code/flask", "workspace_root": "~/code/"}

After:
  {"path": "~/code/flask", "workspace_root": "~/code/"}

Benefits:
- Consistency: Both path and workspace_root now use tilde
- Privacy: No username exposure in JSON dumps
- Portability: Configs/output work across different machines
- Matches shell conventions and user expectations

refs: Breaking change - automation may need to expand ~ to absolute paths
why: Ensure JSON/NDJSON output correctly contracts home directory paths
what:
- Add PathContractionFixture NamedTuple in test_list.py
- Add 3 parametrized test cases for list (JSON, NDJSON, JSON+tree)
- Add StatusPathContractionFixture NamedTuple in test_status.py
- Add 3 parametrized test cases for status (JSON, NDJSON, detailed)
- Assert paths start with ~/ and don't contain absolute home paths
- Follow project pattern: NamedTuple fixtures with test_id field

Coverage:
- test_list_repos_path_contraction: 3 scenarios
- test_status_repos_path_contraction: 3 scenarios
- Total: 6 new parametrized test cases

All 208 tests passing
why: Users consuming JSON/NDJSON output need to know about the change
what:
- Add Breaking Changes section to v1.41.x unreleased notes
- Document that all commands (list, status, sync) now use ~/
- Show before/after JSON examples
- Explain rationale: consistency, privacy, portability
- Note impact: automation may need to expand ~ if required

Breaking change: path field changed from /home/user/... to ~/...
Copy link

codecov bot commented Oct 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.10%. Comparing base (58c0b1a) to head (bc9e1e0).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #475   +/-   ##
=======================================
  Coverage   79.10%   79.10%           
=======================================
  Files          14       14           
  Lines        1527     1527           
  Branches      321      321           
=======================================
  Hits         1208     1208           
  Misses        201      201           
  Partials      118      118           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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