d0689573e0
CI / lint (pull_request) Successful in 13s
CI / benchmark-publish (pull_request) Has been skipped
CI / quality (pull_request) Successful in 18s
CI / build (pull_request) Successful in 32s
CI / security (pull_request) Successful in 48s
CI / typecheck (pull_request) Successful in 55s
CI / unit_tests (pull_request) Failing after 2m41s
CI / docker (pull_request) Has been skipped
CI / integration_tests (pull_request) Successful in 3m25s
CI / coverage (pull_request) Successful in 5m56s
CI / benchmark-regression (pull_request) Successful in 33m35s
Add TDD regression tests for bug #570 where `_get_session_service()` calls `container.db()` but the DI `Container` class has no `db` provider, raising `AttributeError`. Same root cause as bug #554. Includes 4 Behave BDD scenarios tagged `@tdd_bug @tdd_bug_570 @tdd_expected_fail`, Robot Framework integration smoke tests with `--format plain`, and ASV service-layer benchmarks. Tests exercise the real DI path by resetting `_service = None` and using a file-based SQLite database. Implements the `@tdd_expected_fail` inversion infrastructure: - Behave: `after_scenario` hook in `features/environment.py` inverts pass/fail for scenarios tagged `@tdd_expected_fail` - Robot: `robot/tdd_expected_fail_listener.py` listener (API v3) performs the same inversion for Robot test cases - `noxfile.py`: registers the listener via `--listener` in both the `integration_tests` and `slow_integration_tests` sessions Migrates 18 existing TDD scenarios across 5 feature files from the old `@tdd @bugNNN` convention to the standardised `@tdd_bug @tdd_bug_NNN` tags per CONTRIBUTING.md § TDD Bug Test Tags. Refs: #570
39 lines
2.0 KiB
Gherkin
39 lines
2.0 KiB
Gherkin
# TDD tests for bug #570 — expected to fail until the DI container fix lands.
|
|
# The @tdd_expected_fail tag causes the test framework to invert pass/fail so
|
|
# these scenarios pass CI while the bug is unfixed. The bug-fix developer
|
|
# removes @tdd_expected_fail (keeping @tdd_bug and @tdd_bug_570) once the fix
|
|
# is applied.
|
|
Feature: Session create command resolves DI container wiring
|
|
As a developer using the agents CLI
|
|
I want "agents session create" to work after a fresh init
|
|
So that I can create interactive sessions without a DI container error
|
|
|
|
Background:
|
|
Given a session-create-error CLI runner using the real DI path
|
|
|
|
@tdd_bug @tdd_bug_570 @tdd_expected_fail
|
|
Scenario: Session create produces a new session
|
|
When I invoke session-create-error create with no arguments
|
|
Then the session-create-error command should exit successfully
|
|
And the session-create-error output should contain "session_id:"
|
|
|
|
@tdd_bug @tdd_bug_570 @tdd_expected_fail
|
|
Scenario: Created session persists and can be retrieved
|
|
When I invoke session-create-error create with no arguments
|
|
Then the session-create-error command should exit successfully
|
|
When I invoke session-create-error list to verify persistence
|
|
Then the session-create-error list should show at least one session
|
|
|
|
@tdd_bug @tdd_bug_570 @tdd_expected_fail
|
|
Scenario: Session create with custom actor succeeds
|
|
When I invoke session-create-error create with actor "openai/gpt-4"
|
|
Then the session-create-error command should exit successfully
|
|
And the session-create-error output should contain "openai/gpt-4"
|
|
And the session-create-error output should contain "session_id:"
|
|
|
|
@tdd_bug @tdd_bug_570 @tdd_expected_fail
|
|
Scenario: Session create with arbitrary actor name succeeds
|
|
When I invoke session-create-error create with actor "nonexistent/bogus-actor-999"
|
|
Then the session-create-error command should exit successfully
|
|
And the session-create-error output should contain "nonexistent/bogus-actor-999"
|