removing hard coded version #797
All Vouch review confidence checks passed
Residual risk 0.16 = 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 · 263 lines diff across 3 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.334
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #797"
general
weight: 0.35
tlwillke
Write feature headers at the graph's version, not
CURRENT_VERSIONProblem
Feature headers that embed a compressor always serialize it at
OnDiskGraphIndex.CURRENT_VERSION, whatever version the graph itself is written at:| feature | call |
|---|---|
|
FusedPQ.writeHeader|pq.write(out, CURRENT_VERSION)||
NVQ.writeHeader|nvq.write(out, CURRENT_VERSION)||
SeparatedNVQ.writeHeader|nvq.write(out, CURRENT_VERSION)||
FusedASH.writeHeader|ash.write(out, CURRENT_VERSION)|The format classes know their own version, but
Feature.writeHeader(IndexWriter)gives them no way to pass it on. This dates from theGraphIndexFormathierarchy, not from ASH. WhileCURRENT_VERSIONwas 6 it went unnoticed. Now thatash-devraises it to 7, a graph written at V6 (for example throughwithVersion(6)to stay rollback-safe) embeds version 7 in its PQ and NVQ headers. So it isn't byte-identical to what 4.0.x writes, contrary to the claim that versions 6 and below are unchanged.FusedASHrepeats the pattern, so it would show the same bug as soon asCURRENT_VERSIONmoves past 7.Change
Feature: addsdefault void writeHeader(IndexWriter out, int version). The default calls the existing method, so otherFeatureimplementations still compile and behave as before.writeHeader(IndexWriter)is deprecated, since a header inside a graph has to be written at the graph's version.FusedPQ,NVQ,SeparatedNVQ,FusedASH: implement the versioned method and serialize their compressor at that version. Their deprecatedwriteHeader(out)calls it withCURRENT_VERSION, so direct callers get the same bytes as before.InlineVectors,SeparatedVectors: their headers don't depend on the version. They get the same structure so all built-in features look alike.AbstractGraphIndexFormat.writeHeaderFeatures(V2–V5) andGraphIndexFormatV6.writeHeaderFeatures(V6, V7): passgetVersion().headerSize()is unchanged. The compressors' serialized size doesn't depend on the version for any format that supports the feature.