fix(resources): register fs-mount built-in resource type at startup #3187

Merged
freemo merged 1 commit from fix/resource-registry-fs-mount-missing-builtin-type into master 2026-04-05 21:13:17 +00:00
Owner

Summary

Fixes #2911fs-mount was listed in BUILTIN_TYPE_NAMES (the validation frozenset) but had no corresponding type definition in BUILTIN_TYPES, so it was never registered at startup.

Root Cause

_GIT_FS_CONTAINER_TYPES in _resource_registry_data.py was missing the fs-mount entry. The type existed in the validation set but had no definition, causing:

  • agents resource type list to omit fs-mount
  • agents resource add fs-mount ... to fail with "Resource type not found"
  • fs-directory unable to reference fs-mount as a parent type

Changes

src/cleveragents/application/services/_resource_registry_data.py

  • Added fs-mount definition to _GIT_FS_CONTAINER_TYPES with all required fields:
    • resource_kind: physical, sandbox_strategy: copy_on_write
    • user_addable: True, cli_args: [path]
    • parent_types: [], child_types: [fs-directory]
    • auto_discovery with fs-directory rule
    • handler: cleveragents.resource.handlers.fs_mount:FsMountHandler
    • capabilities: read/write/sandbox=True, checkpoint=False
  • Added fs-mount to fs-directory's parent_types so fs-directory resources can be nested under an fs-mount

features/resource_type_bootstrap_fs_mount.feature (new)

  • 6 BDD scenarios covering: registration, user_addable, child_types, parent_types, resource add success, and fs-directory parent resolution

features/steps/resource_type_bootstrap_fs_steps.py

  • Added step definitions for new assertions: user_addable, child_types, parent_types

robot/resource_type_bootstrap_fs_mount.robot (new)

  • 4 Robot Framework integration tests covering all acceptance criteria end-to-end

Test Results

  • Lint: ruff check — all checks passed
  • Typecheck: pyright — 0 errors, 0 warnings
  • BDD unit tests: 6/6 new scenarios pass, existing fs/registry tests unaffected
  • Robot Framework: 4/4 new integration tests pass, existing fs bootstrap tests unaffected

Closes #2911


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

## Summary Fixes #2911 — `fs-mount` was listed in `BUILTIN_TYPE_NAMES` (the validation frozenset) but had no corresponding type definition in `BUILTIN_TYPES`, so it was never registered at startup. ### Root Cause `_GIT_FS_CONTAINER_TYPES` in `_resource_registry_data.py` was missing the `fs-mount` entry. The type existed in the validation set but had no definition, causing: - `agents resource type list` to omit `fs-mount` - `agents resource add fs-mount ...` to fail with "Resource type not found" - `fs-directory` unable to reference `fs-mount` as a parent type ### Changes **`src/cleveragents/application/services/_resource_registry_data.py`** - Added `fs-mount` definition to `_GIT_FS_CONTAINER_TYPES` with all required fields: - `resource_kind: physical`, `sandbox_strategy: copy_on_write` - `user_addable: True`, `cli_args: [path]` - `parent_types: []`, `child_types: [fs-directory]` - `auto_discovery` with `fs-directory` rule - `handler: cleveragents.resource.handlers.fs_mount:FsMountHandler` - `capabilities: read/write/sandbox=True, checkpoint=False` - Added `fs-mount` to `fs-directory`'s `parent_types` so `fs-directory` resources can be nested under an `fs-mount` **`features/resource_type_bootstrap_fs_mount.feature`** (new) - 6 BDD scenarios covering: registration, user_addable, child_types, parent_types, resource add success, and fs-directory parent resolution **`features/steps/resource_type_bootstrap_fs_steps.py`** - Added step definitions for new assertions: `user_addable`, `child_types`, `parent_types` **`robot/resource_type_bootstrap_fs_mount.robot`** (new) - 4 Robot Framework integration tests covering all acceptance criteria end-to-end ### Test Results - ✅ Lint: `ruff check` — all checks passed - ✅ Typecheck: `pyright` — 0 errors, 0 warnings - ✅ BDD unit tests: 6/6 new scenarios pass, existing fs/registry tests unaffected - ✅ Robot Framework: 4/4 new integration tests pass, existing fs bootstrap tests unaffected Closes #2911 --- **Automated by CleverAgents Bot** Supervisor: Implementation | Agent: ca-issue-worker
fix(resources): register fs-mount built-in resource type at startup
All checks were successful
CI / lint (pull_request) Successful in 31s
CI / typecheck (pull_request) Successful in 49s
CI / quality (pull_request) Successful in 48s
CI / security (pull_request) Successful in 56s
CI / build (pull_request) Successful in 17s
CI / helm (pull_request) Successful in 25s
CI / unit_tests (pull_request) Successful in 6m44s
CI / e2e_tests (pull_request) Successful in 19m27s
CI / integration_tests (pull_request) Successful in 22m41s
CI / coverage (pull_request) Successful in 11m4s
CI / docker (pull_request) Successful in 1m24s
CI / status-check (pull_request) Successful in 2s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 57m3s
f373e3a527
Add fs-mount ResourceTypeDefinition to _GIT_FS_CONTAINER_TYPES in
_resource_registry_data.py so that bootstrap_builtin_types() seeds it
into the registry at startup.

