← Back to Pull requests

fix(runtime): append ALT extend addresses after existing entries, allow full capacity #1664

Closed
unknown closed this pull request without merging on Jul 14, 2026 16:37 UTC
View on GitHub
unknown unknown commented on Jul 02, 2026 06:29 UTC
Author

Intent

  • fix two bugs in the native address lookup table program's 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

  • offset each new address write by the existing address count, so [A] extended with [B] yields [A, B] instead of [B, 0]. match agave's extend_from_slice. only the .len of the deserialized table is used since the resize before the copy may reallocate the account datas buffer.

  • changed the new_table_addresses_len check 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

  • Extending a non-empty lookup table no longer corrupts the account data.

  • Sig no longer rejects a 255 -> 256 extension that agave accepts.
  • Tests

  • extend appends after an existing address: extends a one-entry table, asserts the result is [first, second]. Fails on main with DataMismatch.

  • extend allows exactly 256 addresses: extends a 255-entry table by one, asserts success with the address appended. Fails on main with InvalidInstructionData.
  • 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

    Diff: 304 lines (+228 / -76) across 3 files Reviewer: ajw221 Review duration: 17887m
    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
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 40.1% (MEDIUM) · Higher = larger blast radius
    40.1%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.9% · Safe to merge
    15.9%
    Repository