Repository navigation
feat(kividb): filter multi-valued labels on KiviDB >= 1.0.5; CI on v1… - #326
murtazayusuf wants to merge 1 commit into
Conversation
….0.5-full KiviDB 1.0.5 accepts FT.CREATE `TAG SEPARATOR` and splits stored values on it, so the multi-valued `labels` field no longer needs to be a hard error. - New `kividb_caps` library module (unit-tested): parses `kividb_version` from `INFO server` and gates multi-valued TAG support at >= 1.0.5. An unknown, malformed or pre-release version reads as unsupported, so the existing hard error remains the fallback. - `configure()` and the `--skip-upload` path of `search()` read the server version before `validate_dataset_support`; on >= 1.0.5 `labels` is declared `TAG SEPARATOR ;`, the same declaration redis.rs uses and matching the `;`-joined value `upload` already stores. `create_index` refuses to declare it without support even if validation is skipped. - The labels integration test now asserts filtered recall (>= 0.9) on the multi-valued fixture instead of rejection; the rejection path is covered by unit tests on both sides of the gate. - tests/docker-compose.test.yml: quay.io/kividbio/kividb:v1.0.2-full -> v1.0.5-full. - README / module docs: the redis#205 divergences re-measured on 1.0.5. Items 1-7 and 9 no longer reproduce; 8 (no GEO type) still does. The emitter is unchanged because its output is correct on every version. Verification: - make agent-check: exit 0 (181 lib + 906 bin + invariant suites, fmt, clippy -D warnings). - integration_kividb against KiviDB 1.0.5: 21/21 passed; multi-valued labels recall 1.000. - Mutations, each restored after: dropping `SEPARATOR` from the labels declaration -> labels test recall 0.000, FAILED; gate min version 1.0.4 or always-true -> kividb_caps unit tests FAILED; rejecting labels regardless of version -> engine unit test FAILED. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WdtvAfcNSzV85y5jAHMVr8
|
🤖 Automated first-pass review — a human maintainer's review is still required before merge. What I checked: whether the version gate can fail open (taxonomy item 1, a filter that runs but silently matches nothing), whether the Things the PR already gets right, so nobody has to rediscover them:
Worth fixing before merge: nothing I'd call blocking. Optional / follow-up:
The README's per-dataset table and the "2 of 61 on >= 1.0.5, 3 on older" count match the code paths above. The Net: a clean, well-scoped extension. It fails closed on every unknown, the mutation testing backs up its claims, and the 1.0.5 re-measurement is careful (expected counts computed from the fixture rather than taken from either server). The optional items are small and local. Whether to drop live CI coverage of pre-1.0.5 KiviDB is a maintainer's call, and so is accepting the PR. |
|
Thank you for this, @murtazayusuf. The version gate, Maintainer edits are off on the fork, so I've continued it in #375. Your commit
This PR will be closed when #375 merges. Comments on the follow-ups are very welcome there. |
… and the FT.INFO check #375 review pass 2, optional item 1: `"keyword" | "uuid" | "bool"` was written out in `create_index`, `validate_dataset_support` and `tag_field_names`. A TAG type added to `create_index` but not to `tag_field_names` would drop out of the FT.INFO declaration check, so a stale bare index on that field would pass `--skip-upload` silently. `is_tag_type` is now the one definition, and `tag_field_names_are_exactly_the_tag_typed_fields` pins the set. The Co-authored-by trailer below credits #326's author in the default squash message (this repo squashes with COMMIT_MESSAGES, and ce46925 itself is authored as Claude). Co-authored-by: murtazayusuf <65263321+murtazayusuf@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Superseded by #381, which carries @fcostaoliveira's follow-ups from #375 and moves CI to KiviDB 1.1.2. Closing this one. |
…381) Multi-valued TAG labels on KiviDB (SEPARATOR ;), with the FT.INFO separator read-back on reused indexes. TAG support is gated on KiviDB >= 1.1.2: older servers, or ones whose version can't be read, refuse TAG datasets and name the version reported. CI runs kividb/kividb:v1.1.2-full from Docker Hub. Supersedes #326. Follow-up: #375 (TAG value escaping on 1.1.2). Co-authored-by: fcostaoliveira <fcostaoliveira@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
….0.5-full
KiviDB 1.0.5 accepts FT.CREATE
TAG SEPARATORand splits stored values on it, so the multi-valuedlabelsfield no longer needs to be a hard error.kividb_capslibrary module (unit-tested): parseskividb_versionfromINFO serverand gates multi-valued TAG support at >= 1.0.5. An unknown, malformed or pre-release version reads as unsupported, so the existing hard error remains the fallback.configure()and the--skip-uploadpath ofsearch()read the server version beforevalidate_dataset_support; on >= 1.0.5labelsis declaredTAG SEPARATOR ;, the same declaration redis.rs uses and matching the;-joined valueuploadalready stores.create_indexrefuses to declare it without support even if validation is skipped.v1.0.5-full.
Verification:
SEPARATORfrom the labels declaration -> labels test recall 0.000, FAILED; gate min version 1.0.4 or always-true -> kividb_caps unit tests FAILED; rejecting labels regardless of version -> engine unit test FAILED.