Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…61) * fix(server): settled threads no longer send mobile completion pushes Upstream: pingdotgg#40391 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci: run checks Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Dodhon <110739214+Dodhon@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Problem
When a thread settles right as its run finishes—for example, when an agent self-settles at turn end (
t3_thread_organizesettleviaThreadManagementService.settleAfterRun), when auto-settle on PR merge triggers, or when the user settles within 5 seconds of completion—mobile still receives an "Agent finished" push notification.projectThreadAwarenessV2already suppresses"completed"whensettledOverride === "settled", butAgentAwarenessRelaykept aheldCompletionsset (added in #24769) that explicitly strippedsettledOverride: nullwhen the 5-second completion confirmation expired, force-publishingphase: "completed"to the push relay and then clearing the card 5 seconds later.Expected: a thread that settles during the 5-second completion confirmation window should clear its live activity (
null) without publishing"completed"to mobile push.Change
heldCompletionsand thesettledOverride: nullre-projection override inapps/server/src/relay/AgentAwarenessRelay.ts.AgentAwarenessRelaynow followsprojectThreadAwarenessV2: if a thread settles during the 5-second confirmation window (or before a failed completion publish retries), the relay publishesnullto clear any live activity card (or skips publishing if the thread was already cleared) instead of sending a"completed"push.apps/server/src/relay/AgentAwarenessRelay.test.tsto assert clearing without"completed".Scope
Small bug fix for an obvious bug in one server module (
apps/server/src/relay/AgentAwarenessRelay.ts) and its unit test file (apps/server/src/relay/AgentAwarenessRelay.test.ts); net reduction of 40 lines in production code, no new settings or contract changes.Verification
Focused tests
Updated tests in
apps/server/src/relay/AgentAwarenessRelay.test.tsfailed onmain(dd941b9c3b58) before the fix:clears instead of alerting when the thread settles during the completion hold:expected [ 'running', 'completed' ] to deeply equal [ 'running', null ]does not alert when a completion settles during its hold after an earlier tombstone:expected [ null, 'completed', null ] to deeply equal [ null ]clears instead of retrying a failed completion after the thread settles:expected [ 'running', 'completed', 'completed' ] to deeply equal [ 'running', 'completed', null ]After the fix:
vp test run apps/server/src/relay/AgentAwarenessRelay.test.ts: 23/23 passed.vp run check:changed: passed (format,lint0 warnings/errors,knip2/2,graphql,typecheck3 packages,test25/25 across affected files).Live server runtime transcript
Ran the real server (
apps/server/src/bin.ts serve, isolated fresh--base-dir,T3CODE_DEV_SEED=0) pointed at a local HTTP stub relay, ran a realReplay (dev)(multi-turn) turn, immediately dispatchedthread.settleonce the run completed (inside the 5s hold), and waited 11.5s across two confirmation windows:origin/main(dd941b9c3b58)["starting", "running", "completed", null]c50c79cad2)["starting", "running", null]Transcript (before vs after)
Not checked
ThreadNotificationCoordinator.tsx), which do not useAgentAwarenessRelayand are out of scope for this change.Created with Gemini 4 Neon in T3 Code (Antigravity harness).