RagLeap
Tests

Tests: ragleap-core (the app)

Test files: 51. Test functions: 580. Described by their authors (docstring or @DisplayName): 27. Where there is no description, the line shows the test name in words and says so.

Latest result: core-tests passed 755 passed, 0 skipped, 0 failed CI job

test_action_fallback.py — 9 tests 9 passed, 0 failed, 0 skipped

Tests for actions.call_with_fallback: the planner and the agent loop survive a busy provider (retry once, then the LLM_FALLBACK_PROVIDERS chain). Fake service; no network.

  • test_retries_the_same_provider_once_then_succeeds passed
    Retries the same provider once then succeeds (no description in the source; shown from the name)
  • test_falls_back_to_the_next_provider passed
    Falls back to the next provider (no description in the source; shown from the name)
  • test_empty_reply_doubles_the_budget_then_tries_the_next_provider passed
    Empty reply doubles the budget then tries the next provider (no description in the source; shown from the name)
  • test_all_providers_failing_raises_the_last_error passed
    All providers failing raises the last error (no description in the source; shown from the name)
  • test_all_empty_returns_empty_string passed
    All empty returns empty string (no description in the source; shown from the name)
  • test_service_without_a_chain_uses_the_primary passed
    Service without a chain uses the primary (no description in the source; shown from the name)
  • test_unusable_chain_object_falls_back_to_the_primary passed
    Unusable chain object falls back to the primary (no description in the source; shown from the name)
  • test_plan_action_survives_a_busy_primary passed
    Plan action survives a busy primary (no description in the source; shown from the name)
  • test_agent_loop_model_call_uses_the_fallback passed
    Agent loop model call uses the fallback (no description in the source; shown from the name)
test_action_senders.py — 19 tests 19 passed, 0 failed, 0 skipped

Tests for core/action_senders.py: no network, DNS/HTTP/SMTP mocked.

  • test_webhook_unknown_target_fails_without_request passed
    Webhook unknown target fails without request (no description in the source; shown from the name)
  • test_webhook_known_target_posts_without_redirects passed
    Webhook known target posts without redirects (no description in the source; shown from the name)
  • test_webhook_non_public_addresses_blocked passed
    Webhook non public addresses blocked (no description in the source; shown from the name)
  • test_webhook_http_scheme_blocked passed
    Webhook http scheme blocked (no description in the source; shown from the name)
  • test_webhook_non_2xx_is_failure passed
    Webhook non 2xx is failure (no description in the source; shown from the name)
  • test_webhook_request_exception_returns_false passed
    Webhook request exception returns false (no description in the source; shown from the name)
  • test_slack_requires_slack_hosted_url passed
    Slack requires slack hosted url (no description in the source; shown from the name)
  • test_slack_posts_when_configured passed
    Slack posts when configured (no description in the source; shown from the name)
  • test_email_empty_allowlist_sends_nothing passed
    Email empty allowlist sends nothing (no description in the source; shown from the name)
  • test_email_unlisted_recipient_blocked passed
    Email unlisted recipient blocked (no description in the source; shown from the name)
  • test_email_header_injection_and_multiple_recipients_blocked passed
    Email header injection and multiple recipients blocked (no description in the source; shown from the name)
  • test_email_allowed_address_sends passed
    Email allowed address sends (no description in the source; shown from the name)
  • test_email_domain_allowlist_is_exact_domain passed
    Email domain allowlist is exact domain (no description in the source; shown from the name)
  • test_email_subject_line_convention passed
    Email subject line convention (no description in the source; shown from the name)
  • test_email_smtp_failure_returns_false passed
    Email smtp failure returns false (no description in the source; shown from the name)
  • test_autonomy_dispatch_reports_sent_or_failed_for_new_channels passed
    Autonomy dispatch reports sent or failed for new channels (no description in the source; shown from the name)
  • test_autonomy_unknown_channel_still_unsupported passed
    Autonomy unknown channel still unsupported (no description in the source; shown from the name)
  • test_plain_address_rules passed
    Plain address rules (no description in the source; shown from the name)
  • test_pathological_address_is_rejected_fast_and_length_capped passed
    Pathological address is rejected fast and length capped (no description in the source; shown from the name)
test_actions.py — 16 tests 16 passed, 0 failed, 0 skipped

Tests for core/employees/actions.py (phase 2): no network, the LLM and the gate are mocked.

  • test_available_tools_none_when_nothing_configured passed
    Available tools none when nothing configured (no description in the source; shown from the name)
  • test_available_tools_lists_configured_without_secrets passed
    Available tools lists configured without secrets (no description in the source; shown from the name)
  • test_available_tools_partial_configuration passed
    Available tools partial configuration (no description in the source; shown from the name)
  • test_parse_plan_variants passed
    Parse plan variants (no description in the source; shown from the name)
  • test_validate_rejects_bad_plans passed
    Validate rejects bad plans (no description in the source; shown from the name)
  • test_validate_accepts_good_plans_and_ignores_model_slack_target passed
    Validate accepts good plans and ignores model slack target (no description in the source; shown from the name)
  • test_validate_email_subject_cannot_inject_headers passed
    Validate email subject cannot inject headers (no description in the source; shown from the name)
  • test_plan_action_happy_path passed
    Plan action happy path (no description in the source; shown from the name)
  • test_plan_action_no_tools_makes_no_llm_call passed
    Plan action no tools makes no llm call (no description in the source; shown from the name)
  • test_plan_action_none_tool_returns_none passed
    Plan action none tool returns none (no description in the source; shown from the name)
  • test_plan_action_empty_reply_retried_with_bigger_budget passed
    Plan action empty reply retried with bigger budget (no description in the source; shown from the name)
  • test_plan_action_provider_failure_returns_none passed
    Plan action provider failure returns none (no description in the source; shown from the name)
  • test_prompt_hides_urls_and_marks_untrusted_text passed
    Prompt hides urls and marks untrusted text (no description in the source; shown from the name)
  • test_run_action_passes_role_and_action_type_to_the_gate passed
    Run action passes role and action type to the gate (no description in the source; shown from the name)
  • test_describe_action_variants passed
    Describe action variants (no description in the source; shown from the name)
  • test_maybe_act_none_and_runs passed
    Maybe act none and runs (no description in the source; shown from the name)
test_agent_loop.py — 16 tests 16 passed, 0 failed, 0 skipped

Tests for core/agent_loop.py: the act-observe loop, taint rule, resumable runs, budget stop, force_semi, and the /agent-runs routes. A scripted fake model replaces the LLM; sending is stubbed. Runs against the test database only.

  • test_disabled_or_no_tools_does_nothing_and_calls_no_model passed
    Disabled or no tools does nothing and calls no model (no description in the source; shown from the name)
  • test_model_says_none_or_fails_leaves_no_run passed
    Model says none or fails leaves no run (no description in the source; shown from the name)
  • test_single_step_then_done_feeds_the_result_back passed
    Single step then done feeds the result back (no description in the source; shown from the name)
  • test_observation_cannot_close_its_own_fence passed
    Observation cannot close its own fence (no description in the source; shown from the name)
  • test_step_cap_and_duplicate_stop passed
    Step cap and duplicate stop (no description in the source; shown from the name)
  • test_budget_block_mid_run_stops_cleanly passed
    Budget block mid run stops cleanly (no description in the source; shown from the name)
  • test_taint_forces_approval_for_outbound_even_in_full_mode passed
    Taint forces approval for outbound even in full mode (no description in the source; shown from the name)
  • test_without_taint_outbound_runs_normally_in_full_mode passed
    Without taint outbound runs normally in full mode (no description in the source; shown from the name)
  • test_force_semi_overrides_full_mode_only_when_asked passed
    Force semi overrides full mode only when asked (no description in the source; shown from the name)
  • test_semi_mode_pauses_then_approval_resumes_with_the_real_result passed
    Semi mode pauses then approval resumes with the real result (no description in the source; shown from the name)
  • test_rejection_ends_the_run_without_calling_the_model passed
    Rejection ends the run without calling the model (no description in the source; shown from the name)
  • test_approved_fetch_taints_the_resumed_run passed
    Approved fetch taints the resumed run (no description in the source; shown from the name)
  • test_switching_the_loop_off_stops_a_waiting_run_after_approval passed
    Switching the loop off stops a waiting run after approval (no description in the source; shown from the name)
  • test_unrelated_approvals_are_unaffected passed
    Unrelated approvals are unaffected (no description in the source; shown from the name)
  • test_routes passed
    Routes (no description in the source; shown from the name)
  • test_chat_uses_the_loop_module_and_describe_run passed
    Chat uses the loop module and describe run (no description in the source; shown from the name)
test_airtable_connector.py — 8 tests 8 passed, 0 failed, 0 skipped

Tests for core/integrations/airtable_connector.py -- the Airtable Web API connector. Pure unit tests against a mocked requests.get; no live Airtable base or DB needed.

  • test_missing_token_fails_gracefully passed
    Missing token fails gracefully (no description in the source; shown from the name)
  • test_missing_endpoint_fails_gracefully passed
    Missing endpoint fails gracefully (no description in the source; shown from the name)
  • test_connection_success passed
    Connection success (no description in the source; shown from the name)
  • test_airtable_api_error_surfaces_message passed
    Airtable api error surfaces message (no description in the source; shown from the name)
  • test_fetch_flattens_fields passed
    Fetch flattens fields (no description in the source; shown from the name)
  • test_fetch_paginates_using_offset passed
    Fetch paginates using offset (no description in the source; shown from the name)
  • test_fetch_uses_filter_formula_when_query_template_set passed
    Fetch uses filter formula when query template set (no description in the source; shown from the name)
  • test_fetch_bad_endpoint_format_raises passed
    Fetch bad endpoint format raises (no description in the source; shown from the name)
test_api_key_auth.py — 10 tests 10 passed, 0 failed, 0 skipped

