feat(mapper): add rust source-group slices - #186
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Map package modules under each crate src/ into bounded review features so Cargo workspaces get module-level ownership without re-owning lib/main/bin entrypoints.
3ee9ff3 to
18239bd
Compare
|
Rebased onto latest CI workflows from this fork are currently in action_required (first-time/fork approval). Once a maintainer approves the CI / Secret Scanning / CodeQL runs and they go green, this is ready for rebase merge. |
|
Codex review: needs maintainer review before merge. Reviewed August 10, 2026, 9:44 PM ET / August 11, 2026, 01:44 UTC. ClawSweeper reviewWhat this changesAdds bounded feature slices for non-entrypoint Rust modules in Cargo packages, with mapper tests and documentation. Merge readinessKeep open: current main does not emit Rust source-group features, while the current PR head resolves the earlier identity and changelog feedback and has sufficient real Cargo-project proof for normal merge review. Priority: P3 Review scores
Verification
How this fits togetherClawpatch converts repository structure into deterministic feature records used by its review workflow. The Rust mapper reads Cargo package layouts and emits command, library, test, and now module-group feature records for downstream persistence. flowchart LR
A[Cargo packages] --> B[Rust mapper]
B --> C[Detect entrypoints]
B --> D[Collect module files]
D --> E[Partition bounded groups]
C --> F[Command and library features]
E --> G[Feature mapping records]
Before merge
Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Merge the manifest-anchored, bounded Rust source-group implementation so Cargo workspaces gain module-level coverage without changing ownership of command or library entrypoints. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR adds new deterministic mapper coverage rather than fixing a reported runtime failure. Is this the best way to solve the issue? Yes. Reusing the existing partition helper and a manifest-anchored identity key adds coverage without competing with established entrypoint features. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1571f3143be5. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
|
Maintainer follow-up pushed in The persisted-identity finding is fixed by anchoring every Rust source group to its crate manifest while retaining the partition label as the identity key. The regression now inserts a lexically earlier Live proof used real Cargo-generated projects, not only test fixtures: The workspace emitted one manifest-anchored source group for Local validation: CI on @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Summary
src/into boundedrust-source-groupreview slices (max 12 files), using the same partition helper as Node/Python.lib.rs,main.rs, and bin entrypoints on the existing library/command features so they are not double-owned.This is aimed at Cargo workspaces (for example anvil) where heuristic map previously only owned crate entrypoints (~18% of
.rsfiles). Dry-run on anvil with this change raised owned source coverage from ~42% to ~88%.Test plan
pnpm test src/mapper.test.ts -t Rust(7 tests)pnpm test src/mapper.test.ts(430 tests)pnpm typecheck && pnpm lint && pnpm format:checkpnpm buildPost-merge
clawpatch mapon consumers that want deeper Rust review coverage.