Repository navigation
fix: keep the action_items created-range count composite ascending and select the newest-first composite for jit-qa - #13457
Merged
Conversation
…d select the newest-first composite for jit-qa get_scores counts completed tasks created in the last week through ACTION_ITEMS_COMPLETED_CREATED_RANGE_QUERY.build with no ordering, which Firestore serves only from the ascending composite. #13454 flipped that spec to descending for the newest-first list read; declare that ordering as an index-only requirement instead and select it in the bounded jit-qa operator. Failure-Class: FC-undeclared-serving-query-index Co-Authored-By: Claude Fable 5.1 <[email protected]>
Git-on-my-level
deleted the
codex/jit-qa-scores-count-index-20260910
branch
September 10, 2026 22:52
Git-on-my-level
added a commit
that referenced
this pull request
Sep 11, 2026
…e database (#13464) ## Summary The isolated `jit-qa` Firestore database is provisioned by the bounded QA operator, which selected 17 of the 78 registry composites. Every shared query outside that set returns `FailedPrecondition` on the QA plane while the plan reports "none missing": - 2026-09-10: `GET /v1/action-items` and `GET /v1/scores` (closed by #13454 / #13457 with three more composites) - 2026-09-11: `POST /v2/chat/materialize-prompts` → `chat_first_intents.release_due_deferrals` needs `chat_first_deferrals (account_generation, state, due_at)`, which the registry already declares as `chat_first_deferrals_due` The QA app now runs the full shared desktop path for real working days, so adding composites one measured failure at a time costs a PR plus an apply run per path. The registry is exactly the set production is reconciled against, so the operator now selects all of it. Project, database, confirmation, and the QA-only single-field target are unchanged, and `firestore.indexes.json` is untouched (no prod reconciliation run is queued by this change). ## Verification - `backend/tests/unit/test_jit_qa_firestore_index_operator.py` and `test_action_items_due_range_index_contract.py`: 28 passed - After merge: dispatch `jit_qa_manual_operator.yml` `operation=indexes-apply` and confirm the deferral query serves on jit-qa Failure-Class: FC-undeclared-serving-query-index 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/13464?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. -->
huiyuansun28-cmyk
added a commit
to huiyuansun28-cmyk/omi
that referenced
this pull request
Sep 15, 2026
Bounty Issue BasedHardware#13457
Contributor
|
PR submitted: #14040 Created by AUTO (AI Agent). AI authorship disclosed. |
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
Follow-up to #13454. After its indexes were applied to the isolated
jit-qadatabase,GET /v1/action-itemsreturned 200 butGET /v1/scoresstill returned 500 (FailedPrecondition): the weekly count inget_scoresisACTION_ITEMS_COMPLETED_CREATED_RANGE_QUERY.build(...)with no ordering, and Firestore serves that aggregation only from the ascending(completed, created_at, __name__)composite. #13454 had flipped that spec to descending, which is what the newest-first list read needs but not what the count needs, and the ascending composite is declared by an index-only requirement (action_items_completed_created) the bounded jit-qa operator never selected.Changes (registry stays truthful for both consumers; the generated manifest's index set is unchanged, only entry order moves):
backend/database/firestore_index_registry.py:ACTION_ITEMS_COMPLETED_CREATED_RANGE_QUERYis ascending again, documented as theget_scorescount aggregation; the newest-first list composite(completed ASC, created_at DESC, __name__ DESC)is now the index-only requirementaction_items_completed_created_newest_first, beside itsaction_items_*siblings.backend/scripts/jit_qa_firestore_index_operator.py: selects index-only requirements by identifier and addsaction_items_completed_created_newest_first(16 → 17 composites for jit-qa).Verified so far on jit-qa: after #13454's apply, six
/v1/action-itemsreads returned 200 in Cloud Run logs and only/v1/scoresremained at 500 with the ascending-index suggestion.Failure-Class: FC-undeclared-serving-query-index
Line-Count-Exception: backend/database/firestore_index_registry.py | 1533 -> 1542 | one new index-only requirement plus its rationale comment in the single generated-manifest source; not splittable for one composite
🤖 Generated with Claude Code