fix(runtime): append ALT extend addresses after existing entries, allow full capacity #1664
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 304 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.342
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #1664"
general
weight: 0.35
ajw221
Intent
ExtendLookupTable:- new addresses are written at the start of the address list, overwriting existing entries instead of appending after them
- the capacity check rejects a valid extension to exactly 256 addresses
Fixes #1637
Fixes #1636
Implementation
[A]extended with[B]yields[A, B]instead of[B, 0]. match agave'sextend_from_slice. only the.lenof the deserialized table is used since the resize before the copy may reallocate the account datas buffer.new_table_addresses_lencheck from>=to>, matching agave.Both fixes are in the same PR because the second can't be tested without the first: extending a 255-entry table exercises the append path.
Ramifications
Tests
extend appends after an existing address: extends a one-entry table, asserts the result is[first, second]. Fails on main withDataMismatch.extend allows exactly 256 addresses: extends a 255-entry table by one, asserts success with the address appended. Fails on main withInvalidInstructionData.the existing extend test only covers extending an empty table, where the wrong offset (
i) and the correct offset (old_len + i) coincide, which is why neither issue was caught./sig/shared/runtime/program/address_lookup_table$ zig build test -Dfilter="address-lookup-table" --summary all
Build Summary: 13/13 steps succeeded; 8/8 tests passed
test success
└─ run test shared 8 passed 36ms MaxRSS:6M
└─ compile test shared Debug native cached 20ms MaxRSS:39M
├─ options cached
├─ run exe gen_feature_set_id (feature-set-id.zig) cached
│ └─ compile exe gen_feature_set_id Debug native cached 12ms MaxRSS:38M
├─ translate-c cached 15ms MaxRSS:38M
├─ WriteFile cached
├─ compile lib secp256k1 Debug native cached 17ms MaxRSS:38M
├─ compile lib secp256k1 Debug native (reused)
├─ WriteFile table.zig cached
│ ├─ run exe generator_chain cached
│ │ └─ compile exe generator_chain Debug native cached 12ms MaxRSS:38M
│ └─ run exe generator_chain (+1 more reused dependencies)
└─ options cached