UAT: bug(resource-registry): git-checkout built-in type incorrectly lists fs-file as direct child type #2924

Open
opened 2026-04-05 02:49:59 +00:00 by freemo · 4 comments
Owner

Metadata

  • Commit Message: fix(resource-registry): remove fs-file from git-checkout direct child_types
  • Branch: bugfix/git-checkout-child-types-fs-file
  • Parent Epic: #353
  • Milestone: v3.1.0

Background and Context

The spec defines git-checkout as a composition type with exactly two required children: git (1, required) and fs-directory (1, required). fs-file resources are children of fs-directory, not direct children of git-checkout. The current implementation incorrectly adds fs-file (and devcontainer-instance, devcontainer-file) as direct child types of git-checkout, violating the DAG type constraints defined in the spec.

Spec reference:

git-checkout | yes | git_worktree | (none — always a top-level resource) | git (1, required), fs-directory (1, required) | A locally checked-out git repository.

Current Behavior

In src/cleveragents/application/services/_resource_registry_data.py, the git-checkout built-in type definition lists:

"child_types": [
    "git",
    "fs-directory",
    "fs-file",           # ← WRONG: fs-file is a child of fs-directory, not git-checkout
    "devcontainer-instance",  # ← WRONG: not a direct child of git-checkout per spec
    "devcontainer-file",      # ← WRONG: not a direct child of git-checkout per spec
],

This means the DAG type constraint validation will incorrectly allow fs-file, devcontainer-instance, and devcontainer-file to be linked as direct children of a git-checkout resource, bypassing the required fs-directory intermediate node.

Expected Behavior

Per the spec, git-checkout should only allow exactly two child types:

  • git (1, required)
  • fs-directory (1, required)

The corrected definition should be:

"child_types": ["git", "fs-directory"],

devcontainer-instance is auto-discovered as a child of fs-directory (when .devcontainer/ is present), not as a direct child of git-checkout. fs-file is a child of fs-directory.

Acceptance Criteria

  • git-checkout built-in type child_types contains only ["git", "fs-directory"]
  • link_child correctly rejects attempts to link fs-file directly to a git-checkout resource
  • devcontainer-instance auto-discovery is triggered from fs-directory, not git-checkout
  • Existing tests pass; new tests cover the corrected DAG constraints

Subtasks

  • Fix child_types in _resource_registry_data.py for git-checkout
  • Verify devcontainer-instance auto-discovery trigger types are correct
  • Add unit tests for DAG type constraint enforcement
  • Run nox and ensure all sessions pass

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and merged.

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: ca-uat-tester

## Metadata - **Commit Message**: `fix(resource-registry): remove fs-file from git-checkout direct child_types` - **Branch**: `bugfix/git-checkout-child-types-fs-file` - **Parent Epic**: #353 - **Milestone**: v3.1.0 ## Background and Context The spec defines `git-checkout` as a composition type with exactly two required children: `git` (1, required) and `fs-directory` (1, required). `fs-file` resources are children of `fs-directory`, not direct children of `git-checkout`. The current implementation incorrectly adds `fs-file` (and `devcontainer-instance`, `devcontainer-file`) as direct child types of `git-checkout`, violating the DAG type constraints defined in the spec. Spec reference: > `git-checkout` | yes | `git_worktree` | (none — always a top-level resource) | `git` (1, required), `fs-directory` (1, required) | A locally checked-out git repository. ## Current Behavior In `src/cleveragents/application/services/_resource_registry_data.py`, the `git-checkout` built-in type definition lists: ```python "child_types": [ "git", "fs-directory", "fs-file", # ← WRONG: fs-file is a child of fs-directory, not git-checkout "devcontainer-instance", # ← WRONG: not a direct child of git-checkout per spec "devcontainer-file", # ← WRONG: not a direct child of git-checkout per spec ], ``` This means the DAG type constraint validation will incorrectly allow `fs-file`, `devcontainer-instance`, and `devcontainer-file` to be linked as direct children of a `git-checkout` resource, bypassing the required `fs-directory` intermediate node. ## Expected Behavior Per the spec, `git-checkout` should only allow exactly two child types: - `git` (1, required) - `fs-directory` (1, required) The corrected definition should be: ```python "child_types": ["git", "fs-directory"], ``` `devcontainer-instance` is auto-discovered as a child of `fs-directory` (when `.devcontainer/` is present), not as a direct child of `git-checkout`. `fs-file` is a child of `fs-directory`. ## Acceptance Criteria - [ ] `git-checkout` built-in type `child_types` contains only `["git", "fs-directory"]` - [ ] `link_child` correctly rejects attempts to link `fs-file` directly to a `git-checkout` resource - [ ] `devcontainer-instance` auto-discovery is triggered from `fs-directory`, not `git-checkout` - [ ] Existing tests pass; new tests cover the corrected DAG constraints ## Subtasks - [ ] Fix `child_types` in `_resource_registry_data.py` for `git-checkout` - [ ] Verify `devcontainer-instance` auto-discovery trigger types are correct - [ ] Add unit tests for DAG type constraint enforcement - [ ] Run `nox` and ensure all sessions pass ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged**. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
Author
Owner

Label compliance fix applied:

  • Added missing labels: Priority/Medium, State/Unverified, Type/Bug
  • Reason: Issue was missing all required labels per CONTRIBUTING.md. Inferred Type/Bug from the "UAT: bug" prefix. Applied Priority/Medium and State/Unverified as defaults.

Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: ca-backlog-groomer

Label compliance fix applied: - Added missing labels: `Priority/Medium`, `State/Unverified`, `Type/Bug` - Reason: Issue was missing all required labels per CONTRIBUTING.md. Inferred `Type/Bug` from the "UAT: bug" prefix. Applied `Priority/Medium` and `State/Unverified` as defaults. --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: ca-backlog-groomer
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
freemo added this to the v3.2.0 milestone 2026-04-05 04:49:31 +00:00
Author
Owner

Milestone compliance fix applied:

  • Assigned to milestone: v3.2.0
  • Reason: Issue is State/Verified (ready for implementation) but had no milestone. Issue body references Milestone: v3.1.0 which is no longer an active open milestone. Assigned to the earliest active milestone v3.2.0 as the appropriate target.

Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: ca-backlog-groomer

Milestone compliance fix applied: - Assigned to milestone: `v3.2.0` - Reason: Issue is `State/Verified` (ready for implementation) but had no milestone. Issue body references `Milestone: v3.1.0` which is no longer an active open milestone. Assigned to the earliest active milestone `v3.2.0` as the appropriate target. --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: ca-backlog-groomer
freemo removed this from the v3.2.0 milestone 2026-04-06 22:28:39 +00:00
Author
Owner

This issue has been moved to the backlog as part of an aggressive grooming of the v3.2.0 milestone. It has been deemed non-critical for the minimal viability of the milestone and will be addressed in a future release.

This issue has been moved to the backlog as part of an aggressive grooming of the v3.2.0 milestone. It has been deemed non-critical for the minimal viability of the milestone and will be addressed in a future release.
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#2924
No description provided.