UAT: cleveragents.resource.handlers.git module is missing — 9 built-in git resource type handlers cannot be resolved #2933

Open
opened 2026-04-05 02:52:03 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: fix/resource-handlers-git-module
  • Commit Message: fix(resource): add missing git handler module with GitHandler, GitObjectHandler, GitRefHandler, GitConfigHandler
  • Milestone: v3.6.0
  • Parent Epic: #398

Bug Report

Feature Area: Resource Types & Inheritance — Handler Implementation
Severity: High
Found by: UAT Testing (Resource Types & Inheritance)

What was tested

Handler references for the deferred physical git resource types defined in src/cleveragents/application/services/_resource_registry_physical.py.

Expected behavior (from spec)

Per docs/specification.md line 25133-25137, the following handlers are required:

Resource Type Handler
git GitHandler
git-commit, git-tree, git-tree-entry GitObjectHandler
git-branch, git-tag, git-stash GitRefHandler
git-remote, git-submodule GitConfigHandler

All of these are expected to be in the module cleveragents.resource.handlers.git.

Actual behavior (from code analysis)

The _resource_registry_physical.py file defines 9 built-in git resource types with handler references pointing to cleveragents.resource.handlers.git:

# git type (line 73)
"handler": "cleveragents.resource.handlers.git:GitHandler"

# git-remote (line 94)
"handler": "cleveragents.resource.handlers.git:GitConfigHandler"

# git-branch (line 119)
"handler": "cleveragents.resource.handlers.git:GitRefHandler"

# git-tag (line 147)
"handler": "cleveragents.resource.handlers.git:GitRefHandler"

# git-commit (line 174)
"handler": "cleveragents.resource.handlers.git:GitObjectHandler"

# git-tree (line 204)
"handler": "cleveragents.resource.handlers.git:GitObjectHandler"

# git-tree-entry (line 225)
"handler": "cleveragents.resource.handlers.git:GitObjectHandler"

# git-stash (line 243)
"handler": "cleveragents.resource.handlers.git:GitRefHandler"

# git-submodule (line 264)
"handler": "cleveragents.resource.handlers.git:GitConfigHandler"

However, the module cleveragents.resource.handlers.git does not exist. The src/cleveragents/resource/handlers/ directory only contains:

  • git_checkout.py (GitCheckoutHandler — this one exists)
  • fs_directory.py (FsDirectoryHandler — this one exists)
  • devcontainer.py, cloud.py, database.py, discovery.py, protocol.py, resolver.py, _base.py

When resolve_handler("cleveragents.resource.handlers.git:GitHandler") is called, it raises HandlerResolutionError: Cannot import handler module 'cleveragents.resource.handlers.git': No module named 'cleveragents.resource.handlers.git'.

Impact

Any operation that triggers handler resolution for git, git-remote, git-branch, git-tag, git-commit, git-tree, git-tree-entry, git-stash, or git-submodule resource types will fail at runtime. This includes:

  • Auto-discovery of git object children when a git-checkout is registered
  • Reading git metadata via the resource handler
  • Polymorphic handler resolution for subtypes of these types

Code location

  • src/cleveragents/application/services/_resource_registry_physical.py — handler references (lines 73, 94, 119, 147, 174, 204, 225, 243, 264)
  • src/cleveragents/resource/handlers/ — missing git.py module

Steps to reproduce

from cleveragents.resource.handlers.resolver import resolve_handler
resolve_handler("cleveragents.resource.handlers.git:GitHandler")
# Raises: HandlerResolutionError: Cannot import handler module 'cleveragents.resource.handlers.git'

Subtasks

  • Create src/cleveragents/resource/handlers/git.py implementing GitHandler, GitObjectHandler, GitRefHandler, and GitConfigHandler classes, each extending the appropriate base handler from _base.py
  • Ensure all four handler classes are statically typed with full type annotations and pass nox -e typecheck
  • Add Behave unit test scenarios in features/ covering handler resolution for all 9 git resource types (git, git-remote, git-branch, git-tag, git-commit, git-tree, git-tree-entry, git-stash, git-submodule)
  • Add a Robot Framework integration test in robot/ that verifies handler resolution succeeds for each of the 9 git resource types at runtime
  • Verify resolve_handler("cleveragents.resource.handlers.git:GitHandler") (and all 3 other handler classes) no longer raises HandlerResolutionError
  • Verify coverage ≥97% via nox -s coverage_report
  • Run nox (all default sessions) and fix any errors

Definition of Done

  • src/cleveragents/resource/handlers/git.py exists and exports GitHandler, GitObjectHandler, GitRefHandler, GitConfigHandler
  • All 9 git resource type handler references in _resource_registry_physical.py resolve without error
  • All Behave unit test scenarios pass
  • All Robot Framework integration tests pass
  • All nox stages pass
  • Coverage >= 97%

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: ca-new-issue-creator

