Repository navigation
refactor(pnpr): extract pnpr-storage - #14210
Conversation
`storage`, `s3`, `streaming`, `journal`, and `publish` move together as one crate, because they are one subsystem and the graph says so: `storage → journal → publish → streaming → storage` is a cycle, and `s3 ↔ storage` is another. Splitting them further would mean inventing seams the code does not have; the crate they form is coherent on its own terms — where packages live, how bytes get into that store, and the journal that makes a publish survive a crash. Fifteen items the boundary caught as reaching across become `pub`, plus the `HostedPackumentForUpdate` fields the server reads. `HostedBackend` stays crate-internal: the trait is implemented and dispatched only in here, so it is the one part of the backend contract that is nobody else's business. Four doc links pointed at `crate::serve`, `crate::s3`, or private items that no longer resolve from the new crate root; those are plain code spans now. `test-pnpr` covers eleven crates at 733 tests, unchanged.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
Included review availability: Your plan provides up to 10 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe change extracts storage functionality into the Changespnpr-storage extraction
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This PR reorganizes the pnpr storage subsystem into a dedicated crate without changing its stated behavior; the existing 733-test suite, feature builds, and dependency policy checks pass, so no actionable merge-blocking risk remains beyond normal checks. Suggested labels: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR Summary by QodoExtract pnpr storage subsystem into pnpr-storage crate
AI Description
Diagram
High-Level Assessment
Files changed (22)
|
Code Review by Qodo
1.
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains; the previously missing manifest and test modules are present, and the prior visibility narration was removed. Reviews (3): Last reviewed commit: "docs(pnpr): drop the history from the gi..." | Re-trigger Greptile |
`.gitignore` carries a bare `storage` rule for verdaccio's data directory. It is unanchored, so it matches a directory of that name at any depth — and `git add` skips ignored paths without a word, so five files of the previous commit were never staged: the crate's `Cargo.toml` and the four `<module>/tests.rs`. Nothing local noticed. The files are on disk, so the build and the suite pass here; only a fresh checkout sees a workspace member with no manifest, which is how CI failed every Rust job at once. The rule already had a negation for this source tree from when it lived under `pnpr/crates/pnpr/src/` — moving the crate left that pointing at nothing. Repoint it, and say in the comment why the exclusion exists so the next move keeps it in step.
`pub(crate)` already says the item is internal, and the type name says what it is. The comment restated both.
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Code review by qodo was updated up to the latest commit b3a47df |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Where the module used to live is what git log is for. The rationale that matters — the rule is unanchored, and git add skips ignored paths without saying so — stands on its own.
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
|
Qodo's comment finding is right — fixed in a5a4fa6. The The manifest finding was the same one CI and Greptile raised; fixed in CI on the fixed commits is back to green — the six simultaneous Rust failures Written by an agent (Claude Code, claude-opus-5[1m]). |
|
Code review by qodo was updated up to the latest commit a5a4fa6 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Micro-Benchmark ResultsLinux |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #14210 +/- ##
=======================================
Coverage 88.35% 88.35%
=======================================
Files 690 690
Lines 119200 119200
=======================================
Hits 105324 105324
Misses 13876 13876 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
Continues the crate split from #14191, after #14202,
#14204 and #14207.
storage,s3,streaming,journalandpublishmove together as onecrate. That is not a shortcut — the graph says they are one subsystem:
Splitting them further would mean inventing seams the code does not have. The
crate they form is coherent on its own terms: where packages live, how bytes
get into that store, and the journal that makes a publish survive a crash.
The two thin edges are
Storage::publish_journal()(a convenience constructor)and
streaming's use ofTarballWrite— either could be cut, but doing so tomanufacture crate boundaries would make the code worse, not better.
What the boundary caught
Fifteen items become
pub, plus theHostedPackumentForUpdatefields theserver reads — I had initially guessed that type was crate-internal and the
compiler corrected me.
HostedBackenddeliberately stayspub(crate): the trait is implemented anddispatched only inside this crate, so it is the one part of the backend
contract that is nobody else's business. The re-export is split by visibility to
say so.
One over-publish caught on review of my own diff:
revision_ref_ownerexiststwice — a method and a free function — and the compiler only needed the method.
The free function is back to private.
Four doc links pointed at
crate::serve,crate::s3or private items that nolonger resolve from the new crate root; those are plain code spans now.
just test-pnprcovers eleven crates at 733 tests, unchanged. All featurecombinations build and
cargo deny checkpasses.Remaining
osvis now a pure leaf and can go next. After that the root crate holdsserver,search,shared_artifactsandresolver— of whichserverandresolverare the natural final residents.Checklist
existing suite passes unchanged.
pnpr/AGENTS.md's layout liststhe crate.
Written by an agent (Claude Code, claude-opus-5[1m]).
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit