Core: authored selection release with a proven total preorder (V5c-1) - #531
Conversation
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 44 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
WalkthroughДобавлен внутренний модуль ChangesSelection release V1
Estimated code review effort: 4 (Complex) | ~45 минут Sequence Diagram(s)sequenceDiagram
participant Caller
participant admit_selection_release_v1
participant AdmittedSelectionReleaseV1
participant CandidateSet
Caller->>admit_selection_release_v1: передаёт SelectionReleaseV1
admit_selection_release_v1->>AdmittedSelectionReleaseV1: проверяет и канонизирует release
AdmittedSelectionReleaseV1-->>Caller: возвращает допущенный release
Caller->>AdmittedSelectionReleaseV1: вызывает select_order_v1
AdmittedSelectionReleaseV1->>CandidateSet: проверяет привязки и сортирует payload
CandidateSet-->>Caller: возвращает упорядоченный Box<[C]>
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
…ation lib.rs now registers selection_release, so the point-support source capsule and the clean-set module-registration artifact are rebound to the new byte digests without any semantic change.
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@crates/labcolors-core/src/selection_release_tests.rs`:
- Around line 73-83: Add a test alongside
identity_is_content_addressed_and_revision_bound that verifies identity encoding
separates key and group boundaries: compare releases containing one key b"ab"
versus keys b"a", b"b", then compare the split-key release with the same keys
placed in separate rank groups, asserting distinct identities for both pairs.
In `@crates/labcolors-core/src/selection_release.rs`:
- Around line 159-168: Replace the unit-valued BTreeMap used by bound in the
candidate-binding loop with a BTreeSet, adding the required import and
preserving the existing duplicate detection via insert(key.as_bytes()). Keep the
UnknownCandidateKey lookup and DuplicateCandidateBinding error behavior
unchanged.
- Around line 96-120: Замените все три вызова unwrap при преобразовании размеров
в u32 на типизированную обработку ошибки. Добавьте вариант
SelectionReleaseErrorV1 для неподдерживаемого размера и возвращайте его при
переполнении числа tie-групп, ключей в группе или длины ключа, сохраняя
хеширование для допустимых значений.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: be660f0a-5494-44a3-beb1-afcf7824b692
📒 Files selected for processing (7)
crates/labcolors-core/contracts/clean-set-srgb8-v1/receipt-v1.jsoncrates/labcolors-core/contracts/clean-set-srgb8-v1/receipt-v1.sha256crates/labcolors-core/contracts/point-support-reference-surplus-q55-bps-proof-v1.jsoncrates/labcolors-core/src/lib.rscrates/labcolors-core/src/selection_release.rscrates/labcolors-core/src/selection_release_tests.rsscripts/verify_point_support_surplus.py
Admission now rejects oversized length fields through a typed ReleaseShapeOverflow verdict instead of panicking, and a hostile test pins that the length-prefixed identity grammar separates key and group boundaries for releases with identical joined key bytes.
V5c-1: the sole authored selection input, ahead of the V5c session integration.
selection_release.rs(labcolors-core):SelectionReleaseV1declares a total preorder over opaque canonical candidate keys as an ordered sequence of tie groups. Admission is sealed and content-addressed (labcolors.selection-release.v1\0domain-separated SHA-256 over revision + canonical groups); key order inside a tie group is not policy — groups canonicalise before identity. The single common tie-break inside a group is the canonical key bytes; declaration index,usize, RGB bytes, distances and weights never participate.select_order_v1materialises one candidate set's total order by (rank, key bytes) only, rejecting unknown keys, duplicate bindings and empty sets with typed errors.a2e6de1, GREEN commitc17952b.--test sha256python3-corpus case requires python3, present only in the CI image).Summary by CodeRabbit
Новые возможности
Исправления