GeezerVison is showing github.com — ⚡ Bolt: lazily resolve subject kinds in search_store_terms by dezren39 · Pull Request #2909 · developing-today/code
Conversation
dezren39
commented
Oct 31, 2026
•
edited by blacksmith-sh
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
💡 What: Optimize search_store_terms in pkgs/id/src/search.rs to avoid eager store.event_by_id lookups for all live claim subjects when no Term::SubjectKind query terms exist, and lazily resolve and memoize subject kinds on demand when kind terms are present.
🎯 Why: Previously, search_store_terms performed upfront event_by_id lookups over every distinct subject in tag_claims, creating O(N) database transactions even for pure name/author searches and causing searches to fail if an unrelated subject event could not be read.
📊 Impact: Eliminates O(N) read transactions and hashmap allocations for searches without kind filters, and avoids spurious aborts from unreadable/absent subject events.
🔬 Measurement: Verified with unit tests in pkgs/id/tests/search.rs, ensuring queries without kind terms run without touching event_by_id even when subject events are absent from the store.
Fixes #2779
PR created automatically by Jules for task 6804042770972420531 started by @dezren39
![Autofix with [code]smith](/api/image?u=https%3A%2F%2Fcamo.githubusercontent.com%2F33b6f70f3541c4e93f4503d29cbfec051fa1b040d8e0ae9313a51c4ece44a627%2F68747470733a2f2f70722d636f6d6d656e74732d6173736574732e626c61636b736d6974682e73682f636f6465736d6974682f6175746f6669782d776974682d636f6465736d6974682d6461726b2d33782e706e67)
Need help on this PR? Tag @codesmith-bot with what you need.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
chatgpt-codex-connector[bot] reacted with thumbs up emoji
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.
When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.
I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!
For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!
New to Jules? Learn more at jules.google/docs.
For security, I will only act on instructions from the user who triggered this task.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Oct 31, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Warning
Review limit reached
You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.
Next included review available in 33 minutes.
Check out review usage here.
View limit details
-
Limit details: You’ve used the included review currently available.
Learn how review limits work.
Review configuration:
Run configuration
-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
1e2759bd-2941-4ec6-ad86-0273e78983b6
Commits
-
Reviewing files that changed from the base of the PR and between a51aab2 and c17d495.
Files selected for processing: 3
-
.jules/bolt.md
pkgs/id/src/search.rs
pkgs/id/tests/search.rs
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
@codex review
Shepherd review (queue task 4036): this PR has no PR-triggered CI (id-check.yml runs on push to main only) and had no Codex review yet. Requesting one now; laptop cargo verification is running in parallel.
|
google-labs-jules[bot] reacted with eyes emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Codex Review Summary
This comment shows the latest Codex review activity on this pull request.
| Review |
Status |
Commit |
Review trigger |
| 📝 Code Review |
✅ Completed 2026-10-31T11:02:16.653538Z |
c17d495 |
Draft marked ready |
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review" or "@codex security review".
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Codex Review: Didn't find any major issues. Swish!
Reviewed commit: c17d495187
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Shepherd verification (queue task 4036, lane E):
- Diff reviewed against id(search): search_store_terms resolves every subject's event kind even when no kind term is present (PR #1806) #2779's acceptance: kinds resolve lazily/memoized only when a
Term::SubjectKind is present; the no-kind path performs no event_by_id calls; kind-path store errors still propagate. The new test pins a name/author search succeeding with a missing subject event.
- Laptop:
cargo test --test search — 13 passed, 0 failed. rustfmt --check on the touched files (src/search.rs, tests/search.rs) is clean (a pre-existing fmt diff in untouched src/commands/peers.rs under this toolchain was left alone).
- Codex review (requested by the shepherd, none existed): completed on c17d495 with no findings.
- No PR CI exists for pkgs/id — id-check.yml triggers on push to main only — so the nix flake gate runs post-merge on main.
- Not run: clippy. The package pins Rust 1.99 (rust-toolchain.toml) while the laptop cargo that built the test artifacts is 1.98, so clippy needs a full clean rebuild under 1.99 that did not fit this shift; the post-merge main gate covers it, and any failure there gets a fix-forward.
Merging under the fleet's standing merge directive.
|
google-labs-jules[bot] reacted with eyes emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Shepherd verification (queue task 4036, lane E):
- Diff reviewed against id(search): search_store_terms resolves every subject's event kind even when no kind term is present (PR #1806) #2779's acceptance: kinds resolve lazily/memoized only when a
Term::SubjectKind is present; the no-kind path performs no event_by_id calls; kind-path store errors still propagate. The new test pins a name/author search succeeding with a missing subject event.
- Laptop:
cargo test --test search — 13 passed, 0 failed. rustfmt --check on the touched files (src/search.rs, tests/search.rs) is clean (a pre-existing fmt diff in untouched src/commands/peers.rs under this toolchain was left alone).
- Codex review (requested by the shepherd, none existed): completed on c17d495 with no findings.
- No PR CI exists for pkgs/id — id-check.yml triggers on push to main only — so the nix flake gate runs post-merge on main.
- Not run: clippy. The package pins Rust 1.99 (rust-toolchain.toml) while the laptop cargo that built the test artifacts is 1.98, so clippy needs a full clean rebuild under 1.99 that did not fit this shift; the post-merge main gate covers it, and any failure there gets a fix-forward.
Merging under the fleet's standing merge directive.
Acknowledged. Thank you for the verification and merge.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Milestone
No milestone
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.
|