Repository navigation
fix: select every registry composite for the isolated jit-qa Firestore database - #13464
Conversation
…e database The bounded QA operator selected 17 of 78 registry composites, so the signed-in QA app hit FailedPrecondition on the first shared query outside that set: action_items on 2026-09-10 and chat_first_deferrals (release_due_deferrals via POST /v2/chat/materialize-prompts) on 2026-09-11, while the plan reported "none missing". The registry is exactly the set production is reconciled against, so the operator now selects all of it; the QA-only single-field target stays explicit. Tests follow the registry count. Failure-Class: FC-undeclared-serving-query-index Co-Authored-By: Claude Fable 5.1 <[email protected]>
There was a problem hiding this comment.
1 issue found across 2 files
Confidence score: 5/5
- In
backend/tests/unit/test_jit_qa_firestore_index_operator.py, the_REGISTRY_COUNT >= 78floor may preserve a hardcoded staged-count assumption, allowing the test to pass without fully ensuring new production query requirements are provisioned; align the assertion with the registry-derived count or clarify why the floor remains.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="backend/tests/unit/test_jit_qa_firestore_index_operator.py">
<violation number="1" location="backend/tests/unit/test_jit_qa_firestore_index_operator.py:64">
P3: The new `_REGISTRY_COUNT >= 78` floor partially contradicts the change's stated intent of "the count follows the registry so a new production query requirement is provisioned" and removing hardcoded staged counts. If production ever legitimately reduces a composite (registry drops below 78), this test fails even though the operator correctly follows the registry. The lower-bound `>=` also does not catch the over-selection case the PR cares about, since `len(manifest["indexes"]) == _REGISTRY_COUNT` already ties the manifest to the registry. Consider asserting only the equality (len follow) and dropping the brittle hardcoded floor, or document why 78 is a permanent minimum.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| manifest, signatures = operator.selected_manifest() | ||
|
|
||
| assert len(manifest["indexes"]) == 17 | ||
| assert _REGISTRY_COUNT >= 78 |
There was a problem hiding this comment.
P3: The new _REGISTRY_COUNT >= 78 floor partially contradicts the change's stated intent of "the count follows the registry so a new production query requirement is provisioned" and removing hardcoded staged counts. If production ever legitimately reduces a composite (registry drops below 78), this test fails even though the operator correctly follows the registry. The lower-bound >= also does not catch the over-selection case the PR cares about, since len(manifest["indexes"]) == _REGISTRY_COUNT already ties the manifest to the registry. Consider asserting only the equality (len follow) and dropping the brittle hardcoded floor, or document why 78 is a permanent minimum.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At backend/tests/unit/test_jit_qa_firestore_index_operator.py, line 64:
<comment>The new `_REGISTRY_COUNT >= 78` floor partially contradicts the change's stated intent of "the count follows the registry so a new production query requirement is provisioned" and removing hardcoded staged counts. If production ever legitimately reduces a composite (registry drops below 78), this test fails even though the operator correctly follows the registry. The lower-bound `>=` also does not catch the over-selection case the PR cares about, since `len(manifest["indexes"]) == _REGISTRY_COUNT` already ties the manifest to the registry. Consider asserting only the equality (len follow) and dropping the brittle hardcoded floor, or document why 78 is a permanent minimum.</comment>
<file context>
@@ -53,10 +58,12 @@ def request(method, url, payload):
manifest, signatures = operator.selected_manifest()
- assert len(manifest["indexes"]) == 17
+ assert _REGISTRY_COUNT >= 78
+ assert len(manifest["indexes"]) == _REGISTRY_COUNT
+ assert operator.TARGET_REQUIREMENTS is registry.INDEX_REQUIREMENTS
</file context>
Summary
The isolated
jit-qaFirestore database is provisioned by the bounded QA operator, which selected 17 of the 78 registry composites. Every shared query outside that set returnsFailedPreconditionon the QA plane while the plan reports "none missing":GET /v1/action-itemsandGET /v1/scores(closed by fix: declare the descending action_items created-range composite and select action_items indexes for jit-qa #13454 / fix: keep the action_items created-range count composite ascending and select the newest-first composite for jit-qa #13457 with three more composites)POST /v2/chat/materialize-prompts→chat_first_intents.release_due_deferralsneedschat_first_deferrals (account_generation, state, due_at), which the registry already declares aschat_first_deferrals_dueThe 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.jsonis untouched (no prod reconciliation run is queued by this change).Verification
backend/tests/unit/test_jit_qa_firestore_index_operator.pyandtest_action_items_due_range_index_contract.py: 28 passedjit_qa_manual_operator.ymloperation=indexes-applyand confirm the deferral query serves on jit-qaFailure-Class: FC-undeclared-serving-query-index
🤖 Generated with Claude Code