chore(agents): fix uat-tester parallel docs PR merge conflicts #5768

Merged
HAL9000 merged 5 commits from improvement/agent-uat-tester-parallel-docs-pr-fix into master 2026-06-01 05:36:07 +00:00

5 Commits

Author SHA1 Message Date
HAL9000 5d84984338 fix(uat-tester): resolve 3 bash-permission blockers
CI / build (pull_request) Successful in 35s
CI / lint (pull_request) Successful in 58s
CI / typecheck (pull_request) Successful in 1m17s
CI / quality (pull_request) Successful in 1m16s
CI / helm (pull_request) Successful in 53s
CI / security (pull_request) Successful in 1m23s
CI / push-validation (pull_request) Successful in 20s
CI / unit_tests (pull_request) Successful in 6m16s
CI / docker (pull_request) Successful in 1m36s
CI / coverage (pull_request) Successful in 15m17s
CI / integration_tests (pull_request) Successful in 25m40s
CI / status-check (pull_request) Successful in 2s
- Resolve Forgejo label name to integer ID before PUT /issues/{n}/labels
  (both create_uat_tracking_issue and create_uat_announcement_issue);
  string names cause 422 / silent no-op, breaking the cleanup filter
- Add rm -rf /tmp/uat-tester-* and rm -rf /tmp/docs-* to bash allowlist
  so worker clone cleanup can actually execute
- Replace multi-line python3 -c calls in Pool Supervisor with jq:
  EXISTING_WORKERS lookup now uses jq ltrimstr/startswith filter;
  SESSION_ID creation now uses jq -r '.id'
2026-06-01 01:07:53 -04:00
HAL9000 35b212989e fix(uat-tester): add missing bash permissions for worker clone and docs
Worker Mode requires git clone, git config, git pull, git checkout,
git add, git commit, git push, and uv commands in bash. These were all
missing from the frontmatter permission block, causing every Worker Mode
instance to fail immediately with permission denied on the first command.
2026-06-01 01:07:53 -04:00
HAL9000 a38cb5c317 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
2026-06-01 01:07:53 -04:00
HAL9000 6116236c71 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
2026-06-01 01:07:53 -04:00
HAL9000 f6975d4322 chore(agents): fix uat-tester parallel docs PR merge conflicts
Fixed two critical bugs in the uat-tester agent's create_documentation_pr() function:

1. **Branch-existence guard bug**: Changed existing_branch.get('error') to existing_branch.get('errors') to correctly detect when a branch does not exist. The Forgejo API returns a JSON error body with an errors field (not error) when a branch is absent.

2. **Open-PR duplicate check bug**: Changed head={branch_name} to head={owner}:{branch_name} in the Forgejo API query. The API expects the owner prefix to properly filter PRs by head branch.

These fixes ensure parallel workers can safely coordinate without creating conflicting PRs.

Closes #4374
2026-06-01 01:07:53 -04:00