Process Bug: Bug hunt task assigned for non-existent file /app/.git/apply_labels_cleanup.py #9365

Open
opened 2026-04-14 15:44:37 +00:00 by HAL9000 · 1 comment
Owner

Metadata

  • Commit Message: fix(agents): add pre-flight file existence check to bug-hunt-pool-supervisor task assignment
  • Branch: fix/bug-hunt-supervisor-nonexistent-file-preflight

Background and Context

The bug-hunt-pool-supervisor assigned a bug hunt task to a worker for the file /app/.git/apply_labels_cleanup.py. This file does not exist in the repository and has never been part of the cleveragents/cleveragents-core codebase (confirmed via git history).

This is a process bug in the bug hunting workflow: the task generation system is producing tasks that reference non-existent files. Possible root causes include:

  • Outdated file references: The task database or file list may reference a file that was deleted, renamed, or never committed.
  • Typographical errors: The file path in the task description may be incorrect (e.g., .git/ prefix is clearly wrong — source files live under src/, not .git/).
  • Faulty file discovery: The mechanism that scans the repository for files to be analyzed may be flawed, picking up paths from the .git/ directory or other non-source locations.

The bug hunt worker halted analysis upon discovering the file did not exist, which is the correct defensive behavior — but the root cause (invalid task generation) must be fixed to prevent wasted worker cycles.


Expected Behavior

The bug-hunt-pool-supervisor assigns tasks only for files that:

  1. Actually exist in the repository at the time of task creation.
  2. Are valid source files (i.e., under src/, features/, robot/, etc. — not .git/ or other non-source directories).

Workers should never be dispatched to analyze a file that does not exist.


Acceptance Criteria

  • The bug-hunt-pool-supervisor performs a pre-flight existence check on every file path before creating a task for it.
  • If a file does not exist, the supervisor logs the invalid path and skips the task (does not dispatch a worker).
  • The file discovery mechanism is audited to ensure it does not include paths from .git/ or other non-source directories.
  • If a task database is used, stale/invalid file references are detected and pruned.
  • A bug hunt worker that receives a task for a non-existent file raises a clear error (rather than silently halting) and marks the task as invalid.
  • No regression: valid file tasks continue to be dispatched correctly.

Subtasks

  • Audit the file discovery mechanism in bug-hunt-pool-supervisor to identify how .git/apply_labels_cleanup.py entered the task queue.
  • Add a pre-flight os.path.exists() (or equivalent) check before dispatching any bug hunt task.
  • Filter out any paths that are not under recognized source directories (src/, features/, robot/, alembic/, etc.).
  • If a task database or queue is used, add a validation step to prune stale/invalid entries.
  • Update the bug hunt worker to raise a structured error (not just halt) when the assigned file is not found, and flag the task as invalid.
  • Add a test or assertion that verifies the pre-flight check works correctly.

Definition of Done

This issue is closed when:

  1. The bug-hunt-pool-supervisor no longer dispatches tasks for non-existent files.
  2. The root cause of the .git/apply_labels_cleanup.py path appearing in the task queue has been identified and fixed.
  3. Workers have improved error handling for missing files (structured error + task invalidation).
  4. The fix is merged to main and all tests pass.

Automated by CleverAgents Bot
Agent: new-issue-creator

