Targeting: a stored ruleset the reader cannot parse raises, failing the bulk flags call and the SDK ruleset for every flag
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- Nửa ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
Start in backend/app/core/targeting_adapter.py at normalise_targeting_rules, where the documented never-raises contract is broken for exceptions other than TargetingRulesError. Reproduce with a stored geo_within_radius whose radius is a very large integer (OverflowError) and a semver value like "1.²" (ValueError), then trace how get_user_flags, build_ruleset and segment membership call it. Done when one bad stored ruleset yields error for only its own flag while the bulk call and ruleset document still succeed, with tests covering both exception types.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
normalise_targeting_rules (backend/app/core/targeting_adapter.py) documents that invalid content never raises, but a stored ruleset whose reading raises an exception other than the ones it catches escapes it. Measured at 3a6eb775 (with #1664's branch on top, which touches no targeting code): a stored dashboard geo_within_radius whose radius is a 401-digit integer makes normalise_targeting_rules raise OverflowError. The principal engineer's review of the #1666/#1669/#1672 plan measured the same with a ValueError (a stored dashboard semver value "1.²", which a save refuses).
What a reader then does with one such stored flag, measured in that review:
get_user_flagsandbuild_rulesetraise, so the bulk flags call and the SDK ruleset document fail for every flag, not only this one;- segment membership raises (it catches only
TargetingRulesError); - every evaluation of the flag answers
errorand writes an error-log row, which the safety monitor counts.
No API route can write such a row (saves refuse or, until #1672 is fixed, answer 500 without writing); it takes a direct database write or a row stored before validation existed.
Expected
A stored ruleset that cannot be read affects only its own flag, experiment or segment. The fix is a read-path decision: catching the exception broadly in normalise_targeting_rules makes the flag fall back to its global rollout (fails open, as returning None does today for the cases it catches), so the likely shape is a per-flag catch that answers error for that flag and lets the bulk call and the ruleset document go on. The docstring's promise is made true either way.
- Ngôn ngữ chính
- Python
- Star
- 0
- Fork
- 4
- Merge trung bình
- 5 giờ 19 phút
- Pull request đã merge (30 ngày)
- 503
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Controlvar/controlvar
-
Dashboard: the sequential panel's "Ready to stop" banner shows no sample-ratio-mismatch cautionĐang mởbug post-launch
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Controlvar/controlvar#1737 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
fix(api): the feature-flag list has no defined order across pagesCó thể đã có người làm @amarkanday đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Controlvar/controlvar#1612 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug post-launch
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Controlvar/controlvar#1562 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
Controlvar/controlvar#1447 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Experiment setup: emptying a traffic share box and typing a number shows a leading zero ("034")Đang mởbug post-launch
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Controlvar/controlvar#1428 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Controlvar/controlvar
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
FinanceFlash/unvibecode#509 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
FAIRmat-NFDI/nomad-distro-dev#161 ·
-
bug v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
modelcontextprotocol/python-sdk#3821 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug severity:low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Log-odds calibration uses upper middle score instead of median for even candidate setsCó thể đã có người làm @flysheep-ai đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày