[Improve] Frame provider comment follow-ups as untrusted content#574
Open
mrubens wants to merge 1 commit into
Open
[Improve] Frame provider comment follow-ups as untrusted content#574mrubens wants to merge 1 commit into
mrubens wants to merge 1 commit into
Conversation
GitLab, Bitbucket, Azure DevOps, and Gitea comment handlers previously interpolated the triggering comment into follow-up task messages with plain "> " quoting and no injection-resistance policy. They now compose the message the same way as the GitHub issue-mention handler: the gate-verified commenter's text lands in an escaped mention_request block, the PR/MR title is escaped as task context, and the shared untrusted content policy is appended. Handler tests mock the @roomote/cloud-agents/server barrel with marker fakes and assert the composition; the Bitbucket suite gains its first coverage of the reusable-task follow-up path.
Contributor
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.
Description
Follow-up to #570, which added shared prompt-hardening helpers (
buildMentionRequestBlock,buildUntrustedContentPolicy) and applied them to the GitHub-facing prompts. The non-GitHub provider comment handlers still interpolated the triggering comment into follow-up task messages with plain>quoting and no untrusted-content policy.The GitLab, Bitbucket, Azure DevOps, and Gitea comment handlers now compose their existing-task follow-up messages the same way as the GitHub issue-mention handler:
<mention_request>block instead of>quoting.escapeTaskContextText, matching the GitHub composition.formatQuotedTexthelpers are removed.Test plan
@roomote/cloud-agents/serverbarrel with distinctive marker fakes and assert the follow-up message routes text through the right builders, mirroring the GitHub handler test update in [Improve] Frame third-party text in agent prompts as untrusted content #570.apps/apihandler test directories (21 files, 146 tests),pnpm lint,pnpm check-types, andpnpm knip.