Skip to content

fix(environment_mode)!: implement reproducible, fast_assert and full_assert - #181

Merged
blackopsrepl merged 3 commits into
mainfrom
feature/172-environment-mode
Nov 4, 2026
Merged

blackopsrepl merged 3 commits into
mainfrom
feature/172-environment-mode

Conversation

@blackopsrepl

Copy link
Copy Markdown
Collaborator

Closes #172. Base main @ 5e33d374, three commits:

  • 9f3f36d4 seed every mode but non_reproducible with a fixed seed
  • 6c8e0ae4 check committed steps against a fresh score in fast_assert
  • bd910d01 check every score calculation in full_assert

Gate on bd910d01 (fmt, clippy -D warnings, doc-names file-length facade-reachability public-api deps, rustdoc -D warnings, examples, workspace all-feature tests, doctests): EXIT 0, 1513 passed, 0 failed, 65 result lines. Each slice passed clippy, rustdoc and its focused tests on its own; each behaviour test was mutation-checked (removing the fix fails it).

…ixed seed

`reproducible` ran exactly like `non_reproducible`: without `random_seed`
every run drew its seed from the operating system. Every mode except
`non_reproducible` now solves with `REPRODUCIBLE_RANDOM_SEED` when
`random_seed` is omitted, and every seed consumer (solver scope, search
context, compiled selectors and acceptors) reads
`SolverConfig::resolved_random_seed`.

BREAKING CHANGE: `environment_mode = "reproducible"`, `"fast_assert"` and
`"full_assert"` without `random_seed` now solve with the fixed seed
`REPRODUCIBLE_RANDOM_SEED` instead of an operating-system seed.
…n fast_assert

`fast_assert` ran without any checks. It now asserts at every committed
step and best-solution update that the incremental score equals a fresh
full calculation, panicking on drift, the scope-level check `full_assert`
already ran.

BREAKING CHANGE: `environment_mode = "fast_assert"` now panics on score
drift at committed steps and best-solution updates.
`full_assert` checked only scope-level score calculations, never the move
evaluations that score through the director directly. It now also turns
on `Director::set_score_assertion`, so `ScoreDirector` checks every score
calculation against a fresh one, including each evaluated move, and
evaluator replicas inherit the check.

Closes #172.

BREAKING CHANGE: `environment_mode = "full_assert"` now panics on drift in
any score-director calculation, including move evaluations and evaluator
replicas. `Director` gains the provided method `set_score_assertion`.
@blackopsrepl
blackopsrepl merged commit bd910d0 into main Nov 4, 2026
23 of 24 checks passed
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.

EnvironmentMode: reproducible and fast_assert behave like non_reproducible; full_assert skips move evaluation

1 participant