fix(acms): align DEFAULT_SKELETON_RATIO default value with spec #3246
@@ -250,7 +250,7 @@ Feature: Depth/Breadth Projection System and Skeleton Context Propagation
|
||||
Scenario: PlanContextInheritance config uses default skeleton_ratio
|
||||
Given the depth/breadth projection modules are available
|
||||
When I create an InheritanceConfig with defaults
|
||||
Then the inheritance config skeleton_ratio should be 0.2
|
||||
Then the inheritance config skeleton_ratio should be 0.15
|
||||
|
||||
@inheritance @skeleton
|
||||
Scenario: PlanContextInheritance extract_child_focus returns parent decisions
|
||||
|
||||
@@ -62,3 +62,8 @@ Feature: Project context coverage round 3 (pccov3)
|
||||
Then the pccov3 command should succeed
|
||||
And the pccov3 output should contain "Execution Environment"
|
||||
And the pccov3 output should contain "fallback"
|
||||
|
||||
# --- _DEFAULT_SKELETON_RATIO spec alignment ---
|
||||
Scenario: Default ACMS config skeleton_ratio matches spec value of 0.15
|
||||
When I pccov3 read the ACMS config for "local/pccov3-app"
|
||||
Then the pccov3 ACMS config skeleton_ratio should be 0.15
|
||||
|
||||
@@ -38,7 +38,7 @@ Feature: Skeleton compressor
|
||||
Scenario: Default ratio applied when None
|
||||
Given context fragments with total tokens 1000
|
||||
When I compress with skeleton_ratio not specified
|
||||
Then the metadata ratio should equal the default 0.3
|
||||
Then the metadata ratio should equal the default 0.15
|
||||
|
||||
# --- stable ordering --------------------------------------------------
|
||||
|
||||
|
||||
@@ -438,3 +438,15 @@ def step_pccov3_assert_output_contains(context: Any, text: str) -> None:
|
||||
assert text in context.pccov3_output, (
|
||||
f"Expected '{text}' in output, got: {context.pccov3_output!r}"
|
||||
)
|
||||
|
||||
|
||||
@then("the pccov3 ACMS config skeleton_ratio should be {expected:g}")
|
||||
def step_pccov3_assert_skeleton_ratio(context: Any, expected: float) -> None:
|
||||
from cleveragents.cli.commands.project_context import _DEFAULT_SKELETON_RATIO
|
||||
|
||||
assert context.pccov3_acms["skeleton_ratio"] == expected, (
|
||||
f"Expected skeleton_ratio {expected}, got {context.pccov3_acms['skeleton_ratio']}"
|
||||
)
|
||||
assert expected == _DEFAULT_SKELETON_RATIO, (
|
||||
f"_DEFAULT_SKELETON_RATIO is {_DEFAULT_SKELETON_RATIO}, expected {expected}"
|
||||
)
|
||||
|
||||
@@ -48,7 +48,7 @@ logger = structlog.get_logger()
|
||||
# Constants
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
DEFAULT_SKELETON_RATIO: float = 0.2
|
||||
DEFAULT_SKELETON_RATIO: float = 0.15
|
||||
"""Default fraction of child's token budget reserved for parent skeleton."""
|
||||
|
||||
EDGE_RELATIONS: tuple[str, ...] = (
|
||||
|
||||
@@ -47,7 +47,7 @@ class CompressionResult:
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# Default skeleton_ratio when the caller does not specify one.
|
||||
DEFAULT_SKELETON_RATIO: float = 0.3
|
||||
DEFAULT_SKELETON_RATIO: float = 0.15
|
||||
|
||||
|
||||
class SkeletonCompressorService:
|
||||
|
||||
@@ -65,7 +65,7 @@ _DEFAULT_WARM_MAX_DECISIONS = 500
|
||||
_DEFAULT_COLD_MAX_DECISIONS = 5000
|
||||
_DEFAULT_BREADTH = 2
|
||||
_DEFAULT_DEPTH = 3
|
||||
_DEFAULT_SKELETON_RATIO = 0.2
|
||||
_DEFAULT_SKELETON_RATIO = 0.15
|
||||
_DEFAULT_BUDGET_TOKENS = 8000
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user