fix(heartbeat): default target none and internalize cron/exec relay prompts#25916
fix(heartbeat): default target none and internalize cron/exec relay prompts#25916
Conversation
|
/landpr |
PR SummaryMedium Risk Overview Cron and exec-completion heartbeat flows now choose between user-relay vs internal-only prompt wording based on whether delivery is actually possible/allowed, and tests are expanded to cover the new default routing, internal-only prompt behavior, and a couple of platform/path normalization expectations. Written by Cursor Bugbot for commit cef9cff. This will update automatically on new commits. Configure here. |
5d9ba59 to
34a754d
Compare
|
/landpr |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5d9ba595cc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let target: HeartbeatTarget = "none"; | ||
| if (rawTarget === "none" || rawTarget === "last") { | ||
| target = rawTarget; |
There was a problem hiding this comment.
Normalize reserved heartbeat targets before fallback
resolveHeartbeatDeliveryTarget now initializes target to "none" and only matches rawTarget with a case-sensitive check ("none"/"last"), so configs that pass validation with mixed-case reserved values (for example target: "LAST", accepted by validateHeartbeatTarget after lowercasing in src/config/validation.ts) silently resolve to target-none and stop outbound heartbeat delivery. Before this change, the same input still behaved like last because the fallback default was "last", so this is a regression for existing mixed-case configs.
Useful? React with 👍 / 👎.
|
/landpr |
1 similar comment
|
/landpr |
34fc446 to
cef9cff
Compare
|
/landpr |
1 similar comment
|
/landpr |
Summary
target: "last", so unattended heartbeat alerts could route to the last external DM (including Discord DMs).none; docs/config references updated; cron/exec heartbeat prompt wording now switches to internal-only language when outbound delivery is disabled.target: "last"/ explicit channel targets still work as before; outbound channel implementations unchanged.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
lasttononewhen unset.Security Impact (required)
No)No)No)No)No)Yes, explain risk + mitigation:Repro + Verification
Environment
target: "none"Steps
heartbeat.target.target: "none".Expected
none).Actual
Evidence
Human Verification (required)
resolveHeartbeatDeliveryTargetdefault behavior nowtarget-none.target: none.target: none.target: "last"coverage kept in tests.Compatibility / Migration
No)No)Yes)agents.defaults.heartbeat.targetexplicitly ("last"or channel id).heartbeat.to/accountIdfor deterministic routing.Failure Recovery (if this breaks)
agents.defaults.heartbeat.target: "last"to restore prior default behavior.src/infra/heartbeat-runner.tssrc/infra/outbound/targets.tsRisks and Mitigations
Mintlify
0 threads from 0 users in Mintlify
Greptile Summary
Changed the default heartbeat delivery target from
lasttonone, preventing unattended heartbeat alerts from routing to external channels (including Discord DMs) unless explicitly configured. When delivery is disabled (target: "none"), cron and exec event prompts now use internal-only language that avoids instructing the agent to relay messages to users.Key Changes:
src/infra/heartbeat-runner.ts:99andsrc/infra/outbound/targets.ts:213changed from"last"to"none"buildExecEventPromptfunction withdeliverToUseroption to generate internal-only or user-facing promptsbuildCronEventPromptto acceptdeliverToUseroption and generate appropriate prompt wordingheartbeat-runner.ts:650-657determinescanRelayToUserbased on delivery channel, target, and visibility settingsMigration Impact:
Users relying on implicit
lastrecipient delivery will need to explicitly setagents.defaults.heartbeat.target: "last"to restore previous behavior.Confidence Score: 4/5
Last reviewed commit: 34a754d