Tests for the opt-in RAGLEAP_API_KEY middleware in core/api.py.

  • test_health_exempt_when_key_unset passed
    Health exempt when key unset (no description in the source; shown from the name)
  • test_health_exempt_even_when_key_set passed
    Health exempt even when key set (no description in the source; shown from the name)
  • test_protected_route_open_when_key_unset passed
    Protected route open when key unset (no description in the source; shown from the name)
  • test_protected_route_rejects_missing_header_when_key_set passed
    Protected route rejects missing header when key set (no description in the source; shown from the name)
  • test_protected_route_rejects_wrong_key passed
    Protected route rejects wrong key (no description in the source; shown from the name)
  • test_protected_route_accepts_correct_key passed
    Protected route accepts correct key (no description in the source; shown from the name)
  • test_key_comparison_is_exact_not_prefix_or_substring passed
    Key comparison is exact not prefix or substring (no description in the source; shown from the name)
  • test_webhook_paths_exempt_from_key_even_when_set passed
    The middleware itself must not block /webhook/* when a key is configured --
  • test_middleware_function_directly_open_when_unset passed
    Middleware function directly open when unset (no description in the source; shown from the name)
  • test_middleware_function_directly_blocks_when_set_and_missing passed
    Middleware function directly blocks when set and missing (no description in the source; shown from the name)
test_approval_message.py — 3 tests 3 passed, 0 failed, 0 skipped

The approval request message: by default it asks for a chat reply (YES/NO <id>); with APPROVAL_REPLIES=off (an install whose app cannot receive chat replies) it points to the approval inbox instead. No network: sending is stubbed.

  • test_default_message_asks_for_chat_replies passed
    Default message asks for chat replies (no description in the source; shown from the name)
  • test_replies_off_points_to_the_inbox passed
    Replies off points to the inbox (no description in the source; shown from the name)
  • test_other_values_keep_chat_replies passed
    Other values keep chat replies (no description in the source; shown from the name)
test_approval_sender.py — 18 tests 18 passed, 0 failed, 0 skipped

Approval sender check and webhook fail-closed behaviour. No network: settings, senders and signatures mocked.

  • test_owner_matches_configured_channel_and_target passed
    Owner matches configured channel and target (no description in the source; shown from the name)
  • test_whatsapp_number_formats_are_normalised passed
    Whatsapp number formats are normalised (no description in the source; shown from the name)
  • test_wrong_channel_is_not_owner passed
    Wrong channel is not owner (no description in the source; shown from the name)
  • test_wrong_sender_is_not_owner passed
    Wrong sender is not owner (no description in the source; shown from the name)
  • test_unconfigured_target_means_nobody_is_owner passed
    Unconfigured target means nobody is owner (no description in the source; shown from the name)
  • test_owner_check_never_raises_and_fails_closed passed
    Owner check never raises and fails closed (no description in the source; shown from the name)
  • test_non_owner_cannot_approve_and_is_told_nothing passed
    Non owner cannot approve and is told nothing (no description in the source; shown from the name)
  • test_owner_approval_is_delegated passed
    Owner approval is delegated (no description in the source; shown from the name)
  • test_non_owner_approval_attempt_is_logged passed
    Non owner approval attempt is logged (no description in the source; shown from the name)
  • test_telegram_router_passes_channel_and_sender passed
    Telegram router passes channel and sender (no description in the source; shown from the name)
  • test_whatsapp_router_passes_channel_and_sender passed
    Whatsapp router passes channel and sender (no description in the source; shown from the name)
  • test_discord_router_passes_channel_and_sender passed
    Discord router passes channel and sender (no description in the source; shown from the name)
  • test_telegram_without_secret_is_rejected passed
    Telegram without secret is rejected (no description in the source; shown from the name)
  • test_telegram_without_secret_can_be_opted_out_for_local_testing passed
    Telegram without secret can be opted out for local testing (no description in the source; shown from the name)
  • test_telegram_with_secret_still_compares_strictly passed
    Telegram with secret still compares strictly (no description in the source; shown from the name)
  • test_whatsapp_request_without_signature_is_rejected passed
    Whatsapp request without signature is rejected (no description in the source; shown from the name)
  • test_whatsapp_unsigned_allowed_only_with_explicit_opt_out passed
    Whatsapp unsigned allowed only with explicit opt out (no description in the source; shown from the name)
  • test_whatsapp_invalid_signature_is_rejected_and_valid_is_accepted passed
    Whatsapp invalid signature is rejected and valid is accepted (no description in the source; shown from the name)
test_autonomy.py — 14 tests 14 passed, 0 failed, 0 skipped

Tests for core/autonomy.py - the single-tenant Autonomous Loop. Requires a Postgres DB with db/schema.sql applied, reachable via the DATABASE_URL env var (same convention as core/employees/_db.py).

  • test_default_settings_are_off passed
    Default settings are off (no description in the source; shown from the name)
  • test_set_and_get_settings_roundtrip passed
    Set and get settings roundtrip (no description in the source; shown from the name)
  • test_off_mode_skips_everything passed
    Off mode skips everything (no description in the source; shown from the name)
  • test_action_allowlist_blocks_disallowed_action passed
    Action allowlist blocks disallowed action (no description in the source; shown from the name)
  • test_channel_allowlist_blocks_disallowed_channel passed
    Channel allowlist blocks disallowed channel (no description in the source; shown from the name)
  • test_full_mode_executes_via_custom_fn_and_logs passed
    Full mode executes via custom fn and logs (no description in the source; shown from the name)
  • test_semi_mode_creates_pending_and_approval_flow passed
    Semi mode creates pending and approval flow (no description in the source; shown from the name)
  • test_process_approval_response_ignores_non_approval_messages passed
    Process approval response ignores non approval messages (no description in the source; shown from the name)
  • test_process_approval_response_unknown_id passed
    Process approval response unknown id (no description in the source; shown from the name)
  • test_sensitive_role_forces_full_to_semi passed
    core.employees.defaults.SENSITIVE_DOMAIN_ROLES enforcement: a role
  • test_non_sensitive_role_full_mode_executes_normally passed
    A role NOT in SENSITIVE_DOMAIN_ROLES should behave exactly like
  • test_role_is_persisted_in_autonomy_log passed
    Role is persisted in autonomy log (no description in the source; shown from the name)
  • test_role_is_persisted_through_semi_approval_flow passed
    Role is persisted through semi approval flow (no description in the source; shown from the name)
  • test_role_optional_backward_compatible passed
    Existing callers that never pass role must keep working exactly
test_autonomy_inbox.py — 7 tests 7 passed, 0 failed, 0 skipped

Tests for the approval inbox: autonomy.list_pending / resolve_pending and the /autonomy/pending routes. Approve and reject go through process_approval_response, the same path as a chat "YES/NO <id>" reply. No LLM or network; sending is stubbed.

  • test_list_shows_full_content_newest_first passed
    List shows full content newest first (no description in the source; shown from the name)
  • test_approve_runs_the_action_and_removes_it passed
    Approve runs the action and removes it (no description in the source; shown from the name)
  • test_reject_discards_without_running passed
    Reject discards without running (no description in the source; shown from the name)
  • test_bad_or_unknown_ids_return_none passed
    Bad or unknown ids return none (no description in the source; shown from the name)
  • test_pending_still_stored_when_no_approval_target passed
    Pending still stored when no approval target (no description in the source; shown from the name)
  • test_processing_error_text_is_not_leaked passed
    Processing error text is not leaked (no description in the source; shown from the name)
  • test_routes passed
    Routes (no description in the source; shown from the name)
test_bigquery_connector.py — 8 tests 8 passed, 0 failed, 0 skipped

Tests for core/integrations/bigquery_connector.py -- the BigQuery connector. google-cloud-bigquery is a heavy optional dependency not installed in CI (same convention as snowflake-connector-python for SnowflakeConnector). We inject fake google.cloud.bigquery and google.oauth2.service_account modules into sys.modules so the connector's lazy imports succeed against MagicMocks.

  • test_missing_connection_string_fails_gracefully passed
    Missing connection string fails gracefully (no description in the source; shown from the name)
  • test_invalid_json_fails_gracefully passed
    Invalid json fails gracefully (no description in the source; shown from the name)
  • test_missing_project_id_without_override_fails_gracefully passed
    Missing project id without override fails gracefully (no description in the source; shown from the name)
  • test_connection_success passed
    Connection success (no description in the source; shown from the name)
  • test_fetch_data_requires_query_template passed
    Fetch data requires query template (no description in the source; shown from the name)
  • test_fetch_data_maps_rows passed
    Fetch data maps rows (no description in the source; shown from the name)
  • test_fetch_data_uses_named_parameter_for_user_identifier passed
    Fetch data uses named parameter for user identifier (no description in the source; shown from the name)
  • test_connection_failure_surfaces_message passed
    Connection failure surfaces message (no description in the source; shown from the name)
test_budget.py — 24 tests 24 passed, 0 failed, 0 skipped

Tests for core/budget.py, the usage-recording wrapper and the budget check in ask(). No network; DB mocked.

  • test_estimate_tokens passed
    Estimate tokens (no description in the source; shown from the name)
  • test_record_usage_uses_reported_tokens passed
    Record usage uses reported tokens (no description in the source; shown from the name)
  • test_record_usage_estimates_when_provider_reports_nothing passed
    Record usage estimates when provider reports nothing (no description in the source; shown from the name)
  • test_record_usage_partial_usage_estimates_the_missing_part passed
    Record usage partial usage estimates the missing part (no description in the source; shown from the name)
  • test_record_usage_can_be_disabled_and_never_raises passed
    Record usage can be disabled and never raises (no description in the source; shown from the name)
  • test_no_caps_means_no_database_access passed
    No caps means no database access (no description in the source; shown from the name)
  • test_global_daily_cap_blocks_and_under_cap_passes passed
    Global daily cap blocks and under cap passes (no description in the source; shown from the name)
  • test_global_monthly_cap_blocks_when_daily_is_fine passed
    Global monthly cap blocks when daily is fine (no description in the source; shown from the name)
  • test_role_cap_only_applies_to_that_role_and_filters_by_role passed
    Role cap only applies to that role and filters by role (no description in the source; shown from the name)
  • test_role_overrides_and_zero_means_unlimited passed
    Role overrides and zero means unlimited (no description in the source; shown from the name)
  • test_bad_env_values_are_ignored passed
    Bad env values are ignored (no description in the source; shown from the name)
  • test_check_fails_open_on_database_error passed
    Check fails open on database error (no description in the source; shown from the name)
  • test_warning_logged_at_eighty_percent passed
    Warning logged at eighty percent (no description in the source; shown from the name)
  • test_call_provider_wrapper_records_and_returns_unchanged passed
    Call provider wrapper records and returns unchanged (no description in the source; shown from the name)
  • test_call_provider_wrapper_survives_recording_failure passed
    Call provider wrapper survives recording failure (no description in the source; shown from the name)
  • test_ask_blocked_by_budget_skips_the_whole_pipeline_and_traces_it passed
    Ask blocked by budget skips the whole pipeline and traces it (no description in the source; shown from the name)
  • test_ask_not_blocked_runs_normally passed
    Ask not blocked runs normally (no description in the source; shown from the name)
  • test_ask_auto_checks_global_first_then_the_routed_role passed
    Ask auto checks global first then the routed role (no description in the source; shown from the name)
  • test_ask_auto_blocked_after_routing_when_role_cap_reached passed
    Ask auto blocked after routing when role cap reached (no description in the source; shown from the name)
  • test_stream_records_estimated_usage_from_streamed_text passed
    Stream records estimated usage from streamed text (no description in the source; shown from the name)
  • test_stream_interrupted_still_records_what_was_spent passed
    Stream interrupted still records what was spent (no description in the source; shown from the name)
  • test_stream_recording_failure_never_breaks_the_stream passed
    Stream recording failure never breaks the stream (no description in the source; shown from the name)
  • test_ask_stream_blocked_by_budget_makes_no_calls passed
    Ask stream blocked by budget makes no calls (no description in the source; shown from the name)
  • test_ask_stream_not_blocked_streams_normally passed
    Ask stream not blocked streams normally (no description in the source; shown from the name)
test_channel_routers_import.py — 5 tests 5 passed, 0 failed, 0 skipped

Smoke test: each channel router module must import cleanly.

  • test_telegram_router_imports_cleanly passed
    Telegram router imports cleanly (no description in the source; shown from the name)
  • test_whatsapp_router_imports_cleanly passed
    Whatsapp router imports cleanly (no description in the source; shown from the name)
  • test_discord_router_imports_cleanly passed
    Discord router imports cleanly (no description in the source; shown from the name)
  • test_voice_router_imports_cleanly passed
    Voice router imports cleanly (no description in the source; shown from the name)
  • test_all_channel_routers_reference_tool_registry passed
    All 4 channels now dispatch escalate_to_owner via the same registry
test_chat.py — 21 tests 21 passed, 0 failed, 0 skipped

Tests for core/chat.py's ask() - specifically its wiring to core.observability.record_trace() (item #2 of the 9-pattern agentic-architecture build). No prior test file covered core.chat.ask() at all before this.

  • test_ask_records_a_trace_on_success passed
    Ask records a trace on success (no description in the source; shown from the name)
  • test_ask_records_a_trace_with_role_and_fallback passed
    Ask records a trace with role and fallback (no description in the source; shown from the name)
  • test_ask_records_a_trace_on_embedding_failure passed
    Ask records a trace on embedding failure (no description in the source; shown from the name)
  • test_ask_records_error_when_all_providers_failed passed
    Ask records error when all providers failed (no description in the source; shown from the name)
  • test_ask_does_not_run_grounding_check_for_non_sensitive_role passed
    Ask does not run grounding check for non sensitive role (no description in the source; shown from the name)
  • test_ask_runs_grounding_check_for_sensitive_role_and_appends_caveat_when_flagged passed
    Ask runs grounding check for sensitive role and appends caveat when flagged (no description in the source; shown from the name)
  • test_ask_runs_grounding_check_for_sensitive_role_but_no_caveat_when_grounded passed
    Ask runs grounding check for sensitive role but no caveat when grounded (no description in the source; shown from the name)
  • test_ask_skips_grounding_check_when_all_providers_failed_even_for_sensitive_role passed
    No point running a grounding check against an answer that's just
  • test_ask_sensitive_role_uses_reasoning_mode_and_traces_reasoning passed
    Ask sensitive role uses reasoning mode and traces reasoning (no description in the source; shown from the name)
  • test_ask_non_sensitive_uses_no_reasoning_mode passed
    Ask non sensitive uses no reasoning mode (no description in the source; shown from the name)
  • test_ask_passes_tot_mode_through_and_defaults_off passed
    Ask passes tot mode through and defaults off (no description in the source; shown from the name)
  • test_ask_auto_uses_routed_role_and_defaults_to_untrusted passed
    Ask auto uses routed role and defaults to untrusted (no description in the source; shown from the name)
  • test_ask_auto_trusted_flag_is_passed_through passed
    Ask auto trusted flag is passed through (no description in the source; shown from the name)
  • test_ask_auto_routed_to_sensitive_role_gets_reasoning_mode passed
    Ask auto routed to sensitive role gets reasoning mode (no description in the source; shown from the name)
  • test_ask_without_auto_never_calls_supervisor passed
    Ask without auto never calls supervisor (no description in the source; shown from the name)
  • test_ask_team_delegates_to_run_team_and_skips_normal_pipeline passed
    Ask team delegates to run team and skips normal pipeline (no description in the source; shown from the name)
  • test_ask_without_team_never_calls_run_team passed
    Ask without team never calls run team (no description in the source; shown from the name)
  • test_ask_actions_off_by_default passed
    Ask actions off by default (no description in the source; shown from the name)
  • test_ask_allow_actions_trusted_runs_and_appends_note passed
    Ask allow actions trusted runs and appends note (no description in the source; shown from the name)
  • test_ask_allow_actions_untrusted_never_plans passed
    Ask allow actions untrusted never plans (no description in the source; shown from the name)
  • test_ask_no_action_proposed_leaves_answer_untouched passed
    Ask no action proposed leaves answer untouched (no description in the source; shown from the name)
test_chat_feedback.py — 4 tests 4 passed, 0 failed, 0 skipped

Tests for core/api.py's /chat/feedback endpoint (chat_feedback function called directly, not via HTTP/TestClient - it's a plain function under the @app.post decorator). Covers the new optional channel/user_message/ ai_reply fields that additionally record a learned skill via learn_from_conversation, on top of the existing reinforce-only behavior via record_role_memory_outcome. employee_learning is mocked, no live DB/API needed.

  • test_feedback_without_conversation_fields_only_reinforces passed
    Backward compatibility: existing callers that only send
  • test_feedback_with_conversation_fields_also_learns passed
    Feedback with conversation fields also learns (no description in the source; shown from the name)
  • test_feedback_failure_still_calls_learn_with_resolved_false passed
    A failed outcome still calls learn_from_conversation (with
  • test_feedback_partial_conversation_fields_skips_learning passed
    All three of channel/user_message/ai_reply are required together -
test_code_sandbox.py — 23 tests 23 passed, 0 failed, 0 skipped

Tests for the code sandbox: core/code_exec.py (client), sandbox/runner.py (runner, with a fake Docker API), the run_code action tool, and the autonomy gate paths. No Docker, network or LLM is used. The spec/compose tests are deliberate tripwires: weakening the sandbox must fail CI.

  • test_enabled_needs_flag_and_token passed
    Enabled needs flag and token (no description in the source; shown from the name)
  • test_happy_path_request_shape passed
    Happy path request shape (no description in the source; shown from the name)
  • test_refusals_make_no_http_call passed
    Refusals make no http call (no description in the source; shown from the name)
  • test_flags_busy_errors_and_truncation passed
    Flags busy errors and truncation (no description in the source; shown from the name)
  • test_network_error_never_raises passed
    Network error never raises (no description in the source; shown from the name)
  • test_run_code_listed_only_when_enabled passed
    Run code listed only when enabled (no description in the source; shown from the name)
  • test_validate_plan_run_code passed
    Validate plan run code (no description in the source; shown from the name)
  • test_send_via_channel_code_dispatches passed
    Send via channel code dispatches (no description in the source; shown from the name)
  • test_full_mode_runs_immediately passed
    Full mode runs immediately (no description in the source; shown from the name)
  • test_semi_mode_pends_then_yes_runs passed
    Semi mode pends then yes runs (no description in the source; shown from the name)
  • test_sensitive_role_forced_to_semi passed
    Sensitive role forced to semi (no description in the source; shown from the name)
  • test_spec_is_locked_down passed
    Spec is locked down (no description in the source; shown from the name)
  • test_code_travels_only_in_env_never_in_command passed
    Code travels only in env never in command (no description in the source; shown from the name)
  • test_spec_ignores_everything_but_code passed
    Spec ignores everything but code (no description in the source; shown from the name)
  • test_demux_splits_streams passed
    Demux splits streams (no description in the source; shown from the name)
  • test_compose_sandbox_service_is_isolated passed
    Compose sandbox service is isolated (no description in the source; shown from the name)
  • test_run_in_sandbox_happy_path_and_cleanup passed
    Run in sandbox happy path and cleanup (no description in the source; shown from the name)
  • test_timeout_kills_then_cleans_up passed
    Timeout kills then cleans up (no description in the source; shown from the name)
  • test_failures_raise_and_still_clean_up passed
    Failures raise and still clean up (no description in the source; shown from the name)
  • test_http_health_and_auth passed
    Http health and auth (no description in the source; shown from the name)
  • test_http_validation_and_success passed
    Http validation and success (no description in the source; shown from the name)
  • test_http_busy_returns_429 passed
    Http busy returns 429 (no description in the source; shown from the name)
  • test_runner_refuses_to_start_without_token passed
    Runner refuses to start without token (no description in the source; shown from the name)
test_db_guard.py — 6 tests 6 passed, 0 failed, 0 skipped

Tests for the database guard in tests/conftest.py (pure function, no DB access).

  • test_refuses_non_test_names passed
    Refuses non test names (no description in the source; shown from the name)
  • test_allows_test_databases passed
    Allows test databases (no description in the source; shown from the name)
  • test_ci_and_explicit_override_skip_the_check passed
    Ci and explicit override skip the check (no description in the source; shown from the name)
  • test_unset_url_is_not_blocked passed
    Unset url is not blocked (no description in the source; shown from the name)
  • test_message_never_contains_credentials passed
    Message never contains credentials (no description in the source; shown from the name)
  • test_session_start_exits_for_production_name passed
    Session start exits for production name (no description in the source; shown from the name)
test_default_roles.py — 10 tests 10 passed, 0 failed, 0 skipped

Tests for the expanded DEFAULT_ROLES catalog (37 new global professional roles across three batches).

  • test_no_duplicate_roles_in_default_roles passed
    No duplicate roles in default roles (no description in the source; shown from the name)
  • test_new_role_registered_in_role_choices passed
    New role registered in role choices (no description in the source; shown from the name)
  • test_new_role_has_skill_tags passed
    New role has skill tags (no description in the source; shown from the name)
  • test_new_role_has_complete_default_entry passed
    New role has complete default entry (no description in the source; shown from the name)
  • test_sensitive_domain_roles_are_a_subset_of_role_choices passed
    Sensitive domain roles are a subset of role choices (no description in the source; shown from the name)
  • test_sensitive_domain_roles_include_all_expected passed
    Sensitive domain roles include all expected (no description in the source; shown from the name)
  • test_existing_nine_roles_untouched passed
    Existing nine roles untouched (no description in the source; shown from the name)
  • test_no_role_in_default_roles_is_missing_from_role_choices passed
    No role in default roles is missing from role choices (no description in the source; shown from the name)
  • test_total_role_count_at_least_46 passed
    Total role count at least 46 (no description in the source; shown from the name)
  • test_every_real_role_has_core_and_owner_instruction_tags passed
    Every real role has core and owner instruction tags (no description in the source; shown from the name)
test_embedding.py — 8 tests 8 passed, 0 failed, 0 skipped

Tests for core/embedding.py - same-provider retry-on-transient-error logic. No live API calls - google.genai.Client is mocked directly. Deliberately does NOT test cross-provider fallback because there isn't one: every stored chunk is embedded via this exact model/dimensions, so a different provider would land in a different, incompatible vector space (see embedding.py's module docstring/comments for why).

  • test_embed_text_succeeds_first_try_no_retry passed
    Embed text succeeds first try no retry (no description in the source; shown from the name)
  • test_embed_text_retries_on_429_then_succeeds passed
    Embed text retries on 429 then succeeds (no description in the source; shown from the name)
  • test_embed_text_retries_on_503_then_succeeds passed
    Embed text retries on 503 then succeeds (no description in the source; shown from the name)
  • test_embed_text_does_not_retry_on_non_transient_error passed
    A 401/403 (bad key) or 400 (malformed request) should fail fast,
  • test_embed_text_gives_up_after_max_retries passed
    Embed text gives up after max retries (no description in the source; shown from the name)
  • test_embed_batch_retries_on_transient_error passed
    Embed batch retries on transient error (no description in the source; shown from the name)
  • test_embed_batch_empty_input_returns_empty_no_api_call passed
    Embed batch empty input returns empty no api call (no description in the source; shown from the name)
  • test_embed_text_empty_string_returns_none_no_api_call passed
    Embed text empty string returns none no api call (no description in the source; shown from the name)
test_error_leaks.py — 11 tests 11 passed, 0 failed, 0 skipped

Regression tests: raw exception text must never reach API callers (CodeQL py/stack-trace-exposure).

  • test_generate_answer_failure_does_not_leak_error_text passed
    Generate answer failure does not leak error text (no description in the source; shown from the name)
  • test_execute_or_request_error_does_not_leak passed
    Execute or request error does not leak (no description in the source; shown from the name)
  • test_autonomy_daily_report_does_not_leak passed
    Autonomy daily report does not leak (no description in the source; shown from the name)
  • test_rejection_report_does_not_leak passed
    Rejection report does not leak (no description in the source; shown from the name)
  • test_observability_report_does_not_leak passed
    Observability report does not leak (no description in the source; shown from the name)
  • test_streaming_paths_do_not_interpolate_exception_text passed
    Streaming paths do not interpolate exception text (no description in the source; shown from the name)
  • test_api_http_errors_do_not_interpolate_exception_text passed
    Api http errors do not interpolate exception text (no description in the source; shown from the name)
  • test_send_via_channel_exception_does_not_leak passed
    Send via channel exception does not leak (no description in the source; shown from the name)
  • test_sync_endpoint_failure_returns_fresh_generic_dict passed
    Sync endpoint failure returns fresh generic dict (no description in the source; shown from the name)
  • test_sync_endpoint_success_returns_only_known_fields passed
    Sync endpoint success returns only known fields (no description in the source; shown from the name)
  • test_api_does_not_copy_result_dict_on_sync_failure passed
    Api does not copy result dict on sync failure (no description in the source; shown from the name)
test_generation.py — 35 tests 35 passed, 0 failed, 0 skipped

Tests for core/generation.py - provider-agnostic truncation retry safeguard. No DB or live API required - _call_provider is mocked directly so this tests generate_answer()'s retry logic in isolation from any real provider, covering Gemini/Anthropic/OpenAI-compatible (including Ollama) alike since they all normalize to a "finish_reason" key in the usage dict.

  • test_no_retry_when_not_truncated passed
    No retry when not truncated (no description in the source; shown from the name)
  • test_retries_once_on_truncation_and_uses_retry_result passed
    Retries once on truncation and uses retry result (no description in the source; shown from the name)
  • test_retry_result_still_truncated_returns_it_anyway passed
    If the retry is ALSO truncated, generate_answer should still return
  • test_no_retry_when_already_at_max_retry_cap passed
    max_tok already >= TRUNCATION_MAX_RETRY_TOKENS should not retry.
  • test_retry_failure_falls_back_to_original_answer passed
    If the retry call itself raises, keep the original (possibly
  • test_ollama_style_finish_reason_triggers_retry passed
    OpenAI-compatible hosts (including Ollama) report finish_reason='length'.
  • test_stream_no_notice_when_complete passed
    Stream no notice when complete (no description in the source; shown from the name)
  • test_stream_appends_notice_when_truncated_gemini_style passed
    Stream appends notice when truncated gemini style (no description in the source; shown from the name)
  • test_stream_appends_notice_when_truncated_openai_style passed
    Stream appends notice when truncated openai style (no description in the source; shown from the name)
  • test_stream_appends_notice_when_truncated_anthropic_style passed
    Stream appends notice when truncated anthropic style (no description in the source; shown from the name)
  • test_stream_no_notice_when_provider_fails_before_yielding passed
    If a provider errors before yielding anything and before ever
  • test_check_grounding_returns_none_when_grounded passed
    Check grounding returns none when grounded (no description in the source; shown from the name)
  • test_check_grounding_returns_reason_when_not_grounded passed
    Check grounding returns reason when not grounded (no description in the source; shown from the name)
  • test_check_grounding_generic_reason_when_no_colon passed
    Check grounding generic reason when no colon (no description in the source; shown from the name)
  • test_check_grounding_returns_none_on_provider_failure passed
    Best-effort: a failure in the check itself must never propagate
  • test_check_grounding_uses_primary_config_not_fallback_chain passed
    Check grounding uses primary config not fallback chain (no description in the source; shown from the name)
  • test_split_reasoning_marker_present passed
    Split reasoning marker present (no description in the source; shown from the name)
  • test_split_reasoning_marker_case_insensitive passed
    Split reasoning marker case insensitive (no description in the source; shown from the name)
  • test_split_reasoning_marker_absent_falls_back_to_full_text passed
    Split reasoning marker absent falls back to full text (no description in the source; shown from the name)
  • test_split_reasoning_empty_answer_after_marker_falls_back passed
    Split reasoning empty answer after marker falls back (no description in the source; shown from the name)
  • test_generate_answer_reasoning_mode_true passed
    Generate answer reasoning mode true (no description in the source; shown from the name)
  • test_generate_answer_reasoning_mode_false_unchanged passed
    Generate answer reasoning mode false unchanged (no description in the source; shown from the name)
  • test_generate_answer_reasoning_mode_no_marker_never_breaks passed
    Generate answer reasoning mode no marker never breaks (no description in the source; shown from the name)
  • test_generate_answer_all_providers_failed_has_reasoning_and_fallback_keys passed
    Generate answer all providers failed has reasoning and fallback keys (no description in the source; shown from the name)
  • test_tot_picks_candidate_chosen_by_judge passed
    Tot picks candidate chosen by judge (no description in the source; shown from the name)
  • test_tot_garbage_judge_reply_uses_first_candidate passed
    Tot garbage judge reply uses first candidate (no description in the source; shown from the name)
  • test_tot_judge_failure_uses_first_candidate passed
    Tot judge failure uses first candidate (no description in the source; shown from the name)
  • test_tot_returns_none_when_fewer_than_two_candidates passed
    Tot returns none when fewer than two candidates (no description in the source; shown from the name)
  • test_generate_answer_tot_mode_true_returns_tot_answer_and_reasoning passed
    Generate answer tot mode true returns tot answer and reasoning (no description in the source; shown from the name)
  • test_generate_answer_tot_mode_falls_back_to_normal_answer passed
    Generate answer tot mode falls back to normal answer (no description in the source; shown from the name)
  • test_generate_answer_tot_mode_false_never_calls_tree_of_thought passed
    Generate answer tot mode false never calls tree of thought (no description in the source; shown from the name)
  • test_tot_judge_call_gets_enough_token_budget passed
    Tot judge call gets enough token budget (no description in the source; shown from the name)
  • test_tot_judge_empty_reply_is_retried_with_bigger_budget passed
    Tot judge empty reply is retried with bigger budget (no description in the source; shown from the name)
  • test_check_grounding_uses_bigger_budget_and_flags_concern passed
    Check grounding uses bigger budget and flags concern (no description in the source; shown from the name)
  • test_check_grounding_empty_reply_is_retried_with_bigger_budget passed
    Check grounding empty reply is retried with bigger budget (no description in the source; shown from the name)
test_gmail_connector.py — 8 tests 8 passed, 0 failed, 0 skipped

Tests for core/integrations/gmail_connector.py -- the Gmail connector. google-api-python-client / google-auth are heavy optional dependencies not installed in CI (same convention as snowflake-connector-python / google-cloud-bigquery). We inject fake googleapiclient.discovery and google.oauth2.credentials modules into sys.modules so the connector's lazy imports succeed against MagicMocks.

  • test_missing_connection_string_fails_gracefully passed
    Missing connection string fails gracefully (no description in the source; shown from the name)
  • test_invalid_json_fails_gracefully passed
    Invalid json fails gracefully (no description in the source; shown from the name)
  • test_missing_required_keys_fails_gracefully passed
    Missing required keys fails gracefully (no description in the source; shown from the name)
  • test_connection_success passed
    Connection success (no description in the source; shown from the name)
  • test_connection_failure_surfaces_message passed
    Connection failure surfaces message (no description in the source; shown from the name)
  • test_fetch_data_maps_messages passed
    Fetch data maps messages (no description in the source; shown from the name)
  • test_fetch_data_no_messages_returns_empty_list passed
    Fetch data no messages returns empty list (no description in the source; shown from the name)
  • test_fetch_data_appends_user_identifier_to_query passed
    Fetch data appends user identifier to query (no description in the source; shown from the name)
test_learning.py — 4 tests 4 passed, 0 failed, 0 skipped

Tests for core/employees/learning.py's learn_from_owner_approval() - records the owner's real approve/reject decision as a learned skill, distinctly for each outcome (not mislabeling a rejection as an approval). write_learned_skill is mocked, no live DB/API needed.

  • test_approved_action_recorded_as_approved passed
    Approved action recorded as approved (no description in the source; shown from the name)
  • test_rejected_action_recorded_as_rejected_not_approved passed
    Rejected action recorded as rejected not approved (no description in the source; shown from the name)
  • test_default_approved_true_for_backward_compatibility passed
    approved defaults to True so any other/future caller that
  • test_action_type_included_in_tags_for_both_outcomes passed
    Action type included in tags for both outcomes (no description in the source; shown from the name)
test_mcp_client.py — 20 tests 20 passed, 0 failed, 0 skipped

Tests for core/mcp_client.py and the mcp_call action tool. A fake in-process MCP server replaces requests.post, so no network and no LLM calls happen.

  • test_servers_and_allowlist_parsing passed
    Servers and allowlist parsing (no description in the source; shown from the name)
  • test_nothing_configured_means_no_tool passed
    Nothing configured means no tool (no description in the source; shown from the name)
  • test_configured_tool_listed_with_targets passed
    Configured tool listed with targets (no description in the source; shown from the name)
  • test_happy_path_sequence_and_headers passed
    Happy path sequence and headers (no description in the source; shown from the name)
  • test_no_token_means_no_auth_header passed
    No token means no auth header (no description in the source; shown from the name)
  • test_empty_content_sends_empty_arguments passed
    Empty content sends empty arguments (no description in the source; shown from the name)
  • test_event_stream_reply_is_parsed passed
    Event stream reply is parsed (no description in the source; shown from the name)
  • test_tool_reported_error_is_flagged passed
    Tool reported error is flagged (no description in the source; shown from the name)
  • test_result_is_truncated passed
    Result is truncated (no description in the source; shown from the name)
  • test_not_allowlisted_is_refused_without_any_http passed
    Not allowlisted is refused without any http (no description in the source; shown from the name)
  • test_non_public_server_is_refused_without_http passed
    Non public server is refused without http (no description in the source; shown from the name)
  • test_arguments_must_be_json_object passed
    Arguments must be json object (no description in the source; shown from the name)
  • test_invalid_json_arguments_fail_safely passed
    Invalid json arguments fail safely (no description in the source; shown from the name)
  • test_http_error_server_error_and_oversize_fail_safely passed
    Http error server error and oversize fail safely (no description in the source; shown from the name)
  • test_network_exception_never_raises passed
    Network exception never raises (no description in the source; shown from the name)
  • test_validate_plan_mcp_call passed
    Validate plan mcp call (no description in the source; shown from the name)
  • test_send_via_channel_mcp_dispatches passed
    Send via channel mcp dispatches (no description in the source; shown from the name)
  • test_full_mode_executes_immediately passed
    Full mode executes immediately (no description in the source; shown from the name)
  • test_semi_mode_pends_then_yes_dispatches_same_channel passed
    Semi mode pends then yes dispatches same channel (no description in the source; shown from the name)
  • test_sensitive_role_forced_to_semi passed
    Sensitive role forced to semi (no description in the source; shown from the name)
test_memory_role_scoping.py — 4 tests 4 passed, 0 failed, 0 skipped

Tests for role-scoped memory retrieval (core/employees/memory.py + core/employees/skills.py). Covers the fix for semantic_search() having no tag filter at all -- previously any role's query could surface any other role's stored memories via similarity search alone.

  • test_semantic_search_without_tags_returns_across_roles passed
    Baseline: with tags=None (the old default behavior), search is
  • test_semantic_search_with_tags_excludes_other_roles passed
    The actual fix: passing tags restricts results to entries sharing
  • test_get_role_skills_passes_role_tags_to_semantic_search passed
    skills.py's get_role_skills() must actually pass the role's own
  • test_get_role_skills_with_ids_passes_role_tags_to_semantic_search passed
    Get role skills with ids passes role tags to semantic search (no description in the source; shown from the name)
test_memory_seeding.py — 5 tests 5 passed, 0 failed, 0 skipped

Tests for core/employees/memory.py's seed_default_memory_seeds() - idempotent seeding of DEFAULT_MEMORY_SEEDS (generic + per-vertical compliance seeds) into employee_memory. Requires a live DB (same convention as test_autonomy.py/test_memory_role_scoping.py), reachable via DATABASE_URL.

  • test_seeds_all_default_memory_seeds_on_first_run passed
    Seeds all default memory seeds on first run (no description in the source; shown from the name)
  • test_second_run_is_a_noop passed
    Second run is a noop (no description in the source; shown from the name)
  • test_compliance_seeds_present_with_correct_tags passed
    Compliance seeds present with correct tags (no description in the source; shown from the name)
  • test_healthcare_seed_explicitly_excludes_veterinary passed
    Regression guard for the cross-role tag-bleed risk: healthcare_intake
  • test_all_seven_sensitive_roles_have_a_compliance_seed passed
    Every role in SENSITIVE_DOMAIN_ROLES should have at least one
test_notion_connector.py — 8 tests 8 passed, 0 failed, 0 skipped

Tests for core/integrations/notion_connector.py — the Notion API connector. Pure unit tests against a mocked requests.request; no live Notion workspace or DB needed.

  • test_missing_token_fails_gracefully passed
    Missing token fails gracefully (no description in the source; shown from the name)
  • test_connection_success passed
    Connection success (no description in the source; shown from the name)
  • test_notion_api_error_surfaces_message passed
    Notion api error surfaces message (no description in the source; shown from the name)
  • test_fetch_database_default passed
    Fetch database default (no description in the source; shown from the name)
  • test_fetch_database_requires_endpoint passed
    Fetch database requires endpoint (no description in the source; shown from the name)
  • test_fetch_page passed
    Fetch page (no description in the source; shown from the name)
  • test_fetch_search_no_endpoint_needed passed
    Fetch search no endpoint needed (no description in the source; shown from the name)
  • test_unsupported_query_template_raises passed
    Unsupported query template raises (no description in the source; shown from the name)
test_observability.py — 8 tests 8 passed, 0 failed, 0 skipped

Tests for core/observability.py - item #2 of the 9-pattern agentic-architecture build (agent_traces table). Requires a Postgres DB with db/schema.sql applied, reachable via the DATABASE_URL env var (same convention as tests/test_autonomy.py).

  • test_record_trace_inserts_a_row passed
    Record trace inserts a row (no description in the source; shown from the name)
  • test_record_trace_with_no_role_and_an_error passed
    Record trace with no role and an error (no description in the source; shown from the name)
  • test_record_trace_with_reflection_concern passed
    Record trace with reflection concern (no description in the source; shown from the name)
  • test_record_trace_never_raises_on_bad_connection passed
    record_trace() must be best-effort - a DB failure should never
  • test_report_with_no_traces_today passed
    Report with no traces today (no description in the source; shown from the name)
  • test_report_aggregates_role_provider_and_error_rate passed
    Report aggregates role provider and error rate (no description in the source; shown from the name)
  • test_report_shows_reflection_flagged_count passed
    Report shows reflection flagged count (no description in the source; shown from the name)
  • test_record_trace_reasoning_round_trips passed
    Record trace reasoning round trips (no description in the source; shown from the name)
test_office.py — 12 tests 12 passed, 0 failed, 0 skipped

AI Office: the data functions, the three read-only routes, the fixed static files, the key behaviour (page public, data protected) and tripwires on the page's safety.

  • test_overview_counts_and_shape passed
    Overview counts and shape (no description in the source; shown from the name)
  • test_overview_never_reports_the_approval_target passed
    Overview never reports the approval target (no description in the source; shown from the name)
  • test_autonomy_log_order_filter_truncation_and_clamp passed
    Autonomy log order filter truncation and clamp (no description in the source; shown from the name)
  • test_usage_summary_totals_limits_and_sensitivity passed
    Usage summary totals limits and sensitivity (no description in the source; shown from the name)
  • test_budget_limits_helper passed
    Budget limits helper (no description in the source; shown from the name)
  • test_static_files_and_headers passed
    Static files and headers (no description in the source; shown from the name)
  • test_only_the_three_paths_are_served passed
    Only the three paths are served (no description in the source; shown from the name)
  • test_page_safety_tripwires passed
    Page safety tripwires (no description in the source; shown from the name)
  • test_page_uses_the_expected_endpoints passed
    Page uses the expected endpoints (no description in the source; shown from the name)
  • test_app_js_is_valid_javascript passed
    App js is valid javascript (no description in the source; shown from the name)
  • test_exempt_paths_are_exactly_the_page_files passed
    Exempt paths are exactly the page files (no description in the source; shown from the name)
  • test_page_is_public_but_data_needs_the_key passed
    Page is public but data needs the key (no description in the source; shown from the name)
test_office_org.py — 6 tests 6 passed, 0 failed, 0 skipped

AI Office org chart: department definitions, grouping rules, per-role fields and the /org route. Runs against the test database; role lookups are faked.

  • test_every_shipped_role_has_exactly_one_department passed
    Every shipped role has exactly one department (no description in the source; shown from the name)
  • test_regulated_department_is_exactly_the_sensitive_roles passed
    Regulated department is exactly the sensitive roles (no description in the source; shown from the name)
  • test_department_of_rules passed
    Department of rules (no description in the source; shown from the name)
  • test_org_chart_grouping_fields_and_open_task_counts passed
    Org chart grouping fields and open task counts (no description in the source; shown from the name)
  • test_org_route_needs_the_key passed
    Org route needs the key (no description in the source; shown from the name)
  • test_page_uses_the_org_and_task_endpoints passed
    Page uses the org and task endpoints (no description in the source; shown from the name)
test_page_fetch.py — 30 tests 31 passed, 0 failed, 0 skipped

Tests for core/page_fetch.py and the fetch_page action tool. No real network: DNS, sockets and TLS are faked. Covers allowlist matching, SSRF defences, redirect handling, caps, HTML-to-text, planner validation and gate paths.

  • test_allowlist_parsing_drops_tlds_and_bare_names passed
    Allowlist parsing drops tlds and bare names (no description in the source; shown from the name)
  • test_host_allowed_matrix passed
    Host allowed matrix (no description in the source; shown from the name)
  • test_enabled_needs_flag_and_domains passed
    Enabled needs flag and domains (no description in the source; shown from the name)
  • test_validate_rejects passed
    Validate rejects (no description in the source; shown from the name)
  • test_validate_accepts_and_normalises passed
    Validate accepts and normalises (no description in the source; shown from the name)
  • test_resolve_public_returns_first_ip passed
    Resolve public returns first ip (no description in the source; shown from the name)
  • test_resolve_refuses_non_public passed
    Resolve refuses non public (no description in the source; shown from the name)
  • test_resolve_refuses_if_any_address_is_private passed
    Resolve refuses if any address is private (no description in the source; shown from the name)
  • test_request_connects_to_pinned_ip_with_sni_and_clean_headers passed
    Request connects to pinned ip with sni and clean headers (no description in the source; shown from the name)
  • test_request_returns_redirect_location_without_body passed
    Request returns redirect location without body (no description in the source; shown from the name)
  • test_request_enforces_size_cap passed
    Request enforces size cap (no description in the source; shown from the name)
  • test_html_to_text_visible_only passed
    Html to text visible only (no description in the source; shown from the name)
  • test_happy_path_html passed
    Happy path html (no description in the source; shown from the name)
  • test_json_and_plain_pass_through passed
    Json and plain pass through (no description in the source; shown from the name)
  • test_redirect_within_allowlist_is_followed passed
    Redirect within allowlist is followed (no description in the source; shown from the name)
  • test_redirect_to_forbidden_target_is_refused passed
    Redirect to forbidden target is refused (no description in the source; shown from the name)
  • test_too_many_redirects passed
    Too many redirects (no description in the source; shown from the name)
  • test_private_resolution_is_refused_before_connecting passed
    Private resolution is refused before connecting (no description in the source; shown from the name)
  • test_disabled_or_bad_url_makes_no_request passed
    Disabled or bad url makes no request (no description in the source; shown from the name)
  • test_status_content_type_size_and_network_errors passed
    Status content type size and network errors (no description in the source; shown from the name)
  • test_result_is_truncated passed
    Result is truncated (no description in the source; shown from the name)
  • test_fetch_page_listed_only_when_enabled passed
    Fetch page listed only when enabled (no description in the source; shown from the name)
  • test_validate_plan_fetch_page passed
    Validate plan fetch page (no description in the source; shown from the name)
  • test_send_via_channel_fetch_dispatches passed
    Send via channel fetch dispatches (no description in the source; shown from the name)
  • test_full_mode_fetches_immediately passed
    Full mode fetches immediately (no description in the source; shown from the name)
  • test_semi_mode_pends_then_yes_fetches passed
    Semi mode pends then yes fetches (no description in the source; shown from the name)
  • test_sensitive_role_forced_to_semi passed
    Sensitive role forced to semi (no description in the source; shown from the name)
  • test_library_error_text_never_reaches_the_result passed
    Library error text never reaches the result (no description in the source; shown from the name)
  • test_every_refusal_code_has_constant_wording passed
    Every refusal code has constant wording (no description in the source; shown from the name)
  • test_request_requires_tls_1_2_or_newer passed
    Request requires tls 1 2 or newer (no description in the source; shown from the name)
test_proactive_triggers.py — 21 tests 21 passed, 0 failed, 0 skipped

Tests for core/proactive_triggers.py -- CRUD/validation, due filtering, the atomic claim, delivery through the autonomy gate, and failure isolation. ask() and execute_or_request() are stubbed here, so no LLM call is made.

  • test_create_and_get passed
    Create and get (no description in the source; shown from the name)
  • test_rejects_bad_schedule passed
    Rejects bad schedule (no description in the source; shown from the name)
  • test_rejects_unknown_role_and_missing_fields passed
    Rejects unknown role and missing fields (no description in the source; shown from the name)
  • test_update_and_validation passed
    Update and validation (no description in the source; shown from the name)
  • test_delete passed
    Delete (no description in the source; shown from the name)
  • test_due_filtering passed
    Due filtering (no description in the source; shown from the name)
  • test_claim_is_atomic_and_advances_schedule passed
    Claim is atomic and advances schedule (no description in the source; shown from the name)
  • test_run_trigger_delivers_through_gate passed
    Run trigger delivers through gate (no description in the source; shown from the name)
  • test_run_trigger_passes_through_pending_approval passed
    Run trigger passes through pending approval (no description in the source; shown from the name)
  • test_run_trigger_empty_answer_not_delivered passed
    Run trigger empty answer not delivered (no description in the source; shown from the name)
  • test_run_trigger_skips_if_already_claimed passed
    Run trigger skips if already claimed (no description in the source; shown from the name)
  • test_broken_trigger_does_not_raise_or_refire passed
    Broken trigger does not raise or refire (no description in the source; shown from the name)
  • test_run_due_triggers_runs_mine_and_never_raises passed
    Run due triggers runs mine and never raises (no description in the source; shown from the name)
  • test_full_mode_sends_to_owner_immediately passed
    Full mode sends to owner immediately (no description in the source; shown from the name)
  • test_semi_mode_pends_then_owner_yes_dispatches_same_channel passed
    Semi mode pends then owner yes dispatches same channel (no description in the source; shown from the name)
  • test_semi_mode_owner_no_sends_nothing passed
    Semi mode owner no sends nothing (no description in the source; shown from the name)
  • test_sensitive_role_forced_from_full_to_semi passed
    Sensitive role forced from full to semi (no description in the source; shown from the name)
  • test_off_mode_is_inert passed
    Off mode is inert (no description in the source; shown from the name)
  • test_scheduler_job_never_raises passed
    Scheduler job never raises (no description in the source; shown from the name)
  • test_routes_crud_roundtrip passed
    Routes crud roundtrip (no description in the source; shown from the name)
  • test_routes_error_codes passed
    Routes error codes (no description in the source; shown from the name)
test_queue.py — 5 tests 5 passed, 0 failed, 0 skipped

Tests for core/queue.py - the optional Redis-backed task queue.

  • test_enqueue_sync_runs_inline_when_redis_url_unset passed
    Enqueue sync runs inline when redis url unset (no description in the source; shown from the name)
  • test_enqueue_sync_uses_queue_when_redis_configured_and_reachable passed
    Enqueue sync uses queue when redis configured and reachable (no description in the source; shown from the name)
  • test_falls_back_to_inline_when_redis_configured_but_unreachable passed
    Falls back to inline when redis configured but unreachable (no description in the source; shown from the name)
  • test_get_queue_returns_none_when_redis_url_unset passed
    Get queue returns none when redis url unset (no description in the source; shown from the name)
  • test_get_queue_caches_connection_across_calls passed
    Get queue caches connection across calls (no description in the source; shown from the name)
test_razorpay_connector.py — 8 tests 8 passed, 0 failed, 0 skipped

Tests for core/integrations/razorpay_connector.py -- the Razorpay REST API connector. Pure unit tests against a mocked requests.get; no live Razorpay account or DB needed.

  • test_missing_credentials_fails_gracefully passed
    Missing credentials fails gracefully (no description in the source; shown from the name)
  • test_missing_key_secret_fails_gracefully passed
    Missing key secret fails gracefully (no description in the source; shown from the name)
  • test_connection_success passed
    Connection success (no description in the source; shown from the name)
  • test_razorpay_api_error_surfaces_message passed
    Razorpay api error surfaces message (no description in the source; shown from the name)
  • test_fetch_payments_default passed
    Fetch payments default (no description in the source; shown from the name)
  • test_fetch_paginates_using_skip passed
    Fetch paginates using skip (no description in the source; shown from the name)
  • test_fetch_orders_resource passed
    Fetch orders resource (no description in the source; shown from the name)
  • test_unsupported_query_template_raises passed
    Unsupported query template raises (no description in the source; shown from the name)
test_rejection_report.py — 6 tests 6 passed, 0 failed, 0 skipped

Tests for core/autonomy.py's rejection-pattern reporting (item #2 from the pending list, deliberately scoped to real-data-only reporting - see suggest_autonomy_changes()'s docstring for why the actual pattern-suggestion logic isn't implemented yet).

  • test_rejection_report_handles_no_rejections passed
    Rejection report handles no rejections (no description in the source; shown from the name)
  • test_rejection_report_groups_and_counts_correctly passed
    Rejection report groups and counts correctly (no description in the source; shown from the name)
  • test_rejection_report_handles_null_role passed
    Rejection report handles null role (no description in the source; shown from the name)
  • test_rejection_report_handles_db_error_gracefully passed
    Rejection report handles db error gracefully (no description in the source; shown from the name)
  • test_suggest_autonomy_changes_is_explicitly_not_implemented passed
    Suggest autonomy changes is explicitly not implemented (no description in the source; shown from the name)
  • test_min_rejections_threshold_reads_from_env_with_sane_default passed
    Min rejections threshold reads from env with sane default (no description in the source; shown from the name)
test_retrieval.py — 7 tests 7 passed, 0 failed, 0 skipped

Tests for core/retrieval.py's search_similar_chunks_with_graph() - direct vs. indirect (1-2 hop) knowledge-graph boosting (Issue #25).

  • test_direct_match_gets_graph_boost passed
    Direct match gets graph boost (no description in the source; shown from the name)
  • test_one_hop_indirect_match_gets_smaller_boost passed
    Neo4j -> PostgreSQL (1 hop). Doc mentions PostgreSQL, not Neo4j.
  • test_two_hop_indirect_match_gets_smaller_boost passed
    Neo4j -> PostgreSQL -> Docker (2 hops). Doc mentions Docker only.
  • test_direct_match_wins_over_indirect_for_same_document passed
    A doc that is BOTH a direct match and reachable via related entities
  • test_no_related_entities_falls_back_to_direct_only passed
    No related entities falls back to direct only (no description in the source; shown from the name)
  • test_graph_failure_falls_back_to_pure_vector_results passed
    If graph_service raises (e.g. Neo4j unreachable), return unboosted
  • test_no_vector_candidates_returns_empty_without_graph_calls passed
    No vector candidates returns empty without graph calls (no description in the source; shown from the name)
test_role_definitions.py — 9 tests 9 passed, 0 failed, 0 skipped

Consistency guards for core/employees/defaults.py, so a half-added role (or a new sensitive-domain role that silently skips the safety rules) fails CI instead of shipping. Pure data checks: no DB, no network.

  • test_role_names_are_unique passed
    Role names are unique (no description in the source; shown from the name)
  • test_every_default_role_is_fully_defined passed
    Every default role is fully defined (no description in the source; shown from the name)
  • test_role_choices_match_default_roles passed
    Role choices match default roles (no description in the source; shown from the name)
  • test_role_skill_tags_cover_every_role_and_have_no_unknown_keys passed
    Role skill tags cover every role and have no unknown keys (no description in the source; shown from the name)
  • test_channels_are_known passed
    Channels are known (no description in the source; shown from the name)
  • test_sensitive_roles_are_real_defined_roles passed
    Sensitive roles are real defined roles (no description in the source; shown from the name)
  • test_compliance_seeds_match_sensitive_roles_and_are_well_formed passed
    Compliance seeds match sensitive roles and are well formed (no description in the source; shown from the name)
  • test_sensitive_marker_tags_require_sensitive_domain_role passed
    Sensitive marker tags require sensitive domain role (no description in the source; shown from the name)
  • test_guard_actually_catches_an_unguarded_role passed
    Guard actually catches an unguarded role (no description in the source; shown from the name)
test_sandbox_image.py — 3 tests 3 passed, 0 failed, 0 skipped

The sandbox runner ships in its own image instead of being bind-mounted from the folder compose runs in (which depends on whichever branch happens to be checked out there). Tripwires so that cannot silently regress.

  • test_sandbox_is_built_not_bind_mounted passed
    Sandbox is built not bind mounted (no description in the source; shown from the name)
  • test_dockerfile_copies_the_runner_and_installs_nothing passed
    Dockerfile copies the runner and installs nothing (no description in the source; shown from the name)
  • test_build_context_holds_only_the_dockerfile_and_the_runner passed
    Build context holds only the dockerfile and the runner (no description in the source; shown from the name)
test_sensitivity.py — 15 tests 15 passed, 0 failed, 0 skipped

Tests for core/employees/sensitivity.py and its use in ask() and the autonomy gate. No network; DB reads mocked.

  • test_builtin_sensitive_roles_are_sensitive_without_db passed
    Builtin sensitive roles are sensitive without db (no description in the source; shown from the name)
  • test_builtin_non_sensitive_roles_stay_non_sensitive_without_db passed
    Builtin non sensitive roles stay non sensitive without db (no description in the source; shown from the name)
  • test_none_and_empty_role passed
    None and empty role (no description in the source; shown from the name)
  • test_runtime_role_sensitive_by_name_tokens passed
    Runtime role sensitive by name tokens (no description in the source; shown from the name)
  • test_runtime_role_sensitive_by_tags_or_display_name passed
    Runtime role sensitive by tags or display name (no description in the source; shown from the name)
  • test_benign_runtime_roles_and_whole_word_matching passed
    Benign runtime roles and whole word matching (no description in the source; shown from the name)
  • test_env_extra_forces_sensitive passed
    Env extra forces sensitive (no description in the source; shown from the name)
  • test_env_reviewed_safe_exempts_runtime_roles_but_never_builtin_sensitive passed
    Env reviewed safe exempts runtime roles but never builtin sensitive (no description in the source; shown from the name)
  • test_db_error_falls_back_to_name_only_and_never_raises passed
    Db error falls back to name only and never raises (no description in the source; shown from the name)
  • test_unexpected_failure_fails_closed passed
    Unexpected failure fails closed (no description in the source; shown from the name)
  • test_markers_are_a_superset_of_the_static_guard_markers passed
    Markers are a superset of the static guard markers (no description in the source; shown from the name)
  • test_autonomy_forces_runtime_sensitive_role_from_full_to_semi passed
    Autonomy forces runtime sensitive role from full to semi (no description in the source; shown from the name)
  • test_autonomy_still_executes_for_benign_runtime_role passed
    Autonomy still executes for benign runtime role (no description in the source; shown from the name)
  • test_ask_runtime_sensitive_role_gets_reasoning_and_grounding_check passed
    Ask runtime sensitive role gets reasoning and grounding check (no description in the source; shown from the name)
  • test_ask_benign_runtime_role_gets_neither passed
    Ask benign runtime role gets neither (no description in the source; shown from the name)
test_shell_sandbox.py — 15 tests 15 passed, 0 failed, 0 skipped

Tests for the shell mode of the sandbox: client (core/code_exec.run_shell), runner shell spec/HTTP validation, the run_shell tool, and the gate paths. No Docker, network or LLM is used.

  • test_flags_are_independent passed
    Flags are independent (no description in the source; shown from the name)
  • test_run_shell_request_shape passed
    Run shell request shape (no description in the source; shown from the name)
  • test_run_shell_refusals_make_no_http_call passed
    Run shell refusals make no http call (no description in the source; shown from the name)
  • test_run_shell_errors_never_raise passed
    Run shell errors never raise (no description in the source; shown from the name)
  • test_existing_run_code_labels_unchanged passed
    Existing run code labels unchanged (no description in the source; shown from the name)
  • test_run_shell_listed_only_when_shell_enabled passed
    Run shell listed only when shell enabled (no description in the source; shown from the name)
  • test_validate_plan_run_shell passed
    Validate plan run shell (no description in the source; shown from the name)
  • test_shell_spec_same_lockdown_command_only_in_env passed
    Shell spec same lockdown command only in env (no description in the source; shown from the name)
  • test_default_mode_is_still_python passed
    Default mode is still python (no description in the source; shown from the name)
  • test_http_routes_shell_and_code_to_right_mode passed
    Http routes shell and code to right mode (no description in the source; shown from the name)
  • test_http_rejects_ambiguous_or_bad_bodies passed
    Http rejects ambiguous or bad bodies (no description in the source; shown from the name)
  • test_send_via_channel_shell_dispatches passed
    Send via channel shell dispatches (no description in the source; shown from the name)
  • test_full_mode_runs_immediately passed
    Full mode runs immediately (no description in the source; shown from the name)
  • test_semi_mode_pends_then_yes_runs passed
    Semi mode pends then yes runs (no description in the source; shown from the name)
  • test_sensitive_role_forced_to_semi passed
    Sensitive role forced to semi (no description in the source; shown from the name)
test_slack_connector.py — 8 tests 8 passed, 0 failed, 0 skipped

Tests for core/integrations/slack_connector.py — the Slack Web API connector. Pure unit tests against a mocked requests.get; no live Slack workspace or DB needed (unlike test_autonomy.py, this connector talks to an external API, not Postgres, so there's nothing to fixture-reset).

  • test_missing_token_fails_gracefully passed
    Missing token fails gracefully (no description in the source; shown from the name)
  • test_connection_success passed
    Connection success (no description in the source; shown from the name)
  • test_slack_api_error_surfaces_message passed
    Slack api error surfaces message (no description in the source; shown from the name)
  • test_fetch_channels_default passed
    Fetch channels default (no description in the source; shown from the name)
  • test_fetch_users passed
    Fetch users (no description in the source; shown from the name)
  • test_fetch_messages_requires_channel_id passed
    Fetch messages requires channel id (no description in the source; shown from the name)
  • test_fetch_messages_filters_by_user passed
    Fetch messages filters by user (no description in the source; shown from the name)
  • test_unsupported_query_template_raises passed
    Unsupported query template raises (no description in the source; shown from the name)
test_snowflake_connector.py — 8 tests 8 passed, 0 failed, 0 skipped

Tests for core/integrations/snowflake_connector.py -- the Snowflake connector. snowflake-connector-python is a heavy optional dependency that isn't installed in CI (matching the pymysql/psycopg2 pattern in sql_connectors.py -- these are lazily imported, not required deps). We inject a fake `snowflake.connector` module into sys.modules so the connector's lazy `import snowflake.connector` succeeds against a MagicMock, and drive behavior by configuring that mock per test.

  • test_missing_connection_string_fails_gracefully passed
    Missing connection string fails gracefully (no description in the source; shown from the name)
  • test_invalid_json_fails_gracefully passed
    Invalid json fails gracefully (no description in the source; shown from the name)
  • test_missing_required_keys_fails_gracefully passed
    Missing required keys fails gracefully (no description in the source; shown from the name)
  • test_connection_success passed
    Connection success (no description in the source; shown from the name)
  • test_fetch_data_requires_query_template passed
    Fetch data requires query template (no description in the source; shown from the name)
  • test_fetch_data_maps_columns passed
    Fetch data maps columns (no description in the source; shown from the name)
  • test_fetch_data_substitutes_user_identifier passed
    Fetch data substitutes user identifier (no description in the source; shown from the name)
  • test_connection_failure_surfaces_message passed
    Connection failure surfaces message (no description in the source; shown from the name)
test_supervisor.py — 10 tests 10 passed, 0 failed, 0 skipped

Tests for core/employees/supervisor.py (item #6). No DB/network: list_roles and the LLM are mocked.

  • test_llm_pick_valid_role passed
    Llm pick valid role (no description in the source; shown from the name)
  • test_reply_with_extra_words_still_parsed passed
    Reply with extra words still parsed (no description in the source; shown from the name)
  • test_untrusted_cannot_reach_internal_role_and_prompt_hides_it passed
    Untrusted cannot reach internal role and prompt hides it (no description in the source; shown from the name)
  • test_untrusted_cannot_reach_sensitive_role passed
    Untrusted cannot reach sensitive role (no description in the source; shown from the name)
  • test_trusted_can_reach_internal_and_sensitive_roles passed
    Trusted can reach internal and sensitive roles (no description in the source; shown from the name)
  • test_empty_reply_retried_with_bigger_budget passed
    Empty reply retried with bigger budget (no description in the source; shown from the name)
  • test_provider_failure_falls_back_to_keyword passed
    Provider failure falls back to keyword (no description in the source; shown from the name)
  • test_provider_failure_no_keyword_uses_channel_default passed
    Provider failure no keyword uses channel default (no description in the source; shown from the name)
  • test_garbage_reply_falls_back passed
    Garbage reply falls back (no description in the source; shown from the name)
  • test_list_roles_failure_never_raises passed
    List roles failure never raises (no description in the source; shown from the name)
test_sync_integration_learning.py — 3 tests 3 passed, 0 failed, 0 skipped

Tests for core/api.py's sync_integration() endpoint - covers the new learn_from_integration_action() call added after a successful/failed sync, using integrations_service.sync_data_source()'s and get_data_source()'s real return shapes. Called directly (plain function under @app.post), integrations_service and employee_learning mocked, no live DB/API needed.

  • test_successful_sync_records_learned_skill passed
    Successful sync records learned skill (no description in the source; shown from the name)
  • test_failed_sync_records_learned_skill_with_error passed
    Failed sync records learned skill with error (no description in the source; shown from the name)
  • test_data_source_not_found_raises_404_and_does_not_learn passed
    Data source not found raises 404 and does not learn (no description in the source; shown from the name)
test_tasks.py — 22 tests 22 passed, 0 failed, 0 skipped

Tests for core/tasks.py — task ticket CRUD, and the two ways tasks/owner notifications get triggered through the autonomy gate (core.autonomy's "task" and "notify_owner" channels).

  • test_create_task_minimal passed
    Create task minimal (no description in the source; shown from the name)
  • test_create_task_requires_title passed
    Create task requires title (no description in the source; shown from the name)
  • test_create_task_rejects_bad_status passed
    Create task rejects bad status (no description in the source; shown from the name)
  • test_create_task_rejects_bad_priority passed
    Create task rejects bad priority (no description in the source; shown from the name)
  • test_create_task_rejects_unknown_role passed
    Create task rejects unknown role (no description in the source; shown from the name)
  • test_create_task_rejects_oversized_title passed
    Create task rejects oversized title (no description in the source; shown from the name)
  • test_get_task_roundtrip passed
    Get task roundtrip (no description in the source; shown from the name)
  • test_get_task_missing_returns_none passed
    Get task missing returns none (no description in the source; shown from the name)
  • test_update_task_status passed
    Update task status (no description in the source; shown from the name)
  • test_update_task_result_and_done passed
    Update task result and done (no description in the source; shown from the name)
  • test_update_task_missing_returns_none passed
    Update task missing returns none (no description in the source; shown from the name)
  • test_update_task_rejects_bad_status passed
    Update task rejects bad status (no description in the source; shown from the name)
  • test_list_tasks_filters_by_status passed
    List tasks filters by status (no description in the source; shown from the name)
  • test_subtask_parent_link passed
    Subtask parent link (no description in the source; shown from the name)
  • test_create_task_rejects_unknown_parent passed
    Create task rejects unknown parent (no description in the source; shown from the name)
  • test_send_via_channel_task_creates_a_real_task passed
    Send via channel task creates a real task (no description in the source; shown from the name)
  • test_send_via_channel_notify_owner_without_target_configured_is_safe passed
    Send via channel notify owner without target configured is safe (no description in the source; shown from the name)
  • test_available_tools_excludes_task_tools_by_default passed
    Available tools excludes task tools by default (no description in the source; shown from the name)
  • test_available_tools_includes_create_task_when_enabled passed
    Available tools includes create task when enabled (no description in the source; shown from the name)
  • test_available_tools_includes_notify_owner_when_owner_configured passed
    Available tools includes notify owner when owner configured (no description in the source; shown from the name)
  • test_validate_plan_strips_model_supplied_target_for_notify_owner passed
    Validate plan strips model supplied target for notify owner (no description in the source; shown from the name)
  • test_validate_plan_falls_back_to_unassigned_for_unknown_role passed
    Validate plan falls back to unassigned for unknown role (no description in the source; shown from the name)
test_team.py — 10 tests 10 passed, 0 failed, 0 skipped

Tests for core/employees/team.py (item #7). No DB/network: the LLM and ask_fn are mocked.

  • test_parse_subtasks_valid_and_capped passed
    Parse subtasks valid and capped (no description in the source; shown from the name)
  • test_parse_subtasks_garbage_returns_empty passed
    Parse subtasks garbage returns empty (no description in the source; shown from the name)
  • test_split_empty_reply_retried_with_bigger_budget passed
    Split empty reply retried with bigger budget (no description in the source; shown from the name)
  • test_split_failure_returns_empty passed
    Split failure returns empty (no description in the source; shown from the name)
  • test_run_team_happy_path passed
    Run team happy path (no description in the source; shown from the name)
  • test_run_team_trusted_flag_passed_through passed
    Run team trusted flag passed through (no description in the source; shown from the name)
  • test_single_subtask_falls_back_to_one_normal_ask passed
    Single subtask falls back to one normal ask (no description in the source; shown from the name)
  • test_split_failure_falls_back_to_single_answer passed
    Split failure falls back to single answer (no description in the source; shown from the name)
  • test_failed_sub_answer_falls_back_to_single_answer passed
    Failed sub answer falls back to single answer (no description in the source; shown from the name)
  • test_merge_failure_joins_answers_and_keeps_notes passed
    Merge failure joins answers and keeps notes (no description in the source; shown from the name)
test_tools.py — 5 tests 5 passed, 0 failed, 0 skipped

Tests for core/employees/tools.py - the Tool registry. Requires a Postgres DB with db/schema.sql applied, reachable via the DATABASE_URL env var (same convention as tests/test_autonomy.py), since escalate_to_owner's handler dispatches through core.autonomy.execute_or_request().

  • test_registry_has_escalate_to_owner passed
    Registry has escalate to owner (no description in the source; shown from the name)
  • test_escalate_to_owner_parameters_schema_present passed
    Escalate to owner parameters schema present (no description in the source; shown from the name)
  • test_escalate_to_owner_returns_none_when_no_escalation_detected passed
    Escalate to owner returns none when no escalation detected (no description in the source; shown from the name)
  • test_escalate_to_owner_dispatches_and_off_mode_skips passed
    Escalate to owner dispatches and off mode skips (no description in the source; shown from the name)
  • test_escalate_to_owner_dispatches_and_semi_mode_creates_pending passed
    Escalate to owner dispatches and semi mode creates pending (no description in the source; shown from the name)
test_track_clone_count.py — 13 tests 13 passed, 0 failed, 0 skipped

Tests for scripts/track_clone_count.py: pure logic, no network.

  • test_fresh_state_accumulates passed
    Fresh state accumulates (no description in the source; shown from the name)
  • test_overlapping_window_does_not_double_count passed
    Overlapping window does not double count (no description in the source; shown from the name)
  • test_old_dates_are_trimmed_to_max_kept passed
    Old dates are trimmed to max kept (no description in the source; shown from the name)
  • test_missing_count_field_defaults_to_zero_not_crash passed
    Missing count field defaults to zero not crash (no description in the source; shown from the name)
  • test_empty_clones_list_is_a_noop passed
    Empty clones list is a noop (no description in the source; shown from the name)
  • test_format_message_thresholds passed
    Format message thresholds (no description in the source; shown from the name)
  • test_load_state_missing_file_returns_defaults passed
    Load state missing file returns defaults (no description in the source; shown from the name)
  • test_load_state_fills_missing_keys passed
    Load state fills missing keys (no description in the source; shown from the name)
  • test_write_badge_roundtrip passed
    Write badge roundtrip (no description in the source; shown from the name)
  • test_write_state_roundtrip passed
    Write state roundtrip (no description in the source; shown from the name)
  • test_main_without_token_is_a_graceful_noop passed
    Main without token is a graceful noop (no description in the source; shown from the name)
  • test_main_writes_badge_and_state_on_success passed
    Main writes badge and state on success (no description in the source; shown from the name)
  • test_main_api_failure_keeps_last_total_and_does_not_crash passed
    Main api failure keeps last total and does not crash (no description in the source; shown from the name)
test_translate_readme.py — 6 tests 6 passed, 0 failed, 0 skipped

Tests for scripts/translate_readme.py's resumability logic (state loading/saving, skip-if-up-to-date). Mocks the Gemini client entirely -- no real API calls, no quota cost.

  • test_load_state_missing_file_returns_empty passed
    Load state missing file returns empty (no description in the source; shown from the name)
  • test_save_and_load_state_roundtrip passed
    Save and load state roundtrip (no description in the source; shown from the name)
  • test_skips_language_already_up_to_date passed
    Skips language already up to date (no description in the source; shown from the name)
  • test_translates_missing_language_and_updates_state passed
    Translates missing language and updates state (no description in the source; shown from the name)
  • test_quota_exhaustion_exits_zero_not_one passed
    Quota exhaustion exits zero not one (no description in the source; shown from the name)
  • test_real_failure_exits_one passed
    Real failure exits one (no description in the source; shown from the name)
test_trigger_cron.py — 18 tests 18 passed, 0 failed, 0 skipped

Tests for cron-style proactive trigger schedules: parsing and validation (incl. standard weekday numbering and timezones), the 5-minute floor, scheduling on create/update, the atomic claim, a corrupted stored cron, and the API models. Runs against the test database.

  • test_next_run_respects_the_timezone passed
    Next run respects the timezone (no description in the source; shown from the name)
  • test_weekday_numbers_follow_standard_cron passed
    Weekday numbers follow standard cron (no description in the source; shown from the name)
  • test_weekday_normalisation passed
    Weekday normalisation (no description in the source; shown from the name)
  • test_too_frequent_is_rejected passed
    Too frequent is rejected (no description in the source; shown from the name)
  • test_reasonable_schedules_are_accepted passed
    Reasonable schedules are accepted (no description in the source; shown from the name)
  • test_invalid_cron_or_timezone_is_rejected passed
    Invalid cron or timezone is rejected (no description in the source; shown from the name)
  • test_create_cron_trigger_is_scheduled_for_later passed
    Create cron trigger is scheduled for later (no description in the source; shown from the name)
  • test_interval_triggers_are_unchanged passed
    Interval triggers are unchanged (no description in the source; shown from the name)
  • test_need_exactly_one_schedule passed
    Need exactly one schedule (no description in the source; shown from the name)
  • test_database_enforces_one_schedule passed
    Database enforces one schedule (no description in the source; shown from the name)
  • test_switch_interval_to_cron_and_back passed
    Switch interval to cron and back (no description in the source; shown from the name)
  • test_changing_the_timezone_reschedules passed
    Changing the timezone reschedules (no description in the source; shown from the name)
  • test_update_validation passed
    Update validation (no description in the source; shown from the name)
  • test_claim_moves_a_cron_trigger_to_its_next_slot passed
    Claim moves a cron trigger to its next slot (no description in the source; shown from the name)
  • test_downtime_does_not_cause_a_burst_of_runs passed
    Downtime does not cause a burst of runs (no description in the source; shown from the name)
  • test_corrupted_cron_does_not_refire_every_minute passed
    Corrupted cron does not refire every minute (no description in the source; shown from the name)
  • test_routes_accept_cron passed
    Routes accept cron (no description in the source; shown from the name)
  • test_gap_check_samples_distinct_fire_times passed
    Gap check samples distinct fire times (no description in the source; shown from the name)
test_woocommerce_connector.py — 8 tests 8 passed, 0 failed, 0 skipped

Tests for core/integrations/woocommerce_connector.py -- the WooCommerce REST API v3 connector. Pure unit tests against a mocked requests.get; no live WooCommerce store or DB needed.

  • test_missing_store_url_fails_gracefully passed
    Missing store url fails gracefully (no description in the source; shown from the name)
  • test_missing_credentials_fails_gracefully passed
    Missing credentials fails gracefully (no description in the source; shown from the name)
  • test_connection_success passed
    Connection success (no description in the source; shown from the name)
  • test_woocommerce_api_error_surfaces_message passed
    Woocommerce api error surfaces message (no description in the source; shown from the name)
  • test_fetch_orders_default passed
    Fetch orders default (no description in the source; shown from the name)
  • test_fetch_paginates_using_page_param passed
    Fetch paginates using page param (no description in the source; shown from the name)
  • test_fetch_products_resource passed
    Fetch products resource (no description in the source; shown from the name)
  • test_unsupported_query_template_raises passed
    Unsupported query template raises (no description in the source; shown from the name)

Compiled by script from the public repository, its CI logs and the GitHub API. To correct something, open an issue.

All tests