Stage D: apply the two must-fix resolution-floor / resolved-tag constants - #343
Merged
Merged
Conversation
This was referenced Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docs/pipeline-fidelity-gate.mdSS3): applies the two remaining MISSING knowledge-inventory constants to Stage D's_eligible_cards_queryset(local_calculate_verdicts.py), shared by both the join-key and fallback calculators.RESOLUTION_FLOOR_DPI = 200excludes cards whose source image sits below the pilot's empirically-validated resolution floor. Implemented as.exclude(Q(dpi__lt=200) & Q(dpi__isnull=False)), not a bare.exclude(dpi__lt=200)— the bare form is not null-safe (NOT (dpi < 200)evaluates to NULL, not TRUE, for a NULLdpiunder SQL's three-valued logic, so it would silently drop a null-dpi card too).Card.dpiis a DB-level NOT NULL column today (confirmed live: 0 nulls), so this only matters if that constraint ever moves — guarded anyway per the task spec.EXCLUDED_RESOLVED_TAGS = ["custom-art", "non-english"]excludes cards already tagged either, via the sametags__containsmechanism the live pilot's own_eligible_base_querysetuses.local_calculate_verdicts.py(not imported fromlocal_identify_printing_tags), matching this module's own established "avoid a hard import-time dependency between sibling engines over one constant" convention.docs/pipeline-fidelity-gate.mdSS3 for the full gate status this closes out (not edited in this PR — Dumont owns that doc this cycle in Ratify pipeline-fidelity gate artifact-1 parity-replay outcome #342).Test plan
pytest cardpicker/tests/test_local_calculate_verdicts.py— 84 passed (newTestEligibleCardsQuerysetclass: below-floor excluded, dpi==200 boundary included, null-dpi included, custom-art/non-english tagged excluded, untagged/differently-tagged included)pytest cardpicker/tests/test_local_calculate_verdicts.py cardpicker/tests/test_review_cluster_views.py cardpicker/tests/test_review_clusters.py cardpicker/tests/test_reparse_collector_evidence.py cardpicker/tests/test_local_detect_ai_art.py cardpicker/tests/test_local_identify_printing_tags.py— 413 passed (every module that touches this queryset or its sibling)pre-commit(ruff/isort/black/mypy/prettier) — all green on the commit🤖 Generated with Claude Code