Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
89eed55
v2.4.0 (#327)
singaraiona Jul 11, 2026
eb66eed
feat(query): support live inserts into parted tables
singaraiona Jul 14, 2026
bbdc419
fix(core): restore total-core -c semantics
singaraiona Jul 15, 2026
9961388
fix(parse) Fix nonstring if not defined
protocolstardust Jul 16, 2026
6cac6e8
Merge pull request #330 from protocolstardust/dev
protocolstardust Jul 16, 2026
f44ab81
Merge branch 'master' into dev
singaraiona Jul 16, 2026
49d8524
fix(store): surface FlushFileBuffers failure in journal SYNC mode (#335)
belowzeroff Jul 18, 2026
cb1c6cd
fix(hnsw): reject build dims whose vector count overflows size_t (#333)
belowzeroff Jul 18, 2026
7475949
fix(store): read full link sidecar to avoid wrong-symbol truncation (…
belowzeroff Jul 18, 2026
ebadd07
fix(hnsw): reject index files whose vector count overflows size_t (#332)
belowzeroff Jul 21, 2026
fa39d9d
fix(docs): remediate F-0001 F-0005 F-0007
singaraiona Jul 22, 2026
ffd784f
fix(docs): remediate CF-0001
singaraiona Jul 22, 2026
1f27e61
fix(docs): remediate CF-0002
singaraiona Jul 22, 2026
465e58e
chore(audit): plan CF-0003 ratification
singaraiona Jul 22, 2026
8f8033c
fix(docs): remediate CF-0003
singaraiona Jul 22, 2026
3ae79f5
feat(docs): redesign website and documentation
singaraiona Jul 22, 2026
5dc8265
Merge branch 'master' into dev
singaraiona Jul 22, 2026
4d2c8f3
fix(null): avoid f64 null casts to integers (#340)
belowzeroff Jul 23, 2026
4e49626
fix(expr): avoid null truthiness casts in fallback binary ops (#339)
belowzeroff Jul 23, 2026
a05886d
ci: make Rayforce audit PR comments best-effort
singaraiona Jul 23, 2026
6ca3d8a
ci: publish Rayforce audit comments from trusted workflow
singaraiona Jul 23, 2026
04d8f3d
ci: resolve fork PRs for audit commenter
singaraiona Jul 23, 2026
6acdc2c
perf: parallelize serial stages around group-by; unify binary-agg nul…
ser-vasilich Jul 23, 2026
a53d98e
Merge branch 'master' into dev
singaraiona Jul 23, 2026
260e018
fix(aggr): preserve slice nullability in binary groups
singaraiona Jul 23, 2026
492c5db
fix(expr): avoid f64 null cast in fallback idiv integer output (#344)
belowzeroff Jul 23, 2026
d250108
fix(group): avoid f64 null read cast in dense aggs (#343)
belowzeroff Jul 23, 2026
95f0a3d
fix(ipc): preserve boxed data list args (#346)
belowzeroff Jul 24, 2026
e10d1ab
fix(group): avoid f64 null cast in DA reads (#348)
belowzeroff Jul 24, 2026
842acc0
ci: use portable march for fuzz jobs (#347)
belowzeroff Jul 24, 2026
84cea17
chore(release): merge master into dev
singaraiona Jul 24, 2026
7a5839e
fix(pivot): preserve generic missing cells as null (#350)
belowzeroff Jul 27, 2026
57628fb
fix(xbar): avoid narrow bucket truncation (#351)
belowzeroff Jul 28, 2026
d7a1f6f
Merge branch 'master' into dev
singaraiona Jul 28, 2026
c501ae0
fix(arith): reject float temporal operands (#353)
belowzeroff Jul 29, 2026
aea9bda
fix(ops): make nested (LIST) columns usable through a parted view (fi…
singaraiona Jul 30, 2026
0605f1a
fix(query): preserve temporal arithmetic semantics (#354)
belowzeroff Jul 30, 2026
282d3a1
Merge branch 'master' into dev
singaraiona Jul 30, 2026
17bf2b8
ci: skip audit comments for cancelled runs
singaraiona Jul 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions .github/workflows/rayforce-audit-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ jobs:
body="audit-output/rayforce-audit-comment.md"
report="audit-output/rayforce-audit.md"

case "$RUN_CONCLUSION" in
cancelled|skipped)
echo "::notice title=Rayforce audit comment skipped::Audit workflow run ${RUN_ID} ended with conclusion '${RUN_CONCLUSION}', so no PR comment is needed."
exit 0
;;
esac

pr_number=$(python3 - <<'PY'
import json, os
with open(os.environ['GITHUB_EVENT_PATH'], 'r', encoding='utf-8') as f:
Expand Down Expand Up @@ -96,8 +103,10 @@ jobs:

Workflow run: ${RUN_URL}
EOF_PASS
gh api -X PATCH "repos/${REPO}/issues/comments/${existing}" \
-f body="$(cat "$body")" >/dev/null
if ! gh api -X PATCH "repos/${REPO}/issues/comments/${existing}" \
-f body="$(cat "$body")" >/dev/null; then
echo "::notice title=Rayforce audit comment write failed::Could not update the existing PR comment. The required check and artifact remain authoritative."
fi
fi
exit 0
fi
Expand All @@ -124,9 +133,13 @@ jobs:
| tail -n 1)

if [ -n "$comment_id" ]; then
gh api -X PATCH "repos/${REPO}/issues/comments/${comment_id}" \
-f body="$(cat "$body")" >/dev/null
if ! gh api -X PATCH "repos/${REPO}/issues/comments/${comment_id}" \
-f body="$(cat "$body")" >/dev/null; then
echo "::notice title=Rayforce audit comment write failed::Could not update the existing PR comment. The required check and artifact remain authoritative."
fi
else
gh api -X POST "repos/${REPO}/issues/${pr_number}/comments" \
-f body="$(cat "$body")" >/dev/null
if ! gh api -X POST "repos/${REPO}/issues/${pr_number}/comments" \
-f body="$(cat "$body")" >/dev/null; then
echo "::notice title=Rayforce audit comment write failed::Could not create the PR comment. The required check and artifact remain authoritative."
fi
fi
13 changes: 13 additions & 0 deletions src/ops/arith.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,14 @@ ray_t* ray_sub_fn(ray_t* a, ray_t* b) {
if ((a && RAY_IS_PARTED(a->type)) || (b && RAY_IS_PARTED(b->type)))
return atomic_map_binary_op(ray_sub_fn, OP_SUB, a, b);

/* Match add: temporal offsets must be integer typed. Without this,
* DATE/TIME/TIMESTAMP - F64 reads the float payload through as_i64() and
* either truncates semantics or uses raw union bits. */
if (((a->type == -RAY_F64 || a->type == -RAY_F32) && is_temporal(b)) ||
(is_temporal(a) && (b->type == -RAY_F64 || b->type == -RAY_F32)))
return ray_error("type", "subtract: temporal arithmetic requires integer offsets, got %s and %s",
ray_type_name(a->type), ray_type_name(b->type));

/* Temporal - int null propagation (both operands) */
if (is_temporal(a) && is_numeric(b)) {
if (RAY_ATOM_IS_NULL(a) || RAY_ATOM_IS_NULL(b))
Expand Down Expand Up @@ -219,6 +227,11 @@ ray_t* ray_mul_fn(ray_t* a, ray_t* b) {
if ((a && RAY_IS_PARTED(a->type)) || (b && RAY_IS_PARTED(b->type)))
return atomic_map_binary_op(ray_mul_fn, OP_MUL, a, b);

if (((a->type == -RAY_F64 || a->type == -RAY_F32) && b->type == -RAY_TIME) ||
(a->type == -RAY_TIME && (b->type == -RAY_F64 || b->type == -RAY_F32)))
return ray_error("type", "multiply: temporal arithmetic requires integer factors, got %s and %s",
ray_type_name(a->type), ray_type_name(b->type));

/* int * TIME → TIME, TIME * int → TIME */
if (is_numeric(a) && b->type == -RAY_TIME) {
if (RAY_ATOM_IS_NULL(a) || RAY_ATOM_IS_NULL(b)) return ray_typed_null(-RAY_TIME);
Expand Down
5 changes: 5 additions & 0 deletions src/ops/collection.c
Original file line number Diff line number Diff line change
Expand Up @@ -1078,6 +1078,11 @@ static ray_t* parted_to_flat_vec(ray_t* x) {
for (int64_t s = 0; s < x->len; s++)
if (segs[s]) total += segs[s]->len;

/* RAY_LIST: share (retain) elements — ray_vec_new rejects type 0 and
* the per-cell copy below has no notion of nested elements. */
if (base == RAY_LIST)
return parted_flatten_list(segs, x->len, total);

ray_t* out = ray_vec_new(base, base == RAY_STR ? 0 : total);
if (!out || RAY_IS_ERR(out)) return out ? out : ray_error("oom", NULL);
if (base != RAY_STR) out->len = total;
Expand Down
15 changes: 13 additions & 2 deletions src/ops/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1836,11 +1836,16 @@ static ray_t* exec_node_inner(ray_graph_t* g, ray_op_t* op) {
/* RAY_STR: deep-copy to handle multi-pool segments */
if (base == RAY_STR)
return parted_flatten_str(sps, col->len, total);
/* RAY_LIST: share (retain) elements — byte-copy would
* alias them without a refcount (issue #355). */
if (base == RAY_LIST)
return parted_flatten_list(sps, col->len, total);

uint8_t sba = (base == RAY_SYM)
? parted_sym_max_attrs(sps, col->len) : 0;
ray_t* flat = typed_vec_new(base, sba, total);
if (!flat || RAY_IS_ERR(flat)) return ray_error("oom", NULL);
if (!flat || RAY_IS_ERR(flat))
return flat ? flat : ray_error("oom", NULL);
flat->len = total;
ray_t** segs = sps;
int64_t off = 0;
Expand Down Expand Up @@ -2891,6 +2896,8 @@ static ray_t* exec_node_inner(ray_graph_t* g, ray_op_t* op) {
ray_t* head_vec;
if (base == RAY_STR) {
head_vec = parted_head_str(sp, col->len, n);
} else if (base == RAY_LIST) {
head_vec = parted_head_list(sp, col->len, n);
} else {
uint8_t ba = (base == RAY_SYM)
? parted_sym_max_attrs(sp, col->len) : 0;
Expand Down Expand Up @@ -3022,6 +3029,8 @@ static ray_t* exec_node_inner(ray_graph_t* g, ray_op_t* op) {
ray_t* tail_vec;
if (base == RAY_STR) {
tail_vec = parted_tail_str(tsp, col->len, n);
} else if (base == RAY_LIST) {
tail_vec = parted_tail_list(tsp, col->len, n);
} else {
uint8_t tba = (base == RAY_SYM)
? parted_sym_max_attrs(tsp, col->len) : 0;
Expand Down Expand Up @@ -3691,9 +3700,11 @@ static ray_t* flatten_parted_col(ray_t* col) {
int64_t total = ray_parted_nrows(col);
if (base == RAY_STR)
return parted_flatten_str(segs, col->len, total);
if (base == RAY_LIST)
return parted_flatten_list(segs, col->len, total);
uint8_t sba = (base == RAY_SYM) ? parted_sym_max_attrs(segs, col->len) : 0;
ray_t* flat = typed_vec_new(base, sba, total);
if (!flat || RAY_IS_ERR(flat)) return ray_error("oom", NULL);
if (!flat || RAY_IS_ERR(flat)) return flat ? flat : ray_error("oom", NULL);
flat->len = total;
int64_t off = 0;
uint8_t seg_nulls = 0;
Expand Down
136 changes: 128 additions & 8 deletions src/ops/filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,35 @@ static void parted_gather_col(ray_t* parted_col, const int64_t* match_idx,

/* Filter a single vector by boolean predicate. */
static ray_t* exec_filter_vec(ray_t* input, ray_t* pred, int64_t pass_count) {
/* RAY_LIST: cells are ray_t* — gather them with a retain. The
* byte-copy loop below would alias elements without a refcount (and
* col_vec_new rejects RAY_LIST, type 0, outright). */
if (input->type == RAY_LIST) {
if (input->len != pred->len)
return ray_error("length", "filter: predicate length must match input, got %lld and %lld",
(long long)input->len, (long long)pred->len);
ray_t* result = ray_list_new(pass_count);
if (!result || RAY_IS_ERR(result)) return result;
ray_t** dst = (ray_t**)ray_data(result);
ray_morsel_t mi, mf;
ray_morsel_init(&mi, input);
ray_morsel_init(&mf, pred);
int64_t out_idx = 0;
while (ray_morsel_next(&mi) && ray_morsel_next(&mf)) {
uint8_t* bits = (uint8_t*)mf.morsel_ptr;
ray_t** src = (ray_t**)mi.morsel_ptr;
for (int64_t i = 0; i < mi.morsel_len; i++) {
if (!bits[i]) continue;
if (out_idx >= pass_count) break;
ray_t* e = src[i];
if (e) ray_retain(e);
dst[out_idx++] = e;
}
}
result->len = out_idx;
return result;
}

uint8_t esz = col_esz(input);
ray_t* result = col_vec_new(input, pass_count);
if (!result || RAY_IS_ERR(result)) return result;
Expand Down Expand Up @@ -114,6 +143,11 @@ static ray_t* exec_filter_parted_vec(ray_t* parted_col, ray_t* pred,
int64_t n_segs = parted_col->len;
uint8_t* pred_data = (uint8_t*)ray_data(pred);

/* RAY_LIST: share (retain) elements — the byte-copy path below would
* alias them without a refcount and double-free on release. */
if (base == RAY_LIST)
return parted_filter_list(segs, n_segs, pred_data, pass_count);

/* RAY_STR: deep-copy to handle multi-pool segments */
if (base == RAY_STR) {
ray_t* result = ray_vec_new(RAY_STR, pass_count);
Expand Down Expand Up @@ -392,19 +426,56 @@ ray_t* exec_filter(ray_graph_t* g, ray_op_t* op, ray_t* input, ray_t* pred) {
}
}
if (RAY_IS_PARTED(col->type)) has_parted_cols = true;
ray_t* nc = typed_vec_new(out_type, out_attrs, pass_count);
/* RAY_LIST == 0; typed_vec_new rejects type <= 0, which would leave
* new_cols[c] NULL and silently DROP the LIST column. Allocate it
* as a proper list; elements are gathered (with a retain) in the
* dedicated LIST pass below. */
ray_t* nc = (out_type == RAY_LIST)
? ray_list_new(pass_count)
: typed_vec_new(out_type, out_attrs, pass_count);
if (!nc || RAY_IS_ERR(nc)) { new_cols[c] = NULL; continue; }
nc->len = pass_count;
new_cols[c] = nc;
}

/* LIST columns (flat or parted-LIST): gather element pointers with a
* retain. The byte-copy gather branches below copy raw 8-byte ray_t*
* cells without retaining — that would alias source elements and
* double-free on release (issue #355) — so LIST columns are filled
* here and skipped there. */
for (int64_t c = 0; c < ncols; c++) {
if (!new_cols[c]) continue;
ray_t* col = ray_table_get_col_idx(input, c);
if (!col) continue;
if (col->type == RAY_LIST) {
ray_t** d = (ray_t**)ray_data(new_cols[c]);
ray_t** s = (ray_t**)ray_data(col);
for (int64_t i = 0; i < pass_count; i++) {
ray_t* e = s[match_idx[i]];
if (e) ray_retain(e);
d[i] = e;
}
} else if (parted_base_is_list(col)) {
ray_release(new_cols[c]);
new_cols[c] = parted_gather_list_rows((ray_t**)ray_data(col),
col->len, match_idx,
pass_count);
if (new_cols[c] && RAY_IS_ERR(new_cols[c])) {
ray_error_free(new_cols[c]);
new_cols[c] = NULL;
}
}
}

if (has_parted_cols) {
/* Parted-aware gather: use parted_gather_col for parted columns,
* sequential flat gather for non-parted columns */
for (int64_t c = 0; c < ncols; c++) {
ray_t* col = ray_table_get_col_idx(input, c);
if (!col || !new_cols[c]) continue;
if (col->type == RAY_MAPCOMMON) continue; /* already materialized */
if (col->type == RAY_LIST || parted_base_is_list(col))
continue; /* gathered above with retain */
if (RAY_IS_PARTED(col->type)) {
int8_t pbase = (int8_t)RAY_PARTED_BASETYPE(col->type);
if (pbase == RAY_STR) {
Expand All @@ -430,6 +501,7 @@ ray_t* exec_filter(ray_graph_t* g, ray_op_t* op, ray_t* input, ray_t* pred) {
if (!new_cols[c]) continue;
ray_t* col = ray_table_get_col_idx(input, c);
if (col && col->type == RAY_MAPCOMMON) continue; /* already materialized */
if (col && col->type == RAY_LIST) continue; /* gathered above with retain */
int64_t ci = mgctx.ncols;
mgctx.srcs[ci] = (char*)ray_data(col);
mgctx.dsts[ci] = (char*)ray_data(new_cols[c]);
Expand All @@ -447,6 +519,7 @@ ray_t* exec_filter(ray_graph_t* g, ray_op_t* op, ray_t* input, ray_t* pred) {
for (int64_t c = 0; c < ncols; c++) {
ray_t* col = ray_table_get_col_idx(input, c);
if (!col || !new_cols[c]) continue;
if (col->type == RAY_LIST) continue; /* gathered above with retain */
uint8_t esz = col_esz(col);
char* src = (char*)ray_data(col);
char* dst = (char*)ray_data(new_cols[c]);
Expand All @@ -465,6 +538,8 @@ ray_t* exec_filter(ray_graph_t* g, ray_op_t* op, ray_t* input, ray_t* pred) {
if (!new_cols[c]) continue;
ray_t* col = ray_table_get_col_idx(input, c);
if (!col) continue;
if (col->type == RAY_LIST || parted_base_is_list(col))
continue; /* elements gathered+retained; no str-pool to touch */
if (RAY_IS_PARTED(col->type)) {
int8_t pb = (int8_t)RAY_PARTED_BASETYPE(col->type);
if (pb != RAY_STR) {
Expand Down Expand Up @@ -554,6 +629,35 @@ ray_t* exec_filter_head(ray_t* input, ray_t* pred, int64_t limit) {
out_attrs = parted_sym_max_attrs(sp, col->len);
} else out_attrs = col->attrs;
}
/* LIST (flat or parted-LIST): gather element pointers with a
* retain — the byte-copy gather below would alias them without a
* refcount and double-free on release (issue #355). typed_vec_new
* also rejects RAY_LIST (type 0), which would silently drop the
* column. */
if (out_type == RAY_LIST) {
ray_t* lcol;
if (RAY_IS_PARTED(col->type)) {
lcol = parted_gather_list_rows((ray_t**)ray_data(col),
col->len, match_idx, found);
} else {
lcol = ray_list_new(found);
if (lcol && !RAY_IS_ERR(lcol)) {
lcol->len = found;
ray_t** d = (ray_t**)ray_data(lcol);
ray_t** s = (ray_t**)ray_data(col);
for (int64_t j = 0; j < found; j++) {
ray_t* e = s[match_idx[j]];
if (e) ray_retain(e);
d[j] = e;
}
}
}
if (!lcol) continue;
if (RAY_IS_ERR(lcol)) { ray_error_free(lcol); continue; }
tbl = ray_table_add_col(tbl, name_id, lcol);
ray_release(lcol);
continue;
}
uint8_t esz = ray_sym_elem_size(out_type, out_attrs);
ray_t* new_col = typed_vec_new(out_type, out_attrs, found);
if (!new_col || RAY_IS_ERR(new_col)) continue;
Expand Down Expand Up @@ -852,14 +956,29 @@ ray_t* sel_compact(ray_graph_t* g, ray_t* tbl, ray_t* sel,
new_cols[c] = nc;
}

/* LIST columns: gather element pointers with a retain. The byte-copy
* gather paths below copy raw esz bytes (8-byte ray_t* pointers) without
* retaining — that would alias source elements and double-free on
* release — so LIST columns are filled here and skipped there. */
/* LIST columns (flat or parted-LIST): gather element pointers with a
* retain. The byte-copy gather paths below copy raw esz bytes (8-byte
* ray_t* pointers) without retaining — that would alias source elements
* and double-free on release — so LIST columns are filled here and
* skipped there. A parted LIST column's type is RAY_PARTED_BASE +
* RAY_LIST, not RAY_LIST, so it must be matched explicitly (issue
* #355). */
for (int64_t c = 0; c < ncols; c++) {
if (!new_cols[c]) continue;
ray_t* col = ray_table_get_col_idx(tbl, c);
if (!col || col->type != RAY_LIST) continue;
if (!col) continue;
if (parted_base_is_list(col)) {
ray_release(new_cols[c]);
new_cols[c] = parted_gather_list_rows((ray_t**)ray_data(col),
col->len, match_idx,
pass_count);
if (new_cols[c] && RAY_IS_ERR(new_cols[c])) {
ray_error_free(new_cols[c]);
new_cols[c] = NULL;
}
continue;
}
if (col->type != RAY_LIST) continue;
ray_t** d = (ray_t**)ray_data(new_cols[c]);
ray_t** s = (ray_t**)ray_data(col);
for (int64_t i = 0; i < pass_count; i++) {
Expand All @@ -873,7 +992,8 @@ ray_t* sel_compact(ray_graph_t* g, ray_t* tbl, ray_t* sel,
for (int64_t c = 0; c < ncols; c++) {
ray_t* col = ray_table_get_col_idx(tbl, c);
if (!col || !new_cols[c]) continue;
if (col->type == RAY_LIST) continue; /* gathered above with retain */
if (col->type == RAY_LIST || parted_base_is_list(col))
continue; /* gathered above with retain */
if (RAY_IS_PARTED(col->type)) {
int8_t pbase = (int8_t)RAY_PARTED_BASETYPE(col->type);
if (pbase == RAY_STR) {
Expand Down Expand Up @@ -933,7 +1053,7 @@ ray_t* sel_compact(ray_graph_t* g, ray_t* tbl, ray_t* sel,
for (int64_t c = 0; c < ncols; c++) {
if (!new_cols[c]) continue;
ray_t* scol = ray_table_get_col_idx(tbl, c);
if (scol && scol->type == RAY_LIST) {
if (scol && (scol->type == RAY_LIST || parted_base_is_list(scol))) {
/* LIST elements already gathered+retained; no str-pool / null
* bitmap to propagate. */
} else if (scol && RAY_IS_PARTED(scol->type)) {
Expand Down
6 changes: 4 additions & 2 deletions src/ops/group.c
Original file line number Diff line number Diff line change
Expand Up @@ -7268,14 +7268,16 @@ static ray_t* exec_group_parted(ray_graph_t* g, ray_op_t* op, ray_t* parted_tbl,

if (base_type == RAY_STR) {
flat = parted_flatten_str(segs, col->len, total_rows);
} else if (base_type == RAY_LIST) {
flat = parted_flatten_list(segs, col->len, total_rows);
} else {
uint8_t base_attrs = (base_type == RAY_SYM)
? parted_sym_max_attrs(segs, col->len) : 0;
flat = typed_vec_new(base_type, base_attrs, total_rows);
if (!flat || RAY_IS_ERR(flat)) {
ray_release(flat_tbl);
scratch_free(needed_hdr);
return ray_error("oom", NULL);
return flat ? flat : ray_error("oom", NULL);
}
/* segment cells are copied id-preserving — all partitions
* resolve over the root symfile's domain (PARTED
Expand All @@ -7300,7 +7302,7 @@ static ray_t* exec_group_parted(ray_graph_t* g, ray_op_t* op, ray_t* parted_tbl,
if (!flat || RAY_IS_ERR(flat)) {
ray_release(flat_tbl);
scratch_free(needed_hdr);
return ray_error("oom", NULL);
return flat ? flat : ray_error("oom", NULL);
}

flat_tbl = ray_table_add_col(flat_tbl, name_id, flat);
Expand Down
Loading
Loading