Repository navigation
fix(preflight): normalize Firestore query paths - #9683
tianmind-studio wants to merge 1 commit into
Conversation
Git-on-my-level
left a comment
There was a problem hiding this comment.
Thanks for tracking this down. I reviewed the diff and this looks like the right shape of fix: canonicalizing the inventory source with PurePath.as_posix() before it enters both the AST filename and QueryShape.source should remove the Windows-vs-POSIX separator from fingerprints, including registry-sourced shapes. The added regression test covers equivalent PureWindowsPath / PurePosixPath inputs producing the same source string and fingerprint.
I also ran the ratchet locally against the PR checkout with secrets stripped:
python backend/scripts/firestore_query_coverage.py --check-ratchet— passed
I could not run the targeted pytest in this stripped environment because google.cloud.firestore_v1 is not installed here, but GitHub's Backend unit suite is passing on the PR.
No blocking code issue from me. I am leaving this as a positive signal rather than a formal approval because the PR changes a preflight/static-contract script; a maintainer should still sanity-check the workflow/guardrail behavior before merge.
kodjima33
left a comment
There was a problem hiding this comment.
Preflight path normalization with a contract test; holding the merge on the maintainer-review label.
|
Fresh integration evidence from latest main: rebasing the #9440 pusher circuit-breaker fake-clock change and running |
|
Current |
|
Hey @tianmind-studio 👋 Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request. After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:
Before your next PR, please skim:
If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing. Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out. Thank you for being part of the Omi community! |
Summary
Root cause
inventory()passedstr(relative)intoQueryShape.source, andsourceis part of the fingerprint. Linux generatedbackend/database/...while Windows generatedbackend\database\..., so all 45 existing raw or unsupported fingerprints looked new on Windows. Waiver IDs were platform-dependent for the same reason.The old code reproduced both failures on Windows:
firestore_query_coverage.py --check-ratchetreported 42 new raw shapes and 3 new unsupported shapestest_query_coverage_baseline_tracks_current_raw_and_unsupported_debtfailed against the committed baselineDurable guard
All inventory paths now pass through
PurePath.as_posix()before constructing aQueryShape. The regression test feeds equivalentPureWindowsPathandPurePosixPathvalues through the analyzer and requires identical source strings and fingerprints. The full baseline test also passes on Windows.Validation
python backend/scripts/firestore_query_coverage.py --check-ratchet- passedpython -m pytest backend/tests/unit/test_firestore_query_contract.py::test_query_coverage_baseline_tracks_current_raw_and_unsupported_debt -q -m slow- 1 passedbackend/test.shselected-file runner - 6 passed, 2 deselectedblack --check --line-length 120 --skip-string-normalization ...- passedbackend/scripts/typecheck.sh- 0 errors$env:PYTHONUTF8='1'; make preflight- 14 checks passedFixes #9682.
Contributes to #9440.