Verify locked dependencies during builds#3
Conversation
|
@coderabbitai review |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughLocked dependency resolution now verifies lock metadata and dependency content before compilation, refuses unverified fallback paths, includes ChangesLockfile integrity enforcement
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Build
participant merge_path_dependencies
participant verified_dependency_roots
participant mako.lock
participant merge_path_deps_from_manifest
Build->>merge_path_dependencies: merge manifest dependencies
merge_path_dependencies->>verified_dependency_roots: verify project lock data
verified_dependency_roots->>mako.lock: validate metadata and hashes
verified_dependency_roots-->>merge_path_dependencies: return verified roots
merge_path_dependencies->>merge_path_deps_from_manifest: pass verified roots
merge_path_deps_from_manifest-->>Build: merge dependencies or reject unverified roots
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/pkg.rs`:
- Around line 908-919: Update the dependency verification flow around
hash_path_dep and the verified_roots/verified_packages inserts so compilation
consumes the exact bytes validated by the hash check. Replace path-only
verification results with an immutable snapshot or retained verified
contents/digests, and update the src/tooling.rs manifest/source loading path to
parse or compile from that verified data rather than reopening mutable files.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 077c30e2-3ea3-4818-8102-3d3c4cbda028
📒 Files selected for processing (7)
docs/BUILD.mddocs/CLI.mddocs/book/src/ch10-packages.mddocs/howto/04-packages.mdsrc/incremental.rssrc/pkg.rssrc/tooling.rs
Product version 0.2.4 across Cargo, docs, packaging, and formula. Closes SAFE/RT residuals, stack POD lits, lock verify (PR #3), and memory-safe drops by construction.
Locked dependency integrity was only guaranteed during package resolution, while build, run, and check could consume dependency sources directly.
This verifies every reachable locked dependency before compilation, rejects stale or mismatched lock state, uses the exact verified roots, and includes
mako.lockin incremental fingerprints. Transitive path dependencies now resolve relative to their declaring manifest, and locked builds fail closed if a verified root is unavailable.Tests:
cargo test --bin makoSummary by CodeRabbit
New Features
mako pkg install,mako build,mako run, andmako check, with builds failing closed on any mismatch, missing/unreadable transitive metadata, or malformed lock data.Documentation
mako pkg update.