perf(resolver): skip revalidating primer packages on the second install #2023
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.43) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 355 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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.351
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #2023"
general
weight: 0.35
jdx
The second install after a fresh one no longer re-asks the registry about packages that aube's bundled primer already answered.
Before: the first
aube installon a clean machine serves most popular packages from the bundled primer and writes them to the packument cache marked stale. The next install then revalidated every one of those entries over the network. On vlt'snextfixture that was 299 of 387 packuments, so the first cached install took about 3.5s instead of about 1s.After: when a stale cache entry is one the primer wrote and has not been revalidated since, and the primer covers the
minimumReleaseAgecutoff for that package, aube answers from the primer again instead of going to the registry. That is the same condition under which a fresh install serves the package from the primer, so a repeat install now gives the answer a fresh install would give at the same moment.Behavior is unchanged when there is no cutoff (
minimumReleaseAge: 0), when anyminimumReleaseAgeExcluderule names the package (version-specific rules included), or once an entry has been revalidated from the registry: those still revalidate as before.The primer's coverage stamp is compiled in, so this applies only within
minimumReleaseAgeof the primer snapshot in the build (a day with the default 1440 minutes), the same window in which a fresh install uses the primer at all. Within that window adist-tagschange made after the snapshot is not seen, as on a fresh install today.Results
vlt's
nextfixture, advisory checks off, fresh home, then a repeat install with the lockfile andnode_modulesremoved:| | first cached install |
|---|---|
| before | 3498 ms |
| after | 538 ms |
Steady-state installs after that are unchanged at about 1.0 to 1.1s. Single runs on a shared cloud host, so treat the numbers as indicative.
Validation
stale_primer_seed_reuses_the_primer_only_under_a_covered_cutofffails without the fix;names_package_counts_version_specific_rulescovers the exclude check.cargo test -p aube-resolver -p aube-registryand clippy pass.AI-assisted — Tool: Claude Code; model: anthropic/claude-opus-5-5; version: unavailable.
---
_Generated by Claude Code_
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
Bug Fixes
Cached registry data can now be reused when it is stale but still covers the configured minimum-release-age cutoff, provided the package is not excluded by a trust rule.
Stale cached data that does not cover the cutoff continues to be checked against the registry, keeping release-age results current.
Forced refreshes continue to bypass cached data.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->