Skip to content

Skip the 15s heartbeat on parked or settled folds - #94

Open
Thytu wants to merge 2 commits into
zeronsh:mainfrom
Thytu:skip-heartbeat-on-settled-folds
Open

Skip the 15s heartbeat on parked or settled folds#94
Thytu wants to merge 2 commits into
zeronsh:mainfrom
Thytu:skip-heartbeat-on-settled-folds

Conversation

@Thytu

@Thytu Thytu commented Aug 15, 2026

Copy link
Copy Markdown

Summary

  • skip the 15s session liveness heartbeat when the run is parked (idle_since) or the current fold has completed output and nothing in flight
  • keep the heartbeat for unresolved tools and unanswered questions
  • treat the live-plan chip as chrome, not in-flight work

I reviewed the full diff; this stops a finished turn from looking Working forever just because the heartbeat kept updated_at fresh.

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_liveness
    • completed text / empty fold → no heartbeat
    • open tool + unanswered question → heartbeat
    • live-plan chip alone → no heartbeat

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Thytu added 2 commits August 14, 2026 19:45
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.
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.

1 participant