Skip to content

Add exhaustive tri-state support oracle and replayable certificates (SLM-60)#332

Merged
Tyler-R-Kendrick merged 5 commits into
mainfrom
claude/slm-60-support-oracle
Jul 18, 2026
Merged

Add exhaustive tri-state support oracle and replayable certificates (SLM-60)#332
Tyler-R-Kendrick merged 5 commits into
mainfrom
claude/slm-60-support-oracle

Conversation

@Tyler-R-Kendrick

Copy link
Copy Markdown
Owner

Summary

Implements the deterministic tri-state support oracle for the Verified Scope Solving project (SLM-60 / VSS0-04): the first component allowed to produce UNSUPPORTED. It decides whether a candidate at one hole of a FiniteDomainState participates in at least one bounded, verifier-accepted completion, and distinguishes a proven absence from incomplete search.

Stacked on #321 (SLM-59). Base is agent/slm-59-finite-domain-lattice so this diff shows only the VSS0-04 change; it will retarget to main when the base lands. Torch-free, not wired into decode, and makes no correctness-transfer, speed, or ship claim.

Changes

  • dsl/solver/support.pySupportQuery, SupportCertificate, SupportResult, SearchCounters; the SupportOracle / ProblemExpander / Verifier protocols; and EnumerativeSupportOracle. The search is iterative (no Python recursion), explores values in the canonical HoleDomain order (logit-independent), deduplicates by FiniteDomainState.fingerprint, and enforces every SolverBounds budget. Verdicts: SUPPORTED (verifier-accepted witness; a witness wins even if other branches stay partial), UNSUPPORTED (whole finite space exhausted with only complete coverage and no witness → exhausted=True), UNKNOWN (any partial/none coverage, unavailable capability, or budget stop — never from a timeout). replay_support_certificate(...) re-derives identity, reruns the deterministic search, and returns structured violations.
  • dsl/solver/openui_support.py — the OpenUI wiring: OpenUIForestExpander advances a token prefix through build_completion_forest + the VSS0-03 completion_forest_state adapter (eos→terminal, none→dead, partial→incomplete); OpenUIWellFormedVerifier runs lang-core validate where a genuine ParseError is a hard REJECT but a missing bridge / timeout / RuntimeError is UNAVAILABLEUNKNOWN (the timeout-vs-UNSAT distinction the contract requires).
  • dsl/solver/__init__.py — exports the new public API.
  • Docsverified-scope-solver.md gains an implemented-oracle section (tri-state table, search order canonical-domain-value-v1, certificate schema v1, verifier profile, replay rules) + a dated status note; lattice-recursive-search.md gains a prefix-global extendability vs. verifier-backed support subsection.

Honesty

  • A certificate stores only the witness digest + source label — never raw witness text, logits, timestamps, or secrets.
  • UNSUPPORTED requires an exhausted, fully-complete-coverage search; replay rejects a non-exhausted, incomplete-coverage, or budget-stopped UNSUPPORTED, and rejects a SUPPORTED whose witness digest doesn't match a re-verified witness. UNKNOWN is accepted as honest but never as pruning authority.
  • Reference correctness implementation on tiny closed fixtures — no production-scale enumeration, no model ranking, no SMT dependency, no decode/runtime flag, no train/eval/checkpoint.

Verification

python -m pytest tests/test_dsl/test_solver_support.py tests/test_dsl/test_solver_state.py tests/test_models/test_compiler_decode.py -q92 passed · ruff clean · python -m scripts.repo_policy ok · git diff --check clean. tests/test_dsl/test_solver_support.py (18 tests) pins all three verdicts, witness-before-partial, duplicate-state suppression, determinism, stale-query/candidate rejection, JSON round-trip, torch-free, every replay rule, and an OpenUI wiring smoke.

