Skip to content

fix(processor): bound the complete solver operation (#1108) - #1127

Merged
Brad-Edwards merged 2 commits into
devfrom
fix-1108-bounded-solver-operation
Aug 13, 2026
Merged

fix(processor): bound the complete solver operation (#1108)#1127
Brad-Edwards merged 2 commits into
devfrom
fix-1108-bounded-solver-operation

Conversation

@doublewhy

Copy link
Copy Markdown

Plain-language summary

  • Context: OpenRAE uses a constraint solver to decide whether a scenario's finite choices can all be satisfied.
  • Problem: One analysis could rebuild the same solver thousands of times, its five-second limit covered each individual check instead of the whole operation, and an inconclusive answer could be mistaken for evidence.
  • Fix: Reuse one solver, enforce one five-second deadline across construction and every check, and fail safely without publishing partial evidence.

Summary

Build one deterministic incremental QF_LIA solver session per normalized model. Clauses and fixed witness choices are selected through temporary assumptions, preserving the incumbent initial decision, canonical witness order, and sorted-deletion core reduction without rebuilding the expression graph.

The governed 5,000 ms timeout is now one monotonic operation deadline beginning before solver construction. Every native check receives only the remaining time, and a result arriving after the deadline is rejected. The existing finite check-count budget remains an independent bound.

The shared check path also fails closed on Z3 unknown, preserves bounded operational context at the service boundary, rejects duplicate clause IDs before solver construction, and represents empty membership explicitly as false. No partial SAT/UNSAT, canonical-witness, or subset-minimal-core evidence is emitted after an incomplete check.

Related issues

Closes #1108

Closes #1114

Related: #826 (closed governed-profile lineage). Prior proposal: #1083.

Changes

Test plan

  • Satisfiability solver/service regressions on CPython 3.12.13: 30 passed
  • Satisfiability CLI, SDL parser, reference processor, and processor-manifest regressions: 123 passed, 1 skipped, 1 deselected
  • Parallel satisfiability run with coverage: 30 passed
  • Changed executable-line coverage: 100% (120/120, diff-cover against origin/dev)
  • Changed branch coverage: 100%; _solver.py is 100% line and branch covered, and all introduced _service.py branches are covered
  • Python 3.12 non-host suite under coverage: 6,405 passed, 1 skipped after excluding the libvirt guest-certification file and its /usr/bin/busybox builder test
  • Ruff format and lint pass
  • Repository policy passes; Ground Control requirement lookup skipped cleanly when its service was unavailable
  • Canonical verification integration, contracts, static policy/lint, and docs lanes pass
  • Complete canonical nox -s verify: attempted; this macOS worktree lacks /usr/bin/busybox for host-specific libvirt tests and the pinned offline Isabelle acquisition

Checklist

  • Code follows the project coding standards
  • Classified FM2: bounded constraint semantics with typed IR and differential/property coverage
  • No published contract schema changed; regeneration is not applicable
  • PR title is a Conventional Commit
  • Architectural and normative formal-semantics documentation updated

Notes for review

@doublewhy
doublewhy marked this pull request as ready for review August 12, 2026 20:30
@Brad-Edwards
Brad-Edwards merged commit e4612cf into dev Aug 13, 2026
12 checks passed
@Brad-Edwards
Brad-Edwards deleted the fix-1108-bounded-solver-operation branch August 13, 2026 02:46
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