Skip to content

feat: add approximate symmetry for DPOR - #134

Merged
SamuelIVX merged 1 commit into
mainfrom
feat/approximate-symmetry-dpor
Nov 12, 2026
Merged

SamuelIVX merged 1 commit into
mainfrom
feat/approximate-symmetry-dpor

Conversation

@SamuelIVX

Copy link
Copy Markdown
Owner

Summary

Add approximate symmetry for DPOR, completing the selected B9 implementation. CLI symmetry with an explicit BITSTATE store now supports all four strategies, including omitted --strategy.

  • Probe full orbit-plus-mapped-sleep products; use stable owner witnesses, sorted first-occurrence tokens and one shared filter. VALUE hits never deliberately replace product coverage.
  • Preserve exact/ordinary DPOR, normalization, source/alias certification, CBS policy and original failure/cutoff/resource evidence. No new algorithm, eligibility, schema or exact context cache.
  • Add a 480-product independent shadow, consumer collision shadows, alias/fixed-owner/byte-layout cases, all-mode concurrency and actual CLI/browser artifacts.

Validation

Build, 1,907 tests, strict Javadoc, 185 browser checks, external Java 26 jar consumer. Fresh baseline/final default PIT 455/468 K (97.22%), all 468 identities/statuses unchanged; 94% floor retained. Shared context 102/102 K and final checked store 73/73 K. Evidence ledger distinguishes the wide census, final store run and inherited residuals/CLI coverage boundary.

CodeRabbit completed all 20 submitted files. Both Minor findings and the Trivial finding were patched and locally verified; no rerun for minor/trivial fixes.

Spec 91 records the contract. The budget covers membership, not total heap; no speedup or calibrated coverage guarantee is claimed. B9 remains in progress until K3 merges. B10 and parked roadmap work remain excluded.

Co-authored-by: Codex noreply@openai.com

Encode complete mapped sleep products in the shared filter, using stable
whole-frame witnesses and sorted first-occurrence owner/action identities.
Count only missing products as insertions, retain accepted VALUE marks, and
preserve source/alias validation without an exact visited-context table.

Enable all four built-in strategies in owned library/harness/CLI paths while
keeping the existing DPOR algorithms and CBS policy intact. Add independent
product shadows, real witness/resource artifacts and final release evidence.
B9 closure awaits this phase's merge; B10 and parked work stay excluded.

Co-authored-by: Codex <noreply@openai.com>
@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • New Features

    • Approximate symmetry reduction with bitstate storage now supports all built-in strategies, including DPOR.
    • DPOR runs can report approximate results, including outcomes for violations, deadlocks, and resource-limited runs.
  • Documentation

    • Updated guidance and evidence for approximate symmetry across strategies, including DPOR behavior and its limitations.
    • Clarified strategy defaults and current implementation status.

Approximate symmetry now supports DPOR through encoded sleep-context membership. Runner, CLI, and benchmark validation accept approximate symmetry across built-in strategies. Tests and visualizer checks cover DPOR runs, reports, and resource-limited artifacts.

Changes: DPOR Approximate Symmetry

