Skip to content

fix(firestore): qualify two historic implicit document index forms - #25337

Merged
Git-on-my-level merged 1 commit into
mainfrom
sca-2225/legacy-index-qualification
Nov 14, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
sca-2225/legacy-index-qualification

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

What changed and why

Firestore readiness reports two historic jobs indexes MISSING when the Admin API includes their implicit terminal document order. Qualify that representation only for COLLECTION/batch_pipeline_dev_jobs and COLLECTION/batch_pipeline_prod_jobs with state ASCENDING, enqueued_at ASCENDING and the matching terminal name ASCENDING.

The shared state classifier now recognizes those two exact legacy requirements in check-only, wait and missing/provision planning paths. Project/database/collection resource identity, ANY_API scope, ambiguity rejection and actual READY state remain required. New collections, fields, directions and scopes retain exact matching. No declarations, workflow calls, application pin or schema writes change.

The existing full-manifest fixture now models one physical Admin API resource when historic and explicit-name declarations describe the same shape. Separate tests explicitly reject multiple matching resources and exact-plus-alias ambiguity.

Product invariants affected

  • INV-DATA-1: project/database/resource identity and production data routing remain enforced. This change qualifies only two historical composite representations and retains non-READY refusals and API-scope checks.

How it was verified

  • 153 focused tests pass through backend/test.sh with an explicit two-file list and a 240-second worker-host bound: 40 compatibility cases and 113 existing reconciler tests.
  • Cases cover wrong terminal direction, query scope, API scope, project/database/collection/resource path, new fields/collections, genuine CREATING/MISSING, duplicate ambiguity, canonical check-only and wait, and avoiding duplicate creation for an existing historic alias.
  • Pinned Python formatter and diff checks pass. Normal pre-push passes without bypass; exact-head qualification receipts are recorded on SCA-2225.

Independent native Luna source review: SHIP, no blocking findings, execution exec-rifle-together-salmon-margin-circle-magic (2026-11-14 22:26Z). This is source review, not a green-CI or production-admission claim.

Read-only canonical check-only against the unchanged pin71 manifest/registry completed at 22:23:45Z. Both historic requirements qualify READY; 283 of 288 composite requirements are READY and five remain CREATING, with zero blocking field indexes. The full gate correctly refuses. Comparing the same captured metadata with the previous control source changes only the two historic requirements (MISSING to READY); the five CREATING requirements remain unchanged. This observes metadata only and does not activate these controls in an existing run.

Application pin: 71c79e7. Readiness controls must check that source's unchanged manifest/registry; this PR does not change the application image or claim that still-building indexes are READY. Normal CI, independent review and release admission remain required.

UI evidence

UI-Evidence: none -- schema metadata qualification only.

Failure class (fixes)

Failure-Class: none

Tests

New backend/tests/unit/test_firestore_historic_index_qualification.py exercises the shared canonical qualification boundary. Existing reconciler tests retain their safety assertions with API-shaped fixture resources.

New guards

The release owner reported the historic implicit-name discrepancy on SCA-2225 at 19:59Z and requested bounded repair for fixed pin71 at 22:11Z. The existing resource/readiness classifier owns the narrow compatibility set; no additional workflow, matching bypass or parallel readiness mechanism is introduced.

View guided diff Turn on auto-fix

@Git-on-my-level

Copy link
Copy Markdown
Member Author

Supporting review evidence for exact head a421ae0cefda0a9b54b5c21ad001779d710b4aeb.

Reviewer: independent native Codex gpt-6-luna, read-only on the M1 worker, execution exec-rifle-together-salmon-margin-circle-magic, completed 2026-11-14T22:26:36.611597Z. Original result SHA256: 0e2b62c0cf55c795bfb8999d6e479f942ae6e6cb9f36c15be851abfa9f39b9c8. Reviewed implementation SHA256: e5152719f0000067ea215f8c2f037571f925a45961ed70eacd321a51732e5324.

Recorded by the author, M1 Studio Codex (Sol). The native review is supporting evidence; this author comment is not a Multica review-of-record verdict or a GitHub approval. The designated Multica reviewer or authorized ruling must resolve that admission requirement. No additional review was launched for this packet.

Full native report follows, with runtime-local links converted to repository paths:

SHIP

No blocking findings in the requested source diff.

  • The default alias is limited to the two specified COLLECTION signatures. Qualification still requires ANY_API, matching project/database/collection resource identity, and exactly one matching resource; duplicate matches remain AMBIGUOUS. The existing explicit opt-in behavior is preserved. backend/scripts/reconcile_firestore_indexes.py:33, :452.
  • Check-only proposals, missing-index detection, provisioning, and waiting share this qualification path. States other than READY still block readiness. backend/scripts/reconcile_firestore_indexes.py:957, :999, :1072.
  • The new tests cover invalid shapes and identities, non-READY states, and both alias-plus-exact and multiple-alias ambiguity. The fixture correction models a single normalized Admin API resource; the focused ambiguity tests construct distinct resources explicitly, so the correction does not mask that case. backend/tests/unit/test_firestore_historic_index_qualification.py:34, backend/tests/unit/test_reconcile_firestore_indexes.py:65.
  • Source-root verification still requires the manifest to be inside that root and checks it against that root’s registry. The readiness action passes its admitted source_sha; no workflow or application-pin file is changed in this diff. backend/scripts/reconcile_firestore_indexes.py:268, .github/actions/firestore-readiness/action.yml:62.

Review was source-only as requested: I did not run tests, the reconcile CLI, or cloud commands, and I make no claim about live index readiness.

Bot/connector finding inventory at packet preparation: zero PR issue comments, zero inline review comments, zero submitted PR reviews, and zero review threads. The paginated REST reads completed, and GraphQL returned reviewThreads.totalCount=0, hasNextPage=false at this exact head. There are no findings in those surfaces to dismiss or defer. This is a time-scoped inventory, not a waiver for later findings or check annotations.

Author verification: 153 focused tests pass; normal pre-push passed 37 checks and the 11-file selected backend unit gate. Latest returned CheckRuns contain 40 SUCCESS, 25 SKIPPED and one NEUTRAL; one additional rollup context was not classified by the captured projection. Canonical exact-head CI/admission remains the release owner's merge gate.

Application pin remains 71c79e796a8586c9d057b272de7c90a0835ac288. The prior 22:23:45Z canonical read-only check qualified both historic requirements but refused the full set on five other CREATING requirements. This packet is not a readiness certificate, merge, dispatch, active-control uptake or production action.

@Git-on-my-level
Git-on-my-level merged commit 647aad6 into main Nov 14, 2026
67 checks passed
@Git-on-my-level
Git-on-my-level deleted the sca-2225/legacy-index-qualification branch November 14, 2026 23:01
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