Repository navigation
wait: what arrived since it last woke the supervisor counts as new - #96
Merged
Merged
Conversation
wait took its first snapshot (open messages to the supervisor, owner lines, metrics) as the baseline, so a worker's message that landed between the end of the tick and that snapshot was taken for an old one: the supervisor slept the whole next tick while the worker waited. The snapshot runs metrics, which on a long log takes a while, so the window was wide. wait now records when it last woke the supervisor (run/wait-since) and reports anything that came in after that at once. A message the supervisor leaves open wakes it once, not on every wait. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Run inside an agent session there are nine markers to strip, and the shell wrapped the env -u line at 80 columns, mid-token. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… never answers The probe gave it 5s and then carried on regardless; on a loaded machine Node 18's dashboard took longer, and the test's first real request failed with a bare 'fetch failed'. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Review (upstream loop, author's own PR):
|
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.
What
wait: wait records when it last woke the supervisor (run/wait-since, registered inRUN_KNOWNsofleet statusdoesn't flag it). An open message to the supervisor, or an owner line, created after that moment is reported straight away, even though it's already in wait's first snapshot. Other items keep the old rule: only what's new since the first snapshot wakes it.waitstarts wakes it at once, and only once, when left open.env -uline at 80 columns, mid-token.Why
wait took its first snapshot as the baseline. A worker's message that landed between the end of the supervisor's tick and that snapshot was taken for an old one, so the supervisor slept the whole next tick, 15 minutes by default, while the worker waited. The snapshot runs
metrics, which on a long log (Stacks: about 8.9k lines) takes a while, so the window was wide. The same race failed "a worker's message wakes it" three times on a loaded Mac.Design note
"New" means since the last time wait woke the supervisor, not since its last log line. A message the supervisor deliberately leaves open would otherwise wake it on every wait, which is a busy loop. With the marker it wakes it once.
Authority
This only touches when wait returns. It writes nothing to the log, and
run/wait-sinceis a timestamp that nothing authorizes from.Migration
None.
Tests
Local, sequential, before merging main: Node 24.14.1 42/42, 20.19.6 42/42, 18.20.4 41/42; the failure was the pane wrap, fixed here and rerun green. Main (#93) is merged in; CI runs at the head.
🤖 Generated with Claude Code