perf(onepassword): cache auth and batch fetch secrets#56
Conversation
- Cache whoami result using OnceCell to avoid repeated auth checks - Add get_batch() method to Provider trait for batch fetching - Implement parallel batch fetching for OnePassword provider - Update validate() to group secrets by provider and use batch ops This reduces CLI calls from 2N sequential to ~2 + N parallel for N secrets. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
secretspec | ee0a592 | Commit Preview URL Branch Preview URL |
Jan 29 2026, 10:13 PM |
|
Claude finished @domenkozar's task —— View job PR Review: OnePassword Batch Fetch Performance OptimizationThis PR introduces significant performance improvements to the OnePassword provider through authentication caching and batch fetching. Here's my comprehensive review: Review Checklist
Code Quality & Best Practices ✅Excellent architecture decisions:
Minor suggestions:
Performance Improvements 🚀Significant gains achieved:
Implementation strengths:
Potential Issues & Improvements 🔍Thread safety & resource management: // In onepassword.rs:793-850
let handles: Vec<_> = keys_to_fetch
.into_iter()
.map(|(key, item_id)| {
// Creates one thread per secret - could be resource intensive for many secrets
Error handling in batch operations: // In onepassword.rs:855
if let Ok(Some((key, value))) = handle.join() {
results.insert(key, value);
}
Memory usage:
Security Considerations 🔒Good security practices:
No security concerns identified - the implementation maintains the existing security model while improving performance. Test Coverage 📋Current testing:
Recommendations:
Overall Assessment ⭐This is a well-implemented performance optimization that addresses a real pain point with OnePassword CLI latency. The code quality is high, architecture is sound, and the performance gains are substantial. Key strengths:
Minor areas for improvement:
The PR successfully achieves its goal of reducing OnePassword CLI overhead and should provide significant real-world performance improvements for users with multiple secrets. Recommendation: Approve with minor follow-up considerations for thread pool optimization in future iterations. |
This reduces CLI calls from 2N sequential to ~2 + N parallel for N secrets.