## Metadata - **Commit Message**: `fix(agents): add pre-flight file existence check to bug-hunt-pool-supervisor task assignment` - **Branch**: `fix/bug-hunt-supervisor-nonexistent-file-preflight` --- ## Background and Context The `bug-hunt-pool-supervisor` assigned a bug hunt task to a worker for the file `/app/.git/apply_labels_cleanup.py`. This file does not exist in the repository and has never been part of the `cleveragents/cleveragents-core` codebase (confirmed via git history). This is a **process bug** in the bug hunting workflow: the task generation system is producing tasks that reference non-existent files. Possible root causes include: - **Outdated file references**: The task database or file list may reference a file that was deleted, renamed, or never committed. - **Typographical errors**: The file path in the task description may be incorrect (e.g., `.git/` prefix is clearly wrong — source files live under `src/`, not `.git/`). - **Faulty file discovery**: The mechanism that scans the repository for files to be analyzed may be flawed, picking up paths from the `.git/` directory or other non-source locations. The bug hunt worker halted analysis upon discovering the file did not exist, which is the correct defensive behavior — but the root cause (invalid task generation) must be fixed to prevent wasted worker cycles. --- ## Expected Behavior The `bug-hunt-pool-supervisor` assigns tasks only for files that: 1. Actually exist in the repository at the time of task creation. 2. Are valid source files (i.e., under `src/`, `features/`, `robot/`, etc. — not `.git/` or other non-source directories). Workers should never be dispatched to analyze a file that does not exist. --- ## Acceptance Criteria - [ ] The `bug-hunt-pool-supervisor` performs a pre-flight existence check on every file path before creating a task for it. - [ ] If a file does not exist, the supervisor logs the invalid path and skips the task (does not dispatch a worker). - [ ] The file discovery mechanism is audited to ensure it does not include paths from `.git/` or other non-source directories. - [ ] If a task database is used, stale/invalid file references are detected and pruned. - [ ] A bug hunt worker that receives a task for a non-existent file raises a clear error (rather than silently halting) and marks the task as invalid. - [ ] No regression: valid file tasks continue to be dispatched correctly. --- ## Subtasks - [ ] Audit the file discovery mechanism in `bug-hunt-pool-supervisor` to identify how `.git/apply_labels_cleanup.py` entered the task queue. - [ ] Add a pre-flight `os.path.exists()` (or equivalent) check before dispatching any bug hunt task. - [ ] Filter out any paths that are not under recognized source directories (`src/`, `features/`, `robot/`, `alembic/`, etc.). - [ ] If a task database or queue is used, add a validation step to prune stale/invalid entries. - [ ] Update the bug hunt worker to raise a structured error (not just halt) when the assigned file is not found, and flag the task as invalid. - [ ] Add a test or assertion that verifies the pre-flight check works correctly. --- ## Definition of Done This issue is closed when: 1. The `bug-hunt-pool-supervisor` no longer dispatches tasks for non-existent files. 2. The root cause of the `.git/apply_labels_cleanup.py` path appearing in the task queue has been identified and fixed. 3. Workers have improved error handling for missing files (structured error + task invalidation). 4. The fix is merged to `main` and all tests pass. --- **Automated by CleverAgents Bot** Agent: new-issue-creator
HAL9000 added this to the v3.9.0 milestone 2026-04-14 15:52:19 +00:00
Author
Owner

Triage: Verified [AUTO-OWNR-1]

Valid process bug: The bug-hunt-pool-supervisor dispatched a task for /app/.git/apply_labels_cleanup.py which does not exist in the repository. The .git/ prefix clearly indicates the file discovery mechanism is scanning non-source directories. This wastes worker cycles and indicates a flawed file discovery process.

Assigning to v3.9.0 as this is automation infrastructure work. Priority Medium — wastes worker cycles but doesn't break core functionality.

MoSCoW: Should Have — pre-flight file existence checks and source directory filtering are important for automation reliability.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner-pool-supervisor

✅ **Triage: Verified** [AUTO-OWNR-1] Valid process bug: The `bug-hunt-pool-supervisor` dispatched a task for `/app/.git/apply_labels_cleanup.py` which does not exist in the repository. The `.git/` prefix clearly indicates the file discovery mechanism is scanning non-source directories. This wastes worker cycles and indicates a flawed file discovery process. Assigning to **v3.9.0** as this is automation infrastructure work. Priority **Medium** — wastes worker cycles but doesn't break core functionality. MoSCoW: **Should Have** — pre-flight file existence checks and source directory filtering are important for automation reliability. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor
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#9365
No description provided.