Skip to content

test(runtime): bind wall readback to its predecessor - #1124

Merged
Brad-Edwards merged 1 commit into
devfrom
DSL-437-wall-readback-successor
Aug 13, 2026
Merged

test(runtime): bind wall readback to its predecessor#1124
Brad-Edwards merged 1 commit into
devfrom
DSL-437-wall-readback-successor

Conversation

@doublewhy

@doublewhy doublewhy commented Aug 12, 2026

Copy link
Copy Markdown

Plain-language summary

  • Context: A concurrency test checks that the wall-clock driver cannot change time state while another thread holds the readback lock.
  • Problem: The test assumed the clock must still be at tick zero. Under load, the clock may validly advance before the reader gets the lock, causing a false failure even though the state remains stable during the protected read.
  • Fix: Capture the actual predecessor coordinate after the lock is held, then prove that the snapshot and returned coordinate stay equal to that value until the read finishes.

Summary

Make the DSL-437 wall-clock concurrency regression assert the actual locked predecessor coordinate instead of assuming the driver must still be at absolute tick zero.

Scope: OpenRAE core only. No experiment code, data, or results are changed.

Requirement UIDs

  • DSL-437

Related issues

Closes #1122

Related: #861

Because this PR targets dev, issue closure may need to be reconciled manually when the change reaches the default branch.

Stack

  • Base: dev at 3d6e369b726607ff657a841c7f1dee0bec655b8f
  • Depends on: none; independently mergeable

Changes

  • Capture the complete predecessor TimeCoordinateModel while the participant read lock is held.
  • Assert the manager snapshot remains unchanged during the blocked interval.
  • Require the returned segment, tick, and microstep to equal that captured predecessor after release.
  • Document why a valid advance before lock acquisition is outside the evidence boundary.

Compatibility and release impact

  • Compatibility: no runtime, SDL, schema, or public API change.
  • Release effect: none (test: only).
  • CHANGELOG.md and the package version remain release-please owned.

Verification

  • Focused concurrency regression: 12/12 consecutive runs passed under CPython 3.14.4 free-threaded.
  • Complete DSL-437 test module: 61 passed.
  • Ruff check and format: passed.
  • Repository and DSL-437 requirement policy: passed; Ground Control was unavailable locally, so remote governance used its documented unavailable skip.
  • Changed production executable lines/branch exits: not applicable; this PR changes only a regression test and traceability documentation.

Traceability

  • DOCUMENTS: DSL-437 / #1122 ← concurrency decision addendum.
  • TESTS: DSL-437 / #1122 ← predecessor-bound wall readback regression.

Checklist

  • Conventional lowercase PR title.
  • No published schema change.
  • Requirement traceability updated.
  • No manual changelog or version edit.

Notes for review

This narrows the test oracle without weakening the core assertion: an advance during the protected read still changes the snapshot or returned coordinate and fails deterministically.

@doublewhy
doublewhy marked this pull request as ready for review August 12, 2026 20:39
@Brad-Edwards
Brad-Edwards merged commit 9756ce1 into dev Aug 13, 2026
18 of 20 checks passed
@Brad-Edwards
Brad-Edwards deleted the DSL-437-wall-readback-successor branch August 13, 2026 02:41
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