fix(lifeline): self-heal Telegram.Lifeline degradations on successful send#241
Open
brianjones-v4n wants to merge 1 commit into
Open
fix(lifeline): self-heal Telegram.Lifeline degradations on successful send#241brianjones-v4n wants to merge 1 commit into
brianjones-v4n wants to merge 1 commit into
Conversation
… send
When the agent successfully sends a message to its configured lifeline
topic, that's positive proof the lifeline is reachable. Clear any
existing Telegram.Lifeline degradation events automatically rather
than leaving them stale.
- DegradationReporter: new public clearByFeature(feature) method that
removes events in-memory and from disk, returning the count cleared
- DegradationReporter.render: dedupe leading "Using" so we don't render
"Using Using ..." when a fallback string already starts with "Using"
- TelegramAdapter.apiCall: after a successful sendMessage/sendChatAction
to the lifeline topic, call clearByFeature('Telegram.Lifeline')
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@brianjones-v4n is attempting to deploy a commit to the sagemind Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
Author
|
CI failure note — appears to be an unrelated flake. The failing assertion is in …on Evidence it's a flake:
Would you mind kicking the failed job? Happy to push an empty commit to retrigger CI if that's easier on your end. |
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
When the agent successfully sends a message to its configured lifeline topic, that's positive proof the lifeline is reachable. Today
Telegram.Lifelinedegradation events get reported on first failure but never cleared automatically — they sit stale even after the lifeline recovers.This adds a self-heal pathway:
DegradationReportergains a publicclearByFeature(feature: string): numbermethod that removes events in-memory and fromdegradations.jsonon disk.TelegramAdapter.apiCallcallsclearByFeature('Telegram.Lifeline')after a successfulsendMessage/sendChatActiontolifelineTopicId.DegradationReporter.render: dedupe leading "Using" so a fallback string that already starts with "Using" doesn't render as "Using Using ...".Test plan
clearByFeatureexists, filters events, persists to diskTelegramAdapter.apiCallcallsclearByFeature('Telegram.Lifeline')in its success pathnpx tsc --noEmit— no new errors (9 pre-existing errors remain, all from missing optional deps: js-yaml, @scure/bip39, moltbridge, marked, AgentMdJobLoader implicit any)🤖 Generated with Claude Code