Skip to content

preflight: canonicalize Firestore query fingerprints on Windows #9682

Closed

Description

@tianmind-studio

Problem

make preflight fails on Windows for any change matching backend/**/*.py, even when no Firestore query code changed.

The firestore-query-coverage check reports every existing raw or unsupported query fingerprint as new. On the current main, that is 42 raw shapes and 3 unsupported shapes.

Root cause

backend/scripts/firestore_query_coverage.py::inventory() passes str(relative) into QueryShape.source. The source string is part of QueryShape.fingerprint, so Windows uses paths such as backend\database\action_items.py while the committed Linux-generated baseline uses backend/database/action_items.py.

Observed on Windows:

  • current fingerprints matching the committed baseline: 0/45
  • fingerprints matching after normalizing source to POSIX separators: 45/45

This also makes waiver IDs platform-dependent because waivers use the same fingerprint.

Reproduction

From a Windows checkout of main:

$env:PYTHONUTF8 = '1'
make preflight

The check fails with new unregistered serving compound query shape(s) and new unsupported serving compound query shape(s) for untouched backend queries.

Proposed guard

Canonicalize all source paths with PurePath.as_posix() before constructing QueryShape, and add a platform-independent regression test comparing fingerprints produced from PureWindowsPath and PurePosixPath inputs.

Contributes to #9440.

Activity

  1. Git-on-my-level commented on Jul 14, 2026

    @Git-on-my-level
    Member

    Folded into #9755 (dev deployment acceptance hardening). The implementing PR for #9755 fixes this and will close this issue on merge via Closes #9682. Full requirements from this issue are carried verbatim into #9755's Part 3.

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

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions