UAT: Auto-discovered child resources incorrectly receive names — spec requires ULID-only identification #2054

Open
opened 2026-04-03 03:43:26 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: fix/resource-discover-children-no-name
  • Commit Message: fix(resource): set name=None on auto-discovered child resources in discover_children()
  • Milestone: v3.7.0
  • Parent Epic: #398

Background and Context

During UAT testing of the resource management feature area, a spec-alignment defect was identified in the discover_children() methods of GitCheckoutHandler and FsDirectoryHandler. Both handlers assign a name value to auto-discovered child resources, which directly violates the specification.

Per docs/specification.md (Auto-Discovery section):

"Auto-discovered children do not receive names — they are identified by ULID only, even if their resource type is user-addable."

Auto-discovered children must have name=None and be identifiable exclusively by their ULID (resource_id).

Current Behavior

src/cleveragents/resource/handlers/git_checkout.pyGitCheckoutHandler.discover_children() creates child resources with name=dirname:

child = Resource(
    resource_id=self._derive_child_id(resource.resource_id, dirname),
    name=dirname,  # BUG: should be None
    resource_type_name="fs-directory",
    ...
)

src/cleveragents/resource/handlers/fs_directory.pyFsDirectoryHandler.discover_children() creates child resources with name=entry.name:

child = Resource(
    resource_id=self._derive_child_id(resource.resource_id, entry.name),
    name=entry.name,  # BUG: should be None
    resource_type_name="fs-directory",
    ...
)

Expected Behavior

Per docs/specification.md (Auto-Discovery section):

"Auto-discovered children do not receive names — they are identified by ULID only, even if their resource type is user-addable."

The name field on all auto-discovered child resources must be None. They should only be identifiable by their ULID (resource_id).

Code Locations

  • src/cleveragents/resource/handlers/git_checkout.pyGitCheckoutHandler.discover_children()
  • src/cleveragents/resource/handlers/fs_directory.pyFsDirectoryHandler.discover_children()

Spec Reference

  • docs/specification.md — Auto-Discovery section: "Auto-discovered children do not receive names — they are identified by ULID only, even if their resource type is user-addable."

Subtasks

  • Fix GitCheckoutHandler.discover_children(): set name=None on all auto-discovered child resources
  • Fix FsDirectoryHandler.discover_children(): set name=None on all auto-discovered child resources
  • Verify that DevcontainerHandler.discover_children() also sets name=None (if it creates named children)
  • Tests (Behave): Add/update BDD scenarios verifying that auto-discovered children have name=None
  • Verify coverage ≥ 97% via nox -s coverage_report
  • Run nox (all default sessions), fix any errors

Definition of Done

  • All auto-discovered child resources have name=None
  • Auto-discovered children are only identifiable by ULID
  • All tests pass and coverage ≥ 97%
  • All nox stages pass
  • Coverage >= 97%

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

## Metadata - **Branch**: `fix/resource-discover-children-no-name` - **Commit Message**: `fix(resource): set name=None on auto-discovered child resources in discover_children()` - **Milestone**: v3.7.0 - **Parent Epic**: #398 ## Background and Context During UAT testing of the resource management feature area, a spec-alignment defect was identified in the `discover_children()` methods of `GitCheckoutHandler` and `FsDirectoryHandler`. Both handlers assign a `name` value to auto-discovered child resources, which directly violates the specification. Per `docs/specification.md` (Auto-Discovery section): > "Auto-discovered children do not receive names — they are identified by ULID only, even if their resource type is user-addable." Auto-discovered children must have `name=None` and be identifiable exclusively by their ULID (`resource_id`). ## Current Behavior **`src/cleveragents/resource/handlers/git_checkout.py`** — `GitCheckoutHandler.discover_children()` creates child resources with `name=dirname`: ```python child = Resource( resource_id=self._derive_child_id(resource.resource_id, dirname), name=dirname, # BUG: should be None resource_type_name="fs-directory", ... ) ``` **`src/cleveragents/resource/handlers/fs_directory.py`** — `FsDirectoryHandler.discover_children()` creates child resources with `name=entry.name`: ```python child = Resource( resource_id=self._derive_child_id(resource.resource_id, entry.name), name=entry.name, # BUG: should be None resource_type_name="fs-directory", ... ) ``` ## Expected Behavior Per `docs/specification.md` (Auto-Discovery section): > "Auto-discovered children do not receive names — they are identified by ULID only, even if their resource type is user-addable." The `name` field on all auto-discovered child resources must be `None`. They should only be identifiable by their ULID (`resource_id`). ## Code Locations - `src/cleveragents/resource/handlers/git_checkout.py` — `GitCheckoutHandler.discover_children()` - `src/cleveragents/resource/handlers/fs_directory.py` — `FsDirectoryHandler.discover_children()` ## Spec Reference - `docs/specification.md` — Auto-Discovery section: _"Auto-discovered children do not receive names — they are identified by ULID only, even if their resource type is user-addable."_ ## Subtasks - [ ] Fix `GitCheckoutHandler.discover_children()`: set `name=None` on all auto-discovered child resources - [ ] Fix `FsDirectoryHandler.discover_children()`: set `name=None` on all auto-discovered child resources - [ ] Verify that `DevcontainerHandler.discover_children()` also sets `name=None` (if it creates named children) - [ ] Tests (Behave): Add/update BDD scenarios verifying that auto-discovered children have `name=None` - [ ] Verify coverage ≥ 97% via `nox -s coverage_report` - [ ] Run `nox` (all default sessions), fix any errors ## Definition of Done - [ ] All auto-discovered child resources have `name=None` - [ ] Auto-discovered children are only identifiable by ULID - [ ] All tests pass and coverage ≥ 97% - [ ] All nox stages pass - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.7.0 milestone 2026-04-03 03:43:31 +00:00
freemo self-assigned this 2026-04-03 16:58:13 +00:00
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#2054
No description provided.