style(acms): apply ruff format to acms_context, context_tiers, and step definitions
CI / benchmark-publish (pull_request) Has been skipped
CI / push-validation (pull_request) Successful in 27s
CI / helm (pull_request) Successful in 35s
CI / build (pull_request) Successful in 53s
CI / lint (pull_request) Successful in 1m23s
CI / quality (pull_request) Successful in 1m24s
CI / typecheck (pull_request) Successful in 1m30s
CI / security (pull_request) Successful in 1m50s
CI / integration_tests (pull_request) Successful in 3m37s
CI / e2e_tests (pull_request) Successful in 4m20s
CI / unit_tests (pull_request) Successful in 4m37s
CI / docker (pull_request) Successful in 1m47s
CI / coverage (pull_request) Failing after 11m22s
CI / status-check (pull_request) Failing after 4s
CI / benchmark-regression (pull_request) Successful in 1h4m38s
CI / benchmark-publish (pull_request) Has been skipped
CI / push-validation (pull_request) Successful in 27s
CI / helm (pull_request) Successful in 35s
CI / build (pull_request) Successful in 53s
CI / lint (pull_request) Successful in 1m23s
CI / quality (pull_request) Successful in 1m24s
CI / typecheck (pull_request) Successful in 1m30s
CI / security (pull_request) Successful in 1m50s
CI / integration_tests (pull_request) Successful in 3m37s
CI / e2e_tests (pull_request) Successful in 4m20s
CI / unit_tests (pull_request) Successful in 4m37s
CI / docker (pull_request) Successful in 1m47s
CI / coverage (pull_request) Failing after 11m22s
CI / status-check (pull_request) Failing after 4s
CI / benchmark-regression (pull_request) Successful in 1h4m38s
This commit is contained in:
@@ -316,6 +316,4 @@ def step_then_clear_json_key(context: Any, key: str) -> None:
|
||||
|
||||
@then("the acms clear should require confirmation")
|
||||
def step_then_clear_needs_confirm(context: Any) -> None:
|
||||
assert context.clear_needs_confirm is True, (
|
||||
"Expected clear to require confirmation"
|
||||
)
|
||||
assert context.clear_needs_confirm is True, "Expected clear to require confirmation"
|
||||
|
||||
@@ -450,9 +450,7 @@ class ContextTierService(TierRuntimeMixin, ScopedTierMixin):
|
||||
with self._lock:
|
||||
for fid in fragment_ids:
|
||||
before = (
|
||||
(fid in self._hot)
|
||||
or (fid in self._warm)
|
||||
or (fid in self._cold)
|
||||
(fid in self._hot) or (fid in self._warm) or (fid in self._cold)
|
||||
)
|
||||
if before:
|
||||
self._remove_from_all(fid)
|
||||
|
||||
@@ -31,9 +31,7 @@ from cleveragents.application.services.context_tiers import ContextTierService
|
||||
from cleveragents.domain.models.acms.tiers import ContextTier, TieredFragment
|
||||
|
||||
app = typer.Typer(
|
||||
help=(
|
||||
"ACMS context index: inspect assembled context and remove stale entries"
|
||||
)
|
||||
help=("ACMS context index: inspect assembled context and remove stale entries")
|
||||
)
|
||||
console = Console()
|
||||
err_console = Console(stderr=True)
|
||||
@@ -246,9 +244,7 @@ def _apply_clear_filters(
|
||||
to_remove.append(frag)
|
||||
|
||||
# Remove matched fragments
|
||||
removed_count = tier_service.remove_by_filter(
|
||||
[f.fragment_id for f in to_remove]
|
||||
)
|
||||
removed_count = tier_service.remove_by_filter([f.fragment_id for f in to_remove])
|
||||
|
||||
# Count remaining
|
||||
if project_names:
|
||||
@@ -324,8 +320,7 @@ def acms_show(
|
||||
"""
|
||||
if view not in _VALID_VIEWS:
|
||||
err_console.print(
|
||||
f"[red]Invalid view '{view}': must be one of "
|
||||
f"{sorted(_VALID_VIEWS)}[/red]"
|
||||
f"[red]Invalid view '{view}': must be one of {sorted(_VALID_VIEWS)}[/red]"
|
||||
)
|
||||
raise typer.Exit(1)
|
||||
|
||||
@@ -451,8 +446,7 @@ def acms_clear(
|
||||
ContextTier(tier_filter)
|
||||
except ValueError:
|
||||
err_console.print(
|
||||
f"[red]Invalid tier '{tier_filter}': "
|
||||
f"must be hot, warm, or cold[/red]"
|
||||
f"[red]Invalid tier '{tier_filter}': must be hot, warm, or cold[/red]"
|
||||
)
|
||||
raise typer.Exit(1) from None
|
||||
|
||||
@@ -493,9 +487,7 @@ def acms_clear(
|
||||
if tier_filter:
|
||||
filter_parts.append(f"tier={tier_filter!r}")
|
||||
filter_desc = ", ".join(filter_parts)
|
||||
confirmed = typer.confirm(
|
||||
f"Remove ACMS entries matching {filter_desc}?"
|
||||
)
|
||||
confirmed = typer.confirm(f"Remove ACMS entries matching {filter_desc}?")
|
||||
if not confirmed:
|
||||
console.print("[yellow]Cancelled.[/yellow]")
|
||||
raise typer.Exit(0)
|
||||
|
||||
Reference in New Issue
Block a user