The fs-mount type was listed in BUILTIN_TYPE_NAMES (validation frozenset)
but had no corresponding type definition in BUILTIN_TYPES, causing:
- 'agents resource type list' to omit fs-mount
- 'agents resource add fs-mount ...' to fail with 'Resource type not found'
- fs-directory to be unable to reference fs-mount as a parent type

Changes:
- Add fs-mount definition to _GIT_FS_CONTAINER_TYPES with correct fields:
  name, description, resource_kind=physical, sandbox_strategy=copy_on_write,
  user_addable=True, cli_args=[path], parent_types=[], child_types=[fs-directory],
  auto_discovery with fs-directory rule, handler=fs_mount:FsMountHandler,
  capabilities (read/write/sandbox=True, checkpoint=False)
- Add fs-mount to fs-directory's parent_types so fs-directory can be
  nested under an fs-mount resource
- Add BDD scenarios in resource_type_bootstrap_fs_mount.feature covering
  registration, user_addable, child_types, parent_types, resource add,
  and fs-directory parent resolution
- Add Robot Framework integration tests in resource_type_bootstrap_fs_mount.robot
  covering all four acceptance criteria end-to-end

ISSUES CLOSED: #2911
Author
Owner

🔒 Review claimed by reviewer-pool-1 [claim-token: reviewer-pool-1-3187-1743897600]


Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-continuous-pr-reviewer

🔒 Review claimed by reviewer-pool-1 [claim-token: reviewer-pool-1-3187-1743897600] --- **Automated by CleverAgents Bot** Supervisor: PR Review | Agent: ca-continuous-pr-reviewer
freemo left a comment

Code Review — LGTM

PR: fix(resources): register fs-mount built-in resource type at startup

Review Checklist

Correctness: fs-mount was in BUILTIN_TYPE_NAMES but missing from BUILTIN_TYPES. Fix adds complete definition with all required fields.

Test Coverage: 6 BDD scenarios + 4 Robot Framework integration tests. Both test layers present as required.

Type Safety: No # type: ignore. Pyright passes with 0 errors.

Commit Format: fix(resources): follows Conventional Changelog format.

Bidirectional linking: fs-mount added to fs-directory's parent_types — correct.

Issues Noted (Non-blocking)

  • ⚠️ Missing milestone — Please assign to the appropriate milestone.
  • ⚠️ Missing Type/ label — Please add Type/Bug.

Decision: LGTM — Proceeding to merge when CI passes.


Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-continuous-pr-reviewer

## Code Review — LGTM ✅ **PR:** fix(resources): register fs-mount built-in resource type at startup ### Review Checklist **✅ Correctness:** `fs-mount` was in `BUILTIN_TYPE_NAMES` but missing from `BUILTIN_TYPES`. Fix adds complete definition with all required fields. **✅ Test Coverage:** 6 BDD scenarios + 4 Robot Framework integration tests. Both test layers present as required. **✅ Type Safety:** No `# type: ignore`. Pyright passes with 0 errors. **✅ Commit Format:** `fix(resources):` follows Conventional Changelog format. **✅ Bidirectional linking:** `fs-mount` added to `fs-directory`'s `parent_types` — correct. ### Issues Noted (Non-blocking) - ⚠️ **Missing milestone** — Please assign to the appropriate milestone. - ⚠️ **Missing Type/ label** — Please add `Type/Bug`. ### Decision: **LGTM** — Proceeding to merge when CI passes. --- **Automated by CleverAgents Bot** Supervisor: PR Review | Agent: ca-continuous-pr-reviewer
freemo scheduled this pull request to auto merge when all checks succeed 2026-04-05 08:28:02 +00:00
Author
Owner

🔒 Review claimed by reviewer-pool-1 [claim-token: reviewer-pool-1-3187-1775372800]


Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-continuous-pr-reviewer

🔒 Review claimed by reviewer-pool-1 [claim-token: reviewer-pool-1-3187-1775372800] --- **Automated by CleverAgents Bot** Supervisor: PR Review | Agent: ca-continuous-pr-reviewer
freemo left a comment

Independent Code Review — APPROVED

PR: fix(resources): register fs-mount built-in resource type at startup
Linked Issue: #2911
Reviewer: ca-pr-self-reviewer (independent perspective)

Review Criteria

