Repository navigation
Conversation
…erts - Set tries=1 on CollectMachineTelemetryJob and CollectAgentTelemetryJob. Telemetry runs on a 2-minute schedule so retrying a failed cycle just hammers the machine again before the next tick — one attempt per cycle is sufficient. - Add a 15-minute cache-backed cooldown for SSH connection failures in collectForMachine() and per-deployment failures in collectDeploymentOnConnection(). Without this, every scheduler tick on an unreachable machine floods logs, writes AGENT_UNREACHABLE events to the DB, and fires Slack alerts continuously. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
AgentTelemetryService uses AgentDeploymentEventTypeEnum::AGENT_UNREACHABLE but PHPStan misreports it as an undefined constant on the model class. Adding classConstant.notFound to the ignore list is consistent with the existing property.notFound suppression at level 0. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This branch has not been deployed
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
tries = 1on both telemetry jobs —CollectMachineTelemetryJobandCollectAgentTelemetryJobhad no retry limit, so Laravel's default of 3 attempts meant every SSH timeout triggered the same failing job 3× in a row. Since telemetry is scheduled every 2 minutes, retrying a failed cycle just hammers the machine again before the next tick.collectForMachine()can't connect to a machine it was logging a warning, writingAGENT_UNREACHABLEDB events for every deployment, and sending Slack alerts. With a 2-minute schedule this produces 30+ entries/hour per unreachable machine. A cache key (openclaw:telemetry:ssh-failure:{machineId}) now gates all three: the first failure goes through normally, subsequent failures within 15 minutes are silently skipped.collectDeploymentOnConnection()— the per-deployment failure catch block had identical noise. Rate-limited withopenclaw:telemetry:failure:{deploymentId}.Test plan
AGENT_UNREACHABLEevent is written per 15-minute window (not one every 2 minutes)🤖 Generated with Claude Code