Repository navigation
test: create the plan before stamping the stop request in production stage tests - #255
Conversation
…stage tests The stop file's observed_epoch was taken before intent() set the plan's now_epoch, so a second boundary between the two made the stop clock fall below the plan start and fail with 'invalid stop request clock'.
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Stop request and launch adoption tests tests/test_production_stage.py |
The tests reuse an intent created before the stop request. They verify delivery before launch adoption, recorded delivery after failed adoption, and that removing the request during adoption prevents publication from resuming. |
Priority:
Estimated code review effort: 2 (Simple) | ~5 minutes
Change: Other
Merge Risk: 
Minimal · up to b6052
-
The test-only changes address the reported clock-ordering race without introducing merge-blocking risk.
Pre-merge checks: 
4
-
Full details: Title check
-
Explanation
The title "test: create the plan before stamping the stop request in production stage tests" matches the main change. The objectives say PR
#255reorders plan creation before writing the stop request's observed_epoch in four tests in tests/test_production_stage.py. This removes a clock-boundary race that caused EvidenceError: invalid stop request clock. The title is specific, uses a conventional prefix, and names the primary change. It is under 80 characters, so the length is acceptable.
-
Finishing Touches
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 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.
Comment @coderabbitai help to get the list of available commands.
Four tests in
tests/test_production_stage.pywrote the stop request withobserved_epoch=int(time.time())and only then calledintent(), which sets the plan'snow_epochfrom the clock. When a second ticked over between the two, the stop clock was one second before the plan start andstop_windowrejected it:This failed
test_controller_stop_goes_to_numerical_record_before_hard_worker_stopon #253, a docs-only PR.The fix creates the plan first in those four tests, so the stop is never stamped before the plan starts. Test-only; the production check is unchanged.
tests/test_production_stage.py: 22 passed.Summary by CodeRabbit