Skip to content

theinterneti/TTA.dev / .claude/skills/generated/adaptive

adaptive

Unverified

Adaptive subsystem in TTA.dev: get_fallback_stats and related code. 156 symbols | 11 files | Cohesion: 80%

Adaptive

156 symbols | 11 files | Cohesion: 80%

When to Use

  • Working on adaptive-related functionality in TTA.dev
  • Modifying get_fallback_stats
  • Navigating ttadev/primitives/adaptive/retry.py, ttadev/primitives/adaptive/cache.py

Key Files

FileSymbols
tests/primitives/adaptive/test_adaptive_retry.py_ctx, test_execute_retry_success_on_first_attempt, test_execute_retry_succeeds_after_failures, test_execute_retry_exhaustion_returns_failure_dict, test_execute_retry_no_sleep_after_last_attempt (+32)
tests/primitives/adaptive/test_adaptive_cache.py_ctx, _make_cache, test_cache_default_strategy_params, test_cache_miss_calls_target_primitive, test_cache_hit_returns_cached_value_without_calling_target (+26)
tests/primitives/adaptive/test_adaptive_fallback.py_ctx, _make_fallback, test_get_default_strategy_returns_baseline, test_primary_succeeds_returns_primary_result, test_primary_success_increments_primary_attempts (+21)
tests/primitives/adaptive/test_adaptive_timeout.py_ctx, _make_timeout, test_execute_success_records_latency, test_execute_success_tracks_context_latency, test_execute_multiple_successes_accumulate (+18)
ttadev/primitives/adaptive/retry.py_execute_retry_with_tracing, _consider_error_specific_strategy, _context_extractor, _consider_reducing_retries, to_dict (+7)
ttadev/primitives/adaptive/cache.py_get_default_strategy, _consider_new_strategy, get_cache_stats, evict_expired, _execute_with_strategy (+2)
tests/unit/test_primitives_adaptive.pytest_consider_error_specific_strategy_for_timeout_error, test_context_extractor_embeds_environment_and_priority, test_consider_reducing_retries_creates_strategy, test_max_strategies_limit_prevents_new_creation, test_from_dict_round_trip_preserves_values (+1)
ttadev/primitives/adaptive/base.pyrecord_usage, _execute_impl, _select_strategy, _execute_with_strategy, _get_default_strategy (+1)
ttadev/primitives/adaptive/fallback.py_get_default_strategy, _consider_new_strategy, get_fallback_stats
ttadev/primitives/adaptive/exceptions.pyAdaptiveError, LearningError, StrategyValidationError

Entry Points

Start here when exploring this area:

  • get_fallback_stats (Function) — ttadev/primitives/adaptive/fallback.py:395
  • test_get_default_strategy_returns_baseline (Function) — tests/primitives/adaptive/test_adaptive_fallback.py:135
  • test_primary_succeeds_returns_primary_result (Function) — tests/primitives/adaptive/test_adaptive_fallback.py:167
  • test_primary_success_increments_primary_attempts (Function) — tests/primitives/adaptive/test_adaptive_fallback.py:183
  • test_primary_fail_first_fallback_succeeds (Function) — tests/primitives/adaptive/test_adaptive_fallback.py:202

Key Symbols

SymbolTypeFileLine
AdaptiveErrorClassttadev/primitives/adaptive/exceptions.py35
LearningErrorClassttadev/primitives/adaptive/exceptions.py45
StrategyValidationErrorClassttadev/primitives/adaptive/exceptions.py61
get_fallback_statsFunctionttadev/primitives/adaptive/fallback.py395
test_get_default_strategy_returns_baselineFunctiontests/primitives/adaptive/test_adaptive_fallback.py135
test_primary_succeeds_returns_primary_resultFunctiontests/primitives/adaptive/test_adaptive_fallback.py167
test_primary_success_increments_primary_attemptsFunctiontests/primitives/adaptive/test_adaptive_fallback.py183
test_primary_fail_first_fallback_succeedsFunctiontests/primitives/adaptive/test_adaptive_fallback.py202
test_primary_fail_second_fallback_succeeds_when_first_failsFunctiontests/primitives/adaptive/test_adaptive_fallback.py219
test_fallback_latency_recorded_on_successFunctiontests/primitives/adaptive/test_adaptive_fallback.py236
test_all_fail_raises_last_exceptionFunctiontests/primitives/adaptive/test_adaptive_fallback.py256
test_all_fail_primary_failure_countedFunctiontests/primitives/adaptive/test_adaptive_fallback.py268
test_unknown_fallback_key_skipped_and_next_triedFunctiontests/primitives/adaptive/test_adaptive_fallback.py290
test_unknown_fallback_key_all_unknown_raisesFunctiontests/primitives/adaptive/test_adaptive_fallback.py308
test_context_stats_initialized_on_first_accessFunctiontests/primitives/adaptive/test_adaptive_fallback.py328
test_context_stats_failure_trackedFunctiontests/primitives/adaptive/test_adaptive_fallback.py346
test_get_fallback_stats_emptyFunctiontests/primitives/adaptive/test_adaptive_fallback.py380
test_get_fallback_stats_with_dataFunctiontests/primitives/adaptive/test_adaptive_fallback.py399
test_get_fallback_stats_best_order_by_success_rateFunctiontests/primitives/adaptive/test_adaptive_fallback.py422
test_get_fallback_stats_strategies_includedFunctiontests/primitives/adaptive/test_adaptive_fallback.py440

Connected Areas

AreaConnections
Unit9 calls

How to Explore

  1. gitnexus_context({name: "get_fallback_stats"}) — see callers and callees
  2. gitnexus_query({query: "adaptive"}) — find related execution flows
  3. Read key files listed above for implementation details
receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 318kUpdated Claude CodeCodexUnverifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 318kUpdated Claude CodeCodexUnverifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 318kUpdated Claude CodeCodexUnverifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 318kUpdated Claude CodeCodexUnverifiedInstall