fix(resources): delete executable.yaml, fix resource list columns, update docs
CI / push-validation (pull_request) Successful in 20s
CI / lint (pull_request) Successful in 38s
CI / build (pull_request) Successful in 31s
CI / helm (pull_request) Successful in 34s
CI / quality (pull_request) Successful in 59s
CI / typecheck (pull_request) Successful in 1m7s
CI / security (pull_request) Successful in 1m14s
CI / unit_tests (pull_request) Successful in 5m39s
CI / docker (pull_request) Successful in 1m28s
CI / coverage (pull_request) Successful in 12m39s
CI / integration_tests (pull_request) Successful in 27m48s
CI / status-check (pull_request) Successful in 2s
CI / push-validation (pull_request) Successful in 20s
CI / lint (pull_request) Successful in 38s
CI / build (pull_request) Successful in 31s
CI / helm (pull_request) Successful in 34s
CI / quality (pull_request) Successful in 59s
CI / typecheck (pull_request) Successful in 1m7s
CI / security (pull_request) Successful in 1m14s
CI / unit_tests (pull_request) Successful in 5m39s
CI / docker (pull_request) Successful in 1m28s
CI / coverage (pull_request) Successful in 12m39s
CI / integration_tests (pull_request) Successful in 27m48s
CI / status-check (pull_request) Successful in 2s
- Delete examples/resource-types/executable.yaml (orphaned artifact referencing non-existent ExecutableHandler; flagged in 4 prior reviews as blocking) - Update agents resource list CLI columns from [ID, Name, Type, Status, Kind, Location, Description] to spec-required [Name, ID, Type, Phys/Virt, Children, Projects] per specification line 11051 - Lifecycle state for container resources now shown as a note below the table - Update resource_list_lifecycle_state.feature to remove Status column header assertions; add spec-column header scenario - Add BDD scenario in resource_cli.feature verifying new column headers - Update CHANGELOG.md and CONTRIBUTORS.md ISSUES CLOSED: #3077
This commit is contained in:
@@ -6,6 +6,7 @@ Changed `wf10_batch.robot` to be less likely to create files, and
|
||||
`plan_generation_graph.robot` to give more test answers.
|
||||
|
||||
## [Unreleased]
|
||||
- **fix(resources): remove unsupported executable resource type and fix resource list columns** (#3077 / PR #3248): Removed `executable` from `LSP_RESOURCE_TYPES` and `BUILTIN_TYPE_NAMES` (the specification defines no such built-in type). Updated `agents resource list` CLI table columns from `[ID, Name, Type, Status, Kind, Location, Description]` to the spec-required `[Name, ID, Type, Phys/Virt, Children, Projects]`. Deleted orphaned `examples/resource-types/executable.yaml`. Lifecycle state for container resources is now displayed as a note below the resource table.
|
||||
- **fix(cli): add Read-Only and Writes columns to tool list output** (#1476): Rewrote
|
||||
`list_tools()` in `src/cleveragents/cli/commands/tool.py` to render exactly the 5
|
||||
spec-required columns (Name, Type, Source, Read-Only, Writes), removed the legacy
|
||||
|
||||
@@ -55,3 +55,4 @@ Below are some of the specific details of various contributions.
|
||||
dropped. Includes Behave BDD and Robot Framework regression tests.
|
||||
* HAL 9000 has contributed the config-actor combined-format support fix (PR #11232 / issue #11189): added ``_detect_nested_config_actor()``, ``_flatten_config_actor()``, and handling in ``ActorConfiguration.from_blob()`` to transparently flatten the nested ``config.actor`` block from both compact-string and nested-dict forms so v3 detection, schema validation, and canonicalisation see flat data — eliminating the ``"provider is required"`` crash.
|
||||
* HAL 9000 has contributed the actor compiler `actor_ref` field fix (issue #1429): corrected `_map_node()` and `compile_actor()` in `src/cleveragents/actor/compiler.py` to read `actor_ref` from the top-level `NodeDefinition.actor_ref` field instead of `node.config.get("actor_ref")`, resolving silent failures on all SUBGRAPH nodes where `subgraph_refs` was always empty and `NodeConfig.subgraph` was always `None`.
|
||||
* HAL 9000 has contributed the removal of the unsupported executable resource type (PR #3248 / issue #3077): removed `executable` from `LSP_RESOURCE_TYPES` and `BUILTIN_TYPE_NAMES`, updated `agents resource list` CLI table columns to the spec-required `[Name, ID, Type, Phys/Virt, Children, Projects]`, deleted orphaned `examples/resource-types/executable.yaml`, and updated related BDD test coverage.
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
# Spec reference: docs/adr/ADR-039-container-resource-types.md lines 207-226
|
||||
schema_version: "1.0"
|
||||
name: executable
|
||||
description: "System executable (language runtime, compiler, LSP server binary). Discovered from container or host PATH."
|
||||
resource_kind: physical
|
||||
sandbox_strategy: none
|
||||
user_addable: true
|
||||
built_in: true
|
||||
cli_args:
|
||||
- name: path
|
||||
type: string
|
||||
required: true
|
||||
description: Absolute path to the executable
|
||||
- name: version
|
||||
type: string
|
||||
required: false
|
||||
description: Executable version if detectable
|
||||
parent_types: ["container-exec-env", "fs-directory"]
|
||||
child_types: []
|
||||
handler: "cleveragents.resource.handlers.executable:ExecutableHandler"
|
||||
auto_discovery:
|
||||
trigger_types: ["container-exec-env", "fs-directory"]
|
||||
scan_paths: []
|
||||
lazy: true
|
||||
capabilities:
|
||||
read: true
|
||||
write: false
|
||||
sandbox: false
|
||||
checkpoint: false
|
||||
@@ -102,6 +102,14 @@ Feature: Resource CLI commands
|
||||
When I run resource list with format "json"
|
||||
Then the resource output should be valid JSON
|
||||
|
||||
Scenario: List resources shows spec-required columns
|
||||
Given built-in types are bootstrapped
|
||||
And I run resource add "git-checkout" "local/col-test" with path "/tmp/ctest"
|
||||
When I run resource list
|
||||
Then the resource output should contain "Phys/Virt"
|
||||
And the resource output should contain "Children"
|
||||
And the resource output should contain "Projects"
|
||||
|
||||
# ---- Resource Show ----
|
||||
|
||||
Scenario: Show a resource by name
|
||||
|
||||
@@ -7,10 +7,12 @@ Feature: agents resource list shows devcontainer lifecycle state column
|
||||
Given a fresh in-memory resource registry
|
||||
And built-in types are bootstrapped
|
||||
|
||||
Scenario: resource list shows "Status" column header
|
||||
Scenario: resource list shows spec-required column headers
|
||||
Given a devcontainer-instance resource is registered
|
||||
When I run resource list with all flag
|
||||
Then the resource output should contain "Status"
|
||||
Then the resource output should contain "Phys/Virt"
|
||||
And the resource output should contain "Children"
|
||||
And the resource output should contain "Projects"
|
||||
|
||||
Scenario: resource list shows "detected (not built)" for a new devcontainer-instance
|
||||
Given a devcontainer-instance resource is registered
|
||||
@@ -68,8 +70,7 @@ Feature: agents resource list shows devcontainer lifecycle state column
|
||||
Scenario: resource list shows lifecycle state for container-instance resources
|
||||
Given a container-instance resource is registered
|
||||
When I run resource list with all flag
|
||||
Then the resource output should contain "Status"
|
||||
And the resource output should contain "detected (not built)"
|
||||
Then the resource output should contain "detected (not built)"
|
||||
|
||||
Scenario: resource list succeeds gracefully when lifecycle tracker raises an error
|
||||
Given a devcontainer-instance resource is registered
|
||||
|
||||
@@ -860,37 +860,40 @@ def resource_list(
|
||||
return
|
||||
|
||||
table = Table(title=f"Resources ({len(resources)} total)")
|
||||
table.add_column("ID", style="dim")
|
||||
table.add_column("Name", style="cyan")
|
||||
table.add_column("ID", style="dim")
|
||||
table.add_column("Type", style="blue")
|
||||
table.add_column("Status", style="yellow")
|
||||
table.add_column("Kind", style="magenta")
|
||||
table.add_column("Location", style="dim")
|
||||
table.add_column("Description", style="dim")
|
||||
table.add_column("Phys/Virt", style="magenta")
|
||||
table.add_column("Children", justify="right")
|
||||
table.add_column("Projects", justify="right")
|
||||
|
||||
detected_devcontainers: list[Any] = []
|
||||
lifecycle_states: list[tuple[Any, str]] = []
|
||||
for res in resources:
|
||||
desc = res.description or ""
|
||||
if len(desc) > 40:
|
||||
desc = desc[:37] + "..."
|
||||
res_id = res.resource_id
|
||||
if len(res_id) > 12:
|
||||
res_id = res_id[:12] + "..."
|
||||
lifecycle_state = _get_lifecycle_state_str(res)
|
||||
if lifecycle_state == "detected (not built)":
|
||||
detected_devcontainers.append(res)
|
||||
if lifecycle_state:
|
||||
lifecycle_states.append((res, lifecycle_state))
|
||||
table.add_row(
|
||||
res_id,
|
||||
res.name or "(unnamed)",
|
||||
res_id,
|
||||
res.resource_type_name,
|
||||
lifecycle_state or "",
|
||||
str(res.classification),
|
||||
res.location or "",
|
||||
desc,
|
||||
str(len(res.children)),
|
||||
str(len(res.linked_projects)),
|
||||
)
|
||||
|
||||
console.print(table)
|
||||
|
||||
for res, state in lifecycle_states:
|
||||
style = "yellow" if state in ("detected (not built)", "failed") else "blue"
|
||||
label = res.name or res.resource_id
|
||||
console.print(f"[{style}] {label}: {state}[/{style}]")
|
||||
|
||||
for res in detected_devcontainers:
|
||||
location = res.location or "(unknown path)"
|
||||
devcontainer_json = f"{location}/.devcontainer/devcontainer.json"
|
||||
|
||||
Reference in New Issue
Block a user