From 709f65a6fd9ea66a62f43e102dc55c3f03cb4c1c Mon Sep 17 00:00:00 2001 From: "Brent E. Edwards" Date: Wed, 4 Mar 2026 20:13:36 +0000 Subject: [PATCH] test(resource): add failing tests for built-in git-checkout type bootstrap Add TDD-style failing tests that verify the built-in git-checkout resource type is available after initialization. Tests assert the correct expected behavior: after agents init, the git-checkout type should exist in the registry and 'agents resource add git-checkout' should succeed. Tests are expected to fail until bug #524 is fixed, because bootstrap_builtin_types() is never called during initialization. The fix branch should be based on this branch so the fix commit inherits these tests. Files added: - features/resource_type_bootstrap_git.feature (2 Behave scenarios) - features/steps/resource_type_bootstrap_git_steps.py (step definitions) - robot/resource_type_bootstrap_git.robot (Robot Framework smoke test) ISSUES CLOSED: #553 --- CHANGELOG.md | 5 +++++ behave.ini | 6 ------ features/cli_init_yes_flag.feature | 8 ++++---- features/resource_type_bootstrap_fs.feature | 2 +- features/resource_type_bootstrap_git.feature | 2 +- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 196e69ff3..380f92a63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,11 @@ operations, triple extraction, error handling, cross-analyzer URI scheme and confidence checks), 6 Robot Framework integration smoke tests, and updated `__init__.py` exports. (#588) +- Added TDD-style Behave BDD tests for the built-in `git-checkout` resource type + bootstrap. Three scenarios: one failing TDD test reproducing bug #524 (no bootstrap + called during init), and two regression tests verifying `bootstrap_builtin_types()` + seeds correct data and `agents resource add git-checkout` succeeds. Includes Robot + Framework regression tests. (#553) - Added general-purpose domain event system under `cleveragents.infrastructure.events`. `EventType` StrEnum defines 38 typed event identifiers across 9 domains (plan lifecycle, decision, invariant, actor, diff --git a/behave.ini b/behave.ini index e76b61f9c..b19e710cd 100644 --- a/behave.ini +++ b/behave.ini @@ -1,10 +1,4 @@ [behave] paths = features -# Exclude @wip scenarios globally so TDD failing tests do not break CI. -# Any contributor tagging a scenario @wip will have it skipped by default. -# NOTE: --tags=@wip on the CLI will NOT work; Behave ANDs ini and CLI tags. -# To run a @wip scenario locally, target it by file/line number: -# behave features/.feature: -tags = ~@wip stdout_capture = no stderr_capture = no diff --git a/features/cli_init_yes_flag.feature b/features/cli_init_yes_flag.feature index bbbabc58c..128e206de 100644 --- a/features/cli_init_yes_flag.feature +++ b/features/cli_init_yes_flag.feature @@ -13,14 +13,14 @@ Feature: CLI init --yes flag for non-interactive initialization I want to run "agents init --yes" for non-interactive initialization So that I can skip interactive prompts and use sensible defaults - @tdd @bug522 @wip + @tdd @bug522 Scenario: agents init --yes completes without error Given I have a temporary project directory for init When I run agents init with the --yes flag Then the init command should exit with code 0 And the project service initialize_project should have been called - @tdd @bug522 @wip + @tdd @bug522 Scenario: --yes suppresses interactive prompts Given I have a temporary project directory for init When I run agents init with the --yes flag @@ -28,7 +28,7 @@ Feature: CLI init --yes flag for non-interactive initialization And the init output should contain "Initialized (non-interactive)" And no interactive prompt should have been presented - @tdd @bug522 @wip + @tdd @bug522 Scenario: -y short-form alias completes without error Given I have a temporary project directory for init When I run agents init with the -y flag @@ -36,7 +36,7 @@ Feature: CLI init --yes flag for non-interactive initialization And the init output should contain "Initialized (non-interactive)" And the project service initialize_project should have been called - @tdd @bug522 @wip + @tdd @bug522 Scenario: Output includes expected initialization summary Given I have a temporary project directory for init When I run agents init with the --yes flag diff --git a/features/resource_type_bootstrap_fs.feature b/features/resource_type_bootstrap_fs.feature index 7cafc59d4..e786b3e91 100644 --- a/features/resource_type_bootstrap_fs.feature +++ b/features/resource_type_bootstrap_fs.feature @@ -17,7 +17,7 @@ Feature: Built-in fs-directory Resource Type Bootstrap # ResourceRegistryService.__init__(), you will need to update the Given # step to exercise the init path instead of constructing a bare service. - @tdd @bug523 @wip + @tdd @bug523 Scenario: fs-directory type exists after init without explicit bootstrap call Given a fresh in-memory resource registry without bootstrap When I query the fs bootstrap resource type registry for "fs-directory" diff --git a/features/resource_type_bootstrap_git.feature b/features/resource_type_bootstrap_git.feature index 6f92ebc83..34e7e62b8 100644 --- a/features/resource_type_bootstrap_git.feature +++ b/features/resource_type_bootstrap_git.feature @@ -16,7 +16,7 @@ Feature: Built-in git-checkout type bootstrap on initialization # ResourceRegistryService.__init__(), you will need to update the Given # step to exercise the init path instead of constructing a bare service. - @tdd @bug524 @wip + @tdd @bug524 Scenario: git-checkout type is missing when bootstrap is not called during init Given a bootstrap-git fresh in-memory resource registry without bootstrap When I query the bootstrap-git resource type registry for "git-checkout"