Layer / File(s) Summary
Encode and check DPOR sleep products
src/main/java/dev/samhb/interleave/search/SymmetryRunContext.java, src/main/java/dev/samhb/interleave/search/BitstateSymmetryStateStore.java, src/test/java/dev/samhb/interleave/search/BitstateSymmetryDpor*Test.java, src/test/java/dev/samhb/interleave/search/BitstateSymmetryStoreTest.java
The store binds to a strategy and supports DPOR sleep-product membership. SymmetryRunContext encodes validated sleep contexts in deterministic order. Tests check encoding, invalid contexts, product membership, and oracle comparisons.
Enable approximate symmetry in runners and consumers
src/main/java/dev/samhb/interleave/InterleaveRunner.java, src/main/java/dev/samhb/interleave/cli/Main.java, src/main/java/dev/samhb/interleave/report/BenchmarkHarness.java, src/test/java/dev/samhb/interleave/ApproximateSymmetryRunTest.java, src/test/java/dev/samhb/interleave/ApproximateDporRunTest.java, src/test/java/dev/samhb/interleave/cli/MainTest.java
Runner, CLI, and harness validation no longer apply the previous bitstate strategy whitelist. Tests cover all built-in strategies, DPOR outcomes, and benchmark reports.
Validate artifacts and record K3 status
docs/visualizer-e2e.mjs, docs/visualizer-normalize-check.mjs, .github/workflows/build.yml, docs/measurements/91-approximate-symmetry-dpor.md, docs/specs/active/91-approximate-symmetry-dpor.md, docs/plans/*, README.md
Visualizer checks validate all-strategy and DPOR artifacts, including verdicts and resource-prefix details. Workflow tests run the checks. Documentation records K3 evidence, scope limits, and implementation status.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant DPORRun
  participant BitstateSymmetryStateStore
  participant SymmetryRunContext
  DPORRun->>BitstateSymmetryStateStore: submit sleeping context
  BitstateSymmetryStateStore->>SymmetryRunContext: encode sleep context
  SymmetryRunContext-->>BitstateSymmetryStateStore: return deterministic product bytes
  BitstateSymmetryStateStore-->>DPORRun: return covered or newly inserted
Loading

Possibly related PRs

Merge Risk: Minimal · up to da565

This change extends approximate symmetry reduction to DPOR and all built-in strategies. Nothing in the reviewed material shows a concrete defect, and the new behavior is covered by oracle, run, CLI and visualizer tests. It looks ready to merge after the normal checks.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "feat: add approximate symmetry for DPOR" matches the main change. The changeset extends approximate bitstate symmetry to the DPOR strategy: BitstateSymmetryStateStore accepts DPOR, Symmetry…
Description check Passed The description states the purpose: adding approximate symmetry for DPOR and enabling all four strategies with an explicit BITSTATE store. It describes the product-probing design, the shared filter, t…
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.
Full details: Title check

Explanation

The title "feat: add approximate symmetry for DPOR" matches the main change. The changeset extends approximate bitstate symmetry to the DPOR strategy: BitstateSymmetryStateStore accepts DPOR, SymmetryRunContext adds DPOR sleep-set encoding, and the builder, harness, and CLI validation rules are relaxed. The title is short, specific, and follows a conventional commit style.

Full details: Description check

Explanation

The description states the purpose: adding approximate symmetry for DPOR and enabling all four strategies with an explicit BITSTATE store. It describes the product-probing design, the shared filter, the validation results, and the B9 status. This matches the changed README, spec, measurement, store, and test files.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between b8e2fa1 and da56591.

Files selected for processing: 20

  • .github/workflows/build.yml
  • README.md
  • docs/measurements/91-approximate-symmetry-dpor.md
  • docs/plans/approximate-symmetry-contract.md
  • docs/plans/future-work.md
  • docs/plans/post-task10-follow-ups.md
  • docs/specs/active/91-approximate-symmetry-dpor.md
  • docs/visualizer-e2e.mjs
  • docs/visualizer-normalize-check.mjs
  • src/main/java/dev/samhb/interleave/InterleaveRunner.java
  • src/main/java/dev/samhb/interleave/cli/Main.java
  • src/main/java/dev/samhb/interleave/report/BenchmarkHarness.java
  • src/main/java/dev/samhb/interleave/search/BitstateSymmetryStateStore.java
  • src/main/java/dev/samhb/interleave/search/SymmetryRunContext.java
  • src/test/java/dev/samhb/interleave/ApproximateDporRunTest.java
  • src/test/java/dev/samhb/interleave/ApproximateSymmetryRunTest.java
  • src/test/java/dev/samhb/interleave/cli/MainTest.java
  • src/test/java/dev/samhb/interleave/search/BitstateSymmetryDporOracleTest.java
  • src/test/java/dev/samhb/interleave/search/BitstateSymmetryDporTest.java
  • src/test/java/dev/samhb/interleave/search/BitstateSymmetryStoreTest.java

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Recent review details

Context from checks skipped due to timeout: 2

  • GitHub Check: CodeRabbit
  • GitHub Check: Mutation
Additional context used

Code guidelines: 1

AGENTS.md — auto-discovered
Path-based instructions: 6

Apply implementation criteria to production and example code.

CodeRabbit configuration file

Files:

  • src/main/java/dev/samhb/interleave/search/SymmetryRunContext.java
  • src/main/java/dev/samhb/interleave/cli/Main.java
  • docs/visualizer-normalize-check.mjs
  • src/main/java/dev/samhb/interleave/InterleaveRunner.java
  • src/main/java/dev/samhb/interleave/report/BenchmarkHarness.java
  • docs/visualizer-e2e.mjs
  • src/main/java/dev/samhb/interleave/search/BitstateSymmetryStateStore.java
Review tests and fixtures for their ability to detect plausible regressions in the behavior or contract under test.

CodeRabbit configuration file

Files:

  • src/test/java/dev/samhb/interleave/cli/MainTest.java
  • src/test/java/dev/samhb/interleave/search/BitstateSymmetryStoreTest.java
  • src/test/java/dev/samhb/interleave/search/BitstateSymmetryDporOracleTest.java
  • src/test/java/dev/samhb/interleave/ApproximateDporRunTest.java
  • src/test/java/dev/samhb/interleave/search/BitstateSymmetryDporTest.java
  • src/test/java/dev/samhb/interleave/ApproximateSymmetryRunTest.java
Check automation configuration for correctness, secret exposure, excessive permissions, and unsafe handling of untrusted input.

CodeRabbit configuration file

Files:

  • .github/workflows/build.yml
Check documented behavior, examples, commands, configuration, and requirements against implementation and available evidence.

CodeRabbit configuration file

Files:

  • docs/plans/approximate-symmetry-contract.md
  • docs/plans/future-work.md
  • docs/specs/active/91-approximate-symmetry-dpor.md
  • README.md
  • docs/plans/post-task10-follow-ups.md
  • docs/measurements/91-approximate-symmetry-dpor.md
Prioritize correctness, security, data integrity, and user-visible regressions.

CodeRabbit configuration file

Files:

  • src/main/java/dev/samhb/interleave/search/SymmetryRunContext.java
  • docs/plans/approximate-symmetry-contract.md
  • .github/workflows/build.yml
  • src/main/java/dev/samhb/interleave/cli/Main.java
  • docs/visualizer-normalize-check.mjs
  • src/main/java/dev/samhb/interleave/InterleaveRunner.java
  • src/main/java/dev/samhb/interleave/report/BenchmarkHarness.java
  • src/test/java/dev/samhb/interleave/cli/MainTest.java
  • docs/plans/future-work.md
  • src/test/java/dev/samhb/interleave/search/BitstateSymmetryStoreTest.java
  • docs/specs/active/91-approximate-symmetry-dpor.md
  • README.md
  • src/test/java/dev/samhb/interleave/search/BitstateSymmetryDporOracleTest.java
  • src/test/java/dev/samhb/interleave/ApproximateDporRunTest.java
  • docs/visualizer-e2e.mjs
  • docs/plans/post-task10-follow-ups.md
  • src/main/java/dev/samhb/interleave/search/BitstateSymmetryStateStore.java
  • docs/measurements/91-approximate-symmetry-dpor.md
  • src/test/java/dev/samhb/interleave/search/BitstateSymmetryDporTest.java
  • src/test/java/dev/samhb/interleave/ApproximateSymmetryRunTest.java
Source excerpt: CodeRabbit’s 80% docstring threshold is a minimum acceptance check, not a documentation target.

CodeRabbit inference engine (AGENTS.md)

Files:

  • src/main/java/dev/samhb/interleave/search/SymmetryRunContext.java
  • src/main/java/dev/samhb/interleave/cli/Main.java
  • src/main/java/dev/samhb/interleave/InterleaveRunner.java
  • src/main/java/dev/samhb/interleave/report/BenchmarkHarness.java
  • src/test/java/dev/samhb/interleave/cli/MainTest.java
  • src/test/java/dev/samhb/interleave/search/BitstateSymmetryStoreTest.java
  • src/test/java/dev/samhb/interleave/search/BitstateSymmetryDporOracleTest.java
  • src/test/java/dev/samhb/interleave/ApproximateDporRunTest.java
  • src/main/java/dev/samhb/interleave/search/BitstateSymmetryStateStore.java
  • src/test/java/dev/samhb/interleave/search/BitstateSymmetryDporTest.java
  • src/test/java/dev/samhb/interleave/ApproximateSymmetryRunTest.java
Learnings: 3

Learning: 2026-10-20T02:44:13.594Z

Learnt from: CR
Repo: SamuelIVX/interleave PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-10-20T02:44:13.594Z
Learning: Applies to **/*.java : Source excerpt:
# AGENTS.md — interleave

