Repository navigation
fix(base-engine): expose index as 0-based position in list filter - #12
Draft
378-kaiabot[bot] wants to merge 1 commit into
Draft
378-kaiabot[bot] wants to merge 1 commit into
378-kaiabot[bot] wants to merge 1 commit into
Conversation
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.
Note
Automated pull request by Pi, model
aperture/synthetic/hf:moonshotai/Kimi-K3. Implemented by an orchestrated Pi agent and validated empirically by the orchestrating agent againstaliou/obsdxon a worktree ofmain(commiteab109f).Problem
In
list/searchfilters, thesort.indexbinding was 1-based while the numeric bindings around it are 0-based, so sorting "by the third filter criterion" silently targeted a different column thanindex: 2implies (andindex: 0could not address the first criterion). Reported with a repro in the linked issue.The fix was confirmed empirically both ways at review time: the new regression test fails on a scratch worktree of
mainwithout the fix and passes on this branch.Changes
packages/base-engine/src/expressions/evaluator.ts— the filter'sindexis now exposed as the 0-based position within the filter expression, consistent with how position-like values behave elsewhere on the interfacepackages/base-engine/test/query.test.ts— regression test asserting the 0-based interpretationVerification
turbo run test --force✅ —@aliou/obsdx-base-engine: 12 files, 102 passed (uncached; the rest of the workspace suite green as well)mainin a scratch worktree fails as expectedCloses #9
Run host:
confident-somerville· Session:01a0d467-7973-766f-ada1-dddc5d84111d· Model:aperture/synthetic/hf:moonshotai/Kimi-K3