Repository navigation
test(evals): Add multi-actor provenance evals and mailbox batch harness support - #774
Merged
Merged
Conversation
…ss support Add TDD evals for issue #773 covering per-message actor provenance in multi-user Slack threads: a bystander's first-person preference must not become the requester's personal memory (sequential, conflicting, and batched-mention arrangements), while cross-author operational knowledge should still produce conversation-scoped memory. Add a batch() event builder plus a message_batch harness event so a scenario can express messages that are pending together in the conversation mailbox and handled as one worker turn, matching production mailbox batching. Previously the scenario runner delivered each event to completion, so the batched multi-actor paths were not expressible. The shared-knowledge case is an intentional TDD red: passive participants' messages never reach memory extraction today because runtime context blocks are stripped from the plugin transcript. The batched-mention case is model-dependent today and becomes deterministic once runtime-owned provenance lands. Refs GH-773 Co-Authored-By: Claude Fable 5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5d1f437. Configure here.
The message_batch event previously enqueued each member through the harness's direct delivery path, which runs a full turn per message and never exercises production mailbox batching (caught by review). Batch members now persist through the real Slack ingress boundary (buildSlackInboundMessage + appendAndEnqueueInboundMessage) so the conversation worker claims them as one turn: the last message is live and earlier ones arrive as queued context, exactly as in production. Worker-claimed turns deliver through the harness TestThread because the worker's restored thread has no posting surface on the eval adapter, and the FakeSlackAdapter fixture gains single-workspace internals (botUserId, defaultBotTokenProvider) so runWithSlackInstallation treats it as a default-token install. With the real path, the batched multi-actor eval reproduces the exact issue #773 failure: the reply attributes the other user's first-person preference to the live requester ('You asked for short bullet summaries'). Refs GH-773 Co-Authored-By: Claude Fable 5 <[email protected]>
dcramer
marked this pull request as ready for review
July 7, 2026 04:19
Hardcoding botUserId on the shared FakeSlackAdapter fixture changed leading-mention stripping from generic to exact-id matching for every consumer, breaking integration tests that mention the bot as <@U0APP>. Single-workspace install mode (bot user id plus default token provider) is now an explicit constructor option, and only the eval harness opts in with its own U_APP bot id. Default construction keeps the previous fixture behavior. Refs GH-773 Co-Authored-By: Claude Fable 5 <[email protected]>
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.

Adds TDD eval coverage for the actor/instruction provenance work in #773: four multi-user Slack thread scenarios where Alice is the run requester and Bob is another participant, asserting against the memory plugin's stored rows plus a reply-attribution rubric.
Two cases are intentionally red — they are the acceptance gates for the provenance fix, not eval bugs:
stripRuntimeTurnContextremoves from the plugin transcript, so no conversation-scoped memory is ever created from it.The two sequential-turn cases pass today and guard against over-tightening: per-turn attribution already holds when each message gets its own run, and the fix must not break that.
To make the batched arrangement expressible, the eval harness gains a
batch()event builder (message_batchevent). Batch members persist through the real Slack ingress boundary (buildSlackInboundMessage→appendAndEnqueueInboundMessage) and are claimed by the real conversation worker as one mailbox batch — the last message becomes the live turn, earlier ones arrive as queued context, exactly the production flow. Two harness seams support this: worker-claimed turns deliver through the harnessTestThread(the worker's restored thread has no posting surface on the eval adapter), and theFakeSlackAdapterfixture gains single-workspace internals (botUserId,defaultBotTokenProvider) sorunWithSlackInstallationtreats it as a default-token install. Non-batch events keep the existing direct delivery path unchanged.Review order:
src/helpers.ts(thebatch()builder),src/behavior-harness.ts(themessage_batchingress path and worker thread seam), then the eval file.Refs #773
🤖 Generated with Claude Code