Skip to content

Proof: laned semantic verification assembly (V5b2d-2a) - #534

Merged
lemone112 merged 4 commits into
mainfrom
v5b2d-2a-laned-semantic-verification
Aug 5, 2026
Merged

Proof: laned semantic verification assembly (V5b2d-2a)#534
lemone112 merged 4 commits into
mainfrom
v5b2d-2a-laned-semantic-verification

Conversation

@lemone112

@lemone112 lemone112 commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • The full-domain SemanticVerificationReceiptV1 can never come from one sequential replay of 2^24 points, so the independent replay now runs as the same packing-aligned window lanes the full-domain RUN uses and assembly seals the one receipt from a complete lane cover.
  • verification_assembly.assemble_semantic_verification_v1 admits lanes through the existing corpus lane admission, reassembles the monolithic transcript via the existing shard assembly, and seals exactly when the reassembled independent replay is byte-identical to the verified transcript; gaps, overlaps, reorders, drift and foreign bindings are typed rejections.
  • semantic.verifier.bind_transcript_v1 is extracted as the single binding surface shared by the monolithic verifier and the laned path (behaviour identical, hostile suites green).

This is the next V5b2d DAG node toward DualProofReceiptV1(full_domain=True): reduced-domain contracts stay untouched, the receipt type and sealing path are unchanged, and no engine or controller code is imported.

Test plan

  • py -m unittest tests.test_verification_assembly — 8/8 (RED first: module absent)
  • semantic suites (test_semantic_receipt, replay/diversity/folding/intervalmath) green
  • corpus suites (test_corpus_assembly, test_corpus_lanes) green
  • test_full_domain_gate green; pinned gates verify_point_support_surplus.py and verify_clean_set_receipt.py product green (no Rust touched)
  • full Linux CI suite on the PR

Summary by CodeRabbit

  • Новые возможности

    • Добавлена поддержка поэтапной проверки семантических транскриптов по фрагментам, с итоговой сборкой результата после успешной валидации.
  • Исправления

    • Усилена проверка входных данных: теперь некорректные, неполные, смещённые или несовместимые фрагменты отклоняются раньше.
    • Проверка транскрипта стала строже: несоответствия по типам, идентификаторам и координатам теперь сразу приводят к отказу.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 41 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: da6c87c5-8677-4125-bbbe-a4d5d5f8f8a1

📥 Commits

Reviewing files that changed from the base of the PR and between 0ececdd and 9cfcc39.

📒 Files selected for processing (2)
  • proof/region/v1/tests/test_verification_assembly.py
  • proof/region/v1/verification_assembly.py

Walkthrough

Добавлена сборка semantic verification из lane-фрагментов. verify_transcript теперь выполняет отдельную binding-проверку. Тесты проверяют успешную сборку receipt и типизированные отклонения для некорректных, неполных и несовпадающих входов.

Changes

Семантическая верификация по lane-фрагментам

Layer / File(s) Summary
Публичная проверка binding
proof/region/v1/semantic/__init__.py, proof/region/v1/semantic/verifier.py
Добавлена публичная функция bind_transcript_v1. Она проверяет типы, принадлежность transcript и run к job и comparator, а также количество точек. verify_transcript вызывает её перед replay.
Сборка и sealing receipt
proof/region/v1/verification_assembly.py
Добавлена assemble_semantic_verification_v1. Функция преобразует lanes, собирает DecisionTranscriptV1, классифицирует ошибки и запечатывает SemanticVerificationReceiptV1 только после успешного совпадения.
Контракт lane-based verification
proof/region/v1/tests/test_verification_assembly.py
Добавлены тесты для идентичности монолитного и lane-based receipt, foreign bindings, неверных типов, неполного и перекрывающегося покрытия, перестановки и дублирования lanes, расхождения replay и смещённых окон.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant WindowLaneArtifactV1
  participant assemble_semantic_verification_v1
  participant corpus_assembly
  participant verify_transcript
  participant SemanticVerificationReceiptV1
  WindowLaneArtifactV1->>assemble_semantic_verification_v1: передача lane-фрагментов
  assemble_semantic_verification_v1->>corpus_assembly: сборка DecisionTranscriptV1
  corpus_assembly-->>assemble_semantic_verification_v1: собранный transcript
  assemble_semantic_verification_v1->>verify_transcript: семантическая проверка
  verify_transcript-->>assemble_semantic_verification_v1: receipt или rejection
  assemble_semantic_verification_v1->>SemanticVerificationReceiptV1: sealing успешного результата
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Название чётко описывает основное изменение: добавление сборки семантической верификации с лейн-фрагментами для SemanticVerificationReceiptV1, что соответствует всем четырём изменённым файлам.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ 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 v5b2d-2a-laned-semantic-verification

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

@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: 1

🤖 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/verification_assembly.py`:
- Around line 57-63: Update the lane normalization in
assemble_semantic_verification_v1 to catch Exception, not only TypeError, so
iterator failures such as ValueError and RuntimeError are converted into _reject
with SemanticVerificationReasonV1.INVALID_INPUT and the fixed existing message.
Add a test using an iterator whose __iter__ or __next__ raises one of these
exceptions.
🪄 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: 4a3db773-7120-4acc-8251-0d6302b43984

📥 Commits

Reviewing files that changed from the base of the PR and between fd41783 and 0ececdd.

📒 Files selected for processing (4)
  • proof/region/v1/semantic/__init__.py
  • proof/region/v1/semantic/verifier.py
  • proof/region/v1/tests/test_verification_assembly.py
  • proof/region/v1/verification_assembly.py

Comment thread proof/region/v1/verification_assembly.py
@lemone112
lemone112 merged commit 48df018 into main Aug 5, 2026
10 checks passed
@lemone112
lemone112 deleted the v5b2d-2a-laned-semantic-verification branch August 5, 2026 14:27
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