#13: RED bounded duplicate-aware secondary-index range #13

Open
nsaspy wants to merge 1 commit from rage/13-index-range-duplicates-red into master
Owner

RED-first generic Tek9 dependency for lost-rob0t/llm-log#15.

The new index test requires select-index-range to enumerate all DUPSORT postings for the same secondary key while respecting :limit and inclusive range bounds. index-fetch already proves duplicates are stored, but it is unbounded; the expert-plane dataset query needs the existing bounded public primitive to be duplicate-aware.

No production mutation in this initial PR head. Expected master failure: exact-key range over two a postings returns fewer than both.

RED-first generic Tek9 dependency for `lost-rob0t/llm-log#15`. The new index test requires `select-index-range` to enumerate all DUPSORT postings for the same secondary key while respecting `:limit` and inclusive range bounds. `index-fetch` already proves duplicates are stored, but it is unbounded; the expert-plane dataset query needs the existing bounded public primitive to be duplicate-aware. No production mutation in this initial PR head. Expected master failure: exact-key range over two `a` postings returns fewer than both.
test: RED bounded range over duplicate index postings
Some checks failed
CI / tests (ubuntu-22.04) (pull_request) Successful in 4m32s
CI / tests (ubuntu-24.04) (pull_request) Successful in 6m37s
CI / package-smoke (pull_request) Failing after 8s
CI / benchmark-regression (pull_request) Failing after 24m5s
CI / merge-gate (pull_request) Failing after 4s
90396672de
Author
Owner

Adversarial review found this RED premise was wrong. lmdb:cursor-next on a DUPSORT database advances through duplicate values, and Tek9's current select-index-range uses that operation correctly. The llm-log fixture's second supposed success used authoritative user_feedback=success, which the current SWI-Prolog outcome contract deliberately maps to unknown rather than success. That left only one success assertion, so truncated=false was correct. No Tek9 production change is justified; closing this draft without merge.

Adversarial review found this RED premise was wrong. `lmdb:cursor-next` on a DUPSORT database advances through duplicate values, and Tek9's current `select-index-range` uses that operation correctly. The llm-log fixture's second supposed `success` used authoritative `user_feedback=success`, which the current SWI-Prolog outcome contract deliberately maps to `unknown` rather than success. That left only one success assertion, so `truncated=false` was correct. No Tek9 production change is justified; closing this draft without merge.
Some checks failed
CI / tests (ubuntu-22.04) (pull_request) Successful in 4m32s
CI / tests (ubuntu-24.04) (pull_request) Successful in 6m37s
CI / package-smoke (pull_request) Failing after 8s
CI / benchmark-regression (pull_request) Failing after 24m5s
CI / merge-gate (pull_request) Failing after 4s
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin rage/13-index-range-duplicates-red:rage/13-index-range-duplicates-red
git switch rage/13-index-range-duplicates-red

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch master
git merge --no-ff rage/13-index-range-duplicates-red
git switch rage/13-index-range-duplicates-red
git rebase master
git switch master
git merge --ff-only rage/13-index-range-duplicates-red
git switch rage/13-index-range-duplicates-red
git rebase master
git switch master
git merge --no-ff rage/13-index-range-duplicates-red
git switch master
git merge --squash rage/13-index-range-duplicates-red
git switch master
git merge --ff-only rage/13-index-range-duplicates-red
git switch master
git merge rage/13-index-range-duplicates-red
git push origin master
Sign in to join this conversation.
No description provided.