test: coverage push + 3 latent-bug fixes#199
Merged
singaraiona merged 4 commits intomasterfrom May 8, 2026
Merged
Conversation
Aggregate: lines 79.28% → 80.44%, regions 84.69% → 86.53%. fused_group.c 45.7% → 67.9% (test_fused_group.c +14) fused_topk.c 78.4% → 91.0% (test_fused_topk.c new) group.c 78.0% → 87.3% (rfl/agg/count_distinct.rfl new) query.c 76.5% → 79.3% string.c 73.0% → 81.3% strop.c 91.0% → 94.0% Three latent bugs surfaced; assertions weakened with FIXME markers, fixed in follow-up commits.
(select {by: [a bad_col] from: T}) crashed in group_rows_range
because ray_table_get_col returned NULL but the kernel still
dereferenced key_data[k]. Reject the unresolved key at the
resolution point.
ray_sym(id) leaves attrs == 0 (W8), so atom_broadcast_vec truncated every SYM atom id to one byte: 'hello (id 1000) was memset as byte 0xE8 and read back as whatever sym was interned at id 232. Pick the narrowest width that fits a->i64; W64 leg now explicitly handled.
ray_pool_dispatch's ring is work-stealing — worker w can claim different tasks across pass 1 (histogram) and pass 2 (scatter). Pass-2 writes overshot the cursor slots pass-1 reserved, leaving holes that dedup miscounted. (count (distinct (til 70000))) returned ~30k–60k non-deterministically. Switch to ray_pool_dispatch_n and key the histogram + cursor table by task index (= dispatch_n's start arg, stable across passes). Each task spans [task_idx*grain, +grain) with grain = TASK_GRAIN.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Coverage commit + three independent fixes for bugs surfaced during the
push. Each fix is its own commit so bisect can isolate them.
Coverage delta (commit 1)
Aggregate: lines 79.28% → 80.44%, regions 84.69% → 86.53%.
Bug fixes (commits 2–4)
select {by: [a bad_col] from: T}SIGSEGV —ray_table_get_colreturned NULL for a non-existent name and the kernel still
dereferenced
key_data[k]. Now returns adomainerror.atom_broadcast_vecSYM truncation —ray_sym(id)doesn'ttouch
attrs, so atoms always reached the broadcast as W8. Symids ≥ 256 got truncated to one byte and read back as a different
sym (
'hello↦'filter). Width now picked from id magnitude.Parallel
count(distinct)non-deterministic under-count —exec_count_distinctkeyed its histogram + scatter cursors byworker_id, butray_pool_dispatch's ring is work-stealing, sothe same worker can claim different row ranges across passes.
Pass-2 writes overshot the slot pass-1 reserved.
(count (distinct (til 70000)))returned ~30k–60k across runs. Switched toray_pool_dispatch_nwith task-index keying.Test plan
make test -j— 2396 of 2397 passed (1 skipped, 0 failed). Thesingle skip is pre-existing.
in the matching fix commits.
make coverage— TOTAL line/region/branch numbers above.