UAT: Devcontainer auto-discovery never creates child resource #6965

Open
opened 2026-04-10 06:05:19 +00:00 by HAL9000 · 0 comments
Owner

What was tested

  • Resource Registry auto-discovery for devcontainer support (spec §Resource System > Auto-discovery, lines 24960-24986)
  • Registered a git-checkout resource pointing at a workspace that contains .devcontainer/devcontainer.json

Expected behavior

  • During agents resource add git-checkout ... the handler should scan the checkout, detect .devcontainer/devcontainer.json, and automatically create/link a devcontainer-instance child resource in discovered state (per spec and ADR-043).

Actual behavior

  • Only the user-specified git-checkout resource is stored. Listing resources with include_auto_discovered=True still returns a single entry and no devcontainer-instance child is created.

Steps to reproduce

  1. Launch an interactive Python shell with project dependencies available.
  2. Run the snippet below (uses the in-memory SQLite backend and the resource registry service):
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from cleveragents.infrastructure.database.models import Base
from cleveragents.application.services.resource_registry_service import ResourceRegistryService
import tempfile, os

engine = create_engine('sqlite:///:memory:', future=True)
Base.metadata.create_all(engine)
Session = sessionmaker(bind=engine, expire_on_commit=False)
svc = ResourceRegistryService(session_factory=Session)

root = tempfile.mkdtemp(prefix='uat-resource-system-')
os.makedirs(os.path.join(root, '.devcontainer'), exist_ok=True)
with open(os.path.join(root, '.devcontainer', 'devcontainer.json'), 'w', encoding='utf-8') as f:
    f.write('{"name": "demo", "image": "node:18"}')

svc.register_resource('git-checkout', 'local/demo-repo', location=root)
print(svc.list_resources(include_auto_discovered=True))
  1. The printed list contains only the git-checkout resource; no devcontainer child appears.

Code location

  • src/cleveragents/application/services/resource_registry_service.pyregister_resource() persists the resource but never invokes handler-based auto-discovery.
  • src/cleveragents/infrastructure/database/repositories.py:auto_discover_children() only supports rules-based discovery and ignores the trigger_types/scan_paths schema used by the built-in devcontainer-instance type.
## What was tested - Resource Registry auto-discovery for devcontainer support (spec §Resource System > Auto-discovery, lines 24960-24986) - Registered a `git-checkout` resource pointing at a workspace that contains `.devcontainer/devcontainer.json` ## Expected behavior - During `agents resource add git-checkout ...` the handler should scan the checkout, detect `.devcontainer/devcontainer.json`, and automatically create/link a `devcontainer-instance` child resource in `discovered` state (per spec and ADR-043). ## Actual behavior - Only the user-specified `git-checkout` resource is stored. Listing resources with `include_auto_discovered=True` still returns a single entry and no `devcontainer-instance` child is created. ## Steps to reproduce 1. Launch an interactive Python shell with project dependencies available. 2. Run the snippet below (uses the in-memory SQLite backend and the resource registry service): ```python from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from cleveragents.infrastructure.database.models import Base from cleveragents.application.services.resource_registry_service import ResourceRegistryService import tempfile, os engine = create_engine('sqlite:///:memory:', future=True) Base.metadata.create_all(engine) Session = sessionmaker(bind=engine, expire_on_commit=False) svc = ResourceRegistryService(session_factory=Session) root = tempfile.mkdtemp(prefix='uat-resource-system-') os.makedirs(os.path.join(root, '.devcontainer'), exist_ok=True) with open(os.path.join(root, '.devcontainer', 'devcontainer.json'), 'w', encoding='utf-8') as f: f.write('{"name": "demo", "image": "node:18"}') svc.register_resource('git-checkout', 'local/demo-repo', location=root) print(svc.list_resources(include_auto_discovered=True)) ``` 3. The printed list contains only the `git-checkout` resource; no devcontainer child appears. ## Code location - `src/cleveragents/application/services/resource_registry_service.py` — `register_resource()` persists the resource but never invokes handler-based auto-discovery. - `src/cleveragents/infrastructure/database/repositories.py:auto_discover_children()` only supports `rules`-based discovery and ignores the `trigger_types`/`scan_paths` schema used by the built-in `devcontainer-instance` type.
HAL9000 self-assigned this 2026-04-10 06:21:48 +00:00
HAL9000 added this to the v3.5.0 milestone 2026-04-10 06:21:48 +00:00
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#6965
No description provided.