Skip to content

fix(cli): accept relative project paths in plan and clean - #8

Merged
Finjineersdev merged 1 commit into
mainfrom
fix-relative-project-paths
Nov 27, 2026
Merged

Finjineersdev merged 1 commit into
mainfrom
fix-relative-project-paths

Conversation

@Finjineersdev

Copy link
Copy Markdown
Owner

What

opensweep plan . and opensweep clean ../site refused every folder:

$ cd ~/code/site && opensweep plan .
.: Dormant, edited 1427 days ago
refuse  node_modules  [node]  path is not absolute
refuse  .next  [node]  path is not absolute

The project path went to the guard exactly as typed, and the guard refuses relative candidates (that refusal is right and is not changed). scan and pin already resolve their paths; plan and clean did not.

Now plan and clean make a relative project path absolute before anything else. Absolute paths are passed on unchanged, so the app (which always passes absolute paths) and the JSON output for absolute paths are not affected. The guard, the rules and the quarantine are not touched.

How tested

  • New end-to-end test a_project_given_relative_to_the_working_folder_is_checked runs plan . and clean ../site from inside the project. It fails on main ("path is not absolute") and passes with the fix.
  • By hand on a throwaway project in a temp folder with HOME pointed at a temp folder: plan . now shows allow .next ... Safe.
  • cargo fmt --all --check: ok
  • cargo clippy --all-targets --locked -- -D warnings: ok
  • cargo test --locked: 146 passed, 0 failed (145 on main, plus the new test)
  • cargo run -q -p opensweep-cli -- rules-check rules: 11 rule files, 31 artifacts: ok
  • cd CleanCore && swift test: 21 tests, 0 failures; scripts/check-swift-never-deletes.sh: ok
  • QA-CHECKLIST: no app rows apply (CLI-only change).

🤖 Generated with Claude Code

`opensweep plan .` or `opensweep clean ../site` refused every folder with
"path is not absolute": the project path reached the guard as typed, and
the guard (rightly) refuses relative candidates. `scan` and `pin` already
resolve their paths. plan and clean now make a relative project path
absolute first; absolute paths are passed on unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Finjineersdev
Finjineersdev merged commit f9bb87f into main Nov 27, 2026
6 checks passed
@Finjineersdev
Finjineersdev deleted the fix-relative-project-paths branch November 27, 2026 22:47
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