051ee7c290
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 21s
CI / quality (pull_request) Successful in 31s
CI / typecheck (pull_request) Successful in 47s
CI / security (pull_request) Successful in 52s
CI / build (pull_request) Successful in 56s
CI / e2e_tests (pull_request) Successful in 5m1s
CI / integration_tests (pull_request) Successful in 5m30s
CI / unit_tests (pull_request) Successful in 5m42s
CI / docker (pull_request) Successful in 58s
CI / coverage (pull_request) Successful in 7m35s
CI / build (push) Successful in 21s
CI / docker (push) Has been skipped
CI / benchmark-regression (pull_request) Failing after 49m24s
CI / lint (push) Successful in 22s
CI / quality (push) Successful in 39s
CI / security (push) Successful in 48s
CI / typecheck (push) Successful in 1m26s
CI / benchmark-regression (push) Has been skipped
CI / e2e_tests (push) Successful in 5m53s
CI / coverage (push) Successful in 9m4s
CI / benchmark-publish (push) Successful in 19m10s
CI / integration_tests (push) Failing after 19m18s
CI / unit_tests (push) Failing after 19m20s
Added 52 new .feature files and corresponding _steps.py files targeting previously uncovered code paths in the following areas: - TUI layer: app, commands, persona (state/schema/registry), widgets, input (shell_exec, reference_parser) - Application services: plan lifecycle/service/executor, session, project, repo indexing, correction, checkpoint, actor, llm_actors, strategy coordinator, resource file watcher, service retry wiring - CLI commands: session, resource, repl, plan, db, automation_profile - Domain models: retry_policy, resource_type, cost_budget, docker_compose_analyzer, detail_level, _sql_string_aware, _postgresql_helpers - Core: circuit_breaker, retry_service_patterns - Infrastructure: repositories, transaction_sandbox, strategy_registry, plugins/loader, container - Config: settings - Agents: plan_generation, context_analysis, auto_debug - A2A: facade All new tests follow the Behave/Gherkin BDD standard. Resolved step definition collisions with unique prefixes. Fixed Alembic fileConfig logger disabling issue (disable_existing_loggers=False). ISSUES CLOSED: #1068
69 lines
3.7 KiB
Gherkin
69 lines
3.7 KiB
Gherkin
Feature: Repo Indexing Persistence Coverage
|
|
Additional scenarios that exercise previously uncovered code paths
|
|
in the repo_indexing_persistence module.
|
|
|
|
Background:
|
|
Given the repo indexing persistence module is imported
|
|
|
|
# -------------------------------------------------------------------
|
|
# _safe_fromisoformat — corrupt timestamp fallback (lines 51-56)
|
|
# -------------------------------------------------------------------
|
|
Scenario: _safe_fromisoformat falls back to UTC now on corrupt timestamp
|
|
When I parse a corrupt timestamp value "not-a-date-at-all"
|
|
Then ripcov the result should be a UTC-aware datetime close to now
|
|
And a warning about corrupt timestamp should be logged
|
|
|
|
Scenario: _safe_fromisoformat falls back to UTC now on empty string
|
|
When I parse an empty string as a timestamp
|
|
Then ripcov the result should be a UTC-aware datetime close to now
|
|
|
|
# -------------------------------------------------------------------
|
|
# _safe_fromisoformat — naive datetime gets UTC attached (line 58)
|
|
# -------------------------------------------------------------------
|
|
Scenario: _safe_fromisoformat attaches UTC to naive datetime
|
|
When I parse a naive ISO timestamp "2024-06-15T12:30:00"
|
|
Then ripcov the result should be a UTC-aware datetime with the same wall-clock time
|
|
|
|
# -------------------------------------------------------------------
|
|
# persist_status — error_message validation (line 81)
|
|
# -------------------------------------------------------------------
|
|
Scenario: persist_status rejects error_message when status is not ERROR
|
|
Given a mock session factory for persistence tests
|
|
When I call persist_status with status READY and an error_message
|
|
Then a ValueError should be raised about error_message
|
|
|
|
# -------------------------------------------------------------------
|
|
# persist_status — exception rollback path (lines 112-114)
|
|
# -------------------------------------------------------------------
|
|
Scenario: persist_status rolls back session on commit failure
|
|
Given a mock session factory that raises on commit
|
|
When I call persist_status and the session commit fails
|
|
Then ripcov the session should have been rolled back
|
|
And the original exception should be re-raised
|
|
|
|
# -------------------------------------------------------------------
|
|
# persist_index — exception rollback path (lines 181-183)
|
|
# -------------------------------------------------------------------
|
|
Scenario: persist_index rolls back session on commit failure
|
|
Given a mock session factory that raises on commit for persist_index
|
|
When I call persist_index and the session commit fails
|
|
Then the persist_index session should have been rolled back
|
|
And the persist_index original exception should be re-raised
|
|
|
|
# -------------------------------------------------------------------
|
|
# load_index — corrupt file record skip (lines 219-222)
|
|
# -------------------------------------------------------------------
|
|
Scenario: load_index skips corrupt file records with a warning
|
|
Given a mock session factory with an index row and a corrupt file record
|
|
When I call load_index for the resource
|
|
Then ripcov the result should be a RepoIndex with zero files
|
|
And a warning about skipping corrupt file record should be logged
|
|
|
|
# -------------------------------------------------------------------
|
|
# load_index_status — returns None for missing resource (line 259)
|
|
# -------------------------------------------------------------------
|
|
Scenario: load_index_status returns None for non-existent resource
|
|
Given a mock session factory that returns no index row
|
|
When I call load_index_status for a missing resource
|
|
Then ripcov the result should be None
|