#53316·beats

[text-auditor] Fix misleading and awkward Heartbeat runtime error strings

Author: github-actions[bot]Created Sep 18, 2026Updated Sep 18, 2026
Labelsneeds_team

Text Improvements

The following user-facing runtime text issues were found in Heartbeat. Each is a low-effort fix.

1. Misleading username lookup error renders the wrong value

File: heartbeat/security/security.go (line 63)
Current text: "could not lookup '%s': %w" (formatted with localUser)
Suggested fix: keep message text, but format with localUserName instead of localUser
Why: The error claims to print the lookup target, but uses a *user.User value (often nil) instead of the username string, which can mislead users.

2. GID parse error prints UID value

File: heartbeat/security/security.go (line 71)
Current text: "could not parse GID '%s' as int: %w" (formatted with localUser.Uid)
Suggested fix: format with localUser.Gid
Why: The message says GID parsing failed, but prints UID; this is a direct contradiction.

3. Grammar error in invalid port message

File: heartbeat/monitors/active/http/task.go (line 366)
Current text: "'%v' is no valid port number in '%v'"
Suggested fix: "'%v' is not a valid port number in '%v'"
Why: is no valid is ungrammatical in this context.

4. Grammar/acronym issue in IP address error

File: heartbeat/monitors/active/icmp/stdloop.go (line 337)
Current text: "%v is unknown ip address"
Suggested fix: "%v is an unknown IP address"
Why: Missing article (an) and non-standard acronym casing (ip vs IP).

5. Awkward contradictory command-start failure text

File: heartbeat/ecserr/ecserr.go (line 94)
Current text: "could not start command not found: %s"
Suggested fix: "could not start command: %s" (or equivalent wording that separates start failure vs not-found cause clearly)
Why: Current phrasing is malformed and conflates two failure concepts.

Suggested Actions

  • Update heartbeat/security/security.go to render the correct lookup target and GID values in errors.
  • Fix the port-validation message grammar in heartbeat/monitors/active/http/task.go.
  • Fix the ICMP unknown-address message grammar/casing in heartbeat/monitors/active/icmp/stdloop.go.
  • Clarify the command-start failure message in heartbeat/ecserr/ecserr.go.

What is this? | From workflow: Text Auditor

Give us feedback! React with if perfect, if helpful, if not.

  • expires on Sep 25, 2026, 1:24 PM UTC