perf: the claim's mirror affinity and the batch assessment/ref/summary routes (wave f, F3-F5) #433
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.47) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.47 · 484 lines diff across 6 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.370
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #433"
general
weight: 0.35
chubirka
What
Wave (f) of the performance lane (traust-foundry#56), the core half of the audit's F3-F5:
F3 — the claim answers the mirror-affinity question itself. The engine's claim runners decided what to lease by reading every open order each poll and filtering client-side — at production's 7,300 open orders, ~10⁸ row-materializations a day against core.
claimgainsmirror_affinity(the REST request carries the flag): the next-order selection skips a queued order whose repository another worker's live lease holds (its node already fetched the repository's mirror; the queued orders wait for the holder) and one whose (asset, repository) pair an open order still gates (planned or awaiting approval). A leased sibling is no gate — the holder's own lease never blocks it. A namedorder_idis claimed as asked. Each exclusion is a shape its own index serves, so the claim stays a single-digit-millisecond index walk.F4/F5 — the batch assessment, ref and summary routes. The SCI listings' core observations fanned out per repository (the latest-scan assessment and the ref SHA behind each inventory row, and the per-repository findings census) — 3+ REST calls per row at estate scale. The service layer already owned the batched reads (
list_for_repositories,list_refs_of); three routes expose them in the batch findings family's own shape (a named repository set, a page's worth per call, no set a refusal):GET /v1/assessments/in— several repositories' assessments, oldest first, one kind optionalGET /v1/refs/in— every recorded ref of the set, in bounded batchesGET /v1/findings/summaries— the set's findings counted by state per repository (summary_in: the per-repository summary's own rule — never-reported findings count nowhere — folded one bounded batch of whole repositories at a time)Stacks under: the SDK regen (perf/wave-f-batch-client) and the engine/SCI consumers.
Measured
make lint-fix,make test: 13,774 passed;make test-integration: 4,012 passed (SQLite and PostgreSQL).make perf: the affinity claim walksidx_ops_run_order_claimat 0.61 ms (the unflagged claim: 0.21 ms). Two pre-existing perf flakes fail identically ondevelopment(test_an_assets_open_orders_by_index[page], andtest_spend_by_repository_joins_the_month_to_its_orders_by_keyintermittently) — timing-budget misses on the shared perf database under a loaded machine, not touched by this change.Tests
Changed tests (flagged per the standing rule):
test_operations.py— a held repository skipped for a later free order, the holder's own next order taken, the head claimed when nothing is held, the unflagged claim unchanged, a gated pair waiting, a named order claimed despite the flag, fleet-wide orders never held, and a fleet-wide order taken past the worker's own leased sibling (the shape the engine's feed flow rides). The perf case for the affinity query's index.summary_in's identity with each repository's own summary, its no-row-for-no-findings rule, and its grouping across the fold's batch boundary.Dev validation
Blocked at open time: the dev-20261104 cluster's credentials have expired (the refresh needs an interactive
oc login --web) and the cluster's*.appswildcard DNS currently answers NXDOMAIN while the API endpoint resolves — the environment needs its owner's attention before the wave-f receipts can run. The integration suites above pin the same identities and call shapes; the dev pass (byte-identical bodies before/after, the one-batched-call shapes in core's access log) is the follow-up once the environment is reachable, before merge.Foundry: traust-foundry#56 (wave f, F3 + F4/F5).
💘 Generated with Crush