diff --git a/.opencode/agents/uat-tester.md b/.opencode/agents/uat-tester.md index 04b320ce2..ca640f5fa 100644 --- a/.opencode/agents/uat-tester.md +++ b/.opencode/agents/uat-tester.md @@ -677,6 +677,12 @@ LOOP: documented_examples.append(example_candidate) update_examples_index(example_candidate) + # Batch-update examples.json once after all docs PRs for this cycle are + # created. Keeping this outside create_documentation_pr() avoids + # per-PR merge conflicts when parallel UAT workers run simultaneously. + if documented_examples: + update_examples_json(documented_examples) + tested_features.add(feature) # ── After testing all features in area — exit ──────────────── @@ -876,9 +882,6 @@ def create_documentation_pr(doc_path, doc_content, example): mkdir -p $(dirname doc_path) write_file(doc_path, doc_content) - # Update examples.json index - update_examples_json(example) - # Commit changes git add . commit_msg = f"docs: add {example['category']} example - {example['feature']}" diff --git a/CHANGELOG.md b/CHANGELOG.md index 65672b37f..d6ce8852a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -481,11 +481,13 @@ _ALL_DATA_COLUMNS + ") " "SELECT " + _ALL_DATA_COLUMNS + " FROM v3_plans"`. ### Fixed -- **UAT tester docs PR duplicate detection** (#5768): Fixed two bugs in the +- **UAT tester docs PR duplicate detection and examples.json conflict fix** (#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. + Removed `update_examples_json()` from `create_documentation_pr()` and moved + it to a single batch call after all docs PRs are created per cycle, eliminating + merge conflicts on `examples.json` when parallel UAT workers run simultaneously. - **`invariant_enforced` decisions not propagated to child plans on subplan spawn** (#9131): Fixed `SubplanService.spawn()` to propagate all `invariant_enforced` decisions from the diff --git a/scripts/fix_uat_tester.py b/scripts/fix_uat_tester.py deleted file mode 100644 index 44272ed82..000000000 --- a/scripts/fix_uat_tester.py +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env python3 -"""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() - -# 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")