Repository navigation
Conversation
Migrates the archived LangBot + Valkey cookbook to the current CONTRIBUTING.md format, scoped to the Valkey Search vector-database backend only. The rate-limiting cookbook is dropped: upstream PR langbot-app/LangBot#2267 was rejected by the maintainer, who asked for it as a plugin instead of a cookbook feature. Renumbered 01-getting-started / 02-vector-search (was 03) / 03-hybrid-and-filtering (was 04). Pinned valkey/valkey-bundle:9.1.0 and valkey-glide==2.5.0, verified against a live container (8/8 pytest tests pass, demo script output captured from an actual run). Fixes a real bug found during review: file_id_filter() encodes TAG- unsafe characters for queries, but the write path stored file_id raw, so ids containing those characters would silently stop matching forever. Storage now encodes consistently with the query path, and a regression test covers it. Signed-off-by: Anna Tao <annatao2004@gmail.com>
A wrapped continuation line started with "+ escape_tag", which markdownlint-cli2 (the exact version pinned in CI, v0.17.2) parses as a nested unordered-list marker inconsistent with the file's dash convention. Rewrapped the prose so no continuation line starts with a bullet character. Signed-off-by: Anna Tao <annatao2004@gmail.com>
Collaborator
|
Closing this draft PR as part of a cookbook program cleanup. |
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.
Summary
Migrates the archived LangBot + Valkey cookbook (from
archive/main-pre-reorg) to the currentCONTRIBUTING.mdformat, scoped to the Valkey Search vector-database backend only.valkey-glide, enable LangBot's opt-invalkey_searchbackendftAPIfile_idTAG filtering,vector_weightcaveat, query-injection safetyScope change from the original 4-cookbook series
The original series also covered distributed rate limiting (
valkey_fixwin). That cookbook is dropped in this PR: the upstream implementation, LangBot PR #2267, was not merged — the maintainer said it would be deprecated in favor of a plugin-based approach ("we're going to deprecate Pipeline in the upcoming versions, so this feature will not be accepted, and we recommend implementing this as a plugin"). The vector-search backend (LangBot PR #2276) is merged and released (LangBot v4.10.6), so this PR ships that half of the series now. Rate limiting may return as a separate cookbook if/when a plugin-based reference implementation exists.Version pins
valkey/valkey-bundle:9.1.0— theTEXTfield used by this backend needs valkey-search ≥ v1.2.0, which ships in the 9.x bundle linevalkey-glide==2.5.0— latest published release; verified compatible by actually running the sample and test suite against a live containerA bug found and fixed during review
Independent review caught a real issue in the code carried over from the archive:
file_id_filter()percent-encodes TAG-unsafe characters ({,},*,%) when building a query, but the write path storedfile_idraw and unencoded. A stored value containing one of those characters would silently stop matching its own filter forever — directly contradicting the cookbook's own claim that this "fails closed." Fixed by encoding at write time too, corrected the affected doc text (injection-safety section and troubleshooting table in cookbook 03), and added a regression test (test_delete_by_file_id_with_tag_unsafe_characters) that fails against the old code and passes against the fix.Validation
valkey-glide==2.5.0installed and run against a livevalkey/valkey-bundle:9.1.0containersample/vector_search.pydemo runs end-to-end; its README's "Expected output" block is captured from an actual run, not guessedsample/test_vector_search.py: 8/8 tests pass (7 original + 1 new regression test)markdownlint-cli2clean on all line-length (MD013) findingsPre-Submit Checklist
cookbook-python.ymlcopy, per the pattern used bycookbook-semantic-caching/cookbook-haystack/cookbook-agno— PR docs+ci: add semantic-caching cookbook with Python CI (MERGE FIRST FOR PYTHON CI) #45's shared workflow hasn't merged yet)🤖 Generated with Claude Code