Skip to content

refactor(testing): share one workspace-root helper across the CLIs - #1158

Merged
tcoratger merged 1 commit into
leanEthereum:mainfrom
tcoratger:refactor-dedup-cli-workspace-root
Jun 18, 2026
Merged

refactor(testing): share one workspace-root helper across the CLIs#1158
tcoratger merged 1 commit into
leanEthereum:mainfrom
tcoratger:refactor-dedup-cli-workspace-root

Conversation

@tcoratger

Copy link
Copy Markdown
Collaborator

Summary

The identical 7-line walk to locate the uv workspace root was copy-pasted byte-for-byte in cli/fill.py and cli/apitest.py and would drift. Extracted find_workspace_root() into cli/__init__.py (the natural shared home) and call it from both.

Behavior identical (returns the first ancestor whose pyproject declares the uv workspace, else cwd). CLI-only, no emitted vectors. Found in the packages/testing audit (INFRA-01).

Lint: ruff check + ruff format clean.

The identical workspace-root walk was copy-pasted in fill and apitest. Extract
find_workspace_root into the cli package init and call it from both. CLI behavior unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@tcoratger
tcoratger merged commit 1599945 into leanEthereum:main Jun 18, 2026
14 checks passed
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