Assign every v2 route and service file to a layer and enforce the doc-only v2 layer rules
Maintainer thường phản hồi trong vòng 2 ngày
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 20/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- backend-api-design, testing
Hướng nghiên cứu
Start with scripts/run_quality_guards.py, the rules under scripts/rules/, and the existing checks in tests/unit/v2/test_data_crud_boundaries.py; read rules/registry.toml and v2-code-organization.md for the current rule setup. Discover and classify all Python files under policyengine_api/services/v2 and policyengine_api/fastapi_routes/v2, then add the guard, rule citations, and proof fixtures. Done means every file has a layer, the listed layer rules are enforced or ratcheted, and the fixtures cover receiver-aware calls, TYPE_CHECKING imports, connector imports in routes, and an unassigned file.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Four API v2 layer rules in rules/registry.toml are doc-only: nothing checks them.
api.v2.routes-no-sessions-or-sqlapi.v2.services-no-sqlapi.v2.connectors-never-commitapi.v2.connectors-no-cross-calls
The existing structural tests in tests/unit/v2/test_data_crud_boundaries.py match any call by method name (.add counts whether it is session.add or set.add), and nothing makes sure a new v2 file is checked at all.
Change
A v2-layers quality guard in the rules tool (scripts/rules/, run by scripts/run_quality_guards.py), standard library only:
-
Discover every
.pyfile underpolicyengine_api/services/v2andpolicyengine_api/fastapi_routes/v2and assign it to a layer by its file name (services.py,validators.py,database_connectors/reads.py,routes.py, and so on), or by a small manifest,rules/v2-layer-manifest.toml, for the few files with other names. Fail on any file that has no layer. This is new ruleapi.v2.files-assigned-to-layers. -
Check calls by their receiver (
session.add, not any.add) and SQL builders by where they are imported from, per layer:- route modules open no session and build no SQL;
- services build no SQL and call no data-access session method;
- connectors never open, commit, roll back or close a session.
Imports under
TYPE_CHECKINGcount. -
Make the three rules above
enforced, orratchetedwith a baseline of today's findings.api.v2.connectors-no-cross-callsbecame ratcheted with the Import Linter contracts in #4181. -
Give each rule a proof fixture, including a route that imports a connector and a file with no layer.
-
Cite each rule id in
v2-code-organization.md.
Open pull requests that add v2 files will have to give each new file a layer once this merges.
- Ngôn ngữ chính
- Python
- Star
- 18
- Fork
- 33
- Merge trung bình
- 2 ngày 21 giờ
- Pull request đã merge (30 ngày)
- 93
Chuẩn bị môi trường
- Không có Dockerfile hay 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 PolicyEngine/policyengine-api
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
PolicyEngine/policyengine-api#4037 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
PolicyEngine/policyengine-api#3911 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
PolicyEngine/policyengine-api#3910 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Check that every test function asserts somethingCó thể đã có người làm @anth-volk đã nhận hôm nay. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
PolicyEngine/policyengine-api#4187 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Check that every noqa and type: ignore comment names a code and gives a reasonCó thể đã có người làm @anth-volk đã nhận hôm nay. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 20/100
PolicyEngine/policyengine-api#4182 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của PolicyEngine/policyengine-api
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
huggingface/deep-rl-class#723 ·
-
[tool] bug: Qwen3 XML tool parser raises on `...` argument values (Ellipsis is not JSON serializable)Có thể đã có người làm @super-yuki đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 87/100
verl-project/verl#8559 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
TencentCloud/octop-harness#228 ·
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 78/100
google/osv-scalibr#2585 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
NousResearch/hermes-agent#149323 ·
Maintainer thường phản hồi trong vòng 1 ngày