UAT: cleveragents.resource.handlers.fs_file module is missing — fs-symlink and fs-hardlink handler references are broken #2954

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

Metadata

  • Branch: fix/resource-handlers-fs-file-module
  • Commit Message: fix(resource): add missing fs_file handler module with FilesystemHandler for fs-symlink and fs-hardlink types
  • 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 fs-symlink and fs-hardlink built-in resource types defined in src/cleveragents/application/services/_resource_registry_physical.py.

Expected behavior (from spec)

Per docs/specification.md line 25140:

fs-file, fs-symlink, fs-hardlink | FilesystemHandler | ✓ | ✓ | ✓ | (inherits)

The FilesystemHandler class should exist in cleveragents.resource.handlers.fs_file.

Actual behavior (from code analysis)

The _resource_registry_physical.py file defines fs-symlink (line 282) and fs-hardlink (line 302) with handler references:

# fs-symlink (line 282)
"handler": "cleveragents.resource.handlers.fs_file:FilesystemHandler"

# fs-hardlink (line 302)
"handler": "cleveragents.resource.handlers.fs_file:FilesystemHandler"

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

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

When resolve_handler("cleveragents.resource.handlers.fs_file:FilesystemHandler") is called, it raises HandlerResolutionError: Cannot import handler module 'cleveragents.resource.handlers.fs_file'.

Impact

Any operation that triggers handler resolution for fs-symlink or fs-hardlink resource types will fail at runtime. This includes:

  • Auto-discovery of symlinks and hardlinks when an fs-directory is scanned
  • Reading symlink/hardlink metadata via the resource handler
  • Polymorphic handler resolution for subtypes of these types

Note: fs-file also uses FilesystemHandler per the spec, but fs-file itself is not yet registered as a built-in type (separate issue).

Code location

  • src/cleveragents/application/services/_resource_registry_physical.py — handler references (lines 282, 302)
  • src/cleveragents/resource/handlers/ — missing fs_file.py module

Steps to reproduce

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

Subtasks

  • Create src/cleveragents/resource/handlers/fs_file.py implementing the FilesystemHandler class, extending the appropriate base handler from _base.py
  • Ensure FilesystemHandler supports the read, write, and query capabilities declared in the spec for fs-file, fs-symlink, and fs-hardlink types
  • Ensure FilesystemHandler is statically typed with full type annotations and passes nox -e typecheck
  • Add Behave unit test scenarios in features/ covering handler resolution for fs-symlink and fs-hardlink resource types
  • Add a Robot Framework integration test in robot/ that verifies handler resolution succeeds for fs-symlink and fs-hardlink at runtime
  • Verify resolve_handler("cleveragents.resource.handlers.fs_file:FilesystemHandler") 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/fs_file.py exists and exports FilesystemHandler
  • Both fs-symlink and fs-hardlink 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-fs-file-module` - **Commit Message**: `fix(resource): add missing fs_file handler module with FilesystemHandler for fs-symlink and fs-hardlink types` - **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 `fs-symlink` and `fs-hardlink` built-in resource types defined in `src/cleveragents/application/services/_resource_registry_physical.py`. ### Expected behavior (from spec) Per `docs/specification.md` line 25140: > `fs-file`, `fs-symlink`, `fs-hardlink` | `FilesystemHandler` | ✓ | ✓ | ✓ | (inherits) The `FilesystemHandler` class should exist in `cleveragents.resource.handlers.fs_file`. ### Actual behavior (from code analysis) The `_resource_registry_physical.py` file defines `fs-symlink` (line 282) and `fs-hardlink` (line 302) with handler references: ```python # fs-symlink (line 282) "handler": "cleveragents.resource.handlers.fs_file:FilesystemHandler" # fs-hardlink (line 302) "handler": "cleveragents.resource.handlers.fs_file:FilesystemHandler" ``` However, **the module `cleveragents.resource.handlers.fs_file` does not exist**. The `src/cleveragents/resource/handlers/` directory only contains: - `fs_directory.py` (FsDirectoryHandler) - `git_checkout.py` (GitCheckoutHandler) - `devcontainer.py`, `cloud.py`, `database.py`, `discovery.py`, `protocol.py`, `resolver.py`, `_base.py` When `resolve_handler("cleveragents.resource.handlers.fs_file:FilesystemHandler")` is called, it raises `HandlerResolutionError: Cannot import handler module 'cleveragents.resource.handlers.fs_file'`. ### Impact Any operation that triggers handler resolution for `fs-symlink` or `fs-hardlink` resource types will fail at runtime. This includes: - Auto-discovery of symlinks and hardlinks when an `fs-directory` is scanned - Reading symlink/hardlink metadata via the resource handler - Polymorphic handler resolution for subtypes of these types Note: `fs-file` also uses `FilesystemHandler` per the spec, but `fs-file` itself is not yet registered as a built-in type (separate issue). ### Code location - `src/cleveragents/application/services/_resource_registry_physical.py` — handler references (lines 282, 302) - `src/cleveragents/resource/handlers/` — missing `fs_file.py` module ### Steps to reproduce ```python from cleveragents.resource.handlers.resolver import resolve_handler resolve_handler("cleveragents.resource.handlers.fs_file:FilesystemHandler") # Raises: HandlerResolutionError: Cannot import handler module 'cleveragents.resource.handlers.fs_file' ``` ## Subtasks - [ ] Create `src/cleveragents/resource/handlers/fs_file.py` implementing the `FilesystemHandler` class, extending the appropriate base handler from `_base.py` - [ ] Ensure `FilesystemHandler` supports the read, write, and query capabilities declared in the spec for `fs-file`, `fs-symlink`, and `fs-hardlink` types - [ ] Ensure `FilesystemHandler` is statically typed with full type annotations and passes `nox -e typecheck` - [ ] Add Behave unit test scenarios in `features/` covering handler resolution for `fs-symlink` and `fs-hardlink` resource types - [ ] Add a Robot Framework integration test in `robot/` that verifies handler resolution succeeds for `fs-symlink` and `fs-hardlink` at runtime - [ ] Verify `resolve_handler("cleveragents.resource.handlers.fs_file:FilesystemHandler")` 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/fs_file.py` exists and exports `FilesystemHandler` - [ ] Both `fs-symlink` and `fs-hardlink` 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:55:58 +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#2954
No description provided.