Skip to content

fix(firestore): end the six v3 conversations index declarations in __name__ - #25551

Merged
Git-on-my-level merged 2 commits into
BasedHardware:mainfrom
Git-on-my-level:lane/q12-v3-index-names
Nov 17, 2026
Merged

Git-on-my-level merged 2 commits into
BasedHardware:mainfrom
Git-on-my-level:lane/q12-v3-index-names

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Summary

#25500 declared six conversations composite indexes in backend/database/firestore_index_registry.py without a trailing __name__:

  • conversations_v3_pending_capture_continuation
  • conversations_v3_pending_oldest_page
  • conversations_v3_active_legacy_meter
  • conversations_v3_derived_window
  • conversations_v3_geolocation_count
  • conversations_v3_day_count

Firestore stores each of them with __name__ appended. The readiness checker (reconcile_firestore_indexes.py --check-only) does an exact signature match and only aliases an implicit __name__ for HISTORIC_IMPLICIT_DOCUMENT_ID_SIGNATURES. So it reported all six as MISSING even after they were READY in dev.

This blocked every pusher dev qualification at "Verify serving Firestore indexes" (runs 43954955756 and 43981331203). It will block the next prod backend deploy as well.

This PR adds _asc('__name__') to those six entries and regenerates firestore.indexes.json with generate_firestore_indexes.py --write.

Verification

  • reconcile_firestore_indexes.py --check-only against based-hardware-dev with this manifest: "Firestore index readiness passed: 304 composite indexes and 29 field overrides READY".
  • pytest tests/unit/test_firestore_query_shapes.py: 607 passed.
  • Unit tests that reference the registry, manifest or reconcile script also pass.

CI unblock (test-only)

Shard 3 failed twice on CPU-guard tests in files this PR does not touch:

  • test_conversation_terminal_family.py::test_retry_triggers_never_replace_explicit_restore_authority[False-server_recovery]: 1.05s, then 1.42s. The first case paid the module imports. They now load at collection, and the case measures 0.06-0.13s.
  • test_mcp_conversation_detail_paging.py::test_walk_1200_segments_once_with_one_existing_read_per_page: 1.02-1.07s on CI against about 0.3s locally. This is real paging work, so it is allowlisted with that evidence.

Rollout note

Prod still lacks these six indexes. They have to be applied with gcp_firestore_indexes.yml (prod, composite-indexes) before this manifest lets a prod deploy pass readiness.

Failure-Class: none

🤖 Generated with Claude Code

Git-on-my-level and others added 2 commits November 17, 2026 07:29
…name__

BasedHardware#25500 declared six conversations composite indexes without a trailing
__name__ field. Firestore creates them with __name__ appended, and the
readiness checker only aliases an implicit __name__ for historic
signatures, so it reported all six MISSING even once they were READY.
Every pusher dev qualification failed at "Verify serving Firestore
indexes" because of this, and the next prod backend deploy would too.

Declare __name__ explicitly and regenerate firestore.indexes.json.

Failure-Class: none

Co-Authored-By: Claude Opus 5.5 <[email protected]>
test_conversation_terminal_family's first retry-trigger case paid the
lifecycle import and the lazy speaker_resolution_inputs import inside its
call phase (1.05s and 1.42s on CI). Import both at collection; the case
now measures 0.06-0.13s locally.

test_walk_1200_segments_once_with_one_existing_read_per_page does real
paging work over a 1200-segment transcript (~0.3s locally, 1.02-1.07s on
CI). Allowlist it with that evidence.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Git-on-my-level
Git-on-my-level merged commit 8b5ea50 into BasedHardware:main Nov 17, 2026
57 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant