fix: stop lifecycle authority detection thrash#565
Merged
ogulcancelik merged 1 commit intoJun 11, 2026
Merged
Conversation
Make lifecycle authority sync idempotent so repeated true-to-true updates do not reset agent detection state. Skip routine pty process probes while full lifecycle hook authority is active, preserving pending process-exit and release probes.\n\nFixes ogulcancelik#560.
Collaborator
|
Hi @dzevs, thanks for your interest in contributing! New contributors need maintainer approval before opening PRs. This keeps review time focused on accepted work and avoids wasted effort. Herdr is opinionated about how it should look, feel, and work. Feature requests, ideas, questions, contribution proposals, and product-direction checks belong in Discussions, not issues. Next steps:
A discussion, issue, branch, or proposed implementation does not reserve the work and does not mean the PR path is approved. This PR will be closed automatically. See https://github.com/ogulcancelik/herdr/blob/master/CONTRIBUTING.md for more details. |
Owner
|
lgtm correct fix ty |
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.
Refs #560.
Summary
true -> trueupdates do not reset agent detectionRoot cause
For full lifecycle hook authority panes, app event handling repeatedly synced lifecycle authority into the runtime. The runtime setter notified the detection reset path on every
truecall, even when already active. That resetAgentDetectionPresenceback toNone.The pty-first process probe then ran before the lifecycle-authority screen-detection gate and re-detected the foreground Pi process, emitting repeated
None -> Some(Pi)state changes. Those state changes fed back into app event handling, creating the CPU/log/event-loop flood.Validation
cargo fmt --check✅cargo test pane::tests:: -- --nocapture✅cargo test --bin herdr✅ (1879 passed)cargo test✅ (unit + integration tests)cargo clippy --all-targets --locked -- -D warnings✅Manual verification
Tested locally with a rebuilt/installed
herdr 0.6.9binary:previous_agent=None agent=Some(Pi)flood after restart