feat(resource): add virtual core resource types #329

Closed
opened 2026-02-22 23:41:20 +00:00 by freemo · 1 comment
Owner

Metadata

  • Commit Message: feat(resource): add virtual core resource types
  • Branch: feature/post-resource-types-virtual-core

Background

Built-in virtual resource type YAMLs are added for file, directory, commit, branch, tag, and tree under examples/resource-types/. All use resource_kind: virtual, user_addable: false, and no sandbox strategy. Equivalence metadata (content hash, git object identity) is defined per type.

Acceptance Criteria

  • Add built-in virtual resource type YAML configs under examples/resource-types/: file, directory, commit, branch, tag, tree.
  • Set resource_kind: virtual, user_addable: false, and no sandbox strategy; encode allowed children per spec.
  • Add equivalence metadata fields (content hash/name/permissions for file/directory; git object identity for commit/branch/tag/tree).
  • Extend bootstrap registration to include these virtual types and hide them from resource add scaffolding.
  • Update docs/reference/resource_types_builtin.md with virtual type descriptions and link semantics.

Definition of Done

This issue is complete when:

  • All subtasks below are completed and checked off.
  • A Git commit is created where the first line of the commit message matches
    the Commit Message in Metadata exactly, followed by a blank line, then
    additional lines providing relevant details about the implementation. The
    commit body should be appropriate in size for a commit message and relatively
    complete in describing what was done.
  • The commit is pushed to the remote on the branch matching the Branch in
    Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and
    merged before this issue is marked done.

Subtasks

  • Add built-in virtual resource type YAML configs under examples/resource-types/: file, directory, commit, branch, tag, tree.
  • Set resource_kind: virtual, user_addable: false, and no sandbox strategy; encode allowed children per spec.
  • Add equivalence metadata fields (content hash/name/permissions for file/directory; git object identity for commit/branch/tag/tree).
  • Extend bootstrap registration to include these virtual types and hide them from resource add scaffolding.
  • Update docs/reference/resource_types_builtin.md with virtual type descriptions and link semantics.
  • Tests (Behave): Add scenarios ensuring virtual built-ins exist and cannot be user-added.
  • Tests (Robot): Add Robot test that lists resource types and asserts virtual built-ins are present.
  • Tests (ASV): Add benchmarks/resource_type_virtual_core_bench.py for registry performance.
  • Verify coverage >=97% via nox -s coverage_report. If coverage is <97% then review the current unit test coverage report at build/coverage.xml and use it to write new Behave based unit tests to improve code coverage. Specifically, write Behave style unit tests that are descriptively named and specifically improves coverage on whichever file has the most uncovered lines by writing tests that will target the uncovered lines in the report. Once that is done rerun nox -s coverage_report to verify all tests pass and coverage is above >=97%. Only mark this as complete once coverage is >=97%, if not repeat this task as many times as is needed until coverage reaches >=97%.
  • Run nox (all default sessions, including benchmark), fix any errors if needed ensuring nox passes across entire code base, do not ignore any failure even if it seems unrelated to this commit, fix it.

Section: ### Section 18: Deferred Work
Status: Open

## Metadata - **Commit Message**: `feat(resource): add virtual core resource types` - **Branch**: `feature/post-resource-types-virtual-core` ## Background Built-in virtual resource type YAMLs are added for `file`, `directory`, `commit`, `branch`, `tag`, and `tree` under `examples/resource-types/`. All use `resource_kind: virtual`, `user_addable: false`, and no sandbox strategy. Equivalence metadata (content hash, git object identity) is defined per type. ## Acceptance Criteria - [x] Add built-in **virtual** resource type YAML configs under `examples/resource-types/`: `file`, `directory`, `commit`, `branch`, `tag`, `tree`. - [x] Set `resource_kind: virtual`, `user_addable: false`, and no sandbox strategy; encode allowed children per spec. - [x] Add equivalence metadata fields (content hash/name/permissions for `file`/`directory`; git object identity for `commit`/`branch`/`tag`/`tree`). - [x] Extend bootstrap registration to include these virtual types and hide them from `resource add` scaffolding. - [x] Update `docs/reference/resource_types_builtin.md` with virtual type descriptions and link semantics. ## Definition of Done This issue is complete when: - All subtasks below are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation. The commit body should be appropriate in size for a commit message and relatively complete in describing what was done. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. ## Subtasks - [x] Add built-in **virtual** resource type YAML configs under `examples/resource-types/`: `file`, `directory`, `commit`, `branch`, `tag`, `tree`. - [x] Set `resource_kind: virtual`, `user_addable: false`, and no sandbox strategy; encode allowed children per spec. - [x] Add equivalence metadata fields (content hash/name/permissions for `file`/`directory`; git object identity for `commit`/`branch`/`tag`/`tree`). - [x] Extend bootstrap registration to include these virtual types and hide them from `resource add` scaffolding. - [x] Update `docs/reference/resource_types_builtin.md` with virtual type descriptions and link semantics. - [x] Tests (Behave): Add scenarios ensuring virtual built-ins exist and cannot be user-added. - [x] Tests (Robot): Add Robot test that lists resource types and asserts virtual built-ins are present. - [x] Tests (ASV): Add `benchmarks/resource_type_virtual_core_bench.py` for registry performance. - [ ] Verify coverage >=97% via `nox -s coverage_report`. If coverage is <97% then review the current unit test coverage report at `build/coverage.xml` and use it to write new Behave based unit tests to improve code coverage. Specifically, write Behave style unit tests that are descriptively named and specifically improves coverage on whichever file has the most uncovered lines by writing tests that will target the uncovered lines in the report. Once that is done rerun `nox -s coverage_report` to verify all tests pass and coverage is above >=97%. Only mark this as complete once coverage is >=97%, if not repeat this task as many times as is needed until coverage reaches >=97%. - [ ] Run `nox` (all default sessions, including benchmark), fix any errors if needed ensuring nox passes across **entire** code base, do not ignore any failure even if it seems unrelated to this commit, fix it. **Section**: ### Section 18: Deferred Work **Status**: Open
freemo added this to the (deleted) milestone 2026-02-22 23:41:20 +00:00
freemo modified the milestone from (deleted) to v3.6.0 2026-02-23 00:07:06 +00:00
Author
Owner

Expected completion updated (Day 15 rebaseline): Day 44 / 2026-03-24 (previously Day 39 / 2026-03-19)

**Expected completion updated (Day 15 rebaseline):** Day 44 / 2026-03-24 (previously Day 39 / 2026-03-19)
freemo added the due date 2026-03-11 2026-02-23 18:41:59 +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".

2026-03-11

Blocks
#398 Epic: Post-MVP Resources
cleveragents/cleveragents-core
Depends on
Reference
cleveragents/cleveragents-core#329
No description provided.