Skip to content

Core: удалить второй joint solver - #488

Merged
lemone112 merged 3 commits into
mainfrom
agent/v2a-close
Jul 28, 2026
Merged

Core: удалить второй joint solver#488
lemone112 merged 3 commits into
mainfrom
agent/v2a-close

Conversation

@lemone112

@lemone112 lemone112 commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Причина

После #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.

Реализация

  • удалён runtime-unused PointwiseJointPointProgramV1 и весь его report/selection/recheck island;
  • удалён отдельный joint_tests island и blanket dead_code suppression;
  • недостающие гарантии перенесены в canonical Program tests: точный nested-alpha oracle на полном ScenarioSet, evaluator fail-fast и полный typed finite-order admission;
  • compiled target domains и admitted total order запечатаны одним private AdmittedCompiledJointSpaceV1; runtime получает только допустимые states и resolved assignments;
  • authored policy error, resource exhaustion и internal invariant разделены типами;
  • невозможные empty-domain/empty-selection состояния и runtime arity/ordinal validation удалены;
  • clean-set receipt и point-support source proof перепривязаны к точным исходникам;
  • первый CodeRabbit review-cycle закрыт тремя усилениями: раздельные anti-regrowth diagnostics, точный evaluator call schedule и успешный многомерный mixed-radix case.

Итог среза: 736 добавлений, 2240 удалений; один production joint executor и один admission path.

Проверка exact head

Head: 3b45f81
Tree: e65c1975dc0b9de0ad61b0e4fe30208d82f8f66c

Локально успешно:

  • cargo +1.96.0 test -p labcolors-core --all-features --locked: 915 passed, 6 ignored; все integration/doc/compile-fail suites green;
  • cargo +1.96.0 test --workspace --all-features --locked;
  • cargo +1.96.0 clippy --workspace --all-features --all-targets --locked -- -D warnings;
  • cargo +1.96.0 fmt --all -- --check и git diff --check;
  • cargo +1.85.0 check --workspace --all-targets --locked;
  • clean-set product receipt: PRODUCT_IDENTITY_VERIFIED, hostile 31/31;
  • point-support proof replay и source-binding hostile 5/5;
  • WCAG22 Q55 independent full-domain verification: PASS, 16,777,216 цветов;
  • четыре ручных production mutations дали RED: пропуск сценария, неверный FromOccurrence backdrop, потеря alpha нижнего и верхнего кандидатов.

Изолированный read-only review implementation diff: PASS. Повторный CodeRabbit и GitHub CI проверяются на этом exact head до merge.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Конечные joint-порядки переведены на типизированный admission с непустыми доменами и отдельными ошибками. Компиляция и evaluation используют единое admitted target selection, дополненное интеграционными тестами и обновлёнными контрольными хэшами.

Changes

Конечный joint admission и выполнение

Layer / File(s) Summary
Контракт typed admission
crates/labcolors-core/src/joint.rs, crates/labcolors-core/src/lib.rs, crates/labcolors-core/src/program.rs
Добавлены типизированные непустые кардинальности и FiniteJointOrderAdmissionErrorV1; удалены устаревшие варианты ошибок и соответствующие отображения.
Скомпилированное пространство target selection
crates/labcolors-core/src/program_session.rs
Введены admitted finite states и CompiledTargetSelectionV1; компиляция, подсчёт состояний и hard/report-only evaluation переведены на единое пространство состояний.
Интеграционные проверки и очистка тестового пути
crates/labcolors-core/src/program_joint_integration_tests.rs, crates/labcolors-core/src/generic_boundary_tests.rs, crates/labcolors-core/src/joint_tests.rs, crates/labcolors-core/src/program.rs, crates/labcolors-core/src/session.rs
Добавлены проверки admission, nested alpha и evaluator failures; удалены устаревшие joint-тесты, compile-error тест и тестовый конструктор permit.
Обновление проверочных артефактов
crates/labcolors-core/contracts/clean-set-srgb8-v1/*, crates/labcolors-core/contracts/point-support-reference-surplus-q55-bps-proof-v1.json, scripts/verify_point_support_surplus.py
Обновлены receipt-метаданные, контрольные суммы proof-контракта и ожидаемый digest исходной капсулы.

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
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 43.59% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Заголовок кратко и точно отражает главное изменение: удаление второго joint solver из core.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/v2a-close

Comment @coderabbitai help to get the list of available commands.

@lemone112
lemone112 marked this pull request as ready for review July 28, 2026 07:11
@lemone112

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 95f88a2 and 77d9407.

📒 Files selected for processing (12)
  • crates/labcolors-core/contracts/clean-set-srgb8-v1/receipt-v1.json
  • crates/labcolors-core/contracts/clean-set-srgb8-v1/receipt-v1.sha256
  • crates/labcolors-core/contracts/point-support-reference-surplus-q55-bps-proof-v1.json
  • crates/labcolors-core/src/generic_boundary_tests.rs
  • crates/labcolors-core/src/joint.rs
  • crates/labcolors-core/src/joint_tests.rs
  • crates/labcolors-core/src/lib.rs
  • crates/labcolors-core/src/program.rs
  • crates/labcolors-core/src/program_joint_integration_tests.rs
  • crates/labcolors-core/src/program_session.rs
  • crates/labcolors-core/src/session.rs
  • scripts/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

Comment thread crates/labcolors-core/src/generic_boundary_tests.rs
Comment thread crates/labcolors-core/src/program_joint_integration_tests.rs
Comment thread crates/labcolors-core/src/program_joint_integration_tests.rs
@lemone112
lemone112 merged commit 432662f into main Jul 28, 2026
10 checks passed
@lemone112
lemone112 deleted the agent/v2a-close branch July 28, 2026 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant