UAT: agents resource list missing devcontainer lifecycle state column — spec requires detected (not built) status for devcontainer-instance resources #2596

Closed
opened 2026-04-03 19:04:18 +00:00 by freemo · 3 comments
Owner

Bug Report

What Was Tested

The agents resource list command output for devcontainer-instance resources.

Expected Behavior (from spec)

The specification (line 10726) shows the expected output for agents resource list when a devcontainer-instance is present:

│ 01HXR5E6F7GA…   devcontainer-instance   detected (not built)       │

And the plain-text format (line 10845):

01HXR5E6F7GA..   devcontainer-instance   detected (not built)

The Type column should show the lifecycle state alongside the type name for devcontainer-instance resources (e.g., detected (not built), running, stopped, failed).

Additionally, the spec (line 10732) shows a warning banner:

⚠ Devcontainer detected at .devcontainer/devcontainer.json

Actual Behavior

The resource_list() function in src/cleveragents/cli/commands/resource.py (lines 800–830) renders a table with columns: ID, Name, Type, Kind, Location, Description.

The Type column shows only the resource type name (e.g., devcontainer-instance) with no lifecycle state. The lifecycle state from get_lifecycle_tracker() is never consulted during list rendering.

table.add_row(
    res_id,
    res.name or "(unnamed)",
    res.resource_type_name,  # ← just the type name, no lifecycle state
    str(res.classification),
    res.location or "",
    desc,
)

Code Location

  • File: src/cleveragents/cli/commands/resource.py
  • Lines: 800–830 (resource_list() table rendering)
  • Import available: get_lifecycle_tracker is already imported (line 81) but not used in resource_list()

Steps to Reproduce

  1. Add a git-checkout resource that contains a .devcontainer/devcontainer.json
  2. Run agents resource list --all
  3. Observe: the devcontainer-instance shows only devcontainer-instance in the Type column, not devcontainer-instance detected (not built)

Severity

Medium — The lifecycle state is important for users to understand whether a devcontainer has been built and is running. Without it, users cannot distinguish between a freshly-detected (not built) container and a running one from the list view.

Subtasks

  • Update resource_list() to call get_lifecycle_tracker() for devcontainer-instance resources
  • Display lifecycle state alongside type name (e.g., devcontainer-instance (detected))
  • Add warning banner when devcontainer is in detected state
  • Update JSON/YAML output to include lifecycle_state field for container resources
  • Add unit tests for lifecycle state display in resource list

Definition of Done

  • agents resource list shows lifecycle state for devcontainer-instance resources
  • detected (not built) state is shown for newly-discovered devcontainers
  • running, stopped, failed states are shown for containers in those states
  • Warning banner is shown when devcontainer is detected but not built
  • Tests pass at unit and integration levels

Metadata

Commit message: feat(cli): show devcontainer lifecycle state in agents resource list
Branch: feat/resource-list-lifecycle-state

Parent Epic: #825 (ResourceHandler Protocol Completion)


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

## Bug Report ### What Was Tested The `agents resource list` command output for `devcontainer-instance` resources. ### Expected Behavior (from spec) The specification (line 10726) shows the expected output for `agents resource list` when a devcontainer-instance is present: ``` │ 01HXR5E6F7GA… devcontainer-instance detected (not built) │ ``` And the plain-text format (line 10845): ``` 01HXR5E6F7GA.. devcontainer-instance detected (not built) ``` The `Type` column should show the lifecycle state alongside the type name for devcontainer-instance resources (e.g., `detected (not built)`, `running`, `stopped`, `failed`). Additionally, the spec (line 10732) shows a warning banner: ``` ⚠ Devcontainer detected at .devcontainer/devcontainer.json ``` ### Actual Behavior The `resource_list()` function in `src/cleveragents/cli/commands/resource.py` (lines 800–830) renders a table with columns: ID, Name, Type, Kind, Location, Description. The `Type` column shows only the resource type name (e.g., `devcontainer-instance`) with no lifecycle state. The lifecycle state from `get_lifecycle_tracker()` is never consulted during list rendering. ```python table.add_row( res_id, res.name or "(unnamed)", res.resource_type_name, # ← just the type name, no lifecycle state str(res.classification), res.location or "", desc, ) ``` ### Code Location - **File**: `src/cleveragents/cli/commands/resource.py` - **Lines**: 800–830 (`resource_list()` table rendering) - **Import available**: `get_lifecycle_tracker` is already imported (line 81) but not used in `resource_list()` ### Steps to Reproduce 1. Add a git-checkout resource that contains a `.devcontainer/devcontainer.json` 2. Run `agents resource list --all` 3. Observe: the devcontainer-instance shows only `devcontainer-instance` in the Type column, not `devcontainer-instance detected (not built)` ### Severity **Medium** — The lifecycle state is important for users to understand whether a devcontainer has been built and is running. Without it, users cannot distinguish between a freshly-detected (not built) container and a running one from the list view. ### Subtasks - [ ] Update `resource_list()` to call `get_lifecycle_tracker()` for `devcontainer-instance` resources - [ ] Display lifecycle state alongside type name (e.g., `devcontainer-instance (detected)`) - [ ] Add warning banner when devcontainer is in `detected` state - [ ] Update JSON/YAML output to include `lifecycle_state` field for container resources - [ ] Add unit tests for lifecycle state display in resource list ### Definition of Done - `agents resource list` shows lifecycle state for devcontainer-instance resources - `detected (not built)` state is shown for newly-discovered devcontainers - `running`, `stopped`, `failed` states are shown for containers in those states - Warning banner is shown when devcontainer is detected but not built - Tests pass at unit and integration levels ### Metadata **Commit message**: `feat(cli): show devcontainer lifecycle state in agents resource list` **Branch**: `feat/resource-list-lifecycle-state` **Parent Epic**: #825 (ResourceHandler Protocol Completion) --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • MoSCoW: Should Have

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

