fix(mapper): preserve uv workspace root context - #138
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 15, 2026, 11:48 AM ET / 15:48 UTC. Summary Reproducibility: yes. source-level. Current main can drop root route seeds when only associated tests/context touch a uv member, and member seed wrapping starts from member-local context without recovering workspace-root runtime metadata. Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Next step before merge
Security Review detailsBest possible solution: Land the focused mapper repair with the added regressions if maintainer review and required checks remain clean. Do we have a high-confidence way to reproduce the issue? Yes, source-level. Current main can drop root route seeds when only associated tests/context touch a uv member, and member seed wrapping starts from member-local context without recovering workspace-root runtime metadata. Is this the best way to solve the issue? Yes. The patch extends the existing Python mapper pruning and member-wrapping helpers with focused regressions rather than adding a parallel mapping path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a4b5efd0981a. Label changesLabel changes:
Label justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Landed with maintainer changelog credit. Verification:
Landed commit: |
Summary
.python-versionand rootpyproject.tomlto uv workspace member features after prefixing member paths.Validation
pnpm test src/mapper.test.ts -t "uv workspace"- 1 file passed, 6 tests passed, 421 skippedpnpm test src/mapper.test.ts- 1 file passed, 427 tests passedpnpm typecheckpnpm format:checkpnpm lintpnpm buildLive CLI Proof
Built the PR branch, then ran the public CLI against a temporary real Git repo with:
pyproject.tomldeclaring[tool.uv.workspace] members = ["packages/backend"].python-versionpackages/shared.pypackages/backend/src/backend/app.pypackages/backend/tests/test_member.pyCommands:
initdetected Python/FastAPI/uv andmapreturned:{ "features": 6, "new": 6, "changed": 0, "stale": 0, "source": "heuristic", "usedAgent": false, "reason": "heuristic mapper selected", "next": "clawpatch review --limit 3" }Relevant mapped feature JSON from
.clawpatch/features/*.json:[ { "title": "FastAPI route GET /shared", "kind": "route", "entrypoints": [ { "path": "packages/shared.py", "symbol": "shared", "route": "GET /shared", "command": null } ], "ownedFiles": [ { "path": "packages/shared.py", "reason": "FastAPI route handler shared" } ], "contextFiles": [ { "path": "pyproject.toml", "reason": "python target runtime metadata" }, { "path": ".python-version", "reason": "python target runtime metadata" } ], "tests": [], "tags": ["python", "fastapi", "route"] }, { "title": "Python source packages/backend/src", "kind": "library", "entrypoints": [ { "path": "packages/backend/src", "symbol": "packages/backend/src", "route": null, "command": null } ], "ownedFiles": [ { "path": "packages/backend/src/backend/app.py", "reason": "source group src" } ], "contextFiles": [ { "path": "packages/backend/pyproject.toml", "reason": "python target runtime metadata" }, { "path": "pyproject.toml", "reason": "python target runtime metadata" }, { "path": ".python-version", "reason": "python target runtime metadata" } ], "tests": [], "tags": ["python", "source-group", "workspace", "uv-workspace"] } ]This demonstrates both requested behaviors through the CLI path: the root route is preserved while member-associated tests are pruned, and the uv member source feature includes workspace-root runtime metadata.
Notes
Follow-up to #133. This addresses the post-merge Codex findings about root route seeds with member-only associated tests and workspace-root runtime metadata for uv workspace member features.