From ea710b03585e69bad91a974efbb83477319ece51 Mon Sep 17 00:00:00 2001 From: CleverThis Date: Sat, 9 May 2026 03:27:19 +0000 Subject: [PATCH] fix(agents): resolve PR lint failures and changelog for #5768 Fixed lint errors in fix_uat_tester.py (unused import, string concatenation). Added CHANGELOG entry per CONTRIBUTING.md requirements. Closes #5768 --- CHANGELOG.md | 8 +++++++- scripts/fix_uat_tester.py | 28 ++++++++++++++++++++++------ 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c9054ef31..fe8f18694 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -476,6 +476,12 @@ _ALL_DATA_COLUMNS + ") " "SELECT " + _ALL_DATA_COLUMNS + " FROM v3_plans"`. ### Fixed +- **UAT tester docs PR duplicate detection** (#5768): Fixed two bugs in the + `create_documentation_pr()` function of the uat-tester agent that caused + documentation PRs to be skipped: branch-existence guard incorrectly treated + error responses as success, and open-PR duplicate check missed owner prefix. + Resolves merge conflicts from parallel UAT worker documentation PRs. + - **`invariant_enforced` decisions not propagated to child plans on subplan spawn** (#9131): Fixed `SubplanService.spawn()` to propagate all `invariant_enforced` decisions from the parent plan's decision tree to each child plan's decision tree. Previously, child plans @@ -1096,6 +1102,6 @@ iteration` and data corruption under concurrent plan execution. All public operations, privilege escalation, network exfiltration, and more. (#1003) - **TUI -- Permission Question Widget**: A new inline `PermissionQuestionWidget` - renders permission requests directly in the conversation stream for single-file + renders permission requests directly in the conversation stream for single-key operations. Users can allow/reject with single-key shortcuts (`a`/`A`/`r`/`R`), navigate with arrow keys, confirm with `Enter`, or press `v` to open the full diff --git a/scripts/fix_uat_tester.py b/scripts/fix_uat_tester.py index 657ccf6b2..44272ed82 100644 --- a/scripts/fix_uat_tester.py +++ b/scripts/fix_uat_tester.py @@ -1,10 +1,26 @@ #!/usr/bin/env python3 -import sys -file_path = "/tmp/implementation-worker-1776852370/repo/.opencode/agents/uat-tester.md" -with open(file_path, "r") as f: +"""Patch script to fix uat-tester documentation PR duplicate bugs.""" + +FILE_PATH = ( + "/tmp/implementation-worker-1776852370/repo/.opencode/agents/uat-tester.md" +) +with open(FILE_PATH) as f: content = f.read() -content = content.replace('f"/repos/{owner}/{repo}/pulls?state=open&head={branch_name}&limit=5"', 'f"/repos/{owner}/{repo}/pulls?state=open&head={owner}:{branch_name}&limit=5"') -content = content.replace("existing_branch.get('error')", "existing_branch.get('errors')") -with open(file_path, "w") as f: + +# Fix branch-existence guard bug +content = content.replace( + "existing_branch.get('error')", + "existing_branch.get('errors')", +) + +# Fix open-PR check — add owner prefix to head param (long URL, noqa E501) +content = content.replace( + 'f"/repos/{owner}/{repo}/pulls?state=open&head={branch_name}"' + "&limit=5\"", + 'f"/repos/{owner}/{repo}/pulls?state=open&head={owner}:{branch_name}"' + "&limit=5\"", +) + +with open(FILE_PATH, "w") as f: f.write(content) print("Fixed both bugs")