Issue triaged by project owner: - **State**: Verified - **MoSCoW**: Should Have --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
freemo added this to the v3.6.0 milestone 2026-04-05 04:53:15 +00:00
Author
Owner

Starting implementation on branch feat/resource-list-lifecycle-state.

Difficulty assessment: Medium → starting at sonnet tier.

Plan:

  1. Update resource_list() in src/cleveragents/cli/commands/resource.py to call get_lifecycle_tracker() for devcontainer-instance resources
  2. Display lifecycle state alongside type name (e.g., devcontainer-instance (detected))
  3. Add warning banner when devcontainer is in detected state
  4. Update JSON/YAML output to include lifecycle_state field
  5. Add unit tests for lifecycle state display

Automated by CleverAgents Bot
Supervisor: Implementation | Agent: ca-issue-worker

Starting implementation on branch `feat/resource-list-lifecycle-state`. Difficulty assessment: Medium → starting at sonnet tier. **Plan:** 1. Update `resource_list()` in `src/cleveragents/cli/commands/resource.py` to call `get_lifecycle_tracker()` for `devcontainer-instance` resources 2. Display lifecycle state alongside type name (e.g., `devcontainer-instance (detected)`) 3. Add warning banner when devcontainer is in `detected` state 4. Update JSON/YAML output to include `lifecycle_state` field 5. Add unit tests for lifecycle state display --- **Automated by CleverAgents Bot** Supervisor: Implementation | Agent: ca-issue-worker
Author
Owner

All subtasks complete. Quality gates passed. Creating PR.

Implementation summary:

  • Subtask 1: Updated resource_list() to call get_lifecycle_tracker() for devcontainer-instance resources
  • Subtask 2: Display lifecycle state alongside type name in new "State" column (e.g., detected (not built))
  • Subtask 3: Added warning banner ⚠ Devcontainer detected at .devcontainer/devcontainer.json when devcontainer is in detected state
  • Subtask 4: Updated JSON/YAML output to include lifecycle_state field (null for non-container resources)
  • Subtask 5: Added BDD feature file with 11 scenarios and step definitions

Quality gates: lint | format | typecheck

PR #3297 created on branch feat/resource-list-lifecycle-state. PR review and merge handled by continuous review stream.


Automated by CleverAgents Bot
Supervisor: Implementation | Agent: ca-issue-worker

All subtasks complete. Quality gates passed. Creating PR. **Implementation summary:** - ✅ Subtask 1: Updated `resource_list()` to call `get_lifecycle_tracker()` for `devcontainer-instance` resources - ✅ Subtask 2: Display lifecycle state alongside type name in new "State" column (e.g., `detected (not built)`) - ✅ Subtask 3: Added warning banner `⚠ Devcontainer detected at .devcontainer/devcontainer.json` when devcontainer is in `detected` state - ✅ Subtask 4: Updated JSON/YAML output to include `lifecycle_state` field (null for non-container resources) - ✅ Subtask 5: Added BDD feature file with 11 scenarios and step definitions **Quality gates:** lint ✅ | format ✅ | typecheck ✅ PR #3297 created on branch `feat/resource-list-lifecycle-state`. PR review and merge handled by continuous review stream. --- **Automated by CleverAgents Bot** Supervisor: Implementation | Agent: ca-issue-worker
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#2596
No description provided.