forked from cleveragents/cleveragents-core
31472b5413
Add Behave feature/step pairs that exercise uncovered branches across handlers, LSP, CLI, and service layers to reach the coverage gate. ISSUES CLOSED: #1232
95 lines
5.0 KiB
Gherkin
95 lines
5.0 KiB
Gherkin
@acms @coverage_r3
|
|
Feature: ACMS service coverage round 3 — protocol stubs and default packer
|
|
As a developer maintaining the ACMS pipeline
|
|
I want to exercise uncovered protocol stub bodies and the DefaultBudgetPacker
|
|
So that the test suite covers lines 34-35, 112, 120, 124, 275, 292, 309, 396, 577
|
|
|
|
# -----------------------------------------------------------------------
|
|
# Lines 34-35: TYPE_CHECKING imports (Settings, UnitOfWork)
|
|
# These are behind `if TYPE_CHECKING:` and not executable at runtime.
|
|
# We validate the DI path that accepts those types as constructor args.
|
|
# -----------------------------------------------------------------------
|
|
|
|
Scenario: Pipeline accepts settings and unit_of_work constructor params
|
|
Given ascov3 I have mock Settings and UnitOfWork objects
|
|
When ascov3 I create a pipeline with settings and unit_of_work injected
|
|
Then ascov3 the pipeline should store the injected dependencies
|
|
|
|
# -----------------------------------------------------------------------
|
|
# Line 112: ContextStrategy.can_handle protocol default body (Ellipsis)
|
|
# -----------------------------------------------------------------------
|
|
|
|
Scenario: ContextStrategy protocol default can_handle returns None
|
|
Given ascov3 I have a bare ContextStrategy subclass
|
|
When ascov3 I call can_handle on the bare strategy with an empty request
|
|
Then ascov3 the can_handle result should be None
|
|
|
|
# -----------------------------------------------------------------------
|
|
# Line 120: ContextStrategy.assemble protocol default body (Ellipsis)
|
|
# -----------------------------------------------------------------------
|
|
|
|
Scenario: ContextStrategy protocol default assemble returns None
|
|
Given ascov3 I have a bare ContextStrategy subclass
|
|
When ascov3 I call assemble on the bare strategy with empty fragments and a budget
|
|
Then ascov3 the assemble result should be None
|
|
|
|
# -----------------------------------------------------------------------
|
|
# Line 124: ContextStrategy.explain protocol default body (Ellipsis)
|
|
# -----------------------------------------------------------------------
|
|
|
|
Scenario: ContextStrategy protocol default explain returns None
|
|
Given ascov3 I have a bare ContextStrategy subclass
|
|
When ascov3 I call explain on the bare strategy
|
|
Then ascov3 the explain result should be None
|
|
|
|
# -----------------------------------------------------------------------
|
|
# Line 275: StrategySelector.select protocol default body (Ellipsis)
|
|
# -----------------------------------------------------------------------
|
|
|
|
Scenario: StrategySelector protocol default select returns None
|
|
Given ascov3 I have a bare StrategySelector subclass
|
|
When ascov3 I call select on the bare selector with empty strategies
|
|
Then ascov3 the select result should be None
|
|
|
|
# -----------------------------------------------------------------------
|
|
# Line 292: BudgetAllocator.allocate protocol default body (Ellipsis)
|
|
# -----------------------------------------------------------------------
|
|
|
|
Scenario: BudgetAllocator protocol default allocate returns None
|
|
Given ascov3 I have a bare BudgetAllocator subclass
|
|
When ascov3 I call allocate on the bare allocator with empty candidates
|
|
Then ascov3 the allocate result should be None
|
|
|
|
# -----------------------------------------------------------------------
|
|
# Line 309: StrategyExecutor.execute protocol default body (Ellipsis)
|
|
# -----------------------------------------------------------------------
|
|
|
|
Scenario: StrategyExecutor protocol default execute returns None
|
|
Given ascov3 I have a bare StrategyExecutor subclass
|
|
When ascov3 I call execute on the bare executor with empty allocations
|
|
Then ascov3 the execute result should be None
|
|
|
|
# -----------------------------------------------------------------------
|
|
# Line 396: SkeletonCompressor.compress protocol default body (Ellipsis)
|
|
# -----------------------------------------------------------------------
|
|
|
|
Scenario: SkeletonCompressor protocol default compress returns None
|
|
Given ascov3 I have a bare SkeletonCompressor subclass
|
|
When ascov3 I call compress on the bare compressor with empty fragments
|
|
Then ascov3 the compress result should be None
|
|
|
|
# -----------------------------------------------------------------------
|
|
# Line 577: DefaultBudgetPacker.pack returns fragments unchanged
|
|
# -----------------------------------------------------------------------
|
|
|
|
Scenario: DefaultBudgetPacker pack returns fragments unchanged
|
|
Given ascov3 I have a DefaultBudgetPacker instance
|
|
And ascov3 I have a list of test fragments
|
|
When ascov3 I call pack on the packer with those fragments and a budget
|
|
Then ascov3 the pack result should be the same fragments unchanged
|
|
|
|
Scenario: DefaultBudgetPacker pack returns empty sequence for empty input
|
|
Given ascov3 I have a DefaultBudgetPacker instance
|
|
When ascov3 I call pack on the packer with empty fragments and a budget
|
|
Then ascov3 the pack result should be an empty sequence
|