Specification Alignment

  • fs-mount definition matches spec exactly: resource_kind: physical, sandbox_strategy: copy_on_write, user_addable: True, parent_types: [] (top-level), child_types: [fs-directory]
  • Handler reference cleveragents.resource.handlers.fs_mount:FsMountHandler follows established pattern
  • Capabilities (read/write/sandbox=True, checkpoint=False) are correct per spec
  • Bidirectional relationship: fs-mount added to fs-directory's parent_types

Correctness

  • Root cause correctly identified: fs-mount was in BUILTIN_TYPE_NAMES (validation frozenset) but missing from BUILTIN_TYPES (actual definitions)
  • Fix is minimal and focused — adds the missing definition and updates the parent relationship
  • fs-mount placed first in _GIT_FS_CONTAINER_TYPES — correct since it has no parents and ordering matters for inherits resolution
  • auto_discovery with scan_depth: 1 and fs-directory pattern is appropriate for a mount point

Test Quality

  • 6 BDD scenarios covering: existence, user_addable, child_types, parent_types (empty), resource add success, and fs-directory parent resolution — all meaningful behavioral tests
  • 4 Robot Framework integration tests covering the same acceptance criteria end-to-end with real SQLite + service layer
  • Step definitions are well-typed (Context parameter), have descriptive docstrings, and include informative assertion messages
  • Tests verify both the type definition AND the operational behavior (resource add succeeds)

Commit Format

  • Title: fix(resources): register fs-mount built-in resource type at startup — Conventional Changelog
  • Body: Detailed root cause analysis and change description
  • Footer: ISSUES CLOSED: #2911

Code Quality

  • No # type: ignore suppressions
  • All imports at top of file
  • Files well under 500-line limit
  • Follows existing patterns in _resource_registry_data.py

CI Status

All required checks passing: lint, typecheck, security, quality, unit_tests, integration_tests, e2e_tests, coverage, status-check.

⚠️ Minor Metadata Note

PR is missing milestone assignment (issue #2911 is on v3.7.0). Will fix before merge.

Decision: APPROVED — Proceeding to merge.


Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-pr-self-reviewer

## Independent Code Review — APPROVED ✅ **PR:** fix(resources): register fs-mount built-in resource type at startup **Linked Issue:** #2911 **Reviewer:** ca-pr-self-reviewer (independent perspective) ### Review Criteria #### ✅ Specification Alignment - `fs-mount` definition matches spec exactly: `resource_kind: physical`, `sandbox_strategy: copy_on_write`, `user_addable: True`, `parent_types: []` (top-level), `child_types: [fs-directory]` - Handler reference `cleveragents.resource.handlers.fs_mount:FsMountHandler` follows established pattern - Capabilities (`read/write/sandbox=True`, `checkpoint=False`) are correct per spec - Bidirectional relationship: `fs-mount` added to `fs-directory`'s `parent_types` ✅ #### ✅ Correctness - Root cause correctly identified: `fs-mount` was in `BUILTIN_TYPE_NAMES` (validation frozenset) but missing from `BUILTIN_TYPES` (actual definitions) - Fix is minimal and focused — adds the missing definition and updates the parent relationship - `fs-mount` placed first in `_GIT_FS_CONTAINER_TYPES` — correct since it has no parents and ordering matters for `inherits` resolution - `auto_discovery` with `scan_depth: 1` and `fs-directory` pattern is appropriate for a mount point #### ✅ Test Quality - **6 BDD scenarios** covering: existence, user_addable, child_types, parent_types (empty), resource add success, and fs-directory parent resolution — all meaningful behavioral tests - **4 Robot Framework integration tests** covering the same acceptance criteria end-to-end with real SQLite + service layer - Step definitions are well-typed (`Context` parameter), have descriptive docstrings, and include informative assertion messages - Tests verify both the type definition AND the operational behavior (resource add succeeds) #### ✅ Commit Format - Title: `fix(resources): register fs-mount built-in resource type at startup` — Conventional Changelog ✅ - Body: Detailed root cause analysis and change description ✅ - Footer: `ISSUES CLOSED: #2911` ✅ #### ✅ Code Quality - No `# type: ignore` suppressions - All imports at top of file - Files well under 500-line limit - Follows existing patterns in `_resource_registry_data.py` #### ✅ CI Status All required checks passing: lint, typecheck, security, quality, unit_tests, integration_tests, e2e_tests, coverage, status-check. #### ⚠️ Minor Metadata Note PR is missing milestone assignment (issue #2911 is on v3.7.0). Will fix before merge. ### Decision: **APPROVED** — Proceeding to merge. --- **Automated by CleverAgents Bot** Supervisor: PR Review | Agent: ca-pr-self-reviewer
freemo added this to the v3.7.0 milestone 2026-04-05 09:29:46 +00:00
freemo merged commit 188ea031eb into master 2026-04-05 21:13:03 +00:00
Sign in to join this conversation.
No reviewers
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!3187
No description provided.