fix(#558): codedb_query filter op no longer silently no-ops; output reflects pipeline transforms#559
Merged
Merged
Conversation
…through Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…arams; pipeline output reflects transforms filter now reads glob orelse pattern, auto-promotes bare patterns to '**/<pattern>' (same rule as codedb_search path_glob), and errors via finishQueryWithFailure when no recognized param is present instead of silently passing every file through. find defers its listing unless it is the pipeline's last step, so the rendered output is the post-filter/limit set (previously the eager 50-file dump made downstream transforms invisible). To preserve the issue-356 partial-results contract, finishQueryWithFailure now prints the file set accumulated before the failing step, and the unknown-op branch joins that contract. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Benchmark Regression ReportThresholds: 10.00% and 50,000 ns absolute delta
|
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.
Fixes #558.
Problem
filteronly readext/glob; any other param (e.g. the naturalpattern) silently passed all files through — live repro showedfind → filter → limit 3rendering all 50 files with stage trace1: filter (50 files).findprinted its list eagerly, so downstreamfilter/limitnever affected the rendered output (the final-set print is gated on empty output).Fix
filter:glob orelse pattern, bare-pattern**/auto-promotion (same rule as codedb_searchpath_glob), and an expliciterror: filter needs 'glob' (alias 'pattern') or 'ext'viafinishQueryWithFailurewhen neither is presentfind: defers its listing unless it is the last step — the pipeline tail prints the final transformed setfinishQueryWithFailurenow prints the file set accumulated before the failing step (and theunknown opbranch joins the contract)codedb_queryinputSchema documents the filter paramsFailing Test
test "issue-558: codedb_query filter must filter (or error) — never silently pass every file"(src/test_query.zig), committed red in f7b717f: pre-fix 65/66 (auth.ts leaked into output).Validation
zig build test: all green (729 tests), including issue-356-1/356-3 partial-results and stage-tail tests.🤖 Generated with Claude Code