@@ -85,6 +85,8 @@ async def process(self, task: Task) -> ProcessingResult:
8585 # Agentic: scan repo only when relevant (PR targets default branch)
8686 # Use the PR head ref so we scan the branch being proposed, not main.
8787 suggested_rules_yaml : str | None = None
88+ suggested_rules_translated = 0
89+ suggested_rules_ambiguous : list [Any ] = []
8890 if is_relevant_pr (task .payload ):
8991 scan_start = time .time ()
9092 try :
@@ -108,6 +110,8 @@ async def process(self, task: Task) -> ProcessingResult:
108110 "from_agent" : from_agent ,
109111 },
110112 )
113+ suggested_rules_translated = rules_count
114+ suggested_rules_ambiguous = list (ambiguous ) if ambiguous else []
111115 if rules_count > 0 :
112116 suggested_rules_yaml = rules_yaml
113117 except Exception :
@@ -196,6 +200,20 @@ async def process(self, task: Task) -> ProcessingResult:
196200 except yaml .YAMLError as e :
197201 logger .warning ("Failed to parse suggested rules YAML: %s" , e )
198202
203+ # Surface translation summary to the user (parity with push-event PR body)
204+ # Post when we have any scan result: translated and/or ambiguous, so users see X enforced and Y not translated
205+ if pr_number and (suggested_rules_translated > 0 or suggested_rules_ambiguous ):
206+ try :
207+ comment_body = github_formatter .format_suggested_rules_ambiguous_comment (
208+ rules_translated = suggested_rules_translated ,
209+ ambiguous = suggested_rules_ambiguous ,
210+ )
211+ await self .github_client .create_pull_request_comment (
212+ repo_full_name , pr_number , comment_body , installation_id
213+ )
214+ except Exception as comment_err :
215+ logger .warning ("Could not post suggested-rules translation summary comment: %s" , comment_err )
216+
199217 # 3. Check for existing acknowledgments
200218 previous_acknowledgments = {}
201219 if pr_number :
0 commit comments