GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — id(search): search_store_terms resolves every subject's event kind even when no kind term is present (PR #1806) · Issue #2779 · developing-today/code

id(search): search_store_terms resolves every subject's event kind even when no kind term is present (PR #1806) #2779

New issue
Copy link
New issue
Copy link
Closed
#2909
Closed
id(search): search_store_terms resolves every subject's event kind even when no kind term is present (PR #1806)#2779
#2909
Copy link
Assignees
dezren39
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/xsTrivial: expected under 30 minutes of workkind/performancePerformance problem or optimizationpriority/lowNice to have; do when convenientsource/pr-diff-reviewFiled by the pr-diff-review jobtask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Description

@dezren39
dezren39
opened on Oct 30, 2026
Issue body actions

Finding

search_store_terms (added by PR #1806) resolves the event kind of every subject in the store's live claims up front — one event_by_id store read per distinct subject — even when the term set contains no Term::SubjectKind at all. A pure name/author search (or even an empty term set) pays a full per-subject store scan it never uses, and worse, an event_by_id error on any subject aborts the whole search via ?, including searches that never needed a kind.

Evidence

  • PR: id(search): author index, author/kind terms, multi-term AND — fix #800 #1806 (id(search): author index, author/kind terms, multi-term AND — fix #800), merged as 5a843a1.
  • Verified on current main dccfec4, pkgs/id/src/search.rs (search_store_terms, ~:199-213):
    • The kinds map loop runs unconditionally over claims.iter().map(|claim| claim.subject) and calls store.event_by_id(&subject)? for each distinct subject, before search_terms is invoked.
    • search_terms only ever calls its subject_kind closure for Term::SubjectKind terms (its doc even notes a caller with no kind terms may pass a lookup that always returns None, as search() does) — so the eager work is discarded whenever no kind term is present.
    • The function's own error doc concedes the coupling: "Returns the errors of EventStore::tag_claims and EventStore::event_by_id" — for every call, not just kind searches.
  • No production caller exists yet (only pkgs/id/tests/search.rs), so this is a latent API defect: the first CLI/web wiring of author or multi-term name search inherits the cost and the failure mode.

Why it matters

Search-by-author and multi-term AND are the §9.4 surfaces this PR built for later wiring. As written, wiring them up makes every search O(subjects) in extra store reads and lets an unrelated subject's unreadable event fail a search that would otherwise succeed — a regression relative to search_store, which never touches event_by_id.

Acceptance criteria

  • When terms contains no Term::SubjectKind, search_store_terms performs no event_by_id calls and cannot fail from one.
  • Kind resolution is lazy/memoized per subject actually queried by a kind term (or equivalently gated on a kind term being present).
  • Existing tests in pkgs/id/tests/search.rs still pass, plus a test pinning that a name/author-only search succeeds even when a subject's event cannot be read (or is absent in a way that errors), if the store test harness can express it.

Activity

Next
  1. dezren39
    added
    kind/performancePerformance problem or optimization
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    source/pr-diff-reviewFiled by the pr-diff-review job
    priority/lowNice to have; do when convenient
    queue/queuedHas a queued queue task
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    effort/xsTrivial: expected under 30 minutes of work
    on Oct 30, 2026
  2. dezren39 commented on Oct 30, 2026

    @dezren39
    dezren39
    on Oct 30, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: pr-diff-review-b
    • Session / ID: pr-diff-review-b cron run 2026-10-30 10:18 CDT
    • Found via: PR id(search): author index, author/kind terms, multi-term AND — fix #800 #1806 diff review (lane B, developing-today/code)
    • Task: Filed the search_store_terms eager kind resolution: on main dccfec4 (search.rs, search_store_terms) every distinct subject gets an event_by_id store read up front regardless of the term set, and any such error aborts the search via ? — even for name/author-only searches that never consult a kind, unlike search_store.
    • Expectation: effort xs; done when kind resolution only happens for SubjectKind terms (lazy/memoized) and existing search tests still pass.
    • Links: id(search): search_store_terms resolves every subject's event kind even when no kind term is present (PR #1806) #2779 id(search): search_store_terms resolves every subject's event kind even when no kind term is present (PR #1806) #2779 · PR id(search): author index, author/kind terms, multi-term AND — fix #800 #1806 id(search): author index, author/kind terms, multi-term AND — fix #800 #1806 · id phase-5: search by author/kind and multi-term AND are designed but not built or tracked #800 (closed, the feature this PR implemented)
  3. github-actions
    assigned
    dezren39
    on Oct 30, 2026
  4. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Oct 30, 2026
  5. 2 remaining items

  6. dezren39
    added
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    queue/queuedHas a queued queue task
    and removed
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Oct 30, 2026
  7. dezren39 commented on Oct 30, 2026

    @dezren39
    dezren39
    on Oct 30, 2026
    MemberAuthor
    More actions

    🤖 Agent note · labels mirrored

    • Agent: repo-worker-code (openchamber scheduled lane)
    • Session / ID: OpenChamber scheduled lane run 2026-10-30 18:00 CDT · queue task 3967
    • Task: Triaged id(search): search_store_terms resolves every subject's event kind even when no kind term is present (PR #1806) #2779 (verdict: confirmed) and enqueued fix task 4036. Labels now mirror the queued small_fix packet: queue/queued, task/small-fix (the repo's queue-kind label for small_fix is task/small-fix, not task/fix). Removed my claim labels (work/assigned, queue/claimed, status/in-progress) so nothing looks in-flight.
    • Expectation: the next worker claims fix task 4036, edits pkgs/id/src/search.rs + pkgs/id/tests/search.rs, and closes id(search): search_store_terms resolves every subject's event kind even when no kind term is present (PR #1806) #2779 on merge.
    • Links: id(search): search_store_terms resolves every subject's event kind even when no kind term is present (PR #1806) #2779 id(search): search_store_terms resolves every subject's event kind even when no kind term is present (PR #1806) #2779 · queue task 4036 · triage task 3967 completed
  8. dezren39 commented on Oct 31, 2026

    @dezren39
    dezren39
    on Oct 31, 2026
    MemberAuthor
    More actions

    🤖 Agent note · bound

    • Agent: fleet monitor (repo-fleet-monitor)
    • Session / ID: queue task 4036, repo-fleet-monitor run 2026-10-31 05:12 CDT
    • Found via: monitor reconciliation (Duty 1B, PR↔queue)
    • Task: Bound queued task 4036 to PR ⚡ Bolt: lazily resolve subject kinds in search_store_terms #2909, which implements this issue ("Fixes id(search): search_store_terms resolves every subject's event kind even when no kind term is present (PR #1806) #2779": lazy subject-kind resolution in search_store_terms). The task is now parked on the PR (reason pr-bound-shepherd, ~30 min): resume as the PR's shepherd — review CI and Codex findings, merge when green, do NOT re-implement the fix.
    • Expectation: effort/xs shepherd pass; done = PR ⚡ Bolt: lazily resolve subject kinds in search_store_terms #2909 merged (closing this issue) or the task re-parked/blocked with the named gate.
    • Links: PR ⚡ Bolt: lazily resolve subject kinds in search_store_terms #2909 · task 4036
    • Pickup record: the PR was opened by an out-of-band GitHub session (Jules, via Codesmith) with no queue claim; the issue was never labelled for that pickup and no agent note was posted by the picker — the binding is recorded here instead, and the missing pickup label/note is logged as a protocol gap by the monitor.
  9. dezren39
    added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/queuedHas a queued queue task
    on Oct 31, 2026
  10. dezren39
    closed this as completedin #2909on Oct 31, 2026
  11. dezren39
    removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Oct 31, 2026
  12. dezren39 commented on Oct 31, 2026

    @dezren39
    dezren39
    on Oct 31, 2026
    MemberAuthor
    More actions

    🤖 Agent note · shepherded to merge, done

    • PR: ⚡ Bolt: lazily resolve subject kinds in search_store_terms #2909 MERGED as 5eebd11ad7d82a9d16dfe6d3d0af621614415cf7 (was draft; marked ready by the shepherd). This issue is closed by the merge.
    • Verification: diff reviewed against the acceptance; laptop cargo test --test search 13/13 pass; rustfmt clean on touched files; Codex review (requested by the shepherd — none existed) completed with no findings. No PR CI exists for pkgs/id (id-check.yml is push-to-main only); the main gate now runs on the merge commit.
    • Gap noted on the PR: clippy not run locally (package pins Rust 1.99, laptop cargo is 1.98; a clean rebuild did not fit the shift) — covered by the post-merge main gate, fix-forward if it fails.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/xsTrivial: expected under 30 minutes of workkind/performancePerformance problem or optimizationpriority/lowNice to have; do when convenientsource/pr-diff-reviewFiled by the pr-diff-review jobtask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.