Skip to content

Match ordinary array assignment status for out-of-bounds indices - #106

Merged
quinnj merged 2 commits into
mainfrom
maintenance/string-array-isassigned
Oct 15, 2026
Merged

quinnj merged 2 commits into
mainfrom
maintenance/string-array-isassigned

Conversation

@quinnj

@quinnj quinnj commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

isassigned(StringArray(["value"]), 0) and other out-of-bounds indices throw a BoundsError, while isassigned on an ordinary array returns false. The method read the offset before checking that the slot exists.

It now asks isassigned on the offsets array first, then reads the same linear slot, so out-of-bounds indices return false and results match an ordinary array on each supported Julia version (including Julia 1.6, whose isassigned accepts some index tuples that checked indexing rejects).

Verification: the new test compares isassigned on StringArrays against Array{Any} for four element types, four shapes and 24 index tuples. main fails 256 of the 384 comparisons; this branch passes the full suite on Julia 1.3.1, 1.6.7, 1.12.6, 1.13.1 and 1.14.0-DEV. main's coverage upload settings are kept as they are.

Co-authored by Codex

🤖 Generated with Claude Code

Check the offset array before reading its logical assignment marker, then read the same linear slot checked by Array.isassigned. This preserves the installed Julia version's index semantics, including older multi-index behavior, under forced bounds checks. Add 384 comparisons across scalar, empty, vector and matrix storage with string, weak-reference and missing-capable elements. Full suites pass on Julia 1.6.7 and 1.13.1. Carry the verified OIDC coverage upload repair without secret or settings changes.

AI disclosure: This work was prepared with assistance from OpenAI Codex.
@codecov

codecov Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.66%. Comparing base (8ebbbab) to head (e57b392).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #106      +/-   ##
==========================================
+ Coverage   82.94%   83.66%   +0.72%     
==========================================
  Files           1        1              
  Lines         299      300       +1     
==========================================
+ Hits          248      251       +3     
+ Misses         51       49       -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Keep main's coverage upload settings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@quinnj
quinnj merged commit a9ce815 into main Oct 15, 2026
6 checks passed
@quinnj
quinnj deleted the maintenance/string-array-isassigned branch October 15, 2026 18:13
@quinnj quinnj mentioned this pull request Oct 27, 2026
quinnj referenced this pull request Oct 27, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant