Skip to content

Action items filtered by conversation_id + a due-date range still 500: two more undeclared Firestore indexes #10780

Closed

Description

@kodjima33

GET /v1/action-items accepts conversation_id alongside due_start_date/due_end_date, and the chat get_action_items tool passes both through to database.action_items.get_action_items. _apply_action_item_date_filters orders that due range ascending, so those calls need composite indexes that are neither declared in backend/database/firestore_index_registry.py nor deployed:

  • conversation_id ASC, due_at ASC, __name__ ASC
  • conversation_id ASC, completed ASC, due_at ASC, __name__ ASC

Evidence

Probed prod Firestore directly (read-only, non-existent uid so no user data is read):

conversation_id + due range       -> FailedPrecondition: 400 The query requires an index.
conversation_id + completed + due -> FailedPrecondition: 400 The query requires an index.
completed + created range         -> OK (that composite is deployed)

gcloud firestore indexes composite list --project=based-hardware shows six action_items composites; neither conversation_id+due_at pair is among them.

Same failure class as #10777 (FC-undeclared-serving-query-index), split out because it adds two more composites to a hot collection rather than declaring one that prod already had to hand-create. #10777's fix declares (completed ASC, due_at ASC) and adds the behavioral guard in backend/tests/unit/test_firestore_query_contract.py; extending that guard to the conversation_id chains is what should force these to be declared.

Activity

  1. moved this from Someday to In progress in omi TODO / bountieson Jul 28, 2026
  2. added a commit that references this issue on Jul 28, 2026
    0e093fb
  3. moved this from In progress to In review in omi TODO / bountieson Jul 28, 2026
  4. added a commit that references this issue on Jul 29, 2026
    b1e2bc1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions