feat(colors): prove incremental re-resolve parity - #572
Conversation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
|
Important Review skippedNo new commits to review since the last review. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughДобавлена инкрементальная оценка ChangesИнкрементальная оценка
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant SessionState
participant SessionPlanV1
participant ProgramSession
participant ProgramConstraintEvaluatorSetV1
SessionState->>SessionPlanV1: передаёт last_verified()
SessionPlanV1->>ProgramSession: запускает evaluate с previous
ProgramSession->>ProgramSession: проверяет совместимость report
ProgramSession->>ProgramConstraintEvaluatorSetV1: копирует evidence неизменённых случаев
ProgramSession->>ProgramConstraintEvaluatorSetV1: переоценивает изменённые случаи
ProgramSession-->>SessionState: возвращает обновлённый report
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 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 1326-1328: Update the source assertion for
CanonicalObservationSchemaV1 so the derive attributes and the struct declaration
are validated as one contiguous or otherwise uniquely associated declaration,
rather than using independent global OBSERVATION_SOURCE.contains checks. Ensure
removing any required Debug, PartialEq, Eq, or test-only Clone derive from
CanonicalObservationSchemaV1 causes the test to fail.
In `@crates/labcolors-core/src/private_fixture.rs`:
- Around line 2208-2234: Добавьте комментарий непосредственно перед функцией
two_case_opaque_authored, документирующий инвариант: при opacity: 1.0 разные
backdrop меняют физический case, но не expected_final_visible, поэтому fixture
проверяет reuse и invalidation без изменения certified render.
- Around line 2408-2433: Расширьте тест
unknown_transition_preserves_the_ready_baseline_for_later_reuse: сбросьте
CORE_PROGRAM_ASSESSMENT_CALLS непосредственно перед recovery update и после него
проверьте, что счётчик равен 0, сохранив существующие проверки состояния,
revision и content_identity.
In `@crates/labcolors-core/src/program_session.rs`:
- Around line 754-766: Уберите преобразование неподдерживаемого копирования
evidence в panic: обновите реализации Clone, использующие copy_pass_evidence и
copy_violation_evidence, чтобы они возвращали типизированную ошибку
EvidenceCopyUnsupported через fallible API. Сохраните None из базового
ProgramConstraintEvaluatorSetV1 и обеспечьте одинаковое поведение во всех
отмеченных реализациях, включая прямые вызовы Clone независимо от
supports_evidence_copy().
In `@packages/colors/bench/private-program-wasm.json`:
- Around line 24-29: Replace the canonical benchmark metadata in the policy
section with results from a new successful exact-head rerun, ensuring the
recorded run matches the current HEAD and passes the expected budget check
before setting the zero-headroom maxRawBytes value.
🪄 Autofix
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: 29209774-8a47-4d37-8e8b-7f2ba788ddee
📒 Files selected for processing (14)
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/point_support.rscrates/labcolors-core/src/private_fixture.rscrates/labcolors-core/src/program_session.rscrates/labcolors-core/src/session.rscrates/labcolors-core/src/session_tests.rsfixtures/private-program-browser/proof.mjspackages/colors/bench/private-program-wasm.jsonpackages/colors/test/private-program-mutation-contract.test.mjsscripts/test-private-program-mutations.mjsscripts/verify_point_support_surplus.py
There was a problem hiding this comment.
Actionable comments posted: 1
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/private_fixture.rs (1)
2304-2324: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick winПроверьте идентификаторы переоценённых physical cases.
CORE_PROGRAM_ASSESSMENT_CALLSпроверяет только количество вызовов. Вscan_program_candidateпереиспользование выполняется поcase_index;ScenarioIdхранится отдельно как provenance. При одинаковом opaque render неправильный case может остаться незамеченным. Добавьте test-only witness и проверьте наборы[ScenarioId::new(1)]для частичного обновления,[ScenarioId::new(1), ScenarioId::new(2)]для полного обновления и пустой набор для неизменённого обновления.🤖 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/private_fixture.rs` around lines 2304 - 2324, Extend the test-only instrumentation around scan_program_candidate to record the ScenarioId values of re-evaluated physical cases, not just CORE_PROGRAM_ASSESSMENT_CALLS. Update single_changed_case_recomputes_only_the_affected_case to assert the witness contains [ScenarioId::new(1)], and add coverage asserting [ScenarioId::new(1), ScenarioId::new(2)] for a full update and an empty set for an unchanged update.
🤖 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 `@packages/colors/bench/private-program-wasm.json`:
- Around line 24-29: Обновите запись бюджета в секции policy: замените source на
успешный exact-head run для текущего PR head
4f99f1edb03c81cee302ffc65016561a5fe13dee и установите rawBytes по данным этого
run, не используя данные failed run 31637406587.
---
Outside diff comments:
In `@crates/labcolors-core/src/private_fixture.rs`:
- Around line 2304-2324: Extend the test-only instrumentation around
scan_program_candidate to record the ScenarioId values of re-evaluated physical
cases, not just CORE_PROGRAM_ASSESSMENT_CALLS. Update
single_changed_case_recomputes_only_the_affected_case to assert the witness
contains [ScenarioId::new(1)], and add coverage asserting [ScenarioId::new(1),
ScenarioId::new(2)] for a full update and an empty set for an unchanged update.
🪄 Autofix
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: f2819101-2c0c-4678-a412-c63b2838f29b
📒 Files selected for processing (8)
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/private_fixture.rscrates/labcolors-core/src/program_session.rspackages/colors/bench/private-program-wasm.jsonpackages/colors/test/private-program-mutation-contract.test.mjsscripts/test-private-program-browser.mjs
|
@coderabbitai review |
|
Slice contract — PR F: incremental parity
Scope
SetAll | RevokeAll | ConfirmExactpublication and ABI v2 unchanged.RED
unchanged_cases_skip_evaluator_work_on_revision_only_update: PR E dispatched 2 evaluator calls; PR F requires 0.single_changed_case_recomputes_only_the_affected_case: PR E dispatched 2 evaluator calls; PR F requires 1.incremental-invalidation-skipmutates the exact physical-case equality predicate to unconditional reuse; browser proof must kill it when a changed backdrop should invalidate Ready and revoke output.Exit
Local evidence
31592768178, exact SHA479769ff9564d0bfd8eae5d5211519e1d0ff538f, success.left: 2, right: 0before implementation.cargo test -p labcolors-core --lib --features private-fixture --locked:1098 passed, 0 failed, 7 ignored.cargo clippy -p labcolors-core --all-targets --features private-fixture --locked -- -D warnings: PASS.14 passed, 0 failed; seven exact source transformations bound.Budget cycle
0382196(budget intentionally still pinned to PR E until canonical Linux observation).Summary by CodeRabbit
Новые возможности
Исправления