core: isolate LCS as an explicit Program capability - #467
Conversation
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 2 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 (8)
WalkthroughИзменён evaluation-путь программных ограничений: physical evidence и declared appearance context отделены от lazy LCS capability. Session-план больше не хранит modeled LCS, identity-кодирование разделено по типам ограничений, а тесты и proof-хэши обновлены. ChangesРазделение physical evidence и LCS capability
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant ProgramSessionPlan
participant occurrence_contexts
participant ProgramConstraintEvaluatorSetV1
participant assess_program_point_hard
participant ProgramLcsPointAdapterV1
ProgramSessionPlan->>occurrence_contexts: resolve occurrence_context_index
occurrence_contexts-->>ProgramSessionPlan: return declared AppearanceContextId
ProgramSessionPlan->>ProgramConstraintEvaluatorSetV1: assess ProgramPointOccurrenceV1
ProgramConstraintEvaluatorSetV1->>assess_program_point_hard: assess encoded point
ProgramSessionPlan->>ProgramLcsPointAdapterV1: request LCS only for LCS-aware constraint
ProgramLcsPointAdapterV1-->>ProgramSessionPlan: memoized ModeledLcsOccurrenceV1
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
crates/labcolors-core/src/program_lcs_integration_tests.rs (1)
576-610: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueРазделите два независимых сценария на отдельные тесты.
Функция проверяет и report-only exact-программу, и WCAG-программу. При падении второй части имя теста не покажет, какой evaluator-набор регрессировал, а первая часть уже успела перезаписать счётчики. Отдельный
wcag_program_does_not_derive_lcsдаст точную локализацию.🤖 Prompt for 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. In `@crates/labcolors-core/src/program_lcs_integration_tests.rs` around lines 576 - 610, Разделите тест encoded_only_program_evaluators_do_not_derive_lcs на два независимых теста: сохраните текущую проверку report-only exact-программы в исходном тесте, а проверку compiled_wcag_program вынесите в отдельный тест с именем wcag_program_does_not_derive_lcs. Инициализацию сессии и сброс MODELED_TRISTIMULUS_DERIVATION_CALLS оставьте в соответствующем тесте, сохранив существующие утверждения поведения.
🤖 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/generic_boundary_tests.rs`:
- Around line 983-986: Ограничьте проверку отсутствия
`Option<ModeledLcsOccurrenceV1>` областью `ProgramLcsPointAdapterV1`, извлекая
или проверяя только исходный фрагмент этого адаптера вместо всего
`CONSTRAINTS_SOURCE`. Сохраните текущую проверку для адаптера и не запрещайте
легитимные использования типа в других частях файла.
In `@crates/labcolors-core/src/program_lcs_integration_tests.rs`:
- Around line 638-641: Добавьте поясняющее сообщение к утверждению
MODELED_TRISTIMULUS_DERIVATION_CALLS, явно описывающее инвариант: encoded-only
путь не должен наследовать LCS-требование объявленного контекста. Сохраните
текущую проверку нулевого числа дериваций и используйте формат сообщений,
принятый в остальных проверках счётчика этого файла.
In `@crates/labcolors-core/src/program_mixed_evaluator_tests.rs`:
- Line 761: Замените в проверках вокруг `evidence.binding().context()` сравнение
с `exact.appearance_context()` на сравнение с объявленным контекстом фикстуры
через `context()`. Сохраните проверку привязки evidence, чтобы тест
действительно подтверждал передачу declared context, а не сравнивал значение с
самим собой.
---
Outside diff comments:
In `@crates/labcolors-core/src/program_lcs_integration_tests.rs`:
- Around line 576-610: Разделите тест
encoded_only_program_evaluators_do_not_derive_lcs на два независимых теста:
сохраните текущую проверку report-only exact-программы в исходном тесте, а
проверку compiled_wcag_program вынесите в отдельный тест с именем
wcag_program_does_not_derive_lcs. Инициализацию сессии и сброс
MODELED_TRISTIMULUS_DERIVATION_CALLS оставьте в соответствующем тесте, сохранив
существующие утверждения поведения.
🪄 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: d0494670-efd1-4834-a322-6bbc2f6e60e6
📒 Files selected for processing (13)
crates/labcolors-core/contracts/point-support-reference-surplus-q55-bps-proof-v1.jsoncrates/labcolors-core/src/constraints/mod.rscrates/labcolors-core/src/generic_boundary_tests.rscrates/labcolors-core/src/lcs_occurrence.rscrates/labcolors-core/src/program.rscrates/labcolors-core/src/program_boundary_tests.rscrates/labcolors-core/src/program_identity.rscrates/labcolors-core/src/program_identity_tests.rscrates/labcolors-core/src/program_joint_integration_tests.rscrates/labcolors-core/src/program_lcs_integration_tests.rscrates/labcolors-core/src/program_mixed_evaluator_tests.rscrates/labcolors-core/src/program_session.rsscripts/verify_point_support_surplus.py
Результат
Encoded-only Exact/WCAG Program path больше не строит LCS и не включает неиспользуемые LCS/XYZ releases в content identity. LCS оформлен отдельным occurrence-scoped lazy capability: target и evidence минтятся атомарно из одной физической occurrence, а успех и ошибка derivation кешируются на scope.
Доказательства
Проверки
Независимый final review выполняется на frozen exact head до ready/merge.
Summary by CodeRabbit
Новые возможности
Изменения