## Java documentation

CodeRabbit’s 80% docstring threshold is a minimum acceptance check, not a documentation target.
Document every new function with meaningful Javadoc, including private helpers; use inherited
contracts only when they accurately describe the override. Explain parameters, results, meaningful
failures, preconditions, and side effects, with valid examples for nontrivial public operations.
Place Javadoc before annotations so the compiler attaches it to the declaration.

Applied to files:

  • src/main/java/dev/samhb/interleave/search/SymmetryRunContext.java
  • src/test/java/dev/samhb/interleave/ApproximateDporRunTest.java
Learning: 2026-10-20T02:44:13.594Z

Learnt from: CR
Repo: SamuelIVX/interleave PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-10-20T02:44:13.594Z
Learning: Source excerpt:
# AGENTS.md — interleave

## Test conventions — numeric expectations

When a test asserts a number produced by a formula (an estimated false-positive rate, a hash density, a
projected count), the expected value is **derived outside the language under test and asserted as a
literal**:

- **Never re-derive with the expression under test.** `assertEquals(expected, 1 - Math.exp(-x))`
  beside an implementation containing `1 - Math.exp(-x)` validates nothing — it reproduces the
  implementation line for line and stays green if both are wrong the same way.

Applied to files:

  • src/test/java/dev/samhb/interleave/search/BitstateSymmetryDporTest.java
