Files
cleveragents-core/features
brent.edwards c5ffcf8de4
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 19s
CI / helm (pull_request) Successful in 21s
CI / lint (pull_request) Successful in 3m18s
CI / quality (pull_request) Successful in 3m41s
CI / typecheck (pull_request) Successful in 3m56s
CI / security (pull_request) Successful in 4m12s
CI / integration_tests (pull_request) Successful in 9m13s
CI / unit_tests (pull_request) Successful in 9m37s
CI / docker (pull_request) Successful in 1m16s
CI / coverage (pull_request) Successful in 12m57s
CI / e2e_tests (pull_request) Successful in 19m13s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Successful in 57m29s
test: add TDD bug-capture test for #990 — automation_profile DI bypass
Add a Behave BDD feature (features/tdd_automation_profile_di_bypass.feature)
with three scenarios and a Robot Framework integration test
(robot/tdd_automation_profile_di_bypass.robot) with two test cases that
capture the DI bypass bug described in issue #990.

Bug #990: The _get_service() function in automation_profile.py manually
constructs create_engine / sessionmaker / AutomationProfileRepository
instead of resolving AutomationProfileService through the DI container.
This is the only CLI command that bypasses DI.

Behave scenarios:
  1. Verifies _get_service() resolves from container.automation_profile_service()
  2. Verifies create_engine is NOT called directly
  3. Verifies sessionmaker is NOT called directly

Robot integration tests:
  1. Verifies _get_service() uses the DI container at subprocess level
  2. Verifies create_engine is not called directly at subprocess level

All tests are tagged @tdd_bug @tdd_bug_990 @tdd_issue @tdd_issue_990
@tdd_expected_fail. The @tdd_expected_fail tag inverts the result so CI
passes while the bug is unfixed. Both @tdd_bug and @tdd_issue tags are
included: @tdd_bug per reviewer convention, @tdd_issue to satisfy the
tag validation rules in features/environment.py.

ISSUES CLOSED: #1031
2026-04-14 23:26:26 +00:00
..
2026-02-23 03:11:12 +00:00