chore(agents): improve ca-bug-hunter — prevent false positive infrastructure bug reports #3131
@@ -215,12 +215,19 @@ LOOP:
|
||||
|
||||
**CRITICAL: You MUST work in your own isolated clone. NEVER operate in /app.**
|
||||
|
||||
**HOSTNAME WARNING:** The Forgejo host is NOT necessarily
|
||||
`git.<org-name>.com`. You MUST derive the git clone hostname from the
|
||||
Forgejo base URL or PAT URL provided in your prompt — NOT from the
|
||||
organization name. For example, if the Forgejo URL is
|
||||
`https://git.cleverthis.com`, use `git.cleverthis.com` as the host, even
|
||||
if the org is named `cleveragents`.
|
||||
|
||||
```bash
|
||||
INSTANCE_ID="bug-hunter-$$-$(date +%s)"
|
||||
CLONE_DIR="/tmp/ca-${INSTANCE_ID}"
|
||||
|
||||
# Clone
|
||||
git clone https://<FORGEJO_PAT>@<host>/<owner>/<repo>.git "$CLONE_DIR"
|
||||
# Clone — use the host from FORGEJO_URL, NOT from the org name
|
||||
git clone https://<FORGEJO_PAT>@<FORGEJO_HOST>/<owner>/<repo>.git "$CLONE_DIR"
|
||||
|
||||
# Configure identity (read-only, but git needs this)
|
||||
cd "$CLONE_DIR"
|
||||
@@ -232,6 +239,22 @@ git config user.email "<GIT_USER_EMAIL>"
|
||||
|
||||
**CLEANUP on exit: `rm -rf "$CLONE_DIR"`** — always, even on error.
|
||||
|
||||
### Clone Failure Handling
|
||||
|
||||
If `git clone` fails:
|
||||
|
||||
1. **Check the hostname.** Verify you are using the host from the Forgejo
|
||||
base URL (e.g., `git.cleverthis.com`), NOT a hostname derived from the
|
||||
organization name (e.g., `git.cleveragents.com`).
|
||||
2. **Retry once** with the corrected hostname if it was wrong.
|
||||
3. **If still failing after retry, EXIT gracefully.** Report the clone
|
||||
failure in your return value and move on. Do NOT file a Forgejo issue
|
||||
about the clone failure — it is an agent environment problem, not a
|
||||
product bug.
|
||||
4. **NEVER file issues about TLS, DNS, or network failures** encountered
|
||||
during your own clone operation. These are infrastructure issues in
|
||||
your execution environment, not bugs in the product codebase.
|
||||
|
||||
### Setup
|
||||
|
||||
You receive:
|
||||
@@ -497,6 +520,11 @@ Before filing ANY issue, you MUST validate the finding:
|
||||
get assigned to the active milestone. All other findings are created with
|
||||
no milestone and `Priority/Backlog`. This prevents scope explosion in
|
||||
active milestones.
|
||||
- **NEVER file issues about your own infrastructure.** TLS/SSL failures,
|
||||
DNS resolution errors, clone failures, tool crashes, and network issues
|
||||
in YOUR execution environment are NOT product bugs. They are agent
|
||||
environment problems. If you cannot clone or access the code, exit
|
||||
gracefully — do not file a bug report about it.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user