Align presentation definition filter evaluation with JSON Schema semantics
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ó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu với matchFilter trong vcr/pe và phần filter-semantics của Validate godoc, sau đó so sánh chúng với vendored JSON Schema validator trong vcr/pe/schema/v2. Xem lại tài liệu về capture-group trong docs/pages/deployment/policy.rst và mối quan hệ với selection-engine trong #4253. Được xem là hoàn tất khi đã quyết định phương án tương thích, cập nhật hành vi validation và evaluation, giữ nguyên hoặc di chuyển các capture groups, và ghi lại ảnh hưởng đến release.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Context
PEX defines a field's filter as a full JSON Schema (our own wire schema declares it as a draft-07 $ref), but matchFilter in vcr/pe implements a subset with semantics that deviate from JSON Schema. The load-time validator added in #4281 documents and flags the consequences (see the filter-semantics section in the Validate godoc), but the underlying evaluation is unchanged. This issue tracks the deliberate decision whether and how to align.
Current deviations
enumshadows every other keyword:type,constandpatternare not evaluated whenenumis set. JSON Schema ANDs all keywords.Filter.ConstandFilter.Enumare string-typed in Go: spec-valid numeric or boolean consts fail at parse with an unmarshal error, and values compare as strings only.patternis only evaluated whentypeis "string"; JSON Schema applies keywords per value type (a number trivially passespattern).- Numeric keywords (
minimum,maximum,multipleOf),minLength,formatand composition (allOf,anyOf,not) are not implemented. Since #4281 they are rejected bype.Validatefor own policy files instead of being silently dropped; remote PDs still parse leniently and match weaker than declared. - Consequence of 1-4: numeric claim values cannot be value-constrained at all. Documented guidance is to issue filterable claims as strings.
Considerations
- The evaluation machinery is already vendored:
santhosh-tekuri/jsonschemavalidates the PD documents themselves (vcr/pe/schema/v2). Filter-level evaluation would be wiring, not a new dependency, and schemas can be compiled once at PD load. - The capture-group value extraction in
matchFilteris a documented feature (docs/pages/deployment/policy.rst, "Extracting substrings with regular expressions") with no JSON Schema counterpart. Any alignment must preserve it or provide a migration. - Changing filter semantics changes live matching behavior for counterparty-supplied PDs as well as own policies; this needs release notes and possibly a compatibility window.
- Ecosystem context: OpenID4VP 1.0 replaces PEX with DCQL. Decision 2026-07-16: PEX field matching stays (DCQL is less expressive for our field-binding use); eventual dual support is an option. That bounds how much to invest here.
Relates to #4253 (the selection engine consumes filter evaluation results; pe.Validate encodes the current semantics and must be updated together with any change here).
- Ngôn ngữ chính
- Go
- Star
- 29
- Fork
- 24
- Merge trung bình
- 2 ngày 18 giờ
- Pull request đã merge (30 ngày)
- 45
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không 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 nuts-foundation/nuts-node
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
nuts-foundation/nuts-node#4450 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug discuss
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
nuts-foundation/nuts-node#4436 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
auth bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
nuts-foundation/nuts-node#4435 ·
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 72/100
nuts-foundation/nuts-node#4321 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
nuts-foundation/nuts-node#4230 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của nuts-foundation/nuts-node
Issue tương tự
-
Project submission:Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
slavakurilyak/awesome-ai-agents#845 ·
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 68/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
JakeChampion/lang#13132 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] deploy.restart_policy without condition drops the restart policyCó thể đã có người làm @akshat-lakhera đã 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
docker/compose#14383 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày