perf: restore 200K search and import ratchets #1505
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.45) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 403 lines diff across 5 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.359
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #1505"
general
weight: 0.35
qwts
Motivation
Closes #1221.
The 200K library exceeded the existing cold-start, composed-search and full-pipeline import ratchets. Fresh-main profiles demonstrated repeated candidate scans and SQLCipher page-cache pressure.
Description
Add ordered covering indexes for pending fingerprint candidates and embedding eligibility, plus a measured 256 MiB connection page cache allocated on demand. Preserve ordering, freshness, cancellation, exact cosine ranking, filters before LIMIT, deterministic ties and accurate counts. Performance budgets, memory limits, fixture dimensions and assertions are unchanged.
An opt-in hosted SQL diagnostic compares plans and cache sizes with identical-result assertions and separate setup measurements. It is absent from unprofiled qualification. The canonical performance page retains current main's startup-profiling boundaries.
Documentation
Performance Qualification is canonical for fixtures, ratchets, measurement boundaries and evidence; Testing Strategy links there. Both final JSON reports and the artifact digest are preserved on #1221. The documentation budget is unchanged.
Changeset
Acceptance coverage
Upgrade/plan regressions cover candidate freshness/order, eligibility, unequal vector magnitudes, ties, filters and counts. The cache-policy regression pins the measured setting. No renderer source or command-flow changes.
Testing
Sequential local validation: full
npm run lintbefore incorporating main, targeted ESLint for the incoming profiler files (zero errors, existing harness-length warning),INTEROP_IMAGE_TRAIL_ROOT=/workspace/image-trail npm teston the combined code (2,787 unit passed, ten skipped; 120 DOM; all four database-page scenarios), finalDOCS_GOV_TOOLING_ROOT=/workspace/docs-gov npm run docs:gov,npm run format:check,npm run check:changesetsandgit diff --check. All gates passed.Complete unprofiled Perf run 46110826269 on
b79ce2cf1ab888ed14cf113372a3c98fcca26468: both original scenarios passed and every required assertion executed. Cold 3,400 ms; keyword 37.7 ms; vector/composed 679.5/719.5 ms; import 5.186 photos/s; main RSS 987.04 MiB; zoom-96 median drop share 0.2062.Artifact
15249791643retains both reports; verified ZIP SHA-256f5a86a7c09e5b9466833db46525fb8941c4b4bc3b7e17feaa2914fe20e9c8b36.Hosted current-head CI run 46110807597 covers the complete suite, coverage, build, Storybook, Windows, zero-retry E2E, docs and security checks. Heavy lanes run only in hosted CI; the check results are authoritative.
Manual Testing
The complete hosted harness exercises the seeded library, keyword/vector/composed queries, native-window scrolling, actual 100-file import and collection operations. Automated assertions and retained reports establish this performance acceptance.
<!-- agent-bot-write: ghw_7e6b699e401c23d1 session=f601b21bf418 bot=trueline-codex-agent[bot] conversation_id=1221-performance conversation_id_source=self-reported -->