chore(agents): improve ca-test-infra-improver — remove clone isolation, use API-based analysis #2770

Closed
freemo wants to merge 1 commit from improvement/agent-ca-test-infra-improver-worker-api-mode into master
Owner

Agent Improvement Implementation

Implements approved proposal #2367.

Changes Made

File: .opencode/agents/ca-test-infra-improver.md

The ca-test-infra-improver Worker Mode was crashing on startup because its Clone Isolation Protocol instructed the agent to run git clone, cd, mkdir, and rm -rf — none of which are in its bash permission allow-list. Every worker instance terminated within 10 seconds of launch.

Changes:

  1. Removed the Clone Isolation Protocol from Worker Mode entirely (was lines 247-261).

  2. Added a new "File Access Strategy" section that instructs the worker to use the Forgejo API (forgejo_get_file_content) to read files remotely instead of cloning locally. This aligns with the agent's analysis-only purpose — it never modifies code.

  3. Updated all analysis area instructions to reference Forgejo API-based file reading instead of local filesystem operations. For example, "Read noxfile.py via Forgejo API" instead of "Read noxfile.py in the clone."

  4. Added /app as a fallback — the existing read-only bash commands (cat, ls, find, grep) can still read from /app when the API is slower.

  5. Updated the description frontmatter to reflect the API-based approach.

  6. Updated Important Rules — removed "Delete your clone on exit" (no clone to delete), replaced with clarification about read-only /app access.

Evidence

Issue #2222 documented the crash. Issue #2224 confirmed workers were unable to perform analysis. The agent's bash permissions (lines 18-36) only allow read-only commands, but the Clone Isolation Protocol required write commands.

Expected Impact

  • Worker Mode instances will successfully initialize and complete analysis
  • All 8 analysis areas become functional
  • Pool supervisor can dispatch and collect results from workers

Closes #2367


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

## Agent Improvement Implementation Implements approved proposal #2367. ### Changes Made **File**: `.opencode/agents/ca-test-infra-improver.md` The `ca-test-infra-improver` Worker Mode was crashing on startup because its Clone Isolation Protocol instructed the agent to run `git clone`, `cd`, `mkdir`, and `rm -rf` — none of which are in its bash permission allow-list. Every worker instance terminated within 10 seconds of launch. **Changes:** 1. **Removed the Clone Isolation Protocol** from Worker Mode entirely (was lines 247-261). 2. **Added a new "File Access Strategy" section** that instructs the worker to use the Forgejo API (`forgejo_get_file_content`) to read files remotely instead of cloning locally. This aligns with the agent's analysis-only purpose — it never modifies code. 3. **Updated all analysis area instructions** to reference Forgejo API-based file reading instead of local filesystem operations. For example, "Read `noxfile.py` via Forgejo API" instead of "Read `noxfile.py` in the clone." 4. **Added `/app` as a fallback** — the existing read-only bash commands (`cat`, `ls`, `find`, `grep`) can still read from `/app` when the API is slower. 5. **Updated the description frontmatter** to reflect the API-based approach. 6. **Updated Important Rules** — removed "Delete your clone on exit" (no clone to delete), replaced with clarification about read-only `/app` access. ### Evidence Issue #2222 documented the crash. Issue #2224 confirmed workers were unable to perform analysis. The agent's bash permissions (lines 18-36) only allow read-only commands, but the Clone Isolation Protocol required write commands. ### Expected Impact - Worker Mode instances will successfully initialize and complete analysis - All 8 analysis areas become functional - Pool supervisor can dispatch and collect results from workers Closes #2367 --- **Automated by CleverAgents Bot** Supervisor: Agent Evolver | Agent: ca-agent-evolver
chore(agents): improve ca-test-infra-improver — remove clone isolation, use API-based analysis
Some checks failed
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 3m30s
CI / typecheck (pull_request) Successful in 3m52s
CI / build (pull_request) Successful in 24s
CI / security (pull_request) Successful in 4m13s
CI / helm (pull_request) Successful in 25s
CI / quality (pull_request) Successful in 3m44s
CI / unit_tests (pull_request) Failing after 6m44s
CI / docker (pull_request) Has been skipped
CI / e2e_tests (pull_request) Failing after 16m10s
CI / integration_tests (pull_request) Failing after 22m10s
CI / coverage (pull_request) Successful in 10m53s
CI / status-check (pull_request) Failing after 2s
CI / benchmark-regression (pull_request) Successful in 57m8s
fcd7ec1576
Approved proposal: #2367
Pattern: Permission conflict / initialization crash
Evidence: Worker Mode instructs git clone, cd, mkdir, rm -rf but bash
permissions only allow read-only commands. Every Worker Mode instance
crashes on startup within 10 seconds.
Fix: Remove Clone Isolation Protocol from Worker Mode. Replace with
Forgejo API-based file reading (forgejo_get_file_content). The agent
is analysis-only and never modifies code, so a local clone is unnecessary.