Honest caveat: .githooks/check-changed --staged surfaces 13 failures in unrelated DSL/pack/tokenizer suites (vocab_size 500 != 480, bridge-unavailable QUARANTINE) — these are pre-existing environmental failures on the base branch, not introduced here; all dsl/solver/* tests pass.

🤖 Generated with Claude Code


Generated by Claude Code

claude and others added 4 commits July 17, 2026 20:50
Specify the guarantee boundary separating prefix legality from support
(participation in a bounded, fully verified completion) for the Verified
Scope Solving & Hybrid Realization project. Spec-only: no solver code,
dependency, experiment, or checkpoint; decode behavior is unchanged until a
later VSS issue enables new flags.

- docs/design/verified-scope-solver.md: term definitions, SUPPORTED /
  UNSUPPORTED / UNKNOWN semantics (UNKNOWN never removes a candidate), a
  deterministic bounded-enumeration reference backend (no SMT/Z3) plus an
  optional future backend protocol, certificate replay and the
  deduction-vs-decision transitions with every destructive step citing an
  exact proof/replay, capsule SCC boundaries, late realization, a
  relationship-to-existing-code table, and an end-to-end partial-coverage
  live-UNKNOWN example.
- research-lineage.md: VSS0 research anchors (DeepCoder, CEGIS, egg /
  e-graphs, EDLM, TreeDiff, LDT) with the existing Faithful/Adapted/
  Surrogate/Adjacent fidelity vocabulary; none tagged Faithful (spec-only).
- README.md: register the new doc in the design-doc navigation index.

Verified: python -m scripts.repo_policy ok, check-changed selects no tests
(docs-only), git diff --check clean, all relative links resolve.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MeD6nTTabPQhva7pXtTMNj
…SLM-60)

VSS0-04: implement the deterministic reference oracle that decides whether a
candidate participates in at least one bounded, verifier-accepted completion —
the first component allowed to produce UNSUPPORTED — plus a pure replay checker.
Torch-free, not wired into decode, no ship or speed claim.

- dsl/solver/support.py: SupportQuery / SupportCertificate / SupportResult /
  SearchCounters, the SupportOracle + ProblemExpander + Verifier protocols, and
  EnumerativeSupportOracle — iterative (no Python recursion) deterministic search
  in canonical domain-value order, fingerprint dedup, per-SolverBounds budgets,
  tri-state verdicts (SUPPORTED witness / exhausted-complete UNSUPPORTED /
  partial|budget|unavailable UNKNOWN), and replay_support_certificate returning
  structured violations rather than a bare bool.
- dsl/solver/openui_support.py: OpenUIForestExpander (advances a token prefix via
  build_completion_forest + completion_forest_state; eos->terminal, none->dead,
  partial->incomplete) and OpenUIWellFormedVerifier (lang-core validate; ParseError
  ->REJECT, missing-bridge/timeout->UNAVAILABLE, never UNSUPPORTED).
- tests/test_dsl/test_solver_support.py: tiny closed fixtures pinning all three
  verdicts, witness-before-partial, duplicate-state suppression, determinism,
  stale-query/candidate rejection, JSON round-trip, torch-free, and replay
  rejection of tampered digests / non-exhausted UNSUPPORTED / incomplete coverage /
  stale versions, plus an OpenUI wiring smoke.
- solver/__init__ exports the new public API; docs add the implemented-oracle
  section + tri-state table + replay rules to verified-scope-solver.md and a
  prefix-extendability-vs-support subsection to lattice-recursive-search.md.

Verified: pytest test_solver_support.py test_solver_state.py test_compiler_decode.py
(92 passed), ruff, repo_policy, git diff --check. Stacked on SLM-59. The 13 failures
check-changed surfaces are pre-existing environmental DSL/pack/tokenizer failures on
the base branch (vocab 500!=480, bridge-unavailable QUARANTINE), unrelated to this
change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VHgqD6cnywdnaXP9gRFCwt
@vercel

vercel Bot commented Jul 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
slm-training Ready Ready Preview, Comment Jul 18, 2026 4:27am

Request Review

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Tyler-R-Kendrick, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 23 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 11fb3383-ecab-4200-a299-25ceeba315bf

📥 Commits

Reviewing files that changed from the base of the PR and between 6cee212 and e64230d.

📒 Files selected for processing (6)
  • docs/design/lattice-recursive-search.md
  • docs/design/verified-scope-solver.md
  • src/slm_training/dsl/solver/__init__.py
  • src/slm_training/dsl/solver/openui_support.py
  • src/slm_training/dsl/solver/support.py
  • tests/test_dsl/test_solver_support.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/slm-60-support-oracle

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

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

Base automatically changed from agent/slm-59-finite-domain-lattice to main July 18, 2026 02:37
# Conflicts:
#	docs/design/lattice-recursive-search.md
#	docs/design/verified-scope-solver.md
#	src/slm_training/dsl/solver/__init__.py
@Tyler-R-Kendrick
Tyler-R-Kendrick merged commit c5d1110 into main Jul 18, 2026
4 checks passed
@Tyler-R-Kendrick
Tyler-R-Kendrick deleted the claude/slm-60-support-oracle branch July 18, 2026 04:28
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.

2 participants