Skip the 15s heartbeat on parked or settled folds - #94
Open
Thytu wants to merge 2 commits into
Open
Conversation
A finished fold with no open tools or questions must age out of the UI's 45s Working window instead of being kept fresh forever.
Same unresolved-tool / unanswered-question / live-plan-chip rule already lived next to the watchdog. One helper, shorter comments.
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
idle_since) or the current fold has completed output and nothing in flightI reviewed the full diff; this stops a finished turn from looking Working forever just because the heartbeat kept
updated_atfresh.Why this approach
The heartbeat exists so a silent-but-alive child stays inside the UI's 45s Working window. That is right for an open tool or a parked question. It is wrong once the fold already has completed text and no open work: each tick resets freshness, so the 45s staleness gate never fires.
Tradeoff
Thinking that still emits deltas stays fresh through the event path. A silent think with no open tool and no question will now age out of Working after 45s even though the child is still alive. That is the intended cost of letting the dropped-reply / mid-run hang shape settle.
Testing
cargo test -p zeron-engine fold_livenessNeed help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.