Repository navigation
feat(events): Merge an Event batch into one task message - #2259
Merged
Merged
Conversation
Several Watch Events that share one Turn now become one task input: "You received N events.", each Watch's instructions once, then each Event. Mailbox input saves the task facts so the batch is written when the Turn starts. The conversation message lists every Event, and the dashboard shows them under one heading instead of only the first. Move the conversation stats schemas to their own module so the conversation schema stays under the file-length limit. Co-Authored-By: David Cramer <[email protected]> Co-Authored-By: David Cramer <[email protected]>
Check that Events from a GitHub PR Watch, a second Watch on the same PR, and a Vercel deployment Watch become one task message with each Watch's instructions once, and that a repeated delivery is dropped. Co-Authored-By: David Cramer <[email protected]>
Child Conversations now write the same batch input as roots. The task count and meta.events include only Watch Events with saved facts, so they agree. Drop the unused group key fallback. The dashboard names the resource only when every Event shares it. Fold the mixed Watch case into the burst test and drive it through enqueueEventNotification, so it covers the saved facts, guidance, and people. Lower the test architecture baseline to match. Co-Authored-By: David Cramer <[email protected]>
Main added an Event doer (doneBy) to the task input. Save it with the task facts and render its Done by line for each Event in a batch, so batching does not drop it. Co-Authored-By: David Cramer <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
1 screenshot change — 1 changed · 0 added · 0 removed Review screenshots in Frameshift
|
dcramer
approved these changes
Oct 27, 2026
This branch was successfully 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.
When several Watch Events arrive in one wait window, they already run in one Turn. But the Turn input pasted each Event's full task text together, so the Watch instructions repeated once per Event. The saved conversation message also kept only the first Event's type and summary. On #2245, an approval plus three Bugbot review comments reached the model as about 16KB with the same ~800-character instructions four times. The dashboard showed only "approved by dcramer".
Now each Event saves its task facts (label, instructions, guidance, people, Done by, summary, details, external text) on its mailbox input. The batch text is written when the Turn starts:
meta.eventType(the first Event) for existing readers and addsmeta.events[]with one entry per counted Event. The reporting API exposes it under the same payload rules as the rest of the message.eventsrender as before. I checked it on/dev/transcriptswith a new fixture based on the feat(plugins): Add optional service accounts for plugins #2245 batch.Duplicate handling is unchanged. The inbound id is still
event:<watchId>:<eventKey>, so a repeated webhook delivery for the same Watch is dropped. Event automations don't batch and are not affected.The conversation stats schemas moved to
api/schema/conversation-stats.tssoapi/schema/conversation.tsstays under the 1,000-line limit. Exports are unchanged.Tests: the burst scenario in
event-wake-delay.test.tsnow goes throughenqueueEventNotification. It uses a GitHub PR Watch (with guidance, people and Done by), a second Watch on the same PR, a Vercel deployment Watch, and a repeated delivery. It checks for one Turn, "You received 4 events", three instruction groups, themeta.eventslist, and the dropped duplicate. Removing the saved task facts now fails this test. TherenderTaskBatchInputunit snapshot covers the exact layout.An adversarial review pass found a test-architecture lint failure, child Conversations missing the batch input, a count mismatch with child results, and the test gap above. All are fixed here.
Not in this PR:
Event N:line. The old format had the same gap.review.commentedsent with an approval body.via David Cramer.
--
View Junior Session [Sentry]