feat(tasks): wire agent server event ingest#2111
Open
tatoalo wants to merge 1 commit intofeat/tasks-event-stream-senderfrom
Open
feat(tasks): wire agent server event ingest#2111tatoalo wants to merge 1 commit intofeat/tasks-event-stream-senderfrom
tatoalo wants to merge 1 commit intofeat/tasks-event-stream-senderfrom
Conversation
Contributor
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Contributor
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
packages/agent/src/server/agent-server.test.ts:272-449
**Repeated `AgentServer` setup violates OnceAndOnlyOnce**
The three `signalTaskComplete` tests each repeat an identical 20+ line `new AgentServer({...}) as unknown as { eventStreamSender, posthogAPI, signalTaskComplete }` cast. Extracting a shared helper (e.g. `createSignalTaskCompleteTestServer()`) would remove the duplication and make future type-shape changes a single-line fix instead of three.
Reviews (1): Last reviewed commit: "feat(tasks): wire agent server event ing..." | Re-trigger Greptile |
0da1757 to
99cb219
Compare
ba262d3 to
70c5092
Compare
Contributor
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
packages/agent/src/server/agent-server.ts:1808-1813
`TASK_COMPLETE` is included in the union type but `enqueueTaskTerminalEvent` is only ever called with `ERROR` in this PR (and nowhere else in the codebase). Listing a type option that is never exercised is a superfluous part — if it becomes needed later it can be added then.
```suggestion
private enqueueTaskTerminalEvent(
method: typeof POSTHOG_NOTIFICATIONS.ERROR,
params: Record<string, unknown>,
): void {
```
Reviews (2): Last reviewed commit: "feat(tasks): wire agent server event ing..." | Re-trigger Greptile |
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.

Problem
once the backend provides a sandbox event ingest token, the agent server needs to opt into the new sender while preserving the existing local SSE behavior and task completion signaling
Changes
POSTHOG_TASK_RUN_EVENT_INGEST_TOKENfrom the agent server env