UAT: bug(resource-registry): devcontainer-instance built-in type incorrectly marked user_addable=True #2938

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

Metadata

  • Commit Message: fix(resource-registry): set devcontainer-instance user_addable=False as per spec
  • Branch: bugfix/devcontainer-instance-user-addable
  • Parent Epic: #353
  • Milestone: v3.1.0

Background and Context

The spec states that devcontainer-instance is auto-discovered, not user-addable:

Devcontainer: Auto-discovered when a git-checkout or fs-directory resource contains a .devcontainer/ directory. Represented as a devcontainer-instance resource type that inherits from container-instance. Uses lazy activation — the container is only built when first needed by a plan. See [ADR-043].

The spec also states that auto-discovered child resources are not user-addable:

User addable: Whether users can create instances of this type directly via agents resource add <type>. Types with user_addable: false are only generated as auto-discovered children of other resources.

Current Behavior

In src/cleveragents/application/services/_resource_registry_data.py, devcontainer-instance is defined with user_addable: True:

{
    "name": "devcontainer-instance",
    "description": (
        "A devcontainer execution environment auto-discovered "
        "from .devcontainer/ configuration."
    ),
    "resource_kind": "physical",
    "sandbox_strategy": "snapshot",
    "user_addable": True,   # ← WRONG: should be False per spec
    "built_in": True,
    "inherits": "container-instance",
    ...
}

This means users can run agents resource add devcontainer-instance directly, bypassing the auto-discovery mechanism. This could create orphaned devcontainer-instance resources not linked to any git-checkout or fs-directory parent, breaking the DAG invariant.

Expected Behavior

devcontainer-instance should have user_addable: False. It should only be created by the auto-discovery engine when a .devcontainer/ directory is found in a git-checkout or fs-directory resource.

"user_addable": False,  # Auto-discovered only

Acceptance Criteria

  • devcontainer-instance built-in type has user_addable: False
  • agents resource add devcontainer-instance is rejected with a clear error message
  • Auto-discovery still creates devcontainer-instance resources correctly
  • Unit tests verify user_addable=False for devcontainer-instance

Subtasks

  • Set user_addable: False for devcontainer-instance in _resource_registry_data.py
  • Verify CLI agents resource add correctly rejects non-user-addable types
  • Add unit tests for the corrected user_addable flag
  • 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): set devcontainer-instance user_addable=False as per spec` - **Branch**: `bugfix/devcontainer-instance-user-addable` - **Parent Epic**: #353 - **Milestone**: v3.1.0 ## Background and Context The spec states that `devcontainer-instance` is auto-discovered, not user-addable: > **Devcontainer**: Auto-discovered when a `git-checkout` or `fs-directory` resource contains a `.devcontainer/` directory. Represented as a `devcontainer-instance` resource type that inherits from `container-instance`. Uses lazy activation — the container is only built when first needed by a plan. See [ADR-043]. The spec also states that auto-discovered child resources are not user-addable: > **User addable**: Whether users can create instances of this type directly via `agents resource add <type>`. Types with `user_addable: false` are only generated as auto-discovered children of other resources. ## Current Behavior In `src/cleveragents/application/services/_resource_registry_data.py`, `devcontainer-instance` is defined with `user_addable: True`: ```python { "name": "devcontainer-instance", "description": ( "A devcontainer execution environment auto-discovered " "from .devcontainer/ configuration." ), "resource_kind": "physical", "sandbox_strategy": "snapshot", "user_addable": True, # ← WRONG: should be False per spec "built_in": True, "inherits": "container-instance", ... } ``` This means users can run `agents resource add devcontainer-instance` directly, bypassing the auto-discovery mechanism. This could create orphaned `devcontainer-instance` resources not linked to any `git-checkout` or `fs-directory` parent, breaking the DAG invariant. ## Expected Behavior `devcontainer-instance` should have `user_addable: False`. It should only be created by the auto-discovery engine when a `.devcontainer/` directory is found in a `git-checkout` or `fs-directory` resource. ```python "user_addable": False, # Auto-discovered only ``` ## Acceptance Criteria - [ ] `devcontainer-instance` built-in type has `user_addable: False` - [ ] `agents resource add devcontainer-instance` is rejected with a clear error message - [ ] Auto-discovery still creates `devcontainer-instance` resources correctly - [ ] Unit tests verify `user_addable=False` for `devcontainer-instance` ## Subtasks - [ ] Set `user_addable: False` for `devcontainer-instance` in `_resource_registry_data.py` - [ ] Verify CLI `agents resource add` correctly rejects non-user-addable types - [ ] Add unit tests for the corrected `user_addable` flag - [ ] 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:25 +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:12 +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#2938
No description provided.