O1b-0: отделить подготовку Session от commit - #477
Conversation
|
@coderabbitai review |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
WalkthroughОбновление сессий переведено на двухфазный поток: ChangesДвухфазный переход сессии
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
✅ 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/program_mixed_evaluator_tests.rs`:
- Line 2335: Update the model checks following PrepareDrop to validate identity
of the historical evidence, not merely equivalent state. Preserve and compare
the original certificate and backing identities across Drop, rejecting recreated
replacements while retaining the existing acceptance path when the original
evidence is preserved.
In `@crates/labcolors-core/src/program.rs`:
- Around line 1859-1863: Добавьте к конструктору
PreparedSessionTransitionV1::prepared() комментарий, объясняющий, почему он не
принимает owner и session: Session уже мутабельно заимствована подготовленным
переходом, а связи лайфтаймов 'owner и 'session обеспечивает сам
PreparedSessionTransitionV1. Зафиксируйте этот инвариант и не ограничивайтесь
описанием присваивания PhantomData.
- Around line 1866-1876: Добавьте атрибут #[must_use = "commit the prepared
transition or drop it intentionally"] к структуре PreparedSessionTransitionV1,
согласовав его с core-типом и сохранив существующий контракт prepare/commit.
🪄 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: 541db894-8563-4bb2-a2a2-4df06996aea1
📒 Files selected for processing (13)
crates/labcolors-core/src/generic_boundary_tests.rscrates/labcolors-core/src/point_support_tests.rscrates/labcolors-core/src/program.rscrates/labcolors-core/src/program_api_tests.rscrates/labcolors-core/src/program_boundary_tests.rscrates/labcolors-core/src/program_clean_set_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_point_causality_tests.rscrates/labcolors-core/src/program_session_tests.rscrates/labcolors-core/src/session.rscrates/labcolors-core/src/session_tests.rs
|
@coderabbitai review Пожалуйста, проверяй exact head |
|
✅ Action performedReview finished.
|
|
@coderabbitai review Проверьте точный head |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "HEAD:"
git rev-parse HEAD
echo
echo "Recent commits:"
git log -3 --oneline --decorate
echo
echo "Requested commit:"
git show -s --format='%H%n%P%n%s' 7e97ced2dfe381c35df8e2343efdf61cb14070b2
echo
echo "Files changed by requested commit:"
git diff-tree --no-commit-id --name-status -r 7e97ced2dfe381c35df8e2343efdf61cb14070b2Length of output: 1315
В область этого коммита входят proof/receipt-артефакты, их проверяющий скрипт и изменения в |
Что изменено
PreparedSessionTransition: admission и evaluation завершаются до публикации состояния.Dropподготовленного перехода сохраняет committed raw head, lifecycle и previous evidence.commitпотребляет переход, выполняет только infallible moves без аллокаций и удерживает точную owner-generation до конца публикации.Session::update*,OwnerV1::updateиSessionV1::apply_update.Зачем
Старый
Session::updateпубликовал revision/lifecycle до того, как будущий внешний sink мог атомарно принять полный patch. Компенсирующий rollback не устраняет эту рассинхронизацию. Этот срез создаёт необходимую транзакционную границу для O1b-1.Проверки
-D warnings, Core и полный workspace — GREEN.Summary by CodeRabbit
Новые возможности
prepare_*) и отдельная фиксация (commit).prepared-логики в просмотрах и переходах.Исправления