Enhanced disability premium property test never draws a Kingston claimant with highest-rate DLA care below the top amount

Đang mở Phù hợp với người mới
#2,904 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

@MaxGhenis đang làm issue này rồi.

Từ ngày 10/11/2026.

  • #2905 của @MaxGhenis — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
78/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python, yaml
Lĩnh vực
backend, testing

Hướng nghiên cứu

Bắt đầu với test_enhanced_disability_premium_properties.py và enhanced_disability_premium.yaml, mà theo issue cũng có trên main. Đọc cách property test tạo các nguyên đơn và kiểm tra họ với oracle, rồi thêm một ví dụ Kingston cố định sử dụng dla_care_highest_part_amount. Hoàn thành khi ví dụ được kiểm tra với oracle trong mọi năm và phát hiện được việc hoán đổi điều kiện đã mô tả.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

In Kingston upon Thames, meets_council_tax_reduction_enhanced_disability_premium_condition reads is_enhanced_disabled_for_benefits. Unless the inputs supply that flag, its formula needs DLA care of at least 52 times the highest weekly rate. has_highest_dla_sc_award also holds for any positive amount in the HIGHER category, and for an amount no more than £1 a week below the top rate.

With has_highest_dla_sc_award in place of the flag in Kingston's condition, all four tests in test_enhanced_disability_premium_properties.py passed at #2808's head b99e8c594 (K4 in the mutation check). The generator can draw a Kingston claimant with dla_care_highest_part_amount, the HIGHER category at £1,000 a year, who holds the award without the amount, but none of the eight derandomized examples does. Case 25 of enhanced_disability_premium.yaml failed under the swap, because it enters the flag for a claimant with enhanced PIP daily living and no DLA. main at 8a8354fb6 carries the same test file, YAML and variables.

A fixed Kingston example with dla_care_highest_part_amount, which the test checks against its oracle in every year, would catch the swap.

Ngôn ngữ chính
Python
Star
53
Fork
34
Merge trung bình
2 ngày 9 giờ
Pull request đã merge (30 ngày)
269

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của PolicyEngine/policyengine-uk

Tất cả issue của PolicyEngine/policyengine-uk

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.