## Metadata - **Branch**: `fix/resource-handlers-git-module` - **Commit Message**: `fix(resource): add missing git handler module with GitHandler, GitObjectHandler, GitRefHandler, GitConfigHandler` - **Milestone**: v3.6.0 - **Parent Epic**: #398 ## Bug Report **Feature Area**: Resource Types & Inheritance — Handler Implementation **Severity**: High **Found by**: UAT Testing (Resource Types & Inheritance) ### What was tested Handler references for the deferred physical git resource types defined in `src/cleveragents/application/services/_resource_registry_physical.py`. ### Expected behavior (from spec) Per `docs/specification.md` line 25133-25137, the following handlers are required: | Resource Type | Handler | |---|---| | `git` | `GitHandler` | | `git-commit`, `git-tree`, `git-tree-entry` | `GitObjectHandler` | | `git-branch`, `git-tag`, `git-stash` | `GitRefHandler` | | `git-remote`, `git-submodule` | `GitConfigHandler` | All of these are expected to be in the module `cleveragents.resource.handlers.git`. ### Actual behavior (from code analysis) The `_resource_registry_physical.py` file defines 9 built-in git resource types with handler references pointing to `cleveragents.resource.handlers.git`: ```python # git type (line 73) "handler": "cleveragents.resource.handlers.git:GitHandler" # git-remote (line 94) "handler": "cleveragents.resource.handlers.git:GitConfigHandler" # git-branch (line 119) "handler": "cleveragents.resource.handlers.git:GitRefHandler" # git-tag (line 147) "handler": "cleveragents.resource.handlers.git:GitRefHandler" # git-commit (line 174) "handler": "cleveragents.resource.handlers.git:GitObjectHandler" # git-tree (line 204) "handler": "cleveragents.resource.handlers.git:GitObjectHandler" # git-tree-entry (line 225) "handler": "cleveragents.resource.handlers.git:GitObjectHandler" # git-stash (line 243) "handler": "cleveragents.resource.handlers.git:GitRefHandler" # git-submodule (line 264) "handler": "cleveragents.resource.handlers.git:GitConfigHandler" ``` However, **the module `cleveragents.resource.handlers.git` does not exist**. The `src/cleveragents/resource/handlers/` directory only contains: - `git_checkout.py` (GitCheckoutHandler — this one exists) - `fs_directory.py` (FsDirectoryHandler — this one exists) - `devcontainer.py`, `cloud.py`, `database.py`, `discovery.py`, `protocol.py`, `resolver.py`, `_base.py` When `resolve_handler("cleveragents.resource.handlers.git:GitHandler")` is called, it raises `HandlerResolutionError: Cannot import handler module 'cleveragents.resource.handlers.git': No module named 'cleveragents.resource.handlers.git'`. ### Impact Any operation that triggers handler resolution for `git`, `git-remote`, `git-branch`, `git-tag`, `git-commit`, `git-tree`, `git-tree-entry`, `git-stash`, or `git-submodule` resource types will fail at runtime. This includes: - Auto-discovery of git object children when a `git-checkout` is registered - Reading git metadata via the resource handler - Polymorphic handler resolution for subtypes of these types ### Code location - `src/cleveragents/application/services/_resource_registry_physical.py` — handler references (lines 73, 94, 119, 147, 174, 204, 225, 243, 264) - `src/cleveragents/resource/handlers/` — missing `git.py` module ### Steps to reproduce ```python from cleveragents.resource.handlers.resolver import resolve_handler resolve_handler("cleveragents.resource.handlers.git:GitHandler") # Raises: HandlerResolutionError: Cannot import handler module 'cleveragents.resource.handlers.git' ``` ## Subtasks - [ ] Create `src/cleveragents/resource/handlers/git.py` implementing `GitHandler`, `GitObjectHandler`, `GitRefHandler`, and `GitConfigHandler` classes, each extending the appropriate base handler from `_base.py` - [ ] Ensure all four handler classes are statically typed with full type annotations and pass `nox -e typecheck` - [ ] Add Behave unit test scenarios in `features/` covering handler resolution for all 9 git resource types (`git`, `git-remote`, `git-branch`, `git-tag`, `git-commit`, `git-tree`, `git-tree-entry`, `git-stash`, `git-submodule`) - [ ] Add a Robot Framework integration test in `robot/` that verifies handler resolution succeeds for each of the 9 git resource types at runtime - [ ] Verify `resolve_handler("cleveragents.resource.handlers.git:GitHandler")` (and all 3 other handler classes) no longer raises `HandlerResolutionError` - [ ] Verify coverage ≥97% via `nox -s coverage_report` - [ ] Run `nox` (all default sessions) and fix any errors ## Definition of Done - [ ] `src/cleveragents/resource/handlers/git.py` exists and exports `GitHandler`, `GitObjectHandler`, `GitRefHandler`, `GitConfigHandler` - [ ] All 9 git resource type handler references in `_resource_registry_physical.py` resolve without error - [ ] All Behave unit test scenarios pass - [ ] All Robot Framework integration tests pass - [ ] All nox stages pass - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.6.0 milestone 2026-04-05 02:52:09 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Confirmed
  • MoSCoW: Should Have

Valid finding verified during batch triage.


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

Issue triaged by project owner: - **State**: Verified - **Priority**: Confirmed - **MoSCoW**: Should Have Valid finding verified during batch triage. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
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.

Blocks
#398 Epic: Post-MVP Resources
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#2933
No description provided.