Repository navigation
fix(batch): a shift opens at dispatched:, not when the brief lands - #590
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The shift watcher opened a brief the moment it landed, ignoring
dispatched:. Pilot shadow shift 1 (#574) opened a day early. That's harmless in shadow mode, but a live brief landed early would start workers early. A brief is now open only fromdispatched:toreview-at:. Before the start, a tick is idle withnot yet open: opens at dispatched …and touches nothing, not even the slot directory, so a brief may be landed early.batch watchshowsnot yet open — opens in ….Closes #589
API Changes
None public.
_orchestrator.brief_openreturns(False, "not yet open: …", None)beforedispatched:. This narrows the watcher; there is no doctrine change.Witness
test_a_brief_before_dispatched_is_not_yet_open: a tick at 08:00Z on a brief dispatched at 08:30Z is idle, says "not yet open" with the time, and creates no slot; the tick at 08:30Z plans. Control: with_orchestrator.pyreverted, this test fails (1 failed); with the fix it passes.test_before_dispatched_the_header_says_not_yet_open(batch watch).Tier: glance — merge mode: auto-merge on green with Witness PASS, post-merge summary.
🤖 Generated with Claude Code