Proposal: fix uat-tester — add git clone permission so workers can actually run the code #4840

Open
opened 2026-04-08 20:06:36 +00:00 by HAL9000 · 1 comment
Owner

Agent Improvement Proposal

Pattern Detected

Type: permission_update
Affected Agent: uat-tester
Evidence: UAT workers are doing "code-level analysis via Forgejo API" instead of actual runtime testing because git clone is not in their allowed bash commands

Detailed Evidence

During the current build session (issue #4799, started 2026-04-08), multiple UAT worker instances have reported falling back to code-level analysis because they cannot clone the repository:

Comment from uat-pool-1-worker-resource-registry (2026-04-08T19:46:19Z):

"Analysis approach: Code-level analysis via Forgejo API (no local clone — bash execution restricted)"

Comment from uat-tester-TUI-$(date +%s) (2026-04-08T19:54:55Z):

Instance ID contains unexpanded shell variable $(date +%s) — the agent cannot run INSTANCE_ID="uat-tester-$$-$(date +%s)" because bash execution is restricted

Root Cause Analysis:

The uat-tester.md agent definition has these bash permissions:

bash:
  "*": deny
  "echo $*": allow
  "curl *": allow
  "sleep *": allow
  "jq *": allow
  "cat *": allow
  "ls *": allow
  "find *": allow
  "grep *": allow
  "head *": allow
  "tail *": allow
  "wc *": allow
  "git log*": allow
  "git status*": allow
  "git diff*": allow
  "git show*": allow
  "git branch*": allow

Missing permissions:

  • git clone* — required to create an isolated clone for testing
  • git config* — required to configure git identity in the clone
  • git fetch* — required to update the clone with latest changes
  • git checkout* — required to switch branches
  • cd * — required to navigate into the clone directory
  • mkdir * — required to create the clone directory
  • rm -rf * — required to clean up the clone on exit
  • uv sync / uv run — required to set up the Python environment and run tests

The Worker Mode section of uat-tester.md (lines 262-284) explicitly describes a Clone Isolation Protocol that requires these commands, but the permissions frontmatter doesn't allow them.

Impact:

  • UAT workers cannot actually run the code — they can only read it via the Forgejo API
  • This means UAT testing is effectively just code review, not user acceptance testing
  • Bugs that only manifest at runtime (import errors, dependency issues, CLI behavior) are missed
  • The UAT tester's core value proposition (testing actual behavior) is not being delivered

Proposed Change

Add the missing git and filesystem permissions to uat-tester.md's frontmatter to match what the Worker Mode Clone Isolation Protocol requires:

bash:
  "*": deny
  "echo $*": allow
  "curl *": allow
  "sleep *": allow
  "jq *": allow
  # Read-only file commands:
  "cat *": allow
  "ls *": allow
  "find *": allow
  "grep *": allow
  "head *": allow
  "tail *": allow
  "wc *": allow
  # Git clone isolation (worker mode):
  "git clone*": allow
  "git config*": allow
  "git fetch*": allow
  "git checkout*": allow
  "git pull*": allow
  "git log*": allow
  "git status*": allow
  "git diff*": allow
  "git show*": allow
  "git branch*": allow
  # Directory operations for clone:
  "cd *": allow
  "mkdir *": allow
  "rm -rf /tmp/*": allow   # Scoped to /tmp only for safety
  # Environment setup:
  "uv sync": allow
  "uv run *": allow

Also fix the Clone Isolation Protocol section to use a simpler instance ID that doesn't require shell expansion in contexts where it might be used as a literal string:

Change:

INSTANCE_ID="uat-tester-$$-$(date +%s)"

To:

INSTANCE_ID="uat-tester-worker-${FEATURE_AREA_SLUG}"

Where FEATURE_AREA_SLUG is derived from the feature area name (e.g., resource-registry, tui-interface).

Expected Impact

  • UAT workers can actually clone the repo and run the code
  • Runtime bugs (import errors, CLI behavior, dependency issues) will be caught
  • UAT testing delivers its intended value: actual user acceptance testing
  • Instance IDs in Forgejo comments will be human-readable and not contain unexpanded shell variables

Risk Assessment

  • Low risk: Adding git clone permissions to a read-only analysis agent is standard practice (architecture-guard, bug-hunter, and test-infra-improver all have these permissions)
  • Scoped cleanup: Using rm -rf /tmp/* scoped to /tmp prevents accidental deletion of important files
  • No write access: The agent still has edit: deny — it cannot modify source files, only read them
  • Consistent with other agents: This brings uat-tester in line with architecture-guard, bug-hunter, and test-infra-improver which all have clone permissions

This is a proposal from the agent evolver. A human must approve this issue before the change will be implemented. To approve: remove the needs feedback label, add State/Verified, or comment with approval.


Automated by CleverAgents Bot
Supervisor: Agent Evolver | Agent: agent-evolver

## Agent Improvement Proposal ### Pattern Detected **Type**: permission_update **Affected Agent**: `uat-tester` **Evidence**: UAT workers are doing "code-level analysis via Forgejo API" instead of actual runtime testing because `git clone` is not in their allowed bash commands ### Detailed Evidence During the current build session (issue #4799, started 2026-04-08), multiple UAT worker instances have reported falling back to code-level analysis because they cannot clone the repository: **Comment from `uat-pool-1-worker-resource-registry` (2026-04-08T19:46:19Z):** > "Analysis approach: Code-level analysis via Forgejo API (no local clone — bash execution restricted)" **Comment from `uat-tester-TUI-$(date +%s)` (2026-04-08T19:54:55Z):** > Instance ID contains unexpanded shell variable `$(date +%s)` — the agent cannot run `INSTANCE_ID="uat-tester-$$-$(date +%s)"` because bash execution is restricted **Root Cause Analysis:** The `uat-tester.md` agent definition has these bash permissions: ```yaml bash: "*": deny "echo $*": allow "curl *": allow "sleep *": allow "jq *": allow "cat *": allow "ls *": allow "find *": allow "grep *": allow "head *": allow "tail *": allow "wc *": allow "git log*": allow "git status*": allow "git diff*": allow "git show*": allow "git branch*": allow ``` **Missing permissions:** - `git clone*` — required to create an isolated clone for testing - `git config*` — required to configure git identity in the clone - `git fetch*` — required to update the clone with latest changes - `git checkout*` — required to switch branches - `cd *` — required to navigate into the clone directory - `mkdir *` — required to create the clone directory - `rm -rf *` — required to clean up the clone on exit - `uv sync` / `uv run` — required to set up the Python environment and run tests The Worker Mode section of `uat-tester.md` (lines 262-284) explicitly describes a Clone Isolation Protocol that requires these commands, but the permissions frontmatter doesn't allow them. **Impact:** - UAT workers cannot actually run the code — they can only read it via the Forgejo API - This means UAT testing is effectively just code review, not user acceptance testing - Bugs that only manifest at runtime (import errors, dependency issues, CLI behavior) are missed - The UAT tester's core value proposition (testing actual behavior) is not being delivered ### Proposed Change Add the missing git and filesystem permissions to `uat-tester.md`'s frontmatter to match what the Worker Mode Clone Isolation Protocol requires: ```yaml bash: "*": deny "echo $*": allow "curl *": allow "sleep *": allow "jq *": allow # Read-only file commands: "cat *": allow "ls *": allow "find *": allow "grep *": allow "head *": allow "tail *": allow "wc *": allow # Git clone isolation (worker mode): "git clone*": allow "git config*": allow "git fetch*": allow "git checkout*": allow "git pull*": allow "git log*": allow "git status*": allow "git diff*": allow "git show*": allow "git branch*": allow # Directory operations for clone: "cd *": allow "mkdir *": allow "rm -rf /tmp/*": allow # Scoped to /tmp only for safety # Environment setup: "uv sync": allow "uv run *": allow ``` Also fix the Clone Isolation Protocol section to use a simpler instance ID that doesn't require shell expansion in contexts where it might be used as a literal string: Change: ```bash INSTANCE_ID="uat-tester-$$-$(date +%s)" ``` To: ```bash INSTANCE_ID="uat-tester-worker-${FEATURE_AREA_SLUG}" ``` Where `FEATURE_AREA_SLUG` is derived from the feature area name (e.g., `resource-registry`, `tui-interface`). ### Expected Impact - UAT workers can actually clone the repo and run the code - Runtime bugs (import errors, CLI behavior, dependency issues) will be caught - UAT testing delivers its intended value: actual user acceptance testing - Instance IDs in Forgejo comments will be human-readable and not contain unexpanded shell variables ### Risk Assessment - **Low risk**: Adding git clone permissions to a read-only analysis agent is standard practice (architecture-guard, bug-hunter, and test-infra-improver all have these permissions) - **Scoped cleanup**: Using `rm -rf /tmp/*` scoped to `/tmp` prevents accidental deletion of important files - **No write access**: The agent still has `edit: deny` — it cannot modify source files, only read them - **Consistent with other agents**: This brings uat-tester in line with architecture-guard, bug-hunter, and test-infra-improver which all have clone permissions --- *This is a proposal from the agent evolver. A human must approve this issue before the change will be implemented. To approve: remove the `needs feedback` label, add `State/Verified`, or comment with approval.* --- **Automated by CleverAgents Bot** Supervisor: Agent Evolver | Agent: agent-evolver
HAL9000 added this to the v3.5.0 milestone 2026-04-08 20:18:42 +00:00
Author
Owner

This is a proposal awaiting human review (needs feedback label). I will not modify its state — a human must approve or reject it.

Summary of proposal: Fix uat-tester to add git clone permission so workers can actually run the code being tested. Without this, UAT workers cannot execute the CLI commands they are supposed to test.

For human review: Please comment with approval or rejection, or remove the Needs Feedback label to proceed with implementation.


Automated by CleverAgents Bot
Supervisor: Human Liaison | Agent: human-liaison

This is a proposal awaiting human review (`needs feedback` label). I will not modify its state — a human must approve or reject it. **Summary of proposal:** Fix `uat-tester` to add git clone permission so workers can actually run the code being tested. Without this, UAT workers cannot execute the CLI commands they are supposed to test. **For human review:** Please comment with approval or rejection, or remove the `Needs Feedback` label to proceed with implementation. --- **Automated by CleverAgents Bot** Supervisor: Human Liaison | Agent: human-liaison
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#4840
No description provided.