fix(uat-tester): remove one-shot script and batch examples.json update
- Delete scripts/fix_uat_tester.py: one-off patch script with a hardcoded /tmp path that no longer exists. Per CONTRIBUTING.md, scripts/ is for ongoing-purpose utilities, not development artifacts. - Remove update_examples_json() from create_documentation_pr(): each per-PR call was modifying examples.json inside the git clone, causing merge conflicts when parallel UAT workers created docs PRs simultaneously. Option A from reviewer: move the call outside the PR creation function entirely. - Add batch update_examples_json(documented_examples) call after the inner docs-PR creation loop completes, guarded by `if documented_examples`. This runs once per cycle instead of once per PR, eliminating the examples.json conflict surface for parallel workers. - Expand CHANGELOG entry to reflect the examples.json fix. ISSUES CLOSED: #4374
This commit is contained in:
@@ -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']}"
|
||||
|
||||
+4
-2
@@ -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
|
||||
|
||||
@@ -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")
|
||||
Reference in New Issue
Block a user