ISSUES CLOSED: #2367
Author
Owner

Do not remove clone isolation, this is important. Instead simply give it the permissions it needs to perform the git commands needed to clone the repo.

Do **not** remove clone isolation, this is important. Instead simply give it the permissions it needs to perform the git commands needed to clone the repo.
Author
Owner

The CTO has provided feedback on this PR: clone isolation must not be removed. The correct approach is to expand the bash permission allow-list to include the git commands needed for cloning (git clone*, mkdir *, etc.), rather than removing the Clone Isolation Protocol entirely.

This PR needs to be revised to:

  1. Restore the Clone Isolation Protocol in Worker Mode
  2. Add the missing bash permissions (git clone*, mkdir *, cd *, and appropriate cleanup commands) to the allow-list
  3. Keep the API-based analysis as a supplementary capability, not a replacement for local clone analysis

The current implementation contradicts the human directive. Please revise or close this PR and submit a corrected version.


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

The CTO has provided feedback on this PR: **clone isolation must not be removed**. The correct approach is to expand the bash permission allow-list to include the git commands needed for cloning (`git clone*`, `mkdir *`, etc.), rather than removing the Clone Isolation Protocol entirely. This PR needs to be revised to: 1. **Restore the Clone Isolation Protocol** in Worker Mode 2. **Add the missing bash permissions** (`git clone*`, `mkdir *`, `cd *`, and appropriate cleanup commands) to the allow-list 3. Keep the API-based analysis as a supplementary capability, not a replacement for local clone analysis The current implementation contradicts the human directive. Please revise or close this PR and submit a corrected version. --- **Automated by CleverAgents Bot** Supervisor: Human Liaison | Agent: ca-human-liaison
freemo force-pushed improvement/agent-ca-test-infra-improver-worker-api-mode from fcd7ec1576
Some checks failed
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 3m30s
CI / typecheck (pull_request) Successful in 3m52s
CI / build (pull_request) Successful in 24s
CI / security (pull_request) Successful in 4m13s
CI / helm (pull_request) Successful in 25s
CI / quality (pull_request) Successful in 3m44s
CI / unit_tests (pull_request) Failing after 6m44s
CI / docker (pull_request) Has been skipped
CI / e2e_tests (pull_request) Failing after 16m10s
CI / integration_tests (pull_request) Failing after 22m10s
CI / coverage (pull_request) Successful in 10m53s
CI / status-check (pull_request) Failing after 2s
CI / benchmark-regression (pull_request) Successful in 57m8s
to 3bd24629b9
All checks were successful
CI / benchmark-publish (pull_request) Has been skipped
CI / helm (pull_request) Successful in 33s
CI / build (pull_request) Successful in 39s
CI / lint (pull_request) Successful in 42s
CI / typecheck (pull_request) Successful in 50s
CI / quality (pull_request) Successful in 3m50s
CI / security (pull_request) Successful in 4m19s
CI / unit_tests (pull_request) Successful in 6m46s
CI / docker (pull_request) Successful in 1m35s
CI / coverage (pull_request) Successful in 10m32s
CI / e2e_tests (pull_request) Successful in 17m56s
CI / integration_tests (pull_request) Successful in 22m52s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Successful in 57m29s
2026-04-05 02:29:25 +00:00
Compare
Author
Owner

Once this PR has been updated to remove clone isolation message and tag me so I can review it for acceptance.

Once this PR has been updated to remove clone isolation message and tag me so I can review it for acceptance.
Author
Owner

Closing, you can redo this correctly.

Closing, you can redo this correctly.
freemo closed this pull request 2026-04-05 04:32:29 +00:00
All checks were successful
CI / benchmark-publish (pull_request) Has been skipped
CI / helm (pull_request) Successful in 33s
CI / build (pull_request) Successful in 39s
Required
Details
CI / lint (pull_request) Successful in 42s
Required
Details
CI / typecheck (pull_request) Successful in 50s
Required
Details
CI / quality (pull_request) Successful in 3m50s
Required
Details
CI / security (pull_request) Successful in 4m19s
Required
Details
CI / unit_tests (pull_request) Successful in 6m46s
Required
Details
CI / docker (pull_request) Successful in 1m35s
Required
Details
CI / coverage (pull_request) Successful in 10m32s
Required
Details
CI / e2e_tests (pull_request) Successful in 17m56s
CI / integration_tests (pull_request) Successful in 22m52s
Required
Details
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Successful in 57m29s

Pull request closed

Sign in to join this conversation.
No reviewers
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!2770
No description provided.