forked from HAL9000/cleveragents-core
10df485401
## Summary This PR adds a Behave TDD bug-capture test that proves bug #1039 exists: the specification references `validations/unit-tests.yaml` as an example validation configuration file (Workflow Examples, Example 1, Step 1) but the file does not exist in the project's `examples/validations/` directory. ## Changes - **New feature file:** `features/tdd_missing_validation_unit_tests_yaml.feature` — four scenarios tagged `@tdd_expected_fail @tdd_bug @tdd_bug_1039` that verify: 1. The file `examples/validations/unit-tests.yaml` exists 2. The YAML config contains `name: local/unit-tests` 3. The validation mode is `required` 4. The description field is non-empty - **New step file:** `features/steps/tdd_missing_validation_unit_tests_yaml_steps.py` — step implementations that locate the project root and check file existence/content All four scenarios currently fail with `AssertionError` (the file doesn't exist, proving the bug exists). The `@tdd_expected_fail` tag inverts the results so the test suite passes CI. ## Robot Integration Test N/A — this bug is purely about a missing example file referenced by the specification. There is no integration-level behavior to test. ## Quality Gate Results | Gate | Result | |------|--------| | `nox -s lint` | passed | | `nox -s typecheck` | passed (0 errors) | | `nox -s unit_tests` | 462 features, 12234 scenarios, 0 failures | | `nox -s integration_tests` | 1672 tests, 0 failures | | `nox -s e2e_tests` | 37 tests, 0 failures | | `nox -s coverage_report` | 98% (>= 97% threshold) | Closes #1103 Reviewed-on: cleveragents/cleveragents-core#1132 Reviewed-by: Jeffrey Phillips Freeman <jeffrey.freeman@cleverthis.com> Co-authored-by: Brent E. Edwards <brent.edwards@cleverthis.com> Co-committed-by: Brent E. Edwards <brent.edwards@cleverthis.com>
43 lines
2.3 KiB
Gherkin
43 lines
2.3 KiB
Gherkin
@tdd_expected_fail @tdd_issue @tdd_issue_1039
|
|
Feature: TDD Bug #1039 — Missing validations/unit-tests.yaml configuration
|
|
As a developer
|
|
I want to verify that the validation configuration file referenced by the
|
|
specification exists and conforms to the expected schema
|
|
So that the bug is captured and will be caught by a regression test
|
|
|
|
The specification (Workflow Examples, Example 1, Step 1) references a
|
|
validation configuration file ``validations/unit-tests.yaml`` that is
|
|
used with the ``agents validation add`` command to register a required
|
|
validation named ``local/unit-tests``. According to the specification
|
|
output, this validation should run ``pytest tests/``, have description
|
|
"Unit tests", mode "required", and timeout 300s (default).
|
|
|
|
However, the file ``validations/unit-tests.yaml`` does not exist anywhere
|
|
in the project. The ``examples/validations/`` directory contains only
|
|
``required-validation.yaml`` and ``wrapped-validation.yaml``, but not
|
|
the ``unit-tests.yaml`` referenced by the specification.
|
|
|
|
This test captures bug #1039 and uses ``@tdd_expected_fail`` until the
|
|
fix is merged. Once the file is created, the tag will be removed and
|
|
the test will run normally as a regression guard.
|
|
|
|
Scenario: The unit-tests.yaml validation config file exists in the project
|
|
Given the project root directory is known for validation yaml test
|
|
When I check for the validation config file "examples/validations/unit-tests.yaml"
|
|
Then the validation config file should exist
|
|
|
|
Scenario: The unit-tests.yaml config loads as valid YAML with expected name
|
|
Given the project root directory is known for validation yaml test
|
|
When I load the validation config file "examples/validations/unit-tests.yaml"
|
|
Then the validation config should have name "local/unit-tests"
|
|
|
|
Scenario: The unit-tests.yaml config defines a required validation mode
|
|
Given the project root directory is known for validation yaml test
|
|
When I load the validation config file "examples/validations/unit-tests.yaml"
|
|
Then the validation config should have mode "required"
|
|
|
|
Scenario: The unit-tests.yaml config includes a description
|
|
Given the project root directory is known for validation yaml test
|
|
When I load the validation config file "examples/validations/unit-tests.yaml"
|
|
Then the validation config should have a non-empty description
|