Proof: seal the dual proof join of five evidence chains (V5b2d) - #522
Conversation
The join of the structural candidate with both source-bound receipts and both semantic receipts is the only authority that may seal a DualProofReceiptV1. RED on WSL: 6 join tests fail against the stub; both lanes seal real receipts on a reduced fully-resolved domain and the honest chain admits one structural candidate.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 12 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
WalkthroughДобавлен ChangesDual proof receipt
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant ARBController
participant MPFIController
participant SemanticReplay
participant join_dual_proof_v1
participant DualProofReceiptV1
ARBController->>join_dual_proof_v1: передаёт Arb source-bound receipt
MPFIController->>join_dual_proof_v1: передаёт MPFI source-bound receipt
SemanticReplay->>join_dual_proof_v1: передаёт два SemanticVerificationReceiptV1
join_dual_proof_v1->>join_dual_proof_v1: проверяет типы, bindings и порядок Arb → MPFI
join_dual_proof_v1->>DualProofReceiptV1: создаёт sealed receipt и SHA-256 identity
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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: 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 `@proof/region/v1/dual_proof.py`:
- Around line 225-234: Сделайте public path вокруг claim_spans_full_domain_v1
total: при неканоническом claim возвращайте типизированный DualProofRejectedV1
вместо TypeError, сохранив bool для валидного claim. Обновите использование
full_domain в соответствующей логике так, чтобы там применялся приватный
предикат для уже канонического claim и full_domain оставался bool.
- Around line 128-142: Close inheritance for DualProofReceiptV1 as required by
the protocol: mark the class with typing.final and add __init_subclass__ that
rejects subclass creation, while preserving the existing _SEAL_TOKEN validation
in __new__. Update imports to include final and use the same rejection behavior
established by SemanticVerificationReceiptV1.
- Line 16: Declare the repository’s minimum supported Python version as 3.11 or
newer in the appropriate project configuration, so usage of StrEnum and
datetime.UTC is supported. Ensure the target declaration is consistent with the
repository’s existing packaging or tooling configuration.
In `@proof/region/v1/tests/test_dual_proof.py`:
- Around line 410-424: Extend test_complete_dual_chain_seals_one_receipt to
assert that proof.binds returns False when given at least one foreign or
mismatched receipt, while preserving the existing valid-chain assertion and
identity checks.
- Around line 46-48: Явно загрузите модуль `test_pipeline` до вызова
`_load_harness` для `ARB_HARNESS`, чтобы присваивание `ARB_PIPELINE_HARNESS =
sys.modules["test_pipeline"]` не зависело от побочного эффекта импорта
`arb/tests/test_receipt.py` и не приводило к `KeyError`.
🪄 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: bd40c165-fbac-47a3-90b4-c5950714a3df
📒 Files selected for processing (3)
proof/region/v1/PROTOCOL.mdproof/region/v1/dual_proof.pyproof/region/v1/tests/test_dual_proof.py
…ed floor rejection, explicit harness load (V5b2d)
|
Все 5 находок review закрыты в 376a620:
Доказательство: 8/8 OK в 60.6s под WSL (Ubuntu, Python 3.12.3), compileall чист. |
|
@coderabbitai resolve |
✅ Action performedComments resolved and changes approved. |
Срез V5b2d: DualProofReceiptV1 join
Структурный dual candidate доказывает только побайтное согласие двух engine transcripts; каждый source-bound receipt доказывает только provenance одного lane; каждый semantic receipt — только один transcript против независимого верификатора. Только join связывает все пять evidence chains в один sealed dual proof.
Что сделано
RED (95effe4): hostile contract из 8 тестов против заглушки — 6 падают по NotImplementedError, seal-гейты проверяются через TypeError.
GREEN (2d0d224): полный join в dual_proof.py (~240 строк):
Тестовый harness
Two-phase minting: discovery pass через harness._execute() учится manifest'у, выводимому controller'ом (comparator derivation детерминирован и job-независим), honest pass исполняется с _ReplayedRunBackend. Fixture job несёт 8 RESOURCE_LIMIT точек, поэтому dual_job() строит reduced-domain manifest (504 clean точки) через semantic replay scan.
Доказательства
Замечание про красный rerun #519
Rerun 30797490032 (c73f2f3) упал на WASM size budget: старый пин 376554B против реального артефакта 376907B. Дрейф уже закрыт в main через #514 (be009ce); актуальный CI на main — run 30893495847 (c327eb3) — зелёный. Красный статус merge commit #519 — артефакт rerun исторического коммита, не дефект кода.
Summary by CodeRabbit
Новые возможности
Исправления