Core: удалить мёртвый Source из конечной цели - #487
Conversation
WalkthroughИзменена модель конечных целей: вместо источника и сырого списка кандидатов используется непустой ChangesМодель целей и API
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant ProgramAuthor
participant prepare_program
participant compile_targets
participant compile_program_content_identity_v5
ProgramAuthor->>prepare_program: submit TargetIntentV1
prepare_program->>compile_targets: validate and lower finite domain
compile_targets-->>prepare_program: compiled target bindings
prepare_program->>compile_program_content_identity_v5: compute content identity
compile_program_content_identity_v5-->>ProgramAuthor: ProgramContentIdentityV5
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.
|
203f3e5 to
e516459
Compare
|
@coderabbitai review Финальный содержательный цикл на exact head |
|
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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/contracts/clean-set-srgb8-v1/receipt-v1.json`:
- Around line 86-91: Обновите поле sha256 в записи артефакта с ролью
point_attachment_tests для program/attachment/tests.rs, пересчитав хэш
фактического файла. Убедитесь, что значение содержит ровно 64 шестнадцатеричных
символа и соответствует содержимому файла.
In `@crates/labcolors-core/src/program_identity_tests.rs`:
- Around line 1192-1260: Усилить тест
finite_target_dead_source_cannot_change_physical_content_identity: вместо
перестановки сигналов создайте две программы, где один неиспользуемый Source
получает разные значения, причём новое значение отсутствует в первой программе.
Сохраните остальные идентификаторы и содержимое неизменными, чтобы проверка
first.content_identity() == second.content_identity() выявляла включение
мёртвого Source в identity.
🪄 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: 9e3ea4d1-7c40-4160-8404-ba91cb0ee066
📒 Files selected for processing (16)
crates/labcolors-core/contracts/clean-set-srgb8-v1/receipt-v1.jsoncrates/labcolors-core/contracts/clean-set-srgb8-v1/receipt-v1.sha256crates/labcolors-core/src/generic_boundary_tests.rscrates/labcolors-core/src/program.rscrates/labcolors-core/src/program/attachment/tests.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_identity.rscrates/labcolors-core/src/program_identity_tests.rscrates/labcolors-core/src/program_joint_integration_tests.rscrates/labcolors-core/src/program_mixed_evaluator_tests.rscrates/labcolors-core/src/program_point_causality_tests.rscrates/labcolors-core/src/program_session.rscrates/labcolors-core/src/program_session_tests.rsdocs/whitepaper.md
Контекст
После squash merge #485 ветка перебазирована на
main@cc8245f4f231bcae17f00fcd1d020ba5c84ff014; проверяемый diff содержит только V3c.После V3b у fixed- и finite-целей оставалась общая форма
{ source, domain }. Для finite-целиsourceуже не участвовал в допустимом множестве: он служил только холодным seed и попадал в content identity. Перед каждой физической оценкой кандидат всё равно заменял его атомарно. Поэтому один семантически мёртвый ID менял идентичность программы и оставлял невозможное состояние в API.Изменение
FixedSource(SourceId) | Finite(FinitePaintDomainV1);SourceId;MissingFixedSourceсуществуют только для fixed-цели;UnconstrainedFiniteTargetописывает только конечную цель;EmptyTargetDomain;Механическое расширение lock-set на
program_session_tests.rsсогласовано: сохранение старого source-accessor противоречило бы hard cut; иных изменений скоупа нет.appearance.rs,joint.rs, публичный package/WASM, roadmap и Issues не менялись.TDD и опровержение
RED differential: одинаковая физическая finite-программа с изменённым только мёртвым source-ID дала разные V4 digest; тест завершился с кодом 101.
GREEN: V5 делает такую перестановку неразличимой, а fixed source остаётся частью физического intent.
Manual mutants: удаление проверки пустого домена превратило
Err(Empty)вOk([]); возврат запрещённого finiteTarget → Sourceизменил V5 identities. Оба targeted-теста завершились RED с кодом 101; mutants отменены.Gates на опубликованном head
cargo +1.96.0 test --workspace --all-features --locked— 1151 passed, 0 failed, 7 ignored;cargo test -p labcolors-core -q— 938 unit: 932 passed, 6 ignored; все integration suites зелёные;cargo +1.96.0 clippy --workspace --all-targets --all-features --locked -- -D warnings— exit 0;cargo +1.96.0 fmt --all -- --check— exit 0;cargo +1.85.0 check --workspace --all-targets --locked— exit 0;git diff --check— exit 0;PRODUCT_IDENTITY_VERIFIED; RESEARCH_REPLAY_NOT_EXECUTED;3b51f8ecf38181d68b619b30ebb1fdd28a17606f5ac2699bf8070497a0515b80.Head:
258a74065a99df2012a2e15df8ec42f3db065d46Tree:
b88cd5402b7fd8a8f5f2e582349be8872ae2cdbbSummary by CodeRabbit
Новые возможности
Исправления
Документация