Learning: 2026-10-20T02:44:13.594Z

Learnt from: CR
Repo: SamuelIVX/interleave PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-10-20T02:44:13.594Z
Learning: Source excerpt:
# AGENTS.md — interleave

## Test conventions — numeric expectations

When a test asserts a number produced by a formula (an estimated false-positive rate, a hash density, a
projected count), the expected value is **derived outside the language under test and asserted as a
literal**:

- **Assert against literals.** Write the number out. A literal is checkable by a reader; a recomputed
  expression is not.

Applied to files:

  • src/test/java/dev/samhb/interleave/search/BitstateSymmetryDporTest.java
ast-grep (0.51.1)

src/main/java/dev/samhb/interleave/search/SymmetryRunContext.java

[warning] 145-145: Use a randomly-generated IV
Context: byte[] orbit = product.key().getBytes(StandardCharsets.UTF_8);
Note: [CWE-329] Generation of Predictable IV with CBC Mode.

(random-iv)

LanguageTool

docs/measurements/91-approximate-symmetry-dpor.md

[grammar] ~29-~29: Ensure spelling is correct
Context: ... observed false positives rather than retuning or skipping. Positive equivalence check...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

[locale-violation] ~92-~92: In American English, ‘afterward’ is the preferred variant. ‘Afterwards’ is more commonly used in British English and other dialects.
Context: ...nal integrated build/tests/Javadoc pass afterwards. All 79 remaining survivors match inhe...

(AFTERWARDS_US)

Additional comments: 16

src/main/java/dev/samhb/interleave/search/SymmetryRunContext.java: 1

137-153: LGTM!

src/main/java/dev/samhb/interleave/search/BitstateSymmetryStateStore.java: 1

1-1: LGTM!

Also applies to: 11-11, 30-31, 40-40, 42-42, 47-47, 51-51, 54-54, 60-60, 69-69, 134-134, 141-141, 157-165, 168-173

src/test/java/dev/samhb/interleave/search/BitstateSymmetryDporTest.java: 1

1-148: LGTM!

src/test/java/dev/samhb/interleave/search/BitstateSymmetryStoreTest.java: 1

48-48: LGTM!

Also applies to: 50-50, 58-58

src/test/java/dev/samhb/interleave/search/BitstateSymmetryDporOracleTest.java: 1

1-135: LGTM!

src/main/java/dev/samhb/interleave/InterleaveRunner.java: 1

609-609: LGTM!

Also applies to: 733-734, 740-740

src/main/java/dev/samhb/interleave/cli/Main.java: 1

265-265: LGTM!

Also applies to: 268-268, 449-449

src/main/java/dev/samhb/interleave/report/BenchmarkHarness.java: 1

118-119: LGTM!

Also applies to: 125-125

src/test/java/dev/samhb/interleave/ApproximateSymmetryRunTest.java: 1

22-22: LGTM!

Also applies to: 78-79, 100-101, 110-110, 119-122

src/test/java/dev/samhb/interleave/ApproximateDporRunTest.java: 1

1-57: LGTM!

src/test/java/dev/samhb/interleave/cli/MainTest.java: 1

616-666: LGTM!

.github/workflows/build.yml: 1

51-51: LGTM!

Also applies to: 58-58

docs/visualizer-e2e.mjs: 1

354-366: LGTM!

Also applies to: 367-385

docs/visualizer-normalize-check.mjs: 1

55-69: LGTM!

README.md: 1

378-379: LGTM!

Also applies to: 382-382, 390-393, 473-475

docs/measurements/91-approximate-symmetry-dpor.md: 1

1-122: LGTM!

@github-actions

Copy link
Copy Markdown

⚠️ Deprecation Warning: The deny-licenses option is deprecated for possible removal in the next major release. For more information, see issue 997.

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@SamuelIVX
SamuelIVX marked this pull request as ready for review November 12, 2026 06:29
@graphify-labs

graphify-labs Bot commented Nov 12, 2026

Copy link
Copy Markdown

Graphify reviews are paused for this workspace because nobody has used it in 7 days. A workspace owner can resume reviews from the Repositories page: https://app.graphify.com/personal-1d9554/repositories

@SamuelIVX
SamuelIVX merged commit 3d5c09e into main Nov 12, 2026
11 checks passed
@SamuelIVX
SamuelIVX deleted the feat/approximate-symmetry-dpor branch November 12, 2026 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant