bug(cli): agents resource list table is missing Sandbox Strategy and Read-only columns #2520

Open
opened 2026-04-03 18:44:55 +00:00 by freemo · 1 comment
Owner

Background and Context

The specification defines the agents resource list output with columns: Name | Type | Sandbox | Read-only. The current implementation in resource_list() renders a table with columns ID | Name | Type | Kind | Location | Description, omitting the Sandbox Strategy and Read-only columns that the spec requires.

The spec (lines 26734, 26824) shows example output such as:

local/api-repo    git-checkout    git_worktree          no
local/staging-db  local/database  transaction_rollback  yes

This means users cannot quickly determine the sandbox isolation strategy or read-only status of a resource from the listing output, which is a usability gap and a spec non-conformance.

Current Behavior

Running agents resource list produces a table with columns:

ID | Name | Type | Kind | Location | Description

Code location: /app/src/cleveragents/cli/commands/resource.py, resource_list() function, lines 794–816:

table = Table(title=f"Resources ({len(resources)} total)")
table.add_column("ID", style="dim")
table.add_column("Name", style="cyan")
table.add_column("Type", style="blue")
table.add_column("Kind", style="magenta")
table.add_column("Location", style="dim")
table.add_column("Description", style="dim")

The Sandbox Strategy and Read-only columns are absent.

Expected Behavior

Per the specification, agents resource list should render a table that includes at minimum:

Name Type Sandbox Read-only
local/api-repo git-checkout git_worktree no
local/staging-db local/database transaction_rollback yes
  • Sandbox Strategy: obtainable from the resource type spec (e.g., spec.sandbox_strategy).
  • Read-only: stored in ResourceModel.read_only DB column; must be surfaced through the domain model and passed through to the CLI layer.

Note

: The Resource domain model does not currently expose read_only directly — it is stored in ResourceModel.read_only but is not propagated to the domain object. That data-model gap may need to be addressed as part of this fix or tracked as a separate issue.

Acceptance Criteria

  • agents resource list output includes a Sandbox column showing the sandbox strategy for each resource's type.
  • agents resource list output includes a Read-only column showing yes/no (or equivalent) for each resource.
  • The Resource domain model (or the service layer) exposes read_only so the CLI can render it.
  • The column layout matches the spec: Name | Type | Sandbox | Read-only (additional columns such as ID or Location are acceptable if they do not replace the required ones).
  • All existing resource list BDD scenarios are updated or extended to assert the new columns.
  • New BDD scenarios cover the Sandbox and Read-only column values for at least two resource types.

Supporting Information

  • Spec reference lines: 26734, 26824 — example resource list tabular output.
  • Existing resource_type list table (lines 341–347 of resource.py) already renders a Sandbox column for resource types — the same approach can be reused for resources.
  • ResourceModel.read_only exists in the DB layer; the domain model gap is a related concern.
  • Parent Epic: #398 (Epic: Post-MVP Resources)

Metadata

  • Branch: fix/resource-list-missing-sandbox-readonly-columns
  • Commit Message: fix(cli): add Sandbox Strategy and Read-only columns to resource list table
  • Milestone: v3.6.0
  • Parent Epic: #398

Subtasks

  • Investigate how sandbox_strategy is exposed on the resource type spec and confirm it is accessible from a Resource domain object.
  • Investigate ResourceModel.read_only propagation path to the domain model; add read_only field to the domain model if missing.
  • Update resource_list() in resource.py to add Sandbox and Read-only columns to the Rich table.
  • Update _resource_dict() helper to include sandbox_strategy and read_only keys for JSON/other format output.
  • Write a TDD issue-capture BDD scenario (in features/) that fails against the current implementation, proving the bug.
  • Update or add BDD scenarios asserting Sandbox and Read-only columns appear in resource list output.
  • Run nox -e typecheck and resolve any type errors introduced by domain model changes.
  • Run nox -e unit_tests and nox -e coverage_report to confirm coverage ≥ 97%.

Definition of Done

  • All subtasks above are checked off.
  • The commit is created with the exact message: fix(cli): add Sandbox Strategy and Read-only columns to resource list table
  • The commit footer includes ISSUES CLOSED: #<this issue number>.
  • The commit is pushed to branch fix/resource-list-missing-sandbox-readonly-columns.
  • A Pull Request is created, reviewed by ≥ 2 contributors, and merged.
  • All nox stages pass (nox -e lint, nox -e typecheck, nox -e unit_tests, nox -e integration_tests).
  • Coverage ≥ 97%.

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

## Background and Context The specification defines the `agents resource list` output with columns: `Name | Type | Sandbox | Read-only`. The current implementation in `resource_list()` renders a table with columns `ID | Name | Type | Kind | Location | Description`, omitting the `Sandbox Strategy` and `Read-only` columns that the spec requires. The spec (lines 26734, 26824) shows example output such as: ``` local/api-repo git-checkout git_worktree no local/staging-db local/database transaction_rollback yes ``` This means users cannot quickly determine the sandbox isolation strategy or read-only status of a resource from the listing output, which is a usability gap and a spec non-conformance. ## Current Behavior Running `agents resource list` produces a table with columns: ``` ID | Name | Type | Kind | Location | Description ``` Code location: `/app/src/cleveragents/cli/commands/resource.py`, `resource_list()` function, lines 794–816: ```python table = Table(title=f"Resources ({len(resources)} total)") table.add_column("ID", style="dim") table.add_column("Name", style="cyan") table.add_column("Type", style="blue") table.add_column("Kind", style="magenta") table.add_column("Location", style="dim") table.add_column("Description", style="dim") ``` The `Sandbox Strategy` and `Read-only` columns are absent. ## Expected Behavior Per the specification, `agents resource list` should render a table that includes at minimum: | Name | Type | Sandbox | Read-only | |------|------|---------|-----------| | local/api-repo | git-checkout | git_worktree | no | | local/staging-db | local/database | transaction_rollback | yes | - **Sandbox Strategy**: obtainable from the resource type spec (e.g., `spec.sandbox_strategy`). - **Read-only**: stored in `ResourceModel.read_only` DB column; must be surfaced through the domain model and passed through to the CLI layer. > **Note**: The `Resource` domain model does not currently expose `read_only` directly — it is stored in `ResourceModel.read_only` but is not propagated to the domain object. That data-model gap may need to be addressed as part of this fix or tracked as a separate issue. ## Acceptance Criteria - [ ] `agents resource list` output includes a `Sandbox` column showing the sandbox strategy for each resource's type. - [ ] `agents resource list` output includes a `Read-only` column showing `yes`/`no` (or equivalent) for each resource. - [ ] The `Resource` domain model (or the service layer) exposes `read_only` so the CLI can render it. - [ ] The column layout matches the spec: `Name | Type | Sandbox | Read-only` (additional columns such as `ID` or `Location` are acceptable if they do not replace the required ones). - [ ] All existing `resource list` BDD scenarios are updated or extended to assert the new columns. - [ ] New BDD scenarios cover the `Sandbox` and `Read-only` column values for at least two resource types. ## Supporting Information - Spec reference lines: 26734, 26824 — example `resource list` tabular output. - Existing `resource_type list` table (lines 341–347 of `resource.py`) already renders a `Sandbox` column for resource *types* — the same approach can be reused for resources. - `ResourceModel.read_only` exists in the DB layer; the domain model gap is a related concern. - Parent Epic: #398 (Epic: Post-MVP Resources) --- ## Metadata - **Branch**: `fix/resource-list-missing-sandbox-readonly-columns` - **Commit Message**: `fix(cli): add Sandbox Strategy and Read-only columns to resource list table` - **Milestone**: v3.6.0 - **Parent Epic**: #398 ## Subtasks - [ ] Investigate how `sandbox_strategy` is exposed on the resource type spec and confirm it is accessible from a `Resource` domain object. - [ ] Investigate `ResourceModel.read_only` propagation path to the domain model; add `read_only` field to the domain model if missing. - [ ] Update `resource_list()` in `resource.py` to add `Sandbox` and `Read-only` columns to the Rich table. - [ ] Update `_resource_dict()` helper to include `sandbox_strategy` and `read_only` keys for JSON/other format output. - [ ] Write a TDD issue-capture BDD scenario (in `features/`) that fails against the current implementation, proving the bug. - [ ] Update or add BDD scenarios asserting `Sandbox` and `Read-only` columns appear in `resource list` output. - [ ] Run `nox -e typecheck` and resolve any type errors introduced by domain model changes. - [ ] Run `nox -e unit_tests` and `nox -e coverage_report` to confirm coverage ≥ 97%. ## Definition of Done - [ ] All subtasks above are checked off. - [ ] The commit is created with the exact message: `fix(cli): add Sandbox Strategy and Read-only columns to resource list table` - [ ] The commit footer includes `ISSUES CLOSED: #<this issue number>`. - [ ] The commit is pushed to branch `fix/resource-list-missing-sandbox-readonly-columns`. - [ ] A Pull Request is created, reviewed by ≥ 2 contributors, and merged. - [ ] All nox stages pass (`nox -e lint`, `nox -e typecheck`, `nox -e unit_tests`, `nox -e integration_tests`). - [ ] 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-03 18:45:00 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • MoSCoW: Should Have — Spec compliance or quality improvement that should be included in the milestone.

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

Issue triaged by project owner: - **State**: Verified - **MoSCoW**: Should Have — Spec compliance or quality improvement that should be included in the milestone. --- **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#2520
No description provided.