← Back to Pull requests

perf(add): check new package names against OSV while their packuments download #2033

Closed
unknown closed this pull request without merging on Dec 03, 2026 20:19 UTC
View on GitHub
unknown unknown commented on Dec 03, 2026 19:30 UTC
Author

aube add <pkg> used to check the names you typed against OSV (and the package-age and download-count gates) first, and only then start downloading their packuments. Both steps wait on the network and neither needs the other's answer, so they now run at the same time.

Nothing is written any sooner. package.json, the lockfile and node_modules still change only after the gates pass, and a refusal still leaves the project untouched. When both a gate and a packument download fail, the gate's refusal is the error you see, as before. A refusal returns right away, without waiting for downloads still in flight. aube add --filter runs the gates once, alongside the first selected package's downloads.

Results

aube add is-number on the vlt next fixture, warm caches, with OSV queries held 250ms by a local delay proxy to stand in for a real network round trip. Nine interleaved rounds each, median wall time:

| | before (main) | after | change |
|---|---|---|---|
| aube add is-number | 693 ms | 621 ms | -10% |

The large fixture couldn't be measured: aube add fails there on main with the alias regression that #2030 fixes.

🤖 Generated with Claude Code

AI-assisted — Tool: Claude Code; model: anthropic/claude-opus-5-5; version: unavailable.

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->

Summary by CodeRabbit

Bug Fixes
Package additions now run the name check alongside package information retrieval, reducing time spent waiting on sequential checks.
When both checks fail, name-check errors take precedence over package-fetch errors. Name-check failures still stop the add operation.
Offline package additions continue without the online name check.
* The name check still runs when package information retrieval is unnecessary, and any failure is reported.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---
_Generated by Claude Code_

Diff: 255 lines (+191 / -64) across 3 files Reviewer: jdx Review duration: 48m
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.39) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 255 lines diff across 3 files
0.39
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.332
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #2033"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 39.1% (MEDIUM) · Higher = larger blast radius
39.1%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 15.4% · Safe to merge
15.4%
Repository