Core: удалить второй joint solver - #488
Conversation
WalkthroughКонечные joint-порядки переведены на типизированный admission с непустыми доменами и отдельными ошибками. Компиляция и evaluation используют единое admitted target selection, дополненное интеграционными тестами и обновлёнными контрольными хэшами. ChangesКонечный joint admission и выполнение
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Program
participant compile_targets
participant AdmittedCompiledJointSpaceV1
participant evaluate_program_session_into
participant ProgramConstraintEvaluatorSetV1
Program->>compile_targets: компилирует target selection
compile_targets->>AdmittedCompiledJointSpaceV1: проверяет authored order
AdmittedCompiledJointSpaceV1-->>compile_targets: возвращает admitted states
compile_targets-->>evaluate_program_session_into: передаёт CompiledTargetSelectionV1
evaluate_program_session_into->>AdmittedCompiledJointSpaceV1: перебирает states()
evaluate_program_session_into->>ProgramConstraintEvaluatorSetV1: оценивает candidate
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
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/generic_boundary_tests.rs`:
- Around line 478-489: Разбейте составной assert в тесте вокруг
PROGRAM_SESSION_SOURCE на отдельные проверки, сгруппировав связанные гарантии и
добавив каждому assert сообщение с конкретным проверяемым условием, по аналогии
с существующими циклами в этом тесте. Сохраните все проверки наличия
sealed-типов и отсутствия устаревших полей/вариантов; для проверок точных
литералов добавьте комментарий, фиксирующий намеренную чувствительность к
форматированию rustfmt.
In `@crates/labcolors-core/src/program_joint_integration_tests.rs`:
- Around line 339-349: Make the call-index-to-evaluation-phase invariant
explicit for the evaluator failure logic around must_fail and
InjectedEvaluatorFailureV1. In the enclosing integration test, assert the
expected final value of self.calls so changes to candidate-search calls cannot
silently shift FreshRecheck failure to another phase; alternatively, document
this invariant directly beside the mapping if that is the established test
style.
- Around line 2517-2528: Добавьте в тесты самостоятельный успешный кейс для
admit_finite_joint_order_v1 с двумя или более размерностями, используя
mixed-radix индексацию и проверяя ожидаемый порядок tuples через отдельный
assert. Не обобщайте и не заменяйте существующий одномерный тест; сохраните его
без изменений.
🪄 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: 77eb2653-56eb-449f-867e-ff9713c91c4f
📒 Files selected for processing (12)
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/generic_boundary_tests.rscrates/labcolors-core/src/joint.rscrates/labcolors-core/src/joint_tests.rscrates/labcolors-core/src/lib.rscrates/labcolors-core/src/program.rscrates/labcolors-core/src/program_joint_integration_tests.rscrates/labcolors-core/src/program_session.rscrates/labcolors-core/src/session.rsscripts/verify_point_support_surplus.py
💤 Files with no reviewable changes (4)
- crates/labcolors-core/src/session.rs
- crates/labcolors-core/src/joint_tests.rs
- crates/labcolors-core/src/lib.rs
- crates/labcolors-core/src/program.rs
Причина
После #487 production Program уже был единственным исполнителем совместного выбора, но joint.rs сохранял второй специализированный executor, доступный лишь собственным тестам и скрытый blanket dead_code. Это создавало второй solver без differential-связи и ложную SSOT.
RED
Structural anti-regrowth test на baseline main@95f88a237cb0c75352da44ebf2d276ed8c314df7 действительно выполнил 1 test и упал на CandidateOrdinalV1: 0 passed, 1 failed, 938 filtered out.
Реализация
Итог среза: 736 добавлений, 2240 удалений; один production joint executor и один admission path.
Проверка exact head
Head: 3b45f81
Tree: e65c1975dc0b9de0ad61b0e4fe30208d82f8f66c
Локально успешно:
Изолированный read-only review implementation diff: PASS. Повторный CodeRabbit и GitHub CI проверяются на этом exact head до merge.