Core: типизировать opacity-domain point-представления - #519
Conversation
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 46 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Добавлен закрытый ChangesПайплайн opacity и point representation
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant AlphaAnalog
participant SemanticResolver
participant PointRepresentation
participant ExactVerifier
AlphaAnalog->>SemanticResolver: передаёт solid target и OpacityDomainV1
SemanticResolver->>PointRepresentation: вызывает resolver с доменом
PointRepresentation->>PointRepresentation: выбирает первую feasible opacity
PointRepresentation->>ExactVerifier: проверяет выбранное point representation
ExactVerifier-->>SemanticResolver: возвращает VerifiedExactPointV1
SemanticResolver-->>AlphaAnalog: возвращает verified representation и selection evidence
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
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/point_representation.rs`:
- Around line 653-667: Remove the tautological assertion comparing
evidence.binding().program_occurrence() with
verified.evidence.binding().program_occurrence(), since verified.evidence is
copied into evidence and both values are identical. Either compare the binding
occurrence against an independently expected value or delete this assertion
while preserving the remaining evidence checks.
- Around line 299-309: Construct `evidence` only inside a debug-only block
around the `debug_assert_eq!` checks in the verification path, using the
existing `verified.evidence()` call. Keep the assertions and their current
comparisons unchanged, while ensuring release builds do not bind or compute
`evidence`.
In `@docs/whitepaper.md`:
- Around line 171-177: Уточните описание AlphaAnalog: для MostTransparent явно
укажите выбор минимальной достижимой opacity внутри замкнутого диапазона
[minimum, 1], а не просто «первого достижимого binary64». В этом абзаце замените
англоязычные термины domain, release, predecessor, design objectives, versioned
selection contract и frontend на краткие русские эквиваленты, сохранив смысл
повторной проверки итогового sRGB8.
🪄 Autofix (Beta)
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: 9e2000ba-e0cd-4bab-9bcb-b623e22eeb28
📒 Files selected for processing (10)
.cargo/mutants.tomlcrates/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/alpha.rscrates/labcolors-core/src/composition.rscrates/labcolors-core/src/point_representation.rscrates/labcolors-core/src/semantic.rsdocs/whitepaper.mdscripts/verify_point_support_surplus.py
|
Пост-мортем красного статуса merge commit c73f2f3. Rerun 30797490032 (запущен после ручной отмены) завершился failure в job wasm build + headless test + size: WASM size budget — expected=376554B, actual=376907B. Причина: на момент merge этот коммит нёс устаревший пин бюджета (376554B из run 30790916413), а #518/#519 изменили реальный размер артефакта до 376907B. Дрейф закрыт в main коммитом be009ce (#514): пин обновлён на 376907B по замеру run 30864842276, self-hash бюджетного файла проверен (e39d32e0...). Доказательство здоровья кодовой базы: актуальный CI на head main (run 30893495847, c327eb3) полностью зелёный. Красный статус на историческом merge commit — артефакт rerun старого коммита со старым пином; код #519 дефектов не содержит, переписывать историю недопустимо. |
Что изменено
OpacityDomainV1; fixed opacity выражается равными границами без второго физического типа;AlphaAnalogкомпилирует объявленный минимум в[minimum, 1], не создавая нового публичного API;analog.rsвpoint_representation.rs;Почему
Раньше физический coordinator принимал только одно число «minimum opacity», поэтому допустимое множество и правило выбора не были представлены типами. Это мешало строить общий декларативный alpha-контракт и позволяло будущим frontend-ам размножать локальные selector-рецепты.
Этот PR намеренно не объявляет общий
alpha:autoи не создаёт локальную selection-authority: остальные objectives должны войти в один глобальный versionedSelectionRelease.Проверки
cargo test --workspace --all-targets;cargo clippy -p labcolors-core --all-targets -- -D warnings;PRODUCT_IDENTITY_VERIFIED;PASS;npm@11.9.0 run release:verify.