Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The Messenger date/datetime prompt path still drops commentAnchor and needs propagation plus regression coverage.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
This PR fixes comment-anchor propagation for getUserData in comment-triggered flows.
Changes:
- Treats
getUserDataas message-producing. - Forwards anchors through text prompt jobs.
- Adds anchor lifecycle and regression tests.
A moderate review finding remains: Messenger date/datetime prompts use a direct chat-message path that drops commentAnchor.
File summaries
| File | Summary |
|---|---|
apps/worker/src/integration/handlers/get-user-data.ts |
Forwards anchors for text prompts. |
apps/worker/src/integration/handlers/flow-utils.ts |
Registers getUserData as message-producing; the date/datetime path still needs anchor propagation. |
apps/worker/__tests__/get-user-data.test.ts |
Tests prompt anchor forwarding. |
apps/worker/__tests__/flow.test.ts |
Tests anchor lifecycle behavior. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| * its first outgoing message. | ||
| */ | ||
| export const MESSAGE_PRODUCING_STEP_TYPES = new Set<StepType>([ | ||
| stepTypes.enum.getUserData, |
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.
Summary
Fixes #1186.
getUserDatasends a prompt, but comment-triggered private-reply flows did not treat it as a message-producing step. As a result, thecommentAnchorwas not passed intogetUserData, and the prompt enqueue path also dropped the anchor.This PR keeps the fix scoped to #1186:
getUserDatatoMESSAGE_PRODUCING_STEP_TYPEScommentAnchorthroughenqueueFlowStepMessageBehavior
This now ensures that:
getUserDatacan use the unspent comment anchorgetUserDataafter another message-producing step receives the spent anchorValidation
getUserDatanever receives thecommentAnchor— a question-first flow never claims the anchored DM, and a question after asendTextbypassesassertCommentPrivateReplyFollowUpDeliverable#1186 regression tests: 5/5 passedgit diff --check: passedBiome still reports formatting findings on the touched files, but the parent revision reports the same findings unchanged, so this is a pre-existing baseline issue.