RagLeap
Tests

Tests: ragleap-core (the app)

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

Latest result: core-tests passed 2136 passed, 13 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 — 75 tests 75 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_crm_action_wired_into_the_action_surface passed
    Crm action wired into the action surface (no description in the source; shown from the name)
  • test_crm_is_an_outbound_tool_for_the_taint_rule passed
    Crm is an outbound tool for the taint rule (no description in the source; shown from the name)
  • test_crm_unconfigured_refuses_without_request passed
    Crm unconfigured refuses without request (no description in the source; shown from the name)
  • test_crm_token_missing_with_allowlists_set_refuses_without_request passed
    Crm token missing with allowlists set refuses without request (no description in the source; shown from the name)
  • test_crm_malformed_content_refused_before_any_request passed
    Crm malformed content refused before any request (no description in the source; shown from the name)
  • test_crm_allowlist_refusals_happen_before_any_request passed
    Crm allowlist refusals happen before any request (no description in the source; shown from the name)
  • test_crm_allowlist_is_exact_match_fixed_point_breakers passed
    Crm allowlist is exact match fixed point breakers (no description in the source; shown from the name)
  • test_crm_allowlisted_unicode_name_agrees_exactly passed
    Crm allowlisted unicode name agrees exactly (no description in the source; shown from the name)
  • test_crm_allowlist_entries_may_carry_whitespace_in_config passed
    Crm allowlist entries may carry whitespace in config (no description in the source; shown from the name)
  • test_crm_success_sends_exact_modeled_patch passed
    Crm success sends exact modeled patch (no description in the source; shown from the name)
  • test_crm_model_target_is_never_the_destination passed
    Crm model target is never the destination (no description in the source; shown from the name)
  • test_crm_value_at_the_size_cap_still_sends passed
    Crm value at the size cap still sends (no description in the source; shown from the name)
  • test_crm_not_found_fails_closed_and_never_upserts passed
    Crm not found fails closed and never upserts (no description in the source; shown from the name)
  • test_crm_redirect_status_is_not_success passed
    Crm redirect status is not success (no description in the source; shown from the name)
  • test_crm_http_errors_fail_closed_without_raising passed
    Crm http errors fail closed without raising (no description in the source; shown from the name)
  • test_crm_secrets_never_hit_the_log passed
    Crm secrets never hit the log (no description in the source; shown from the name)
  • test_crm_client_exception_details_never_reach_the_log passed
    Crm client exception details never reach the log (no description in the source; shown from the name)
  • test_crm_status_failure_logs_only_the_status_code passed
    Crm status failure logs only the status code (no description in the source; shown from the name)
  • test_crm_tool_offered_only_when_fully_configured passed
    Crm tool offered only when fully configured (no description in the source; shown from the name)
  • test_validate_plan_crm_update_never_lets_the_model_choose_target_or_bypass_the_allowlist passed
    Validate plan crm update never lets the model choose target or bypass the allowlist (no description in the source; shown from the name)
  • test_autonomy_dispatch_updates_crm_record_end_to_end passed
    Autonomy dispatch updates crm record end to end (no description in the source; shown from the name)
  • test_autonomy_dispatch_reports_failed_for_crm passed
    Autonomy dispatch reports failed for crm (no description in the source; shown from the name)
  • test_autonomy_crm_dispatch_without_config_fails_closed passed
    Autonomy crm dispatch without config fails closed (no description in the source; shown from the name)
  • test_calendar_action_wired_into_the_action_surface passed
    Calendar action wired into the action surface (no description in the source; shown from the name)
  • test_calendar_is_an_outbound_tool_for_the_taint_rule passed
    Calendar is an outbound tool for the taint rule (no description in the source; shown from the name)
  • test_calendar_unconfigured_refuses_without_request passed
    Calendar unconfigured refuses without request (no description in the source; shown from the name)
  • test_calendar_malformed_content_refused_before_any_request passed
    Calendar malformed content refused before any request (no description in the source; shown from the name)
  • test_parse_rfc3339_rejects_malformed_and_naive_forms passed
    Parse rfc3339 rejects malformed and naive forms (no description in the source; shown from the name)
  • test_calendar_naive_start_refused_before_any_request passed
    Calendar naive start refused before any request (no description in the source; shown from the name)
  • test_parse_event_duplicate_and_empty_first_start_end_refused passed
    Parse event duplicate and empty first start end refused (no description in the source; shown from the name)
  • test_calendar_sends_exact_modeled_requests passed
    Calendar sends exact modeled requests (no description in the source; shown from the name)
  • test_calendar_model_target_never_chooses_the_destination passed
    Calendar model target never chooses the destination (no description in the source; shown from the name)
  • test_calendar_no_attendees_still_schedules_without_attendee_field passed
    Calendar no attendees still schedules without attendee field (no description in the source; shown from the name)
  • test_calendar_screening_passes_case_and_whitespace_variants passed
    Calendar screening passes case and whitespace variants (no description in the source; shown from the name)
  • test_calendar_disallowed_attendee_refuses_whole_event passed
    Calendar disallowed attendee refuses whole event (no description in the source; shown from the name)
  • test_calendar_attendee_screening_fixed_point_breakers passed
    Calendar attendee screening fixed point breakers (no description in the source; shown from the name)
  • test_calendar_google_errors_fail_closed_without_raising passed
    Calendar google errors fail closed without raising (no description in the source; shown from the name)
  • test_calendar_secrets_never_hit_the_log passed
    Calendar secrets never hit the log (no description in the source; shown from the name)
  • test_calendar_http_exception_text_never_reaches_the_log passed
    Calendar http exception text never reaches the log (no description in the source; shown from the name)
  • test_calendar_http_exception_log_message_is_constant_across_exceptions passed
    Calendar http exception log message is constant across exceptions (no description in the source; shown from the name)
  • test_calendar_token_json_parse_failure_logs_only_the_fixed_line passed
    Calendar token json parse failure logs only the fixed line (no description in the source; shown from the name)
  • test_calendar_shy_exception_args_never_reach_the_log passed
    Calendar shy exception args never reach the log (no description in the source; shown from the name)
  • test_calendar_status_code_logging_is_untouched passed
    Calendar status code logging is untouched (no description in the source; shown from the name)
  • test_calendar_tool_offered_only_when_fully_configured passed
    Calendar tool offered only when fully configured (no description in the source; shown from the name)
  • test_validate_plan_calendar_requires_valid_content_and_never_a_target passed
    Validate plan calendar requires valid content and never a target (no description in the source; shown from the name)
  • test_autonomy_dispatch_schedules_calendar_event_end_to_end passed
    Autonomy dispatch schedules calendar event end to end (no description in the source; shown from the name)
  • test_autonomy_dispatch_reports_failed_for_calendar passed
    Autonomy dispatch reports failed for calendar (no description in the source; shown from the name)
  • test_autonomy_calendar_dispatch_without_config_fails_closed passed
    Autonomy calendar dispatch without config fails closed (no description in the source; shown from the name)
  • test_webhook_exception_text_never_reaches_the_log passed
    Webhook exception text never reaches the log (no description in the source; shown from the name)
  • test_webhook_exception_log_message_is_constant_across_exceptions passed
    Webhook exception log message is constant across exceptions (no description in the source; shown from the name)
  • test_webhook_status_code_logging_is_untouched passed
    Webhook status code logging is untouched (no description in the source; shown from the name)
  • test_slack_exception_text_never_reaches_the_log passed
    Slack exception text never reaches the log (no description in the source; shown from the name)
  • test_slack_exception_log_message_is_constant_across_exceptions passed
    Slack exception log message is constant across exceptions (no description in the source; shown from the name)
  • test_slack_status_code_logging_is_untouched passed
    Slack status code logging is untouched (no description in the source; shown from the name)
  • test_email_exception_text_never_reaches_the_log passed
    Email exception text never reaches the log (no description in the source; shown from the name)
  • test_email_exception_log_message_is_constant_across_exceptions passed
    Email exception log message is constant across exceptions (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_agent_plugin.py — 15 tests 15 passed, 0 failed, 0 skipped

No file-level description in the source.

  • test_manifest_has_what_the_catalog_and_scanner_need passed
    Manifest has what the catalog and scanner need (no description in the source; shown from the name)
  • test_skill_file_is_well_formed_and_plain passed
    Skill file is well formed and plain (no description in the source; shown from the name)
  • test_script_has_no_dynamic_code_or_shell passed
    Script has no dynamic code or shell (no description in the source; shown from the name)
  • test_ask_sends_the_question_and_prints_answer_and_sources passed
    Ask sends the question and prints answer and sources (no description in the source; shown from the name)
  • test_key_is_sent_as_a_header_only_when_set_and_never_printed passed
    Key is sent as a header only when set and never printed (no description in the source; shown from the name)
  • test_employees_lists_roles_and_marks_switched_off_ones passed
    Employees lists roles and marks switched off ones (no description in the source; shown from the name)
  • test_refuses_to_send_the_key_over_plain_http_to_a_remote_host passed
    Refuses to send the key over plain http to a remote host (no description in the source; shown from the name)
  • test_key_is_allowed_over_https_and_to_local_http passed
    Key is allowed over https and to local http (no description in the source; shown from the name)
  • test_bad_addresses_are_rejected passed
    Bad addresses are rejected (no description in the source; shown from the name)
  • test_a_key_with_odd_characters_is_refused passed
    A key with odd characters is refused (no description in the source; shown from the name)
  • test_redirects_are_not_followed_so_the_key_cannot_leak passed
    Redirects are not followed so the key cannot leak (no description in the source; shown from the name)
  • test_http_errors_are_explained_without_echoing_the_body passed
    Http errors are explained without echoing the body (no description in the source; shown from the name)
  • test_non_json_unexpected_and_unreachable passed
    Non json unexpected and unreachable (no description in the source; shown from the name)
  • test_question_and_role_are_validated_before_any_request passed
    Question and role are validated before any request (no description in the source; shown from the name)
  • test_json_output_has_only_the_expected_fields passed
    Json output has only the expected fields (no description in the source; shown from the name)
test_agent_run_tree.py — 15 tests 15 passed, 0 failed, 0 skipped

Run records with parents (sub-agents), the run tree, and cancelling a run: the schema upgrade, who is stopped when, that a pending action cannot run after its run was cancelled, and that a live loop stops. Real test database only.

  • test_the_new_columns_and_the_cancelled_status_exist passed
    The new columns and the cancelled status exist (no description in the source; shown from the name)
  • test_the_upgrade_block_changes_an_old_constraint_and_is_safe_to_run_twice passed
    The upgrade block changes an old constraint and is safe to run twice (no description in the source; shown from the name)
  • test_parent_and_depth_are_stored_and_listed passed
    Parent and depth are stored and listed (no description in the source; shown from the name)
  • test_the_tree_nests_children_and_grandchildren_in_creation_order passed
    The tree nests children and grandchildren in creation order (no description in the source; shown from the name)
  • test_the_tree_of_an_unknown_run_is_none_and_the_size_is_limited passed
    The tree of an unknown run is none and the size is limited (no description in the source; shown from the name)
  • test_cancelling_a_run_waiting_for_approval_ends_it_and_rejects_the_action passed
    Cancelling a run waiting for approval ends it and rejects the action (no description in the source; shown from the name)
  • test_cancel_goes_down_the_tree_and_leaves_finished_runs_alone passed
    Cancel goes down the tree and leaves finished runs alone (no description in the source; shown from the name)
  • test_a_running_run_without_a_live_thread_is_ended_at_once_a_fresh_one_is_only_flagged passed
    A running run without a live thread is ended at once a fresh one is only flagged (no description in the source; shown from the name)
  • test_finished_and_unknown_runs passed
    Finished and unknown runs (no description in the source; shown from the name)
  • test_a_failing_child_does_not_stop_the_rest passed
    A failing child does not stop the rest (no description in the source; shown from the name)
  • test_a_flagged_run_stops_before_its_next_step passed
    A flagged run stops before its next step (no description in the source; shown from the name)
  • test_a_run_cancelled_while_the_model_was_planning_does_not_execute_the_planned_action passed
    A run cancelled while the model was planning does not execute the planned action (no description in the source; shown from the name)
  • test_an_unflagged_run_is_unchanged passed
    An unflagged run is unchanged (no description in the source; shown from the name)
  • test_the_routes_and_the_permission_rules passed
    The routes and the permission rules (no description in the source; shown from the name)
  • test_a_cancelled_run_is_finished_for_retention passed
    A cancelled run is finished for retention (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_atomic_claim.py — 3 tests 3 passed, 0 failed, 0 skipped

One pending action runs at most once, however many answers arrive at the same time (F-CORE-005).

  • test_two_simultaneous_approvals_run_the_effect_once passed
    Two simultaneous approvals run the effect once (no description in the source; shown from the name)
  • test_approve_and_reject_at_once_have_one_winner passed
    Approve and reject at once have one winner (no description in the source; shown from the name)
  • test_single_approval_still_executes_once passed
    Single approval still executes once (no description in the source; shown from the name)
test_approval_expiry.py — 4 tests 4 passed, 0 failed, 0 skipped

A pending action that waited too long is not run by a late approval (AMQIC review: authorization needs an expiry).

  • test_an_old_pending_action_is_not_run_by_a_late_approval passed
    An old pending action is not run by a late approval (no description in the source; shown from the name)
  • test_a_recent_pending_action_still_runs passed
    A recent pending action still runs (no description in the source; shown from the name)
  • test_rejecting_an_old_pending_action_still_works passed
    Rejecting an old pending action still works (no description in the source; shown from the name)
  • test_the_limit_can_be_changed_and_turned_off passed
    The limit can be changed and turned off (no description in the source; shown from the name)
test_approval_forced_by_channel.py — 6 tests 6 passed, 0 failed, 0 skipped

File effects always need approval, whatever label a caller sends (F-CORE-004). No database, no network.

  • test_a_harmless_label_cannot_carry_a_file_channel passed
    A harmless label cannot carry a file channel (no description in the source; shown from the name)
  • test_a_file_label_cannot_use_another_channel passed
    A file label cannot use another channel (no description in the source; shown from the name)
  • test_valid_pair_is_not_refused_by_the_pair_check passed
    Valid pair is not refused by the pair check (no description in the source; shown from the name)
  • test_request_access_still_waits_for_approval_in_full_mode passed
    Request access still waits for approval in full mode (no description in the source; shown from the name)
  • test_forced_approval_covers_every_file_channel passed
    Forced approval covers every file channel (no description in the source; shown from the name)
  • test_the_execute_route_refuses_a_mismatched_pair passed
    The execute route refuses a mismatched pair (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_private_chat.py — 7 tests 7 passed, 0 failed, 0 skipped

Approvals count only in a private chat, never from a group or server channel (F-CORE-006). No network.

  • test_a_private_owner_chat_can_still_approve passed
    A private owner chat can still approve (no description in the source; shown from the name)
  • test_a_group_chat_never_approves_even_when_its_id_is_the_target passed
    A group chat never approves even when its id is the target (no description in the source; shown from the name)
  • test_the_person_who_wrote_must_be_the_chat_owner passed
    The person who wrote must be the chat owner (no description in the source; shown from the name)
  • test_a_linked_person_cannot_approve_from_a_group_either passed
    A linked person cannot approve from a group either (no description in the source; shown from the name)
  • test_the_telegram_webhook_marks_group_chats_as_not_private passed
    The telegram webhook marks group chats as not private (no description in the source; shown from the name)
  • test_the_discord_webhook_marks_server_channels_as_not_private passed
    The discord webhook marks server channels as not private (no description in the source; shown from the name)
  • test_a_telegram_group_cannot_be_saved_as_the_approval_target passed
    A telegram group cannot be saved as the approval target (no description in the source; shown from the name)
test_approval_sender.py — 22 tests 22 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_whatsapp_valid_twilio_signature_is_processed passed
    A correctly computed signature verifies through the real verifier and the handler runs.
  • test_twilio_signature_verifier_accepts_only_the_documented_signature passed
    The right signature verifies; wrong, empty and missing signatures and an unset token all fail closed.
  • test_twilio_signature_verifier_never_raises_on_non_ascii_credentials passed
    Any non-ASCII character on either side of the signature comparison is a failed verification (False -> 403), never a raised error.
  • test_whatsapp_non_ascii_twilio_signature_is_rejected_before_processing passed
    A non-ASCII X-Twilio-Signature is an invalid credential, not a server error: the real verifier fails it 403 and the handler never runs.
test_audit.py — 17 tests 17 passed, 0 failed, 0 skipped

Who did what: the audit events (core/audit.py), the person on approvals and the activity log (core/autonomy.py, core/office.py), and the GET /audit route. Real database (db/schema.sql applied); test rows are removed afterwards.

  • test_what_is_recorded passed
    What is recorded (no description in the source; shown from the name)
  • test_an_event_has_the_person_the_request_and_the_answer passed
    An event has the person the request and the answer (no description in the source; shown from the name)
  • test_recording_never_raises passed
    Recording never raises (no description in the source; shown from the name)
  • test_the_list_is_newest_first_and_limited passed
    The list is newest first and limited (no description in the source; shown from the name)
  • test_a_change_made_with_the_shared_key_is_recorded_and_a_read_is_not passed
    A change made with the shared key is recorded and a read is not (no description in the source; shown from the name)
  • test_a_person_is_named_in_what_they_change passed
    A person is named in what they change (no description in the source; shown from the name)
  • test_a_refused_attempt_is_recorded_too_but_a_wrong_key_is_not passed
    A refused attempt is recorded too but a wrong key is not (no description in the source; shown from the name)
  • test_a_failing_audit_write_never_breaks_a_request passed
    A failing audit write never breaks a request (no description in the source; shown from the name)
  • test_the_audit_route_is_for_admins_and_owners passed
    The audit route is for admins and owners (no description in the source; shown from the name)
  • test_an_approval_names_the_person_who_gave_it passed
    An approval names the person who gave it (no description in the source; shown from the name)
  • test_a_rejection_names_the_person_too passed
    A rejection names the person too (no description in the source; shown from the name)
  • test_the_shared_key_is_named_as_such passed
    The shared key is named as such (no description in the source; shown from the name)
  • test_an_approval_in_the_owners_chat_is_recorded_as_the_chat passed
    An approval in the owners chat is recorded as the chat (no description in the source; shown from the name)
  • test_an_action_that_ran_on_its_own_has_no_person passed
    An action that ran on its own has no person (no description in the source; shown from the name)
  • test_the_activity_log_shows_the_person passed
    The activity log shows the person (no description in the source; shown from the name)
  • test_logging_still_works_before_the_schema_is_applied passed
    Logging still works before the schema is applied (no description in the source; shown from the name)
  • test_the_activity_log_still_reads_before_the_schema_is_applied passed
    The activity log still reads before the schema is applied (no description in the source; shown from the name)
test_audit_filters.py — 6 tests 6 passed, 0 failed, 0 skipped

GET /audit filters (core/audit.py list_events): method, path prefix, status, since/until and paging by id. Real database (db/schema.sql applied); test rows are removed afterwards.

  • test_filters_by_method_path_prefix_and_status passed
    Filters by method path prefix and status (no description in the source; shown from the name)
  • test_the_path_filter_takes_percent_and_underscore_literally passed
    The path filter takes percent and underscore literally (no description in the source; shown from the name)
  • test_since_and_until passed
    Since and until (no description in the source; shown from the name)
  • test_before_id_reads_the_next_page passed
    Before id reads the next page (no description in the source; shown from the name)
  • test_a_bad_time_is_a_clear_error passed
    A bad time is a clear error (no description in the source; shown from the name)
  • test_the_route_takes_the_filters_and_refuses_a_bad_time passed
    The route takes the filters and refuses a bad time (no description in the source; shown from the name)
test_audit_log_lines.py — 4 tests 4 passed, 0 failed, 0 skipped

Structured audit log lines: one JSON line per agent-audit event, content only as a sha256.

  • test_emit_writes_hash_and_never_the_text passed
    Emit writes hash and never the text (no description in the source; shown from the name)
  • test_emit_can_be_turned_off_and_never_raises passed
    Emit can be turned off and never raises (no description in the source; shown from the name)
  • test_execution_and_rejection_lines_carry_the_approver passed
    Execution and rejection lines carry the approver (no description in the source; shown from the name)
  • test_skip_and_proposal_lines passed
    Skip and proposal lines (no description in the source; shown from the name)
test_auth_throttle.py — 16 tests 16 passed, 0 failed, 0 skipped

No file-level description in the source.

  • test_lockout_after_max_failures passed
    Lockout after max failures (no description in the source; shown from the name)
  • test_lockout_expires passed
    Lockout expires (no description in the source; shown from the name)
  • test_failures_outside_the_window_do_not_add_up passed
    Failures outside the window do not add up (no description in the source; shown from the name)
  • test_success_resets_the_count passed
    Success resets the count (no description in the source; shown from the name)
  • test_missing_key_is_not_counted passed
    Missing key is not counted (no description in the source; shown from the name)
  • test_throttle_can_be_turned_off passed
    Throttle can be turned off (no description in the source; shown from the name)
  • test_spoofed_forwarded_header_does_not_evade_the_limit passed
    Spoofed forwarded header does not evade the limit (no description in the source; shown from the name)
  • test_trusted_proxy_separates_real_clients passed
    Trusted proxy separates real clients (no description in the source; shown from the name)
  • test_public_page_and_health_stay_reachable_during_lockout passed
    Public page and health stay reachable during lockout (no description in the source; shown from the name)
  • test_client_id_ignores_forwarded_header_unless_peer_is_trusted passed
    Client id ignores forwarded header unless peer is trusted (no description in the source; shown from the name)
  • test_client_id_takes_the_rightmost_untrusted_hop passed
    Client id takes the rightmost untrusted hop (no description in the source; shown from the name)
  • test_client_id_falls_back_on_garbage passed
    Client id falls back on garbage (no description in the source; shown from the name)
  • test_client_id_normalises_and_handles_a_missing_peer passed
    Client id normalises and handles a missing peer (no description in the source; shown from the name)
  • test_settings_are_clamped_and_fall_back passed
    Settings are clamped and fall back (no description in the source; shown from the name)
  • test_record_failure_locks_at_the_limit_and_reset_clears passed
    Record failure locks at the limit and reset clears (no description in the source; shown from the name)
  • test_tracking_is_bounded passed
    Tracking is bounded (no description in the source; shown from the name)
test_autonomy.py — 32 tests 32 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_crm_off_mode_skips_with_no_sender_call passed
    Crm off mode skips with no sender call (no description in the source; shown from the name)
  • test_crm_actions_allowlist_blocks_with_no_sender_call passed
    Crm actions allowlist blocks with no sender call (no description in the source; shown from the name)
  • test_crm_channels_allowlist_blocks_with_no_sender_call passed
    Crm channels allowlist blocks with no sender call (no description in the source; shown from the name)
  • test_crm_full_mode_executes_and_logs passed
    Crm full mode executes and logs (no description in the source; shown from the name)
  • test_crm_semi_mode_pending_then_approval_executes_through_the_same_path passed
    Crm semi mode pending then approval executes through the same path (no description in the source; shown from the name)
  • test_crm_sensitive_role_forces_full_to_semi passed
    Crm sensitive role forces full to semi (no description in the source; shown from the name)
  • test_crm_non_sensitive_role_stays_full passed
    Crm non sensitive role stays full (no description in the source; shown from the name)
  • test_crm_gate_product_matrix passed
    Crm gate product matrix (no description in the source; shown from the name)
  • test_crm_rejection_still_logs_through_the_same_path passed
    Crm rejection still logs through the same path (no description in the source; shown from the name)
  • test_calendar_off_mode_skips_with_no_sender_call passed
    Calendar off mode skips with no sender call (no description in the source; shown from the name)
  • test_calendar_actions_allowlist_blocks_with_no_sender_call passed
    Calendar actions allowlist blocks with no sender call (no description in the source; shown from the name)
  • test_calendar_channels_allowlist_blocks_with_no_sender_call passed
    Calendar channels allowlist blocks with no sender call (no description in the source; shown from the name)
  • test_calendar_full_mode_executes_and_logs passed
    Calendar full mode executes and logs (no description in the source; shown from the name)
  • test_calendar_semi_mode_pending_then_approval_executes_through_the_same_path passed
    Calendar semi mode pending then approval executes through the same path (no description in the source; shown from the name)
  • test_calendar_sensitive_role_forces_full_to_semi passed
    Calendar sensitive role forces full to semi (no description in the source; shown from the name)
  • test_calendar_non_sensitive_role_stays_full passed
    Calendar non sensitive role stays full (no description in the source; shown from the name)
  • test_calendar_gate_product_matrix passed
    Calendar gate product matrix (no description in the source; shown from the name)
  • test_calendar_rejection_still_logs_through_the_same_path passed
    Calendar rejection still logs through the same path (no description in the source; shown from the name)
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_boundary_scan.py — 11 tests 11 passed, 0 failed, 0 skipped

Boundary tripwire (Phase 0): executors only in core/autonomy.py, connector code only through HostServices.

  • test_no_module_outside_the_gate_references_an_executor passed
    No module outside the gate references an executor (no description in the source; shown from the name)
  • test_connector_code_has_no_new_network_environment_or_subprocess_use passed
    Connector code has no new network environment or subprocess use (no description in the source; shown from the name)
  • test_the_baseline_only_lists_real_legacy_files_and_can_only_shrink passed
    The baseline only lists real legacy files and can only shrink (no description in the source; shown from the name)
  • test_the_command_line_exits_zero_on_a_clean_tree_and_one_on_a_violation passed
    The command line exits zero on a clean tree and one on a violation (no description in the source; shown from the name)
  • test_the_scanner_catches_each_forbidden_pattern passed
    The scanner catches each forbidden pattern (no description in the source; shown from the name)
  • test_the_scanner_ignores_comments_and_strings_and_harmless_code passed
    The scanner ignores comments and strings and harmless code (no description in the source; shown from the name)
  • test_database_drivers_are_reported_on_a_watch_list_but_do_not_fail passed
    Database drivers are reported on a watch list but do not fail (no description in the source; shown from the name)
  • test_an_executor_referenced_in_another_module_is_found passed
    An executor referenced in another module is found (no description in the source; shown from the name)
  • test_configuration_helpers_are_not_executors passed
    Configuration helpers are not executors (no description in the source; shown from the name)
  • test_inside_the_gate_the_senders_may_only_appear_in_send_via_channel passed
    Inside the gate the senders may only appear in send via channel (no description in the source; shown from the name)
  • test_the_named_exception_is_explicit_and_reasoned passed
    The named exception is explicit and reasoned (no description in the source; shown from the name)
test_broad_grants.py — 18 tests 18 passed, 0 failed, 0 skipped

Broad folders (a home folder, /opt, /mnt, /srv, /media): granted only read-only, for use, for at most 24 hours, with stricter name rules inside the container. The grant rules, the spec, the reader run for real, and the host command (`ragleap files add --broad --for`). No Docker, network or database.

  • test_a_broad_folder_is_accepted_only_with_the_flag_and_a_short_expiry passed
    A broad folder is accepted only with the flag and a short expiry (no description in the source; shown from the name)
  • test_some_folders_are_refused_even_with_the_flag passed
    Some folders are refused even with the flag (no description in the source; shown from the name)
  • test_a_broad_grant_must_be_read_only_for_use_and_short passed
    A broad grant must be read only for use and short (no description in the source; shown from the name)
  • test_the_flag_on_a_normal_folder_is_refused_and_normal_grants_are_not_broad passed
    The flag on a normal folder is refused and normal grants are not broad (no description in the source; shown from the name)
  • test_an_expired_broad_grant_parses_but_is_not_active passed
    An expired broad grant parses but is not active (no description in the source; shown from the name)
  • test_the_grant_path_check_is_unchanged_without_the_flag passed
    The grant path check is unchanged without the flag (no description in the source; shown from the name)
  • test_only_a_broad_grant_gets_the_strict_flag_and_the_mount_stays_read_only passed
    Only a broad grant gets the strict flag and the mount stays read only (no description in the source; shown from the name)
  • test_a_broad_listing_hides_dot_names_and_secret_looking_names passed
    A broad listing hides dot names and secret looking names (no description in the source; shown from the name)
  • test_a_normal_listing_is_unchanged passed
    A normal listing is unchanged (no description in the source; shown from the name)
  • test_a_broad_read_refuses_them passed
    A broad read refuses them (no description in the source; shown from the name)
  • test_a_broad_read_still_reads_normal_files_and_a_normal_grant_reads_the_same_files passed
    A broad read still reads normal files and a normal grant reads the same files (no description in the source; shown from the name)
  • test_add_broad_writes_a_short_read_only_grant_the_runner_accepts passed
    Add broad writes a short read only grant the runner accepts (no description in the source; shown from the name)
  • test_a_broad_folder_needs_the_flag_and_a_time_limit passed
    A broad folder needs the flag and a time limit (no description in the source; shown from the name)
  • test_the_time_limit_is_bounded passed
    The time limit is bounded (no description in the source; shown from the name)
  • test_some_folders_stay_refused_with_the_flag passed
    Some folders stay refused with the flag (no description in the source; shown from the name)
  • test_the_flag_on_a_normal_folder_is_refused passed
    The flag on a normal folder is refused (no description in the source; shown from the name)
  • test_the_normal_flow_is_unchanged passed
    The normal flow is unchanged (no description in the source; shown from the name)
  • test_the_docs_describe_broad_folders passed
    The docs describe broad folders (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 — 24 tests 24 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_ask_marks_document_grounded_answers_as_untrusted_for_actions passed
    Ask marks document grounded answers as untrusted for actions (no description in the source; shown from the name)
  • test_ask_document_taint_can_be_turned_off passed
    Ask document taint can be turned off (no description in the source; shown from the name)
  • test_ask_passes_the_document_taint_to_the_agent_loop passed
    Ask passes the document taint to the agent loop (no description in the source; shown from the name)
test_chat_employees_integration.py — 23 tests 23 passed, 0 failed, 0 skipped

Tests for /chat role wiring (issue #134): _build_system_prompt, _augment_query_with_reminder, the ask() integration of both, and the /chat + /chat/stream HTTP routes themselves (see the route section at the bottom of this file).

  • test_ask_without_role_no_role_context passed
    Without role, _build_system_prompt returns (base_system_prompt, [])
  • test_ask_without_role_system_prompt_passthrough passed
    Without role, the system_prompt passed to generate_answer is exactly
  • test_ask_with_valid_role_injects_personality passed
    With a valid role, _build_system_prompt should include the role's
  • test_ask_with_valid_role_returns_memory_ids passed
    ask() should return role_memory_ids from _build_system_prompt.
  • test_ask_with_nonexistent_role_no_error passed
    A role not in DEFAULT_ROLES or DB should not raise — falls back to
  • test_augment_query_with_reminder_appends_owner_instructions passed
    _augment_query_with_reminder should append owner instructions to the
  • test_augment_query_without_role_returns_query_unchanged passed
    Without role, _augment_query_with_reminder returns query as-is.
  • test_augment_query_with_role_but_no_owner_instructions passed
    With role but no owner instructions, query is returned unchanged.
  • test_ask_with_role_and_owner_instructions_in_augmented_query passed
    End-to-end: owner instructions set via PATCH /profile should appear
  • test_build_system_prompt_no_role_returns_base passed
    Build system prompt no role returns base (no description in the source; shown from the name)
  • test_build_system_prompt_no_role_no_base_returns_none passed
    Build system prompt no role no base returns none (no description in the source; shown from the name)
  • test_build_system_prompt_with_role_and_personality passed
    Build system prompt with role and personality (no description in the source; shown from the name)
  • test_build_system_prompt_with_owner_instructions_in_context passed
    When role_context contains OWNER INSTRUCTIONS, they should be
  • test_sensitive_role_triggers_reflection passed
    Sensitive roles should trigger check_grounding (reflection).
  • test_chat_route_forwards_role_to_ask passed
    Chat route forwards role to ask (no description in the source; shown from the name)
  • test_chat_route_without_role_forwards_none passed
    Pre-#133 behaviour: no role parameter means no role context.
  • test_chat_route_rejects_a_blank_question_before_the_model_is_called passed
    Chat route rejects a blank question before the model is called (no description in the source; shown from the name)
  • test_chat_route_rejects_a_question_over_the_length_limit passed
    Chat route rejects a question over the length limit (no description in the source; shown from the name)
  • test_chat_route_reports_a_failed_model_call_as_500_without_leaking_it passed
    Chat route reports a failed model call as 500 without leaking it (no description in the source; shown from the name)
  • test_chat_stream_route_forwards_role_and_streams_the_text passed
    Chat stream route forwards role and streams the text (no description in the source; shown from the name)
  • test_chat_stream_route_without_role_forwards_none passed
    Chat stream route without role forwards none (no description in the source; shown from the name)
  • test_chat_stream_route_ends_with_an_error_line_instead_of_crashing passed
    A failure mid-stream cannot become a 500 — the status line is already on
  • test_chat_stream_route_rejects_a_blank_question_before_streaming passed
    Chat stream route rejects a blank question before streaming (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_connector_credentials_fail_closed.py — 8 tests 8 passed, 0 failed, 0 skipped

Connector credentials are never stored in plain text, and the Mongo filter is data, not spliced text (AMQIC/CERNOTIS S1-001, S1-006).

  • test_the_error_is_a_value_error_so_the_route_answers_400 passed
    The error is a value error so the route answers 400 (no description in the source; shown from the name)
  • test_without_a_key_a_credential_is_refused_and_nothing_is_stored passed
    Without a key a credential is refused and nothing is stored (no description in the source; shown from the name)
  • test_without_a_key_a_source_with_no_credentials_still_works passed
    Without a key a source with no credentials still works (no description in the source; shown from the name)
  • test_with_a_key_credentials_are_stored_encrypted_and_round_trip passed
    With a key credentials are stored encrypted and round trip (no description in the source; shown from the name)
  • test_older_plain_header_rows_still_read passed
    Older plain header rows still read (no description in the source; shown from the name)
  • test_the_identifier_is_a_plain_value_in_the_filter passed
    The identifier is a plain value in the filter (no description in the source; shown from the name)
  • test_a_quote_in_the_identifier_cannot_add_keys_or_operators passed
    A quote in the identifier cannot add keys or operators (no description in the source; shown from the name)
  • test_placeholders_in_nested_filters_are_filled passed
    Placeholders in nested filters are filled (no description in the source; shown from the name)
test_container_hardening.py — 4 tests 4 passed, 0 failed, 0 skipped

Container hardening: the image installs exact pinned versions and runs as an unprivileged user.

  • test_lock_lines_are_exact_pins passed
    Lock lines are exact pins (no description in the source; shown from the name)
  • test_lock_covers_every_requirement passed
    Lock covers every requirement (no description in the source; shown from the name)
  • test_dockerfile_installs_from_the_lock_and_runs_unprivileged passed
    Dockerfile installs from the lock and runs unprivileged (no description in the source; shown from the name)
  • test_dockerignore_keeps_the_lock_file passed
    Dockerignore keeps the lock file (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_discord_timestamp_fresh.py — 6 tests 6 passed, 0 failed, 0 skipped

A validly signed Discord request is refused when its timestamp is old, so it cannot be replayed (AMQIC review).

  • test_a_fresh_signed_request_is_accepted passed
    A fresh signed request is accepted (no description in the source; shown from the name)
  • test_a_replayed_old_request_is_refused_even_with_a_valid_signature passed
    A replayed old request is refused even with a valid signature (no description in the source; shown from the name)
  • test_a_far_future_timestamp_is_refused passed
    A far future timestamp is refused (no description in the source; shown from the name)
  • test_a_timestamp_that_is_not_a_number_is_refused passed
    A timestamp that is not a number is refused (no description in the source; shown from the name)
  • test_a_bad_signature_is_still_refused passed
    A bad signature is still refused (no description in the source; shown from the name)
  • test_the_limit_can_be_changed_and_turned_off passed
    The limit can be changed and turned off (no description in the source; shown from the name)
test_dockerignore_backups_and_redis_log.py — 4 tests 4 passed, 0 failed, 0 skipped

Database dumps stay out of the image build (INFRA-F-001) and Redis credentials stay out of logs (F-CORE-001).

  • test_dockerignore_keeps_update_backups_out_of_the_image passed
    Dockerignore keeps update backups out of the image (no description in the source; shown from the name)
  • test_dockerignore_does_not_hide_the_schema passed
    Dockerignore does not hide the schema (no description in the source; shown from the name)
  • test_redact_url_hides_user_and_password passed
    Redact url hides user and password (no description in the source; shown from the name)
  • test_the_connected_log_line_has_no_password passed
    The connected log line has no password (no description in the source; shown from the name)
test_documents.py — 14 tests 14 passed, 0 failed, 0 skipped

Documents tab: list and delete routes, and the dashboard tab.

  • test_document_routes_need_the_key passed
    Document routes need the key (no description in the source; shown from the name)
  • test_list_shows_a_new_document_with_zero_chunks passed
    List shows a new document with zero chunks (no description in the source; shown from the name)
  • test_delete_removes_the_document_then_404 passed
    Delete removes the document then 404 (no description in the source; shown from the name)
  • test_delete_with_unknown_or_malformed_id_is_404 passed
    Delete with unknown or malformed id is 404 (no description in the source; shown from the name)
  • test_chunks_are_counted_and_removed_with_the_document passed
    Chunks are counted and removed with the document (no description in the source; shown from the name)
  • test_dashboard_has_the_documents_tab passed
    Dashboard has the documents tab (no description in the source; shown from the name)
  • test_dashboard_script_parses_with_node passed
    Dashboard script parses with node (no description in the source; shown from the name)
  • test_graph_delete_removes_document_then_orphan_entities passed
    Graph delete removes document then orphan entities (no description in the source; shown from the name)
  • test_graph_delete_without_entities_only_removes_the_document passed
    Graph delete without entities only removes the document (no description in the source; shown from the name)
  • test_graph_delete_is_skipped_without_a_driver passed
    Graph delete is skipped without a driver (no description in the source; shown from the name)
  • test_graph_delete_failure_never_raises passed
    Graph delete failure never raises (no description in the source; shown from the name)
  • test_document_store_maps_graph_results passed
    Document store maps graph results (no description in the source; shown from the name)
  • test_delete_route_reports_the_graph_status passed
    Delete route reports the graph status (no description in the source; shown from the name)
  • test_unknown_document_does_not_touch_the_graph passed
    Unknown document does not touch the graph (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_embedding_providers.py — 10 tests 10 passed, 0 failed, 0 skipped

No file-level description in the source.

  • test_ollama_defaults_no_auth passed
    Ollama defaults no auth (no description in the source; shown from the name)
  • test_openai_sends_bearer passed
    Openai sends bearer (no description in the source; shown from the name)
  • test_batching_and_order passed
    Batching and order (no description in the source; shown from the name)
  • test_retry_on_429_then_success passed
    Retry on 429 then success (no description in the source; shown from the name)
  • test_wrong_size_returns_none passed
    Wrong size returns none (no description in the source; shown from the name)
  • test_http_500_returns_none_without_retry passed
    Http 500 returns none without retry (no description in the source; shown from the name)
  • test_config_errors passed
    Config errors (no description in the source; shown from the name)
  • test_configured_dimensions passed
    Configured dimensions (no description in the source; shown from the name)
  • test_empty_text_none passed
    Empty text none (no description in the source; shown from the name)
  • test_gemini_path_unchanged passed
    Gemini path unchanged (no description in the source; shown from the name)
test_empty_answer_placeholder.py — 4 tests 4 passed, 0 failed, 0 skipped

A reasoning model that returns no visible text must not count as an answer (found by the real-model sub-agent test).

  • test_the_placeholder_is_treated_as_empty_and_the_next_provider_answers passed
    The placeholder is treated as empty and the next provider answers (no description in the source; shown from the name)
  • test_a_bigger_budget_that_gives_text_is_used_before_changing_provider passed
    A bigger budget that gives text is used before changing provider (no description in the source; shown from the name)
  • test_a_normal_answer_is_returned_at_once passed
    A normal answer is returned at once (no description in the source; shown from the name)
  • test_the_placeholder_text_is_the_one_the_provider_paths_use passed
    The placeholder text is the one the provider paths use (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_example_scripts.py — 4 tests 4 passed, 0 failed, 0 skipped

examples/01_ingest_and_query.py must work against an installed setup, where the API needs a key: it sends the key from RAGLEAP_API_KEY, sends nothing when it is not set, and stops with a clear message on a 401.

  • test_the_key_is_sent_on_upload_and_chat passed
    The key is sent on upload and chat (no description in the source; shown from the name)
  • test_no_header_is_sent_when_no_key_is_set passed
    No header is sent when no key is set (no description in the source; shown from the name)
  • test_a_401_stops_with_a_clear_message passed
    A 401 stops with a clear message (no description in the source; shown from the name)
  • test_the_server_address_can_be_changed passed
    The server address can be changed (no description in the source; shown from the name)
test_file_audit.py — 5 tests 5 passed, 0 failed, 0 skipped

File tools: the autonomy log never stores file contents, and pausing file access removes the tools.

  • test_read_results_are_logged_without_file_contents passed
    Read results are logged without file contents (no description in the source; shown from the name)
  • test_list_results_keep_only_the_summary_line passed
    List results keep only the summary line (no description in the source; shown from the name)
  • test_errors_and_other_tools_are_unchanged passed
    Errors and other tools are unchanged (no description in the source; shown from the name)
  • test_the_real_pause_flag_removes_the_tools passed
    The real pause flag removes the tools (no description in the source; shown from the name)
  • test_a_paused_runner_refuses_a_call_that_is_already_in_flight passed
    A paused runner refuses a call that is already in flight (no description in the source; shown from the name)
test_file_delete.py — 26 tests 26 passed, 0 failed, 0 skipped

Runner side of deleting a file: operation stat (read-only) and operation delete (moves one file into the trash), the fixed scripts run for real on a temporary folder, the spec, the endpoint switches, and the host-only trash commands (`ragleap files trash list|restore|empty`). No Docker, network or database.

  • test_the_delete_spec_has_exactly_one_writable_mount_and_the_same_hardening passed
    The delete spec has exactly one writable mount and the same hardening (no description in the source; shown from the name)
  • test_a_stat_spec_is_read_only_and_the_other_specs_are_unchanged passed
    A stat spec is read only and the other specs are unchanged (no description in the source; shown from the name)
  • test_stat_shows_size_hash_and_the_start_and_changes_nothing passed
    Stat shows size hash and the start and changes nothing (no description in the source; shown from the name)
  • test_stat_of_binary_missing_and_odd_targets passed
    Stat of binary missing and odd targets (no description in the source; shown from the name)
  • test_stat_refuses_a_big_file_and_cuts_the_head passed
    Stat refuses a big file and cuts the head (no description in the source; shown from the name)
  • test_a_delete_moves_the_file_into_the_trash_with_content_and_mode passed
    A delete moves the file into the trash with content and mode (no description in the source; shown from the name)
  • test_a_nested_file_and_a_binary_file_can_be_deleted passed
    A nested file and a binary file can be deleted (no description in the source; shown from the name)
  • test_a_file_that_changed_since_the_preview_is_not_touched passed
    A file that changed since the preview is not touched (no description in the source; shown from the name)
  • test_a_missing_file_a_folder_and_bad_hashes_are_refused passed
    A missing file a folder and bad hashes are refused (no description in the source; shown from the name)
  • test_paths_that_could_leave_or_hide_things_are_refused passed
    Paths that could leave or hide things are refused (no description in the source; shown from the name)
  • test_a_big_file_is_refused_not_cut passed
    A big file is refused not cut (no description in the source; shown from the name)
  • test_a_full_trash_refuses_and_keeps_the_file_and_leaves_no_empty_folder passed
    A full trash refuses and keeps the file and leaves no empty folder (no description in the source; shown from the name)
  • test_a_failed_delete_leaves_no_empty_stamp_folder passed
    A failed delete leaves no empty stamp folder (no description in the source; shown from the name)
  • test_the_trash_is_invisible_to_the_reader_after_a_delete passed
    The trash is invisible to the reader after a delete (no description in the source; shown from the name)
  • test_delete_is_off_until_writing_is_switched_on_at_the_host passed
    Delete is off until writing is switched on at the host (no description in the source; shown from the name)
  • test_the_pause_flag_and_computer_control_still_win passed
    The pause flag and computer control still win (no description in the source; shown from the name)
  • test_a_read_grant_and_bad_requests_are_refused_before_any_container passed
    A read grant and bad requests are refused before any container (no description in the source; shown from the name)
  • test_stat_needs_a_write_grant_but_not_the_writing_switch passed
    Stat needs a write grant but not the writing switch (no description in the source; shown from the name)
  • test_the_delete_audit_line_has_hashes_and_the_trash_name passed
    The delete audit line has hashes and the trash name (no description in the source; shown from the name)
  • test_trash_list_restore_after_a_real_delete passed
    Trash list restore after a real delete (no description in the source; shown from the name)
  • test_restore_refuses_when_a_file_is_there_and_replace_keeps_the_current_one passed
    Restore refuses when a file is there and replace keeps the current one (no description in the source; shown from the name)
  • test_restore_refuses_unknown_ids_links_and_protected_names passed
    Restore refuses unknown ids links and protected names (no description in the source; shown from the name)
  • test_trash_ignores_links_and_odd_things passed
    Trash ignores links and odd things (no description in the source; shown from the name)
  • test_empty_asks_first_then_removes_and_older_than_keeps_new_ones passed
    Empty asks first then removes and older than keeps new ones (no description in the source; shown from the name)
  • test_a_write_leaves_a_version_that_trash_restore_brings_back passed
    A write leaves a version that trash restore brings back (no description in the source; shown from the name)
  • test_the_docs_page_no_longer_promises_trash_commands_as_future_work passed
    The docs page no longer promises trash commands as future work (no description in the source; shown from the name)
test_file_delete_app.py — 19 tests 19 passed, 0 failed, 0 skipped

App side of deleting a file (tool delete_file): the two switches, plan checks, the file check bound to the action, approval always (even in full mode), the human display, what is logged, and the exact call to the runner. The runner and the database are replaced; nothing here touches a disk, Docker or the network.

  • test_the_tool_needs_both_switches_and_a_write_grant passed
    The tool needs both switches and a write grant (no description in the source; shown from the name)
  • test_a_good_plan_and_the_bad_ones passed
    A good plan and the bad ones (no description in the source; shown from the name)
  • test_it_is_outbound_style_and_not_external_content passed
    It is outbound style and not external content (no description in the source; shown from the name)
  • test_stat_raw_returns_the_dict_and_sends_only_op_grant_path passed
    Stat raw returns the dict and sends only op grant path (no description in the source; shown from the name)
  • test_stat_raw_refuses_bad_input_without_a_call passed
    Stat raw refuses bad input without a call (no description in the source; shown from the name)
  • test_stat_raw_refuses_a_missing_file_an_incomplete_check_and_runner_errors passed
    Stat raw refuses a missing file an incomplete check and runner errors (no description in the source; shown from the name)
  • test_a_delete_always_waits_for_approval_and_stores_the_bound_check passed
    A delete always waits for approval and stores the bound check (no description in the source; shown from the name)
  • test_a_binary_file_stores_no_head passed
    A binary file stores no head (no description in the source; shown from the name)
  • test_a_missing_or_refused_file_creates_no_pending_action passed
    A missing or refused file creates no pending action (no description in the source; shown from the name)
  • test_autonomy_off_asks_the_runner_nothing passed
    Autonomy off asks the runner nothing (no description in the source; shown from the name)
  • test_the_approval_text_shows_path_size_hash_and_the_start passed
    The approval text shows path size hash and the start (no description in the source; shown from the name)
  • test_the_pending_list_carries_a_display_field passed
    The pending list carries a display field (no description in the source; shown from the name)
  • test_the_log_and_learning_keep_no_file_content passed
    The log and learning keep no file content (no description in the source; shown from the name)
  • test_dispatch_and_the_exact_call_to_the_runner passed
    Dispatch and the exact call to the runner (no description in the source; shown from the name)
  • test_runner_refusals_are_plain_and_say_nothing_was_moved passed
    Runner refusals are plain and say nothing was moved (no description in the source; shown from the name)
  • test_an_invalid_approved_action_is_refused_without_a_call passed
    An invalid approved action is refused without a call (no description in the source; shown from the name)
  • test_with_either_switch_off_an_approved_delete_is_refused passed
    With either switch off an approved delete is refused (no description in the source; shown from the name)
  • test_a_runner_crash_never_raises passed
    A runner crash never raises (no description in the source; shown from the name)
  • test_the_docs_describe_the_delete_tool_and_its_switch passed
    The docs describe the delete tool and its switch (no description in the source; shown from the name)
test_file_preview.py — 21 tests 21 passed, 0 failed, 0 skipped

Preview of a change to a file in a write grant (op "preview"): the runner reader run for real, the runner endpoint, the app client and the agent tool. Nothing here can write a file. No Docker, network or database is used.

  • test_preview_is_an_operation_and_other_specs_are_unchanged passed
    Preview is an operation and other specs are unchanged (no description in the source; shown from the name)
  • test_a_preview_spec_has_a_read_only_mount_and_only_the_new_values passed
    A preview spec has a read only mount and only the new values (no description in the source; shown from the name)
  • test_an_existing_file_shows_a_diff_counts_and_both_hashes passed
    An existing file shows a diff counts and both hashes (no description in the source; shown from the name)
  • test_a_new_file_is_reported_as_new_and_nothing_is_created passed
    A new file is reported as new and nothing is created (no description in the source; shown from the name)
  • test_the_same_text_is_identical_and_a_missing_final_newline_is_matched passed
    The same text is identical and a missing final newline is matched (no description in the source; shown from the name)
  • test_a_content_line_that_looks_like_a_header_is_counted_correctly passed
    A content line that looks like a header is counted correctly (no description in the source; shown from the name)
  • test_a_long_diff_is_cut_and_says_so passed
    A long diff is cut and says so (no description in the source; shown from the name)
  • test_the_reader_refuses_odd_targets passed
    The reader refuses odd targets (no description in the source; shown from the name)
  • test_a_file_over_the_size_limit_is_refused_not_cut passed
    A file over the size limit is refused not cut (no description in the source; shown from the name)
  • test_the_folder_itself_is_not_a_file passed
    The folder itself is not a file (no description in the source; shown from the name)
  • test_a_write_grant_gets_a_preview_with_the_text_and_one_read_only_mount passed
    A write grant gets a preview with the text and one read only mount (no description in the source; shown from the name)
  • test_a_read_grant_is_refused_before_any_container_starts passed
    A read grant is refused before any container starts (no description in the source; shown from the name)
  • test_bad_text_is_refused_before_any_container_starts passed
    Bad text is refused before any container starts (no description in the source; shown from the name)
  • test_read_and_list_calls_still_ignore_a_text_field passed
    Read and list calls still ignore a text field (no description in the source; shown from the name)
  • test_modes_come_from_the_grants_reply_and_only_write_grants_count passed
    Modes come from the grants reply and only write grants count (no description in the source; shown from the name)
  • test_the_tool_is_offered_only_for_write_grants passed
    The tool is offered only for write grants (no description in the source; shown from the name)
  • test_a_good_plan_is_normalised_and_bad_ones_are_refused passed
    A good plan is normalised and bad ones are refused (no description in the source; shown from the name)
  • test_the_call_sends_only_op_grant_path_and_text passed
    The call sends only op grant path and text (no description in the source; shown from the name)
  • test_refusals_and_errors_are_plain passed
    Refusals and errors are plain (no description in the source; shown from the name)
  • test_identical_text_says_there_would_be_no_change passed
    Identical text says there would be no change (no description in the source; shown from the name)
  • test_dispatch_taint_and_external_content passed
    Dispatch taint and external content (no description in the source; shown from the name)
test_file_request.py — 8 tests 8 passed, 0 failed, 0 skipped

request_access: the agent can only ask. It never supplies a path, always needs approval, grants nothing.

  • test_off_by_default passed
    Off by default (no description in the source; shown from the name)
  • test_offered_without_any_grant_when_file_tools_are_on passed
    Offered without any grant when file tools are on (no description in the source; shown from the name)
  • test_a_good_request_is_valid passed
    A good request is valid (no description in the source; shown from the name)
  • test_bad_grant_names_are_rejected passed
    Bad grant names are rejected (no description in the source; shown from the name)
  • test_empty_reason_is_rejected passed
    Empty reason is rejected (no description in the source; shown from the name)
  • test_the_reason_is_cleaned_and_capped passed
    The reason is cleaned and capped (no description in the source; shown from the name)
  • test_approving_grants_nothing_and_only_shows_a_command passed
    Approving grants nothing and only shows a command (no description in the source; shown from the name)
  • test_even_in_full_mode_a_request_waits_for_the_owner passed
    Even in full mode a request waits for the owner (no description in the source; shown from the name)
test_file_tools.py — 13 tests 13 passed, 0 failed, 0 skipped

Agent file tools (list_files, read_file): client, tool wiring, taint. No Docker, no network, no database.

  • test_off_by_default passed
    Off by default (no description in the source; shown from the name)
  • test_tools_need_a_grant passed
    Tools need a grant (no description in the source; shown from the name)
  • test_tools_are_offered_with_grant_names_only passed
    Tools are offered with grant names only (no description in the source; shown from the name)
  • test_plans_for_good_paths_are_valid passed
    Plans for good paths are valid (no description in the source; shown from the name)
  • test_bad_plans_are_rejected passed
    Bad plans are rejected (no description in the source; shown from the name)
  • test_the_call_sends_only_op_grant_and_path passed
    The call sends only op grant and path (no description in the source; shown from the name)
  • test_list_output passed
    List output (no description in the source; shown from the name)
  • test_refusals_errors_and_busy passed
    Refusals errors and busy (no description in the source; shown from the name)
  • test_dispatch_goes_to_the_client passed
    Dispatch goes to the client (no description in the source; shown from the name)
  • test_file_tools_taint_the_run_but_are_not_outbound passed
    File tools taint the run but are not outbound (no description in the source; shown from the name)
  • test_real_results_count_as_external_content passed
    Real results count as external content (no description in the source; shown from the name)
  • test_runner_grants_reply_round_trips_to_names passed
    Runner grants reply round trips to names (no description in the source; shown from the name)
  • test_a_file_or_folder_named_like_a_refusal_still_taints passed
    A file or folder named like a refusal still taints (no description in the source; shown from the name)
test_file_write.py — 21 tests 21 passed, 0 failed, 0 skipped

Writing to a file in a write grant (op "write"): the fixed writer run for real on a temporary folder, the spec, the runner endpoint, the trash, and the host-only switch (`ragleap files writing`). No Docker, network or database.

  • test_the_write_spec_has_exactly_one_writable_mount_and_the_same_hardening passed
    The write spec has exactly one writable mount and the same hardening (no description in the source; shown from the name)
  • test_every_other_file_spec_is_still_read_only passed
    Every other file spec is still read only (no description in the source; shown from the name)
  • test_the_trash_and_temp_names_are_protected_everywhere passed
    The trash and temp names are protected everywhere (no description in the source; shown from the name)
  • test_a_new_file_is_created_with_no_trash passed
    A new file is created with no trash (no description in the source; shown from the name)
  • test_an_overwrite_keeps_the_old_version_in_the_trash_and_the_mode passed
    An overwrite keeps the old version in the trash and the mode (no description in the source; shown from the name)
  • test_a_file_that_changed_since_the_preview_is_not_touched passed
    A file that changed since the preview is not touched (no description in the source; shown from the name)
  • test_new_versus_existing_mismatches_are_refused passed
    New versus existing mismatches are refused (no description in the source; shown from the name)
  • test_text_that_is_not_the_previewed_text_is_refused_before_the_trash passed
    Text that is not the previewed text is refused before the trash (no description in the source; shown from the name)
  • test_a_missing_final_newline_is_added_like_the_preview_does passed
    A missing final newline is added like the preview does (no description in the source; shown from the name)
  • test_identical_text_changes_nothing_and_leaves_no_trash passed
    Identical text changes nothing and leaves no trash (no description in the source; shown from the name)
  • test_odd_existing_targets_are_refused_unchanged passed
    Odd existing targets are refused unchanged (no description in the source; shown from the name)
  • test_a_big_old_file_is_refused_not_cut passed
    A big old file is refused not cut (no description in the source; shown from the name)
  • test_paths_that_could_leave_or_hide_things_are_refused passed
    Paths that could leave or hide things are refused (no description in the source; shown from the name)
  • test_a_full_trash_refuses_the_write_and_keeps_the_file passed
    A full trash refuses the write and keeps the file (no description in the source; shown from the name)
  • test_the_trash_is_invisible_to_the_reader passed
    The trash is invisible to the reader (no description in the source; shown from the name)
  • test_writing_is_off_until_the_owner_switches_it_on_at_the_host passed
    Writing is off until the owner switches it on at the host (no description in the source; shown from the name)
  • test_the_switch_needs_computer_control_and_the_pause_flag_wins passed
    The switch needs computer control and the pause flag wins (no description in the source; shown from the name)
  • test_a_read_grant_and_bad_requests_are_refused_before_any_container passed
    A read grant and bad requests are refused before any container (no description in the source; shown from the name)
  • test_the_write_audit_line_has_hashes_and_no_text passed
    The write audit line has hashes and no text (no description in the source; shown from the name)
  • test_file_calls_do_not_refuse_the_next_call_as_busy passed
    File calls do not refuse the next call as busy (no description in the source; shown from the name)
  • test_writing_on_and_off_create_and_remove_the_flag passed
    Writing on and off create and remove the flag (no description in the source; shown from the name)
test_file_write_app.py — 21 tests 21 passed, 0 failed, 0 skipped

App side of writing a file (tool write_file): the kill switch, plan checks, the preview bound to the action, approval always (even in full mode), the human display, what is logged, and the exact call to the runner. The runner and the database are replaced; nothing here touches a disk, Docker or the network.

  • test_the_tool_needs_the_kill_switch_and_a_write_grant passed
    The tool needs the kill switch and a write grant (no description in the source; shown from the name)
  • test_a_good_plan_and_the_bad_ones passed
    A good plan and the bad ones (no description in the source; shown from the name)
  • test_it_is_outbound_style_and_not_external_content passed
    It is outbound style and not external content (no description in the source; shown from the name)
  • test_preview_raw_returns_the_dict_and_sends_only_op_grant_path_text passed
    Preview raw returns the dict and sends only op grant path text (no description in the source; shown from the name)
  • test_preview_raw_refuses_bad_input_without_a_call passed
    Preview raw refuses bad input without a call (no description in the source; shown from the name)
  • test_preview_raw_refuses_an_incomplete_preview_and_runner_errors passed
    Preview raw refuses an incomplete preview and runner errors (no description in the source; shown from the name)
  • test_a_write_always_waits_for_approval_and_stores_the_bound_preview passed
    A write always waits for approval and stores the bound preview (no description in the source; shown from the name)
  • test_a_new_file_has_base_dash passed
    A new file has base dash (no description in the source; shown from the name)
  • test_identical_or_refused_previews_create_no_pending_action passed
    Identical or refused previews create no pending action (no description in the source; shown from the name)
  • test_autonomy_off_asks_the_runner_nothing passed
    Autonomy off asks the runner nothing (no description in the source; shown from the name)
  • test_the_approval_text_shows_path_counts_hashes_and_a_short_diff passed
    The approval text shows path counts hashes and a short diff (no description in the source; shown from the name)
  • test_other_channels_keep_the_old_300_character_preview passed
    Other channels keep the old 300 character preview (no description in the source; shown from the name)
  • test_the_pending_list_carries_a_display_field passed
    The pending list carries a display field (no description in the source; shown from the name)
  • test_the_log_and_learning_keep_no_file_text passed
    The log and learning keep no file text (no description in the source; shown from the name)
  • test_the_dashboard_prefers_the_display_field passed
    The dashboard prefers the display field (no description in the source; shown from the name)
  • test_dispatch_and_the_exact_call_to_the_runner passed
    Dispatch and the exact call to the runner (no description in the source; shown from the name)
  • test_a_new_file_is_reported_as_created passed
    A new file is reported as created (no description in the source; shown from the name)
  • test_runner_refusals_are_plain_and_say_nothing_was_written passed
    Runner refusals are plain and say nothing was written (no description in the source; shown from the name)
  • test_an_invalid_approved_action_is_refused_without_a_call passed
    An invalid approved action is refused without a call (no description in the source; shown from the name)
  • test_with_the_kill_switch_off_an_approved_write_is_refused passed
    With the kill switch off an approved write is refused (no description in the source; shown from the name)
  • test_a_runner_crash_never_raises passed
    A runner crash never raises (no description in the source; shown from the name)
test_files_tab.py — 7 tests 7 passed, 0 failed, 0 skipped

Dashboard Files tab: /file-grants shows switches and grant names only, never host paths. No Docker or database.

  • test_without_a_token_nothing_is_asked passed
    Without a token nothing is asked (no description in the source; shown from the name)
  • test_grants_are_listed_by_name_without_any_host_path passed
    Grants are listed by name without any host path (no description in the source; shown from the name)
  • test_paused_runner_shows_no_grants_and_control_off passed
    Paused runner shows no grants and control off (no description in the source; shown from the name)
  • test_runner_errors_and_outages passed
    Runner errors and outages (no description in the source; shown from the name)
  • test_tools_flag_is_reported passed
    Tools flag is reported (no description in the source; shown from the name)
  • test_the_page_has_the_files_tab_and_no_add_control passed
    The page has the files tab and no add control (no description in the source; shown from the name)
  • test_the_route_needs_the_key passed
    The route needs the key (no description in the source; shown from the name)
test_folder_ingest.py — 26 tests 27 passed, 0 failed, 0 skipped

Folder auto-ingest (core/folder_ingest.py): the manifest and staged-file checks, the plan, the first-sync approval, changes, removals and their safety rules, the per-cycle budget and failure handling. The database and the runner are replaced by fakes, so no Docker, network or database is used.

  • test_off_by_default_and_needs_the_runner_token passed
    Off by default and needs the runner token (no description in the source; shown from the name)
  • test_settings_have_safe_defaults_and_limits passed
    Settings have safe defaults and limits (no description in the source; shown from the name)
  • test_manifest_entries_are_validated passed
    Manifest entries are validated (no description in the source; shown from the name)
  • test_a_bad_manifest_is_ignored passed
    A bad manifest is ignored (no description in the source; shown from the name)
  • test_grant_names_are_checked_before_any_path_is_built passed
    Grant names are checked before any path is built (no description in the source; shown from the name)
  • test_a_staged_file_must_match_the_manifest_exactly passed
    A staged file must match the manifest exactly (no description in the source; shown from the name)
  • test_a_symlink_in_staging_is_never_followed passed
    A symlink in staging is never followed (no description in the source; shown from the name)
  • test_plan_sorts_files_into_new_changed_stale_and_unsupported passed
    Plan sorts files into new changed stale and unsupported (no description in the source; shown from the name)
  • test_an_incomplete_manifest_never_plans_removals passed
    An incomplete manifest never plans removals (no description in the source; shown from the name)
  • test_an_empty_manifest_never_plans_removals passed
    An empty manifest never plans removals (no description in the source; shown from the name)
  • test_the_first_sync_waits_for_the_owner_and_shows_what_it_will_embed passed
    The first sync waits for the owner and shows what it will embed (no description in the source; shown from the name)
  • test_auto_approve_skips_the_wait_and_records_it passed
    Auto approve skips the wait and records it (no description in the source; shown from the name)
  • test_unchanged_files_are_not_ingested_again_and_changes_replace_the_document passed
    Unchanged files are not ingested again and changes replace the document (no description in the source; shown from the name)
  • test_a_removed_source_file_removes_its_document_unless_that_is_switched_off passed
    A removed source file removes its document unless that is switched off (no description in the source; shown from the name)
  • test_nothing_is_deleted_when_the_manifest_cannot_be_trusted passed
    Nothing is deleted when the manifest cannot be trusted (no description in the source; shown from the name)
  • test_the_per_cycle_budget_spreads_a_big_folder_over_several_cycles passed
    The per cycle budget spreads a big folder over several cycles (no description in the source; shown from the name)
  • test_the_budget_is_shared_between_grants passed
    The budget is shared between grants (no description in the source; shown from the name)
  • test_a_failing_file_is_retried_a_few_times_and_then_left_alone_until_it_changes passed
    A failing file is retried a few times and then left alone until it changes (no description in the source; shown from the name)
  • test_one_broken_grant_does_not_stop_the_others passed
    One broken grant does not stop the others (no description in the source; shown from the name)
  • test_a_cycle_asks_the_runner_first_unless_told_not_to passed
    A cycle asks the runner first unless told not to (no description in the source; shown from the name)
  • test_a_database_without_the_new_columns_is_left_alone passed
    A database without the new columns is left alone (no description in the source; shown from the name)
  • test_run_cycle_never_raises_and_does_not_overlap passed
    Run cycle never raises and does not overlap (no description in the source; shown from the name)
  • test_approve_checks_its_input passed
    Approve checks its input (no description in the source; shown from the name)
  • test_status_shows_names_counts_and_sizes_only passed
    Status shows names counts and sizes only (no description in the source; shown from the name)
  • test_request_stage_posts_nothing_but_an_empty_body_with_the_token passed
    Request stage posts nothing but an empty body with the token (no description in the source; shown from the name)
  • test_ingest_file_ingests_first_then_deletes_the_old_documents passed
    Ingest file ingests first then deletes the old documents (no description in the source; shown from the name)
test_folder_ingest_db.py — 9 tests 9 passed, 0 failed, 0 skipped

Folder auto-ingest against the real database (db/schema.sql applied): the source columns on documents, the first-sync approval table, the documents list, and the two API routes. The embedding, graph and language calls are replaced.

  • test_the_schema_is_applied_in_this_database passed
    The schema is applied in this database (no description in the source; shown from the name)
  • test_approvals_are_recorded_and_can_be_repeated passed
    Approvals are recorded and can be repeated (no description in the source; shown from the name)
  • test_a_document_from_a_folder_keeps_its_source_and_a_plain_one_has_none passed
    A document from a folder keeps its source and a plain one has none (no description in the source; shown from the name)
  • test_the_documents_list_still_works_before_the_schema_is_applied passed
    The documents list still works before the schema is applied (no description in the source; shown from the name)
  • test_other_database_errors_in_the_list_are_not_hidden passed
    Other database errors in the list are not hidden (no description in the source; shown from the name)
  • test_the_routes_need_the_key passed
    The routes need the key (no description in the source; shown from the name)
  • test_approve_starts_a_cycle_without_asking_the_runner_again passed
    Approve starts a cycle without asking the runner again (no description in the source; shown from the name)
  • test_approve_passes_refusals_through_and_starts_nothing passed
    Approve passes refusals through and starts nothing (no description in the source; shown from the name)
  • test_the_scheduled_job_runs_one_cycle_and_never_raises passed
    The scheduled job runs one cycle and never raises (no description in the source; shown from the name)
test_formats.py — 14 tests 14 passed, 0 failed, 0 skipped

More document formats and web pages by address (needs the ragleap-rag package, as in requirements.txt).

  • test_supported_extensions_include_the_package_formats passed
    Supported extensions include the package formats (no description in the source; shown from the name)
  • test_upload_accepts_text_like_formats passed
    Upload accepts text like formats (no description in the source; shown from the name)
  • test_upload_accepts_html_and_zip passed
    Upload accepts html and zip (no description in the source; shown from the name)
  • test_upload_still_rejects_other_types passed
    Upload still rejects other types (no description in the source; shown from the name)
  • test_documents_lists_formats_and_url_flag passed
    Documents lists formats and url flag (no description in the source; shown from the name)
  • test_ingest_url_needs_the_key passed
    Ingest url needs the key (no description in the source; shown from the name)
  • test_ingest_url_rejects_bad_input passed
    Ingest url rejects bad input (no description in the source; shown from the name)
  • test_ingest_url_refuses_private_and_internal_addresses passed
    Ingest url refuses private and internal addresses (no description in the source; shown from the name)
  • test_ingest_url_adds_the_page passed
    Ingest url adds the page (no description in the source; shown from the name)
  • test_ingest_url_without_web_support_is_501 passed
    Ingest url without web support is 501 (no description in the source; shown from the name)
  • test_private_addresses_are_allowed_only_by_the_env_setting passed
    Private addresses are allowed only by the env setting (no description in the source; shown from the name)
  • test_empty_page_text_is_a_400 passed
    Empty page text is a 400 (no description in the source; shown from the name)
  • test_dashboard_has_the_url_box_and_dynamic_formats passed
    Dashboard has the url box and dynamic formats (no description in the source; shown from the name)
  • test_url_ingest_needs_a_package_that_can_refuse_private_addresses passed
    Url ingest needs a package that can refuse private addresses (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_http_throughput.py — 10 tests 10 passed, 0 failed, 0 skipped

benchmarks/http_throughput.py against a small local server, plus the WEB_CONCURRENCY behaviour THROUGHPUT.md relies on.

  • test_percentiles_use_the_nearest_rank passed
    Percentiles use the nearest rank (no description in the source; shown from the name)
  • test_it_counts_requests_and_latency_per_path passed
    It counts requests and latency per path (no description in the source; shown from the name)
  • test_error_responses_and_a_missing_key_are_counted_as_errors passed
    Error responses and a missing key are counted as errors (no description in the source; shown from the name)
  • test_the_key_is_sent_as_the_api_key_header passed
    The key is sent as the api key header (no description in the source; shown from the name)
  • test_a_dead_server_gives_errors_not_a_crash passed
    A dead server gives errors not a crash (no description in the source; shown from the name)
  • test_unreasonable_settings_are_refused passed
    Unreasonable settings are refused (no description in the source; shown from the name)
  • test_the_command_line_reads_the_key_from_the_environment_only passed
    The command line reads the key from the environment only (no description in the source; shown from the name)
  • test_web_concurrency_in_the_environment_sets_the_number_of_web_processes passed
    Web concurrency in the environment sets the number of web processes (no description in the source; shown from the name)
  • test_the_dockerfile_does_not_hard_code_the_number_of_workers passed
    The dockerfile does not hard code the number of workers (no description in the source; shown from the name)
  • test_the_throughput_notes_exist_and_name_the_per_process_state passed
    The throughput notes exist and name the per process state (no description in the source; shown from the name)
test_import_order.py — 1 tests 1 passed, 0 failed, 0 skipped

No file-level description in the source.

  • test_module_imports_first_in_a_fresh_interpreter passed
    Module imports first in a fresh interpreter (no description in the source; shown from the name)
test_install_offline.py — 10 tests 10 passed, 0 failed, 0 skipped

install.sh --offline: installs from a bundle made by scripts/make_offline_bundle.sh with no git clone, no pull and no build. Docker, curl and git are test doubles, and the bundle is made by hand, so no Docker and no network are needed.

  • test_an_ollama_install_from_a_bundle_needs_no_clone_no_pull_and_no_build passed
    An ollama install from a bundle needs no clone no pull and no build (no description in the source; shown from the name)
  • test_the_provider_defaults_to_local_models_or_none_and_never_to_gemini passed
    The provider defaults to local models or none and never to gemini (no description in the source; shown from the name)
  • test_gemini_is_refused_because_it_needs_the_internet passed
    Gemini is refused because it needs the internet (no description in the source; shown from the name)
  • test_a_damaged_or_wrong_bundle_is_refused_before_anything_is_loaded passed
    A damaged or wrong bundle is refused before anything is loaded (no description in the source; shown from the name)
  • test_a_missing_bundle_is_refused passed
    A missing bundle is refused (no description in the source; shown from the name)
  • test_a_bundle_without_models_cannot_do_an_ollama_install passed
    A bundle without models cannot do an ollama install (no description in the source; shown from the name)
  • test_models_that_are_not_the_defaults_are_refused_with_a_clear_message passed
    Models that are not the defaults are refused with a clear message (no description in the source; shown from the name)
  • test_the_option_needs_a_path_and_the_help_mentions_it passed
    The option needs a path and the help mentions it (no description in the source; shown from the name)
  • test_the_bundle_path_can_come_from_the_environment passed
    The bundle path can come from the environment (no description in the source; shown from the name)
  • test_the_online_install_is_unchanged passed
    The online install is unchanged (no description in the source; shown from the name)
test_install_script.py — 15 tests 15 passed, 0 failed, 0 skipped

No file-level description in the source.

  • test_syntax passed
    Syntax (no description in the source; shown from the name)
  • test_fresh_gemini_install passed
    Fresh gemini install (no description in the source; shown from the name)
  • test_ollama_install passed
    Ollama install (no description in the source; shown from the name)
  • test_existing_env_is_never_changed passed
    Existing env is never changed (no description in the source; shown from the name)
  • test_existing_ollama_setup_keeps_its_service_and_models passed
    Existing ollama setup keeps its service and models (no description in the source; shown from the name)
  • test_existing_database_volume_keeps_its_password passed
    Existing database volume keeps its password (no description in the source; shown from the name)
  • test_no_choice_and_no_terminal_skips_the_ai passed
    No choice and no terminal skips the ai (no description in the source; shown from the name)
  • test_docker_not_running passed
    Docker not running (no description in the source; shown from the name)
  • test_unknown_option_and_bad_provider passed
    Unknown option and bad provider (no description in the source; shown from the name)
  • test_secrets_differ_between_installs passed
    Secrets differ between installs (no description in the source; shown from the name)
  • test_ollama_service_is_internal_only passed
    Ollama service is internal only (no description in the source; shown from the name)
  • test_docs_match_the_installer passed
    Docs match the installer (no description in the source; shown from the name)
  • test_ollama_models_are_ready_before_ragleap_starts passed
    Ollama models are ready before ragleap starts (no description in the source; shown from the name)
  • test_installer_installs_the_ragleap_command passed
    Installer installs the ragleap command (no description in the source; shown from the name)
  • test_bundled_ollama_has_a_context_window_that_fits_rag_prompts passed
    Bundled ollama has a context window that fits rag prompts (no description in the source; shown from the name)
test_install_scripts.py — 17 tests 17 passed, 0 failed, 0 skipped

Static checks for the installers: they parse, keep Unix line endings, and keep their safety checks.

  • test_shell_scripts_parse passed
    Shell scripts parse (no description in the source; shown from the name)
  • test_installers_have_no_crlf passed
    Installers have no crlf (no description in the source; shown from the name)
  • test_gitattributes_keeps_shell_scripts_on_lf passed
    Gitattributes keeps shell scripts on lf (no description in the source; shown from the name)
  • test_install_sh_safety_checks_present passed
    Install sh safety checks present (no description in the source; shown from the name)
  • test_install_ps1_basics passed
    Install ps1 basics (no description in the source; shown from the name)
  • test_compose_host_ports_are_configurable_with_unchanged_defaults passed
    Compose host ports are configurable with unchanged defaults (no description in the source; shown from the name)
  • test_port_helpers_skip_a_busy_port passed
    Port helpers skip a busy port (no description in the source; shown from the name)
  • test_installer_volume_check_is_project_specific_and_ragleap_reads_app_port passed
    Installer volume check is project specific and ragleap reads app port (no description in the source; shown from the name)
  • test_usage_lists_key_rotate_and_installer_opens_browser_before_printing_key passed
    Usage lists key rotate and installer opens browser before printing key (no description in the source; shown from the name)
  • test_open_browser_can_be_switched_off passed
    Open browser can be switched off (no description in the source; shown from the name)
  • test_ragleap_key_rotate_replaces_key_and_keeps_other_settings passed
    Ragleap key rotate replaces key and keeps other settings (no description in the source; shown from the name)
  • test_install_ps1_does_not_advertise_the_wrapped_one_liner passed
    Install ps1 does not advertise the wrapped one liner (no description in the source; shown from the name)
  • test_install_sh_guidance_for_missing_requirements_and_windows_hint passed
    Install sh guidance for missing requirements and windows hint (no description in the source; shown from the name)
  • test_port_check_can_be_switched_off passed
    Port check can be switched off (no description in the source; shown from the name)
  • test_disk_check_refuses_when_there_is_not_enough_space passed
    Disk check refuses when there is not enough space (no description in the source; shown from the name)
  • test_readme_has_windows_install_without_the_wrapped_form passed
    Readme has windows install without the wrapped form (no description in the source; shown from the name)
  • test_readme_port_troubleshooting_points_to_env_settings passed
    Readme port troubleshooting points to env settings (no description in the source; shown from the name)
test_language_model_setting.py — 5 tests 5 passed, 0 failed, 0 skipped

Language detection model setting: lite works without any download; auto keeps the library default.

  • test_model_setting_values passed
    Model setting values (no description in the source; shown from the name)
  • test_auto_keeps_the_library_default passed
    Auto keeps the library default (no description in the source; shown from the name)
  • test_lite_and_full_are_passed_to_the_library passed
    Lite and full are passed to the library (no description in the source; shown from the name)
  • test_lite_works_without_any_download passed
    Lite works without any download (no description in the source; shown from the name)
  • test_failure_logs_one_hint_and_falls_back passed
    Failure logs one hint and falls back (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_lock_security_pins.py — 3 tests 3 passed, 0 failed, 0 skipped

Pins in requirements.lock (what the Docker image installs) that must stay at or above a patched version.

  • test_soupsieve_is_at_a_patched_version passed
    Soupsieve is at a patched version (no description in the source; shown from the name)
  • test_the_packages_with_fixes_found_by_the_image_scan_are_at_fixed_versions passed
    The packages with fixes found by the image scan are at fixed versions (no description in the source; shown from the name)
  • test_setuptools_is_pinned_to_a_release_with_fixed_bundled_copies passed
    Setuptools is pinned to a release with fixed bundled copies (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_metrics.py — 9 tests 9 passed, 0 failed, 0 skipped

Request metrics and X-Request-ID. No database needed: the shared test key is the owner.

  • test_the_text_has_counters_and_a_cumulative_histogram passed
    The text has counters and a cumulative histogram (no description in the source; shown from the name)
  • test_the_number_of_label_combinations_is_capped passed
    The number of label combinations is capped (no description in the source; shown from the name)
  • test_odd_methods_and_quotes_cannot_break_the_format passed
    Odd methods and quotes cannot break the format (no description in the source; shown from the name)
  • test_request_ids_are_kept_only_when_safe passed
    Request ids are kept only when safe (no description in the source; shown from the name)
  • test_metrics_is_off_by_default_even_for_the_owner passed
    Metrics is off by default even for the owner (no description in the source; shown from the name)
  • test_metrics_needs_a_key_and_an_admin_role passed
    Metrics needs a key and an admin role (no description in the source; shown from the name)
  • test_requests_are_counted_by_route_template_not_raw_path passed
    Requests are counted by route template not raw path (no description in the source; shown from the name)
  • test_nothing_is_counted_while_metrics_are_off passed
    Nothing is counted while metrics are off (no description in the source; shown from the name)
  • test_every_response_carries_a_request_id passed
    Every response carries a request id (no description in the source; shown from the name)
test_neo4j_password.py — 7 tests 7 passed, 0 failed, 0 skipped

The Neo4j password: docker-compose.yml takes it from NEO4J_PASSWORD (public default only while unset), and the app warns when the public default is configured. No Docker and no Neo4j needed.

  • test_compose_gives_the_neo4j_container_the_password_from_the_env_file passed
    Compose gives the neo4j container the password from the env file (no description in the source; shown from the name)
  • test_the_public_default_is_written_only_as_the_fallback passed
    The public default is written only as the fallback (no description in the source; shown from the name)
  • test_the_default_matches_the_one_the_app_warns_about passed
    The default matches the one the app warns about (no description in the source; shown from the name)
  • test_the_public_default_password_is_warned_about passed
    The public default password is warned about (no description in the source; shown from the name)
  • test_a_chosen_password_gets_no_warning_and_is_never_logged passed
    A chosen password gets no warning and is never logged (no description in the source; shown from the name)
  • test_no_password_still_means_graph_off passed
    No password still means graph off (no description in the source; shown from the name)
  • test_the_example_env_file_and_readme_tell_people_to_choose_a_password passed
    The example env file and readme tell people to choose a password (no description in the source; shown from the name)
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_and_the_sign_in_routes passed
    Exempt paths are exactly the page files and the sign in routes (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_folders.py — 5 tests 5 passed, 0 failed, 0 skipped

The Documents tab and folder auto-ingest: what the page asks the server for and what it promises the owner. These are text checks on the page code (the dashboard rules in test_office.py still apply to it).

  • test_the_documents_tab_reads_the_folder_status_and_posts_the_approval passed
    The documents tab reads the folder status and posts the approval (no description in the source; shown from the name)
  • test_the_owner_sees_the_cost_warning_before_the_first_read passed
    The owner sees the cost warning before the first read (no description in the source; shown from the name)
  • test_folder_documents_are_labelled_and_not_deleted_from_the_page passed
    Folder documents are labelled and not deleted from the page (no description in the source; shown from the name)
  • test_an_older_server_without_the_route_does_not_break_the_tab passed
    An older server without the route does not break the tab (no description in the source; shown from the name)
  • test_folder_names_go_in_as_text passed
    Folder names go in as text (no description in the source; shown from the name)
test_office_login_link.py — 3 tests 3 passed, 0 failed, 0 skipped

No file-level description in the source.

  • test_login_link_is_read_stored_and_removed_from_the_address_bar passed
    Login link is read stored and removed from the address bar (no description in the source; shown from the name)
  • test_login_link_never_uses_local_storage_or_the_server passed
    Login link never uses local storage or the server (no description in the source; shown from the name)
  • test_login_link_uses_match_not_exec passed
    Login link uses match not exec (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_office_people.py — 7 tests 7 passed, 0 failed, 0 skipped

The dashboard and people: tabs by role, the Users and Audit tabs, who approved. Text checks on the page code (the general dashboard rules in test_office.py still apply to it).

  • test_every_tab_has_the_lowest_role_that_can_use_it passed
    Every tab has the lowest role that can use it (no description in the source; shown from the name)
  • test_the_page_matches_the_servers_role_table passed
    The page matches the servers role table (no description in the source; shown from the name)
  • test_an_older_server_without_me_gets_no_users_or_audit_tab passed
    An older server without me gets no users or audit tab (no description in the source; shown from the name)
  • test_you_cannot_lock_yourself_out_from_the_page passed
    You cannot lock yourself out from the page (no description in the source; shown from the name)
  • test_a_key_is_only_shown_when_it_was_just_made_and_is_never_stored passed
    A key is only shown when it was just made and is never stored (no description in the source; shown from the name)
  • test_who_approved_is_shown_in_the_activity_log passed
    Who approved is shown in the activity log (no description in the source; shown from the name)
  • test_names_and_paths_go_in_as_text passed
    Names and paths go in as text (no description in the source; shown from the name)
test_office_settings.py — 3 tests 3 passed, 0 failed, 0 skipped

No file-level description in the source.

  • test_settings_tab_uses_the_settings_endpoints passed
    Settings tab uses the settings endpoints (no description in the source; shown from the name)
  • test_secret_inputs_are_password_fields_and_never_prefilled passed
    Secret inputs are password fields and never prefilled (no description in the source; shown from the name)
  • test_lock_clears_the_settings_form passed
    Lock clears the settings form (no description in the source; shown from the name)
test_office_setup.py — 4 tests 4 passed, 0 failed, 0 skipped

No file-level description in the source.

  • test_setup_tab_exists_and_is_first passed
    Setup tab exists and is first (no description in the source; shown from the name)
  • test_setup_tab_uses_the_status_endpoint passed
    Setup tab uses the status endpoint (no description in the source; shown from the name)
  • test_page_opens_on_setup_only_when_something_required_is_missing passed
    Page opens on setup only when something required is missing (no description in the source; shown from the name)
  • test_setup_tab_can_jump_to_settings passed
    Setup tab can jump to settings (no description in the source; shown from the name)
test_offline_bundle.py — 10 tests 10 passed, 0 failed, 0 skipped

scripts/make_offline_bundle.sh with a test double for Docker (no Docker, no network needed). The script is copied into a tiny temporary git repository so the tests stay fast.

  • test_it_builds_one_archive_whose_checksums_verify passed
    It builds one archive whose checksums verify (no description in the source; shown from the name)
  • test_the_manifest_and_the_code_archive_hold_what_they_should passed
    The manifest and the code archive hold what they should (no description in the source; shown from the name)
  • test_models_are_added_only_when_asked_for passed
    Models are added only when asked for (no description in the source; shown from the name)
  • test_a_model_name_with_odd_characters_is_refused_before_anything_runs passed
    A model name with odd characters is refused before anything runs (no description in the source; shown from the name)
  • test_it_uses_the_project_name_and_profiles_the_installer_expects passed
    It uses the project name and profiles the installer expects (no description in the source; shown from the name)
  • test_an_older_compose_without_ignore_buildable_still_works passed
    An older compose without ignore buildable still works (no description in the source; shown from the name)
  • test_missing_docker_and_low_disk_stop_with_a_clear_message passed
    Missing docker and low disk stop with a clear message (no description in the source; shown from the name)
  • test_it_never_overwrites_an_existing_archive passed
    It never overwrites an existing archive (no description in the source; shown from the name)
  • test_it_leaves_no_temporary_files_and_does_not_touch_the_checkout passed
    It leaves no temporary files and does not touch the checkout (no description in the source; shown from the name)
  • test_help_works_and_unknown_options_are_refused passed
    Help works and unknown options are refused (no description in the source; shown from the name)
test_offline_gpu_docs.py — 8 tests 8 passed, 0 failed, 0 skipped

The GPU compose override and docs/offline-and-gpu.md: the override only adds a GPU reservation to the Ollama service, and the guide stays in step with the scripts it names (paths, flags, default models).

  • test_the_override_only_adds_a_gpu_reservation_to_the_ollama_service passed
    The override only adds a gpu reservation to the ollama service (no description in the source; shown from the name)
  • test_merged_with_the_base_file_the_ollama_service_keeps_everything_else passed
    Merged with the base file the ollama service keeps everything else (no description in the source; shown from the name)
  • test_the_guide_names_files_that_exist passed
    The guide names files that exist (no description in the source; shown from the name)
  • test_the_flags_in_the_guide_exist_in_the_scripts passed
    The flags in the guide exist in the scripts (no description in the source; shown from the name)
  • test_the_default_models_in_the_guide_are_the_installers_defaults passed
    The default models in the guide are the installers defaults (no description in the source; shown from the name)
  • test_the_compose_file_setting_in_the_guide_matches_the_override_name passed
    The compose file setting in the guide matches the override name (no description in the source; shown from the name)
  • test_the_guide_is_honest_about_what_is_untested_and_unsigned passed
    The guide is honest about what is untested and unsigned (no description in the source; shown from the name)
  • test_the_readme_links_to_the_guide passed
    The readme links to the guide (no description in the source; shown from the name)
test_oidc.py — 22 tests 22 passed, 0 failed, 0 skipped

core/oidc.py against a fake sign-in provider: its own signing keys, discovery, key set and token endpoint, all served through httpx's mock transport, so no network is used.

  • test_nothing_set_means_oidc_is_off_and_a_partial_setup_is_reported passed
    Nothing set means oidc is off and a partial setup is reported (no description in the source; shown from the name)
  • test_settings_are_read_with_safe_defaults passed
    Settings are read with safe defaults (no description in the source; shown from the name)
  • test_unsafe_issuer_addresses_are_refused passed
    Unsafe issuer addresses are refused (no description in the source; shown from the name)
  • test_plain_http_is_allowed_only_for_localhost_or_when_asked passed
    Plain http is allowed only for localhost or when asked (no description in the source; shown from the name)
  • test_discovery_is_cached_and_the_issuer_must_match passed
    Discovery is cached and the issuer must match (no description in the source; shown from the name)
  • test_redirects_and_bad_answers_from_the_provider_are_errors passed
    Redirects and bad answers from the provider are errors (no description in the source; shown from the name)
  • test_the_real_http_helpers_refuse_big_or_unreadable_answers passed
    The real http helpers refuse big or unreadable answers (no description in the source; shown from the name)
  • test_a_good_token_gives_an_identity passed
    A good token gives an identity (no description in the source; shown from the name)
  • test_tokens_with_wrong_claims_are_refused passed
    Tokens with wrong claims are refused (no description in the source; shown from the name)
  • test_several_audiences_need_a_matching_authorized_party passed
    Several audiences need a matching authorized party (no description in the source; shown from the name)
  • test_a_token_signed_with_another_key_is_refused passed
    A token signed with another key is refused (no description in the source; shown from the name)
  • test_unsafe_algorithms_are_refused_before_any_key_is_used passed
    Unsafe algorithms are refused before any key is used (no description in the source; shown from the name)
  • test_garbage_and_huge_tokens_are_refused passed
    Garbage and huge tokens are refused (no description in the source; shown from the name)
  • test_ec_keys_work_too passed
    Ec keys work too (no description in the source; shown from the name)
  • test_a_new_signing_key_is_picked_up_once_but_not_on_every_unknown_key passed
    A new signing key is picked up once but not on every unknown key (no description in the source; shown from the name)
  • test_the_second_factor_rule passed
    The second factor rule (no description in the source; shown from the name)
  • test_the_email_rules passed
    The email rules (no description in the source; shown from the name)
  • test_pkce_matches_the_published_example passed
    Pkce matches the published example (no description in the source; shown from the name)
  • test_state_comparison_is_exact passed
    State comparison is exact (no description in the source; shown from the name)
  • test_the_sign_in_address_has_everything_and_no_credential passed
    The sign in address has everything and no credential (no description in the source; shown from the name)
  • test_the_code_exchange_sends_the_verifier_and_returns_only_the_id_token passed
    The code exchange sends the verifier and returns only the id token (no description in the source; shown from the name)
  • test_failed_exchanges_do_not_leak_the_code_or_the_credential passed
    Failed exchanges do not leak the code or the credential (no description in the source; shown from the name)
test_openai_compatible_empty_reply.py — 2 tests 2 passed, 0 failed, 0 skipped

An OpenAI-compatible model can answer with no text (content is None, for example when it spends its budget on hidden reasoning). That used to crash with AttributeError; it now returns the same fallback as the Gemini and Anthropic paths, so the caller can retry or say so.

  • test_a_reply_with_no_content_does_not_crash passed
    A reply with no content does not crash (no description in the source; shown from the name)
  • test_a_normal_reply_is_unchanged passed
    A normal reply is unchanged (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_pages_jekyll_safe.py — 4 tests 4 passed, 0 failed, 0 skipped

GitHub Pages builds this repository with Jekyll (see _config.yml).

  • test_no_liquid_syntax_in_files_jekyll_would_render passed
    No liquid syntax in files jekyll would render (no description in the source; shown from the name)
  • test_ansible_playbooks_are_excluded_from_pages passed
    Ansible playbooks are excluded from pages (no description in the source; shown from the name)
  • test_kramdown_parses_markdown_inside_html_blocks passed
    Kramdown parses markdown inside html blocks (no description in the source; shown from the name)
  • test_root_pages_have_no_links_that_only_work_on_github passed
    Root pages have no links that only work on github (no description in the source; shown from the name)
test_permissions.py — 9 tests 9 passed, 0 failed, 0 skipped

Roles and the route table (core/permissions.py). Every route must have its rule written down on purpose.

  • test_roles_run_from_lowest_to_highest passed
    Roles run from lowest to highest (no description in the source; shown from the name)
  • test_allows passed
    Allows (no description in the source; shown from the name)
  • test_known_rules passed
    Known rules (no description in the source; shown from the name)
  • test_anything_not_listed_needs_the_owner passed
    Anything not listed needs the owner (no description in the source; shown from the name)
  • test_method_is_part_of_the_rule passed
    Method is part of the rule (no description in the source; shown from the name)
  • test_every_route_has_its_rule_or_is_public passed
    Every route has its rule or is public (no description in the source; shown from the name)
  • test_no_rule_points_at_a_route_that_does_not_exist passed
    No rule points at a route that does not exist (no description in the source; shown from the name)
  • test_public_routes_are_not_in_the_table passed
    Public routes are not in the table (no description in the source; shown from the name)
  • test_the_shared_key_and_the_open_api_count_as_the_owner passed
    The shared key and the open api count as the owner (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_provider_timeout.py — 5 tests 5 passed, 0 failed, 0 skipped

One slow provider must not stall a planning call: after ACTION_PROVIDER_TIMEOUT the next provider goes (found by the real-model sub-agent test).

  • test_a_slow_provider_is_skipped_after_the_limit_and_not_retried passed
    A slow provider is skipped after the limit and not retried (no description in the source; shown from the name)
  • test_when_every_provider_is_too_slow_the_call_fails_quickly passed
    When every provider is too slow the call fails quickly (no description in the source; shown from the name)
  • test_a_fast_provider_is_unaffected passed
    A fast provider is unaffected (no description in the source; shown from the name)
  • test_the_limit_can_be_turned_off_and_a_bad_value_uses_the_default passed
    The limit can be turned off and a bad value uses the default (no description in the source; shown from the name)
  • test_an_ordinary_error_still_retries_once_and_then_moves_on passed
    An ordinary error still retries once and then moves on (no description in the source; shown from the name)
test_publish_image_workflow.py — 7 tests 7 passed, 0 failed, 0 skipped

The publish-image workflow: signed by digest, attestations on, report-only scan, least privilege, pinned actions, never from a pull request, and the page that explains how to check it.

  • test_it_runs_only_on_release_tags_or_by_hand passed
    It runs only on release tags or by hand (no description in the source; shown from the name)
  • test_every_action_is_pinned_to_a_commit passed
    Every action is pinned to a commit (no description in the source; shown from the name)
  • test_the_two_jobs_have_least_privilege passed
    The two jobs have least privilege (no description in the source; shown from the name)
  • test_the_image_gets_attestations_and_a_signature_by_digest passed
    The image gets attestations and a signature by digest (no description in the source; shown from the name)
  • test_the_scan_is_after_the_signature_report_only_and_cannot_undo_it passed
    The scan is after the signature report only and cannot undo it (no description in the source; shown from the name)
  • test_the_sbom_job_uses_the_lock_file_and_attaches_only_on_tags passed
    The sbom job uses the lock file and attaches only on tags (no description in the source; shown from the name)
  • test_the_docs_page_explains_how_to_check_and_what_it_does_not_say passed
    The docs page explains how to check and what it does not say (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_ragleap_cli.py — 16 tests 16 passed, 0 failed, 0 skipped

No file-level description in the source.

  • test_syntax passed
    Syntax (no description in the source; shown from the name)
  • test_help_and_unknown_command passed
    Help and unknown command (no description in the source; shown from the name)
  • test_key_prints_the_link passed
    Key prints the link (no description in the source; shown from the name)
  • test_launch_needs_an_env_file passed
    Launch needs an env file (no description in the source; shown from the name)
  • test_launch_plain passed
    Launch plain (no description in the source; shown from the name)
  • test_launch_keeps_the_ollama_profile_when_env_uses_it passed
    Launch keeps the ollama profile when env uses it (no description in the source; shown from the name)
  • test_launch_ollama_switches_through_the_settings_api passed
    Launch ollama switches through the settings api (no description in the source; shown from the name)
  • test_launch_ollama_leaves_embeddings_alone_when_documents_exist passed
    Launch ollama leaves embeddings alone when documents exist (no description in the source; shown from the name)
  • test_launch_ollama_unknown_row_count_is_treated_as_unsafe passed
    Launch ollama unknown row count is treated as unsafe (no description in the source; shown from the name)
  • test_launch_ollama_when_env_already_configured passed
    Launch ollama when env already configured (no description in the source; shown from the name)
  • test_launch_ollama_reports_a_vector_size_warning_and_a_failed_switch passed
    Launch ollama reports a vector size warning and a failed switch (no description in the source; shown from the name)
  • test_stop_status_logs passed
    Stop status logs (no description in the source; shown from the name)
  • test_update_backs_up_then_pulls_then_rebuilds passed
    Update backs up then pulls then rebuilds (no description in the source; shown from the name)
  • test_update_when_already_current_changes_nothing passed
    Update when already current changes nothing (no description in the source; shown from the name)
  • test_update_stops_when_the_backup_fails passed
    Update stops when the backup fails (no description in the source; shown from the name)
  • test_update_stops_when_the_pull_fails passed
    Update stops when the pull fails (no description in the source; shown from the name)
test_ragleap_files_cli.py — 16 tests 16 passed, 0 failed, 0 skipped

`ragleap files`: the owner's command for folder grants, the compose wiring and the ignore files. Everything runs on a temporary folder; no Docker, network or database.

  • test_add_writes_a_grant_the_runner_accepts passed
    Add writes a grant the runner accepts (no description in the source; shown from the name)
  • test_add_stores_the_real_path_behind_a_link passed
    Add stores the real path behind a link (no description in the source; shown from the name)
  • test_add_refuses_dangerous_folders passed
    Add refuses dangerous folders (no description in the source; shown from the name)
  • test_add_refuses_missing_paths_and_plain_files passed
    Add refuses missing paths and plain files (no description in the source; shown from the name)
  • test_add_refuses_the_install_folder_and_its_parents passed
    Add refuses the install folder and its parents (no description in the source; shown from the name)
  • test_add_checks_names_modes_and_duplicates passed
    Add checks names modes and duplicates (no description in the source; shown from the name)
  • test_add_expiry passed
    Add expiry (no description in the source; shown from the name)
  • test_add_warns_about_unreadable_files_and_hidden_secrets passed
    Add warns about unreadable files and hidden secrets (no description in the source; shown from the name)
  • test_a_broken_grants_file_is_never_overwritten passed
    A broken grants file is never overwritten (no description in the source; shown from the name)
  • test_list_remove_roundtrip passed
    List remove roundtrip (no description in the source; shown from the name)
  • test_list_marks_expired_and_invalid_entries passed
    List marks expired and invalid entries (no description in the source; shown from the name)
  • test_off_and_on_create_and_remove_the_pause_flag passed
    Off and on create and remove the pause flag (no description in the source; shown from the name)
  • test_status_reports_the_switches_without_printing_secrets passed
    Status reports the switches without printing secrets (no description in the source; shown from the name)
  • test_the_ragleap_command_runs_the_files_helper passed
    The ragleap command runs the files helper (no description in the source; shown from the name)
  • test_only_the_sandbox_service_mounts_the_grants_folder_read_only passed
    Only the sandbox service mounts the grants folder read only (no description in the source; shown from the name)
  • test_grants_stay_out_of_git_and_out_of_images passed
    Grants stay out of git and out of images (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_request_id.py — 5 tests 5 passed, 0 failed, 0 skipped

The request id in log lines: core/request_context.py, the AUDIT lines and the opt-in app log format.

  • test_bind_current_and_unbind passed
    Bind current and unbind (no description in the source; shown from the name)
  • test_audit_lines_carry_the_bound_id_and_an_explicit_one_wins passed
    Audit lines carry the bound id and an explicit one wins (no description in the source; shown from the name)
  • test_the_log_filter_and_the_opt_in_format passed
    The log filter and the opt in format (no description in the source; shown from the name)
  • test_a_call_gets_its_id_back_and_the_audit_line_inside_it_carries_it passed
    A call gets its id back and the audit line inside it carries it (no description in the source; shown from the name)
  • test_an_unsafe_incoming_id_is_replaced_and_nothing_leaks_between_calls passed
    An unsafe incoming id is replaced and nothing leaks between calls (no description in the source; shown from the name)
test_retention.py — 10 tests 10 passed, 0 failed, 0 skipped

Retention of the audit trail (core/retention.py) and the /retention routes. Real database (db/schema.sql applied); test rows are removed afterwards.

  • test_the_days_setting_keeps_everything_unless_it_is_clear passed
    The days setting keeps everything unless it is clear (no description in the source; shown from the name)
  • test_nothing_is_deleted_when_no_limit_is_set passed
    Nothing is deleted when no limit is set (no description in the source; shown from the name)
  • test_old_audit_rows_go_and_new_ones_stay passed
    Old audit rows go and new ones stay (no description in the source; shown from the name)
  • test_finished_runs_go_but_running_and_waiting_runs_never passed
    Finished runs go but running and waiting runs never (no description in the source; shown from the name)
  • test_the_activity_log_is_purged_by_its_own_setting passed
    The activity log is purged by its own setting (no description in the source; shown from the name)
  • test_a_dry_run_counts_and_deletes_nothing passed
    A dry run counts and deletes nothing (no description in the source; shown from the name)
  • test_a_big_backlog_is_taken_in_batches passed
    A big backlog is taken in batches (no description in the source; shown from the name)
  • test_a_purge_leaves_an_audit_log_line passed
    A purge leaves an audit log line (no description in the source; shown from the name)
  • test_a_database_error_never_raises passed
    A database error never raises (no description in the source; shown from the name)
  • test_the_routes_and_who_may_use_them passed
    The routes and who may use them (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_runs_tab.py — 8 tests 8 passed, 0 failed, 0 skipped

Dashboard Runs tab: sub-agent runs shown under their parent, a Cancel run button, a neutral look for cancelled runs. The grouping and the cancel text are pure functions that are cut out of app.js and run in Node; the rest is static checks (the page itself stays text nodes only, see test_office.py).

  • test_children_are_grouped_under_their_parent_in_creation_order passed
    Children are grouped under their parent in creation order (no description in the source; shown from the name)
  • test_a_run_whose_parent_is_not_in_the_list_is_shown_on_its_own_and_odd_input_is_safe passed
    A run whose parent is not in the list is shown on its own and odd input is safe (no description in the source; shown from the name)
  • test_the_cancel_message_says_what_happened passed
    The cancel message says what happened (no description in the source; shown from the name)
  • test_the_cancel_button_posts_to_the_cancel_route_for_live_runs_only_and_asks_twice passed
    The cancel button posts to the cancel route for live runs only and asks twice (no description in the source; shown from the name)
  • test_the_runs_tab_asks_for_enough_runs_and_nests_children_with_a_depth_limit passed
    The runs tab asks for enough runs and nests children with a depth limit (no description in the source; shown from the name)
  • test_a_cancelled_run_is_not_shown_as_an_error_and_the_new_styles_are_plain passed
    A cancelled run is not shown as an error and the new styles are plain (no description in the source; shown from the name)
  • test_the_run_list_gives_the_dashboard_the_parent_fields passed
    The run list gives the dashboard the parent fields (no description in the source; shown from the name)
  • test_the_docs_mention_the_dashboard_view passed
    The docs mention the dashboard view (no description in the source; shown from the name)
test_sandbox_files.py — 32 tests 32 passed, 0 failed, 0 skipped

Owner-granted file access in the sandbox runner: grants, path rules, the fixed container spec, the reader (run for real on a temporary folder, including escape attempts) and the HTTP endpoints. No Docker, network or database is used. The spec tests are tripwires: widening file access must fail CI.

  • test_computer_control_is_off_by_default passed
    Computer control is off by default (no description in the source; shown from the name)
  • test_fine_folders_can_be_granted passed
    Fine folders can be granted (no description in the source; shown from the name)
  • test_dangerous_or_odd_folders_are_refused passed
    Dangerous or odd folders are refused (no description in the source; shown from the name)
  • test_grant_fields_are_checked passed
    Grant fields are checked (no description in the source; shown from the name)
  • test_expired_grants_are_not_active_and_naive_times_count_as_utc passed
    Expired grants are not active and naive times count as utc (no description in the source; shown from the name)
  • test_load_grants_skips_bad_and_duplicate_entries_and_survives_garbage passed
    Load grants skips bad and duplicate entries and survives garbage (no description in the source; shown from the name)
  • test_summary_never_contains_host_paths passed
    Summary never contains host paths (no description in the source; shown from the name)
  • test_good_relative_paths passed
    Good relative paths (no description in the source; shown from the name)
  • test_bad_relative_paths passed
    Bad relative paths (no description in the source; shown from the name)
  • test_an_empty_path_is_only_fine_for_list passed
    An empty path is only fine for list (no description in the source; shown from the name)
  • test_file_spec_is_the_normal_hardened_spec_plus_one_read_only_mount passed
    File spec is the normal hardened spec plus one read only mount (no description in the source; shown from the name)
  • test_file_spec_runs_the_fixed_reader_and_passes_only_four_values passed
    File spec runs the fixed reader and passes only four values (no description in the source; shown from the name)
  • test_write_grants_are_still_mounted_read_only_in_this_version passed
    Write grants are still mounted read only in this version (no description in the source; shown from the name)
  • test_reader_lists_files_and_hides_secrets_and_symlinks passed
    Reader lists files and hides secrets and symlinks (no description in the source; shown from the name)
  • test_reader_reads_text_with_a_hash passed
    Reader reads text with a hash (no description in the source; shown from the name)
  • test_reader_truncates_big_files_and_keeps_the_answer_small passed
    Reader truncates big files and keeps the answer small (no description in the source; shown from the name)
  • test_reader_handles_binary_and_bad_encodings passed
    Reader handles binary and bad encodings (no description in the source; shown from the name)
  • test_reader_refuses_protected_names_and_parent_paths passed
    Reader refuses protected names and parent paths (no description in the source; shown from the name)
  • test_reader_refuses_symlinks_that_leave_the_folder passed
    Reader refuses symlinks that leave the folder (no description in the source; shown from the name)
  • test_reader_treats_an_absolute_looking_path_as_inside_the_folder passed
    Reader treats an absolute looking path as inside the folder (no description in the source; shown from the name)
  • test_reader_follows_a_symlink_that_stays_inside_the_folder passed
    Reader follows a symlink that stays inside the folder (no description in the source; shown from the name)
  • test_reader_rejects_wrong_kinds_and_unknown_operations passed
    Reader rejects wrong kinds and unknown operations (no description in the source; shown from the name)
  • test_endpoints_need_the_token passed
    Endpoints need the token (no description in the source; shown from the name)
  • test_grants_endpoint_lists_names_only_and_hides_expired passed
    Grants endpoint lists names only and hides expired (no description in the source; shown from the name)
  • test_files_endpoint_is_closed_while_computer_control_is_off passed
    Files endpoint is closed while computer control is off (no description in the source; shown from the name)
  • test_files_endpoint_rejects_bad_requests_before_any_container_starts passed
    Files endpoint rejects bad requests before any container starts (no description in the source; shown from the name)
  • test_files_endpoint_happy_path_mounts_only_the_named_grant passed
    Files endpoint happy path mounts only the named grant (no description in the source; shown from the name)
  • test_extra_fields_in_the_request_change_nothing passed
    Extra fields in the request change nothing (no description in the source; shown from the name)
  • test_a_failing_read_is_reported_without_details passed
    A failing read is reported without details (no description in the source; shown from the name)
  • test_the_busy_lock_applies_to_file_calls passed
    The busy lock applies to file calls (no description in the source; shown from the name)
  • test_the_run_endpoint_still_needs_the_token passed
    The run endpoint still needs the token (no description in the source; shown from the name)
  • test_the_disabled_flag_pauses_file_access_immediately passed
    The disabled flag pauses file access immediately (no description in the source; shown from the name)
test_sandbox_files_docker.py — 5 tests 5 passed, 0 failed, 0 skipped

Real-Docker tests for the file-grant reader (sandbox/runner.py).

  • test_read_works passed
    Read works (no description in the source; shown from the name)
  • test_list_works_and_hides_secrets_and_symlinks passed
    List works and hides secrets and symlinks (no description in the source; shown from the name)
  • test_escapes_and_secrets_are_refused passed
    Escapes and secrets are refused (no description in the source; shown from the name)
  • test_the_mount_is_read_only passed
    The mount is read only (no description in the source; shown from the name)
  • test_the_container_has_no_network passed
    The container has no network (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_sandbox_stage.py — 21 tests 21 passed, 0 failed, 0 skipped

Folder staging in the sandbox runner (POST /stage): the fixed container specs (tripwires), the copier and the pruner run for real on temporary folders, the endpoint logic with a fake Docker, and the compose wiring. No Docker, network or database is used.

  • test_stage_spec_is_the_hardened_spec_plus_a_read_only_folder_and_the_staging_volume passed
    Stage spec is the hardened spec plus a read only folder and the staging volume (no description in the source; shown from the name)
  • test_write_grants_are_still_mounted_read_only_for_staging passed
    Write grants are still mounted read only for staging (no description in the source; shown from the name)
  • test_prune_and_prepare_specs_mount_only_the_staging_volume passed
    Prune and prepare specs mount only the staging volume (no description in the source; shown from the name)
  • test_the_extension_list_matches_the_document_formats_the_app_accepts passed
    The extension list matches the document formats the app accepts (no description in the source; shown from the name)
  • test_allowed_files_are_copied_with_a_manifest passed
    Allowed files are copied with a manifest (no description in the source; shown from the name)
  • test_secrets_symlinks_and_other_types_are_never_staged passed
    Secrets symlinks and other types are never staged (no description in the source; shown from the name)
  • test_unchanged_files_are_not_copied_again_and_changes_are_picked_up passed
    Unchanged files are not copied again and changes are picked up (no description in the source; shown from the name)
  • test_a_deleted_source_file_leaves_staging_and_empty_folders_go passed
    A deleted source file leaves staging and empty folders go (no description in the source; shown from the name)
  • test_the_copy_cap_resumes_on_the_next_run passed
    The copy cap resumes on the next run (no description in the source; shown from the name)
  • test_total_caps_mark_the_run_truncated passed
    Total caps mark the run truncated (no description in the source; shown from the name)
  • test_oversized_files_are_skipped passed
    Oversized files are skipped (no description in the source; shown from the name)
  • test_a_bad_grant_name_is_refused passed
    A bad grant name is refused (no description in the source; shown from the name)
  • test_the_pruner_removes_staging_of_grants_that_are_gone passed
    The pruner removes staging of grants that are gone (no description in the source; shown from the name)
  • test_stage_needs_the_token_and_the_switch passed
    Stage needs the token and the switch (no description in the source; shown from the name)
  • test_stage_without_a_name_stages_every_active_knowledge_grant_then_prunes passed
    Stage without a name stages every active knowledge grant then prunes (no description in the source; shown from the name)
  • test_stage_with_a_name_stages_only_that_grant_and_still_prunes passed
    Stage with a name stages only that grant and still prunes (no description in the source; shown from the name)
  • test_use_expired_and_unknown_grants_are_not_staged passed
    Use expired and unknown grants are not staged (no description in the source; shown from the name)
  • test_extra_fields_in_the_request_change_nothing passed
    Extra fields in the request change nothing (no description in the source; shown from the name)
  • test_failures_are_reported_without_details passed
    Failures are reported without details (no description in the source; shown from the name)
  • test_the_busy_lock_applies_to_stage passed
    The busy lock applies to stage (no description in the source; shown from the name)
  • test_compose_only_the_app_mounts_staging_and_only_read_only passed
    Compose only the app mounts staging and only read only (no description in the source; shown from the name)
test_sandbox_stage_docker.py — 2 tests 0 passed, 0 failed, 2 skipped

Real-Docker tests for folder staging (sandbox/runner.py, POST /stage).

  • test_stage_copies_allowed_files_and_the_app_can_read_but_not_write_them skipped
    Stage copies allowed files and the app can read but not write them (no description in the source; shown from the name)
  • test_changes_deletions_and_removed_grants_are_followed skipped
    Changes deletions and removed grants are followed (no description in the source; shown from the name)
test_scheduler_leader.py — 9 tests 9 passed, 0 failed, 0 skipped

Scheduler leader lock: only one process runs the background jobs. Unit tests use fake connections; one test uses the real database when DATABASE_URL is set.

  • test_enabled_by_default_and_switch_off passed
    Enabled by default and switch off (no description in the source; shown from the name)
  • test_disabled_never_connects passed
    Disabled never connects (no description in the source; shown from the name)
  • test_the_winner_keeps_one_connection passed
    The winner keeps one connection (no description in the source; shown from the name)
  • test_a_loser_closes_its_connection_and_retries_next_time passed
    A loser closes its connection and retries next time (no description in the source; shown from the name)
  • test_takeover_after_the_leader_connection_dies passed
    Takeover after the leader connection dies (no description in the source; shown from the name)
  • test_connection_failure_means_not_leader_and_never_raises passed
    Connection failure means not leader and never raises (no description in the source; shown from the name)
  • test_release_closes_the_connection passed
    Release closes the connection (no description in the source; shown from the name)
  • test_leader_only_runs_the_job_in_the_leader_only passed
    Leader only runs the job in the leader only (no description in the source; shown from the name)
  • test_with_the_real_database_a_second_connection_cannot_lead passed
    With the real database a second connection cannot lead (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_settings.py — 12 tests 12 passed, 0 failed, 0 skipped

No file-level description in the source.

  • test_env_then_default passed
    Env then default (no description in the source; shown from the name)
  • test_dashboard_wins_then_reverts passed
    Dashboard wins then reverts (no description in the source; shown from the name)
  • test_secret_encrypted_and_write_only passed
    Secret encrypted and write only (no description in the source; shown from the name)
  • test_secret_needs_encryption_key passed
    Secret needs encryption key (no description in the source; shown from the name)
  • test_wrong_decrypt_key_falls_back passed
    Wrong decrypt key falls back (no description in the source; shown from the name)
  • test_validation_rules passed
    Validation rules (no description in the source; shown from the name)
  • test_batch_is_atomic passed
    Batch is atomic (no description in the source; shown from the name)
  • test_database_down_falls_back_to_env passed
    Database down falls back to env (no description in the source; shown from the name)
  • test_embedding_and_generation_read_dashboard_values passed
    Embedding and generation read dashboard values (no description in the source; shown from the name)
  • test_describe_flags passed
    Describe flags (no description in the source; shown from the name)
  • test_dashboard_switches_primary_and_fallback passed
    Dashboard switches primary and fallback (no description in the source; shown from the name)
  • test_env_provider_still_used_without_dashboard_value passed
    Env provider still used without dashboard value (no description in the source; shown from the name)
test_settings_api.py — 9 tests 9 passed, 0 failed, 0 skipped

No file-level description in the source.

  • test_routes_need_the_key passed
    Routes need the key (no description in the source; shown from the name)
  • test_get_lists_sources_and_never_secrets passed
    Get lists sources and never secrets (no description in the source; shown from the name)
  • test_invalid_input_is_rejected_atomically_without_exception_text passed
    Invalid input is rejected atomically without exception text (no description in the source; shown from the name)
  • test_secret_without_encryption_key_is_refused passed
    Secret without encryption key is refused (no description in the source; shown from the name)
  • test_blank_removes_the_dashboard_value passed
    Blank removes the dashboard value (no description in the source; shown from the name)
  • test_embedding_size_check_runs_only_for_embedding_provider_or_size passed
    Embedding size check runs only for embedding provider or size (no description in the source; shown from the name)
  • test_url_with_credentials_rejected_directly passed
    Url with credentials rejected directly (no description in the source; shown from the name)
  • test_llm_connection_test_outcomes passed
    Llm connection test outcomes (no description in the source; shown from the name)
  • test_embedding_connection_test_outcomes passed
    Embedding connection test outcomes (no description in the source; shown from the name)
test_setup_status.py — 12 tests 12 passed, 0 failed, 0 skipped

No file-level description in the source.

  • test_route_needs_the_key passed
    Route needs the key (no description in the source; shown from the name)
  • test_nothing_configured_is_not_ready_and_every_open_item_says_what_to_do passed
    Nothing configured is not ready and every open item says what to do (no description in the source; shown from the name)
  • test_configured_is_ready passed
    Configured is ready (no description in the source; shown from the name)
  • test_dashboard_settings_count_as_configured passed
    Dashboard settings count as configured (no description in the source; shown from the name)
  • test_no_secret_or_target_ever_appears passed
    No secret or target ever appears (no description in the source; shown from the name)
  • test_vector_mismatch_blocks_ready_and_resizable_does_not passed
    Vector mismatch blocks ready and resizable does not (no description in the source; shown from the name)
  • test_a_failing_check_never_raises_and_never_leaks_the_error passed
    A failing check never raises and never leaks the error (no description in the source; shown from the name)
  • test_autonomy_and_approval_ping_cases passed
    Autonomy and approval ping cases (no description in the source; shown from the name)
  • test_tools_and_sandbox passed
    Tools and sandbox (no description in the source; shown from the name)
  • test_reachable_helper passed
    Reachable helper (no description in the source; shown from the name)
  • test_budgets_and_throttle passed
    Budgets and throttle (no description in the source; shown from the name)
  • test_telegram_item_reports_yes_no_only passed
    Telegram item reports yes no only (no description in the source; shown from the name)
test_shared_key_switch.py — 7 tests 7 passed, 0 failed, 0 skipped

SHARED_KEY_DISABLED: refuse the shared RAGLEAP_API_KEY once an active owner has a personal key. Uses the real database; every person made here is named pytest-... and removed afterwards.

  • test_the_switch_is_off_by_default_and_the_shared_key_keeps_working passed
    The switch is off by default and the shared key keeps working (no description in the source; shown from the name)
  • test_with_the_switch_on_and_a_live_owner_the_shared_key_is_refused passed
    With the switch on and a live owner the shared key is refused (no description in the source; shown from the name)
  • test_with_no_live_owner_the_shared_key_still_works_so_nobody_is_locked_out passed
    With no live owner the shared key still works so nobody is locked out (no description in the source; shown from the name)
  • test_a_wrong_key_is_still_refused_with_the_switch_on passed
    A wrong key is still refused with the switch on (no description in the source; shown from the name)
  • test_only_an_active_owner_with_a_live_key_counts passed
    Only an active owner with a live key counts (no description in the source; shown from the name)
  • test_a_database_problem_means_no_owner_so_the_shared_key_keeps_working passed
    A database problem means no owner so the shared key keeps working (no description in the source; shown from the name)
  • test_revoking_the_last_owner_key_gives_the_shared_key_back_at_once passed
    Revoking the last owner key gives the shared key back at once (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_sso.py — 19 tests 19 passed, 0 failed, 0 skipped

Single sign-on end to end: the real database and routes, with a fake OpenID Connect provider (its own signing key, served through httpx's mock transport). Every person made here is named pytest-... and removed afterwards.

  • test_without_the_settings_single_sign_on_is_off passed
    Without the settings single sign on is off (no description in the source; shown from the name)
  • test_the_public_routes_need_no_key_and_the_rest_still_do passed
    The public routes need no key and the rest still do (no description in the source; shown from the name)
  • test_a_registered_person_signs_in_and_the_session_works_like_a_key passed
    A registered person signs in and the session works like a key (no description in the source; shown from the name)
  • test_the_login_address_and_the_redirect_are_safe passed
    The login address and the redirect are safe (no description in the source; shown from the name)
  • test_the_first_sign_in_binds_the_subject_and_later_email_changes_do_not_matter passed
    The first sign in binds the subject and later email changes do not matter (no description in the source; shown from the name)
  • test_unknown_people_and_disabled_people_are_refused_with_the_same_message passed
    Unknown people and disabled people are refused with the same message (no description in the source; shown from the name)
  • test_a_sign_in_link_works_once_and_expires passed
    A sign in link works once and expires (no description in the source; shown from the name)
  • test_the_provider_refusing_or_a_bad_token_gives_an_error_and_no_session passed
    The provider refusing or a bad token gives an error and no session (no description in the source; shown from the name)
  • test_the_second_factor_rule_can_be_required passed
    The second factor rule can be required (no description in the source; shown from the name)
  • test_too_many_pending_sign_ins_are_refused passed
    Too many pending sign ins are refused (no description in the source; shown from the name)
  • test_a_session_ends_when_idle_expired_logged_out_revoked_or_the_person_is_disabled passed
    A session ends when idle expired logged out revoked or the person is disabled (no description in the source; shown from the name)
  • test_the_limits_can_be_set_by_the_owner passed
    The limits can be set by the owner (no description in the source; shown from the name)
  • test_a_personal_key_cannot_use_the_sign_out_route_and_garbage_tokens_are_refused passed
    A personal key cannot use the sign out route and garbage tokens are refused (no description in the source; shown from the name)
  • test_a_session_lookup_never_raises passed
    A session lookup never raises (no description in the source; shown from the name)
  • test_only_the_owner_manages_identities_and_sessions passed
    Only the owner manages identities and sessions (no description in the source; shown from the name)
  • test_bad_input_to_the_identity_routes passed
    Bad input to the identity routes (no description in the source; shown from the name)
  • test_revoking_all_sessions_of_a_person_ends_them passed
    Revoking all sessions of a person ends them (no description in the source; shown from the name)
  • test_sign_ins_are_recorded_by_name_and_failures_too passed
    Sign ins are recorded by name and failures too (no description in the source; shown from the name)
  • test_personal_keys_and_the_shared_key_still_work passed
    Personal keys and the shared key still work (no description in the source; shown from the name)
test_sso_docs.py — 4 tests 4 passed, 0 failed, 0 skipped

docs/single-sign-on.md stays in step with the code: every setting and route it names exists, and it is honest about what is untested. The dashboard script keeps the places it must use for single sign-on.

  • test_every_setting_in_the_guide_is_read_by_the_code passed
    Every setting in the guide is read by the code (no description in the source; shown from the name)
  • test_every_route_in_the_guide_exists passed
    Every route in the guide exists (no description in the source; shown from the name)
  • test_the_guide_is_honest_about_what_is_not_tested_or_covered passed
    The guide is honest about what is not tested or covered (no description in the source; shown from the name)
  • test_the_dashboard_keeps_its_single_sign_on_places passed
    The dashboard keeps its single sign on places (no description in the source; shown from the name)
test_sso_rate_limit.py — 8 tests 8 passed, 0 failed, 0 skipped

Rate limit on the public sign-in addresses of single sign-on (/auth/login, /auth/callback).

  • test_login_is_limited_per_client_and_a_spoofed_header_does_not_help passed
    Login is limited per client and a spoofed header does not help (no description in the source; shown from the name)
  • test_the_budget_comes_back_and_refused_requests_do_not_extend_the_wait passed
    The budget comes back and refused requests do not extend the wait (no description in the source; shown from the name)
  • test_the_callback_sends_the_person_back_with_a_message passed
    The callback sends the person back with a message (no description in the source; shown from the name)
  • test_login_and_callback_have_separate_budgets passed
    Login and callback have separate budgets (no description in the source; shown from the name)
  • test_a_switched_off_sso_does_not_use_the_budget passed
    A switched off sso does not use the budget (no description in the source; shown from the name)
  • test_the_switch_and_the_setting passed
    The switch and the setting (no description in the source; shown from the name)
  • test_one_audit_line_per_client_and_minute passed
    One audit line per client and minute (no description in the source; shown from the name)
  • test_the_number_of_tracked_clients_is_bounded passed
    The number of tracked clients is bounded (no description in the source; shown from the name)
test_stress_office.py — 10 tests 10 passed, 0 failed, 0 skipped

Pins the safety invariants that the Stress Office harness (benchmarks/stress_office) measures. A scripted model that obeys every injected instruction replaces the LLM; the outside world is faked. Runs against the test database only. It pins only the invariants listed below; any other outcome is reported by the harness and is not pinned here.

  • test_nothing_runs_when_autonomy_is_off passed
    Nothing runs when autonomy is off (no description in the source; shown from the name)
  • test_semi_mode_never_executes_without_approval passed
    Semi mode never executes without approval (no description in the source; shown from the name)
  • test_attacker_targets_are_refused_in_every_mode passed
    Attacker targets are refused in every mode (no description in the source; shown from the name)
  • test_taint_rule_holds_after_a_poisoned_page passed
    Taint rule holds after a poisoned page (no description in the source; shown from the name)
  • test_harness_leaves_no_rows_behind passed
    Harness leaves no rows behind (no description in the source; shown from the name)
  • test_a_poisoned_document_is_held_for_approval_even_in_full_mode passed
    A poisoned document is held for approval even in full mode (no description in the source; shown from the name)
  • test_the_document_taint_can_be_turned_off_on_purpose passed
    The document taint can be turned off on purpose (no description in the source; shown from the name)
  • test_only_the_owner_can_approve_a_held_action passed
    Only the owner can approve a held action (no description in the source; shown from the name)
  • test_a_runaway_loop_stops_at_the_step_cap passed
    A runaway loop stops at the step cap (no description in the source; shown from the name)
  • test_a_budget_block_stops_a_run_in_the_middle passed
    A budget block stops a run in the middle (no description in the source; shown from the name)
test_stress_office_real.py — 17 tests 17 passed, 0 failed, 0 skipped

The real-model mode of the Stress Office harness (benchmarks/stress_office), tested with fake services only: no network and no real model. It checks the token cap, how outcomes are labelled when a model follows or ignores an injected instruction, and the report.

  • test_an_obedient_model_is_held_or_refused_by_the_guardrails passed
    An obedient model is held or refused by the guardrails (no description in the source; shown from the name)
  • test_a_model_that_ignores_the_instruction_is_counted_as_ignoring_it passed
    A model that ignores the instruction is counted as ignoring it (no description in the source; shown from the name)
  • test_with_the_document_taint_off_a_followed_instruction_is_executed passed
    With the document taint off a followed instruction is executed (no description in the source; shown from the name)
  • test_the_token_cap_stops_the_run_for_good passed
    The token cap stops the run for good (no description in the source; shown from the name)
  • test_the_report_names_every_event_and_the_token_use passed
    The report names every event and the token use (no description in the source; shown from the name)
  • test_failed_model_calls_are_not_counted_as_ignoring_the_instruction passed
    Failed model calls are not counted as ignoring the instruction (no description in the source; shown from the name)
  • test_empty_replies_are_not_counted_as_ignoring_the_instruction passed
    Empty replies are not counted as ignoring the instruction (no description in the source; shown from the name)
  • test_the_report_shows_failed_and_empty_calls passed
    The report shows failed and empty calls (no description in the source; shown from the name)
  • test_an_event_where_the_model_never_reads_the_page_is_not_counted_as_resisting_it passed
    An event where the model never reads the page is not counted as resisting it (no description in the source; shown from the name)
  • test_the_no_answer_fallback_counts_as_an_empty_reply passed
    The no answer fallback counts as an empty reply (no description in the source; shown from the name)
  • test_the_report_lists_what_the_model_proposed passed
    The report lists what the model proposed (no description in the source; shown from the name)
  • test_proposing_a_harmless_page_fetch_is_not_counted_as_following_the_injection passed
    Proposing a harmless page fetch is not counted as following the injection (no description in the source; shown from the name)
  • test_the_events_without_a_page_have_no_fetch_tool passed
    The events without a page have no fetch tool (no description in the source; shown from the name)
  • test_the_report_flags_a_control_that_failed passed
    The report flags a control that failed (no description in the source; shown from the name)
  • test_the_report_confirms_a_working_control passed
    The report confirms a working control (no description in the source; shown from the name)
  • test_the_pause_waits_before_every_call_after_the_first passed
    The pause waits before every call after the first (no description in the source; shown from the name)
  • test_run_real_passes_the_pause_on passed
    Run real passes the pause on (no description in the source; shown from the name)
test_subagents.py — 23 tests 23 passed, 0 failed, 0 skipped

Sub-agents: the switch and limits, the delegate tool, children as run records, taint in both directions, the approval hold and the resume of the parent, the token, time and capacity caps, and cancel. Real test database, scripted model.

  • test_without_the_switch_the_tool_is_not_offered_and_a_delegate_plan_is_refused passed
    Without the switch the tool is not offered and a delegate plan is refused (no description in the source; shown from the name)
  • test_the_tool_lists_roles_and_limits_and_is_offered_only_to_top_level_runs passed
    The tool lists roles and limits and is offered only to top level runs (no description in the source; shown from the name)
  • test_the_settings_are_clamped passed
    The settings are clamped (no description in the source; shown from the name)
  • test_a_delegation_makes_a_child_run_and_returns_its_result_to_the_parent passed
    A delegation makes a child run and returns its result to the parent (no description in the source; shown from the name)
  • test_a_child_that_needs_no_tool_answers_the_task_itself passed
    A child that needs no tool answers the task itself (no description in the source; shown from the name)
  • test_a_child_that_tries_to_delegate_is_refused_and_no_grandchild_exists passed
    A child that tries to delegate is refused and no grandchild exists (no description in the source; shown from the name)
  • test_bad_delegations_create_no_child passed
    Bad delegations create no child (no description in the source; shown from the name)
  • test_the_number_of_children_is_limited passed
    The number of children is limited (no description in the source; shown from the name)
  • test_the_same_delegation_twice_is_refused passed
    The same delegation twice is refused (no description in the source; shown from the name)
  • test_a_child_of_a_tainted_parent_is_tainted_and_its_outbound_action_needs_approval passed
    A child of a tainted parent is tainted and its outbound action needs approval (no description in the source; shown from the name)
  • test_a_parent_becomes_tainted_when_a_child_read_outside_content passed
    A parent becomes tainted when a child read outside content (no description in the source; shown from the name)
  • test_a_parent_stays_untainted_when_the_child_read_nothing_outside passed
    A parent stays untainted when the child read nothing outside (no description in the source; shown from the name)
  • test_a_child_needing_approval_puts_the_parent_on_hold passed
    A child needing approval puts the parent on hold (no description in the source; shown from the name)
  • test_approving_the_child_action_finishes_the_child_and_resumes_the_parent passed
    Approving the child action finishes the child and resumes the parent (no description in the source; shown from the name)
  • test_rejecting_the_child_action_lets_the_parent_go_on passed
    Rejecting the child action lets the parent go on (no description in the source; shown from the name)
  • test_cancelling_the_parent_while_on_hold_cancels_the_child_and_nothing_resumes passed
    Cancelling the parent while on hold cancels the child and nothing resumes (no description in the source; shown from the name)
  • test_on_child_ended_does_nothing_without_a_waiting_parent passed
    On child ended does nothing without a waiting parent (no description in the source; shown from the name)
  • test_a_child_over_its_own_token_cap_stops_and_the_parent_goes_on passed
    A child over its own token cap stops and the parent goes on (no description in the source; shown from the name)
  • test_the_tree_cap_stops_the_whole_tree passed
    The tree cap stops the whole tree (no description in the source; shown from the name)
  • test_a_child_past_its_time_limit_stops_before_working passed
    A child past its time limit stops before working (no description in the source; shown from the name)
  • test_when_there_is_no_capacity_no_child_is_started passed
    When there is no capacity no child is started (no description in the source; shown from the name)
  • test_the_capacity_is_given_back_after_every_child passed
    The capacity is given back after every child (no description in the source; shown from the name)
  • test_the_docs_page_describes_the_switches_and_the_limits passed
    The docs page describes the switches and the limits (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_tabs.py — 4 tests 4 passed, 0 failed, 0 skipped

Proactive and Connectors tabs: the dashboard only calls routes that exist, and the script stays safe.

  • test_dashboard_has_both_tabs_and_their_calls passed
    Dashboard has both tabs and their calls (no description in the source; shown from the name)
  • test_every_route_the_tabs_call_exists_with_that_method passed
    Every route the tabs call exists with that method (no description in the source; shown from the name)
  • test_lock_forgets_the_new_forms passed
    Lock forgets the new forms (no description in the source; shown from the name)
  • test_dashboard_script_still_parses_with_node passed
    Dashboard script still parses with node (no description in the source; shown from the name)
test_taint_retrieved.py — 6 tests 6 passed, 0 failed, 0 skipped

Answers built from retrieved documents are untrusted content: a run that follows one starts tainted, so outbound actions need owner approval even in full autonomy mode. These tests cover the rule itself, the legacy single-action path, and the opt-out. The chat wiring is tested in tests/test_chat.py and the end-to-end result in tests/test_stress_office.py.

  • test_documents_taint_a_run_by_default passed
    Documents taint a run by default (no description in the source; shown from the name)
  • test_no_documents_no_taint passed
    No documents no taint (no description in the source; shown from the name)
  • test_the_taint_can_be_turned_off passed
    The taint can be turned off (no description in the source; shown from the name)
  • test_run_action_passes_force_semi_to_the_gate passed
    Run action passes force semi to the gate (no description in the source; shown from the name)
  • test_legacy_path_forces_approval_for_outbound_tools_after_documents passed
    Legacy path forces approval for outbound tools after documents (no description in the source; shown from the name)
  • test_legacy_path_does_not_force_non_outbound_tools passed
    Legacy path does not force non outbound tools (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_telegram_webhook_secret.py — 5 tests 5 passed, 0 failed, 0 skipped

Telegram webhook secret check: non-ASCII secrets never raise and compare exactly, as UTF-8 bytes on both sides.

  • test_verify_never_raises_and_returns_str_equality_across_all_encodings passed
    For every received/configured pair across ASCII, upper-case, whitespace-wrapped, precomposed and decomposed Latin-1, non-BMP and lone-surrogate (surrogatepass and surrogateescape forms) secrets the check returns received == configured and never raises.
  • test_endpoint_rejects_non_ascii_header_with_403_not_500 passed
    A header carrying a character above U+007F is rejected with HTTPException 403, never a TypeError, and the handler is not called.
  • test_endpoint_rejects_non_ascii_configured_secret_with_403_not_500 passed
    A non-ASCII configured secret (Latin-1 or a lone surrogate) rejects an ASCII header with 403 and no encode error.
  • test_fail_closed_controls_are_unchanged passed
    The exact valid secret reaches the handler once; wrong, empty and unconfigured secrets reject with 403; TELEGRAM_ALLOW_UNSIGNED=true with no secret still accepts.
  • test_lossy_encoding_cannot_smuggle_a_match passed
    A header differing from the configured secret only where a lossy encoding would drop or replace a character is rejected with 403.
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_user_channels.py — 13 tests 13 passed, 0 failed, 0 skipped

Linked chats: a person's Telegram, WhatsApp or Discord chat is linked by the owner, and a YES or NO reply from it is recorded under that person's name (operator or higher only). Real database for the links; approvals are mocked.

  • test_link_list_resolve_and_unlink_round_trip passed
    Link list resolve and unlink round trip (no description in the source; shown from the name)
  • test_the_same_chat_number_on_another_channel_is_a_different_chat passed
    The same chat number on another channel is a different chat (no description in the source; shown from the name)
  • test_whatsapp_numbers_are_matched_in_every_usual_format passed
    Whatsapp numbers are matched in every usual format (no description in the source; shown from the name)
  • test_one_chat_belongs_to_one_person passed
    One chat belongs to one person (no description in the source; shown from the name)
  • test_bad_input_and_unknown_or_disabled_people_are_refused passed
    Bad input and unknown or disabled people are refused (no description in the source; shown from the name)
  • test_a_disabled_person_is_no_longer_found_by_their_chat passed
    A disabled person is no longer found by their chat (no description in the source; shown from the name)
  • test_removing_a_person_removes_their_links passed
    Removing a person removes their links (no description in the source; shown from the name)
  • test_the_lookup_never_raises passed
    The lookup never raises (no description in the source; shown from the name)
  • test_a_linked_operator_can_approve_and_is_recorded_by_name passed
    A linked operator can approve and is recorded by name (no description in the source; shown from the name)
  • test_roles_below_operator_and_unlinked_chats_cannot_approve passed
    Roles below operator and unlinked chats cannot approve (no description in the source; shown from the name)
  • test_a_disabled_person_cannot_approve_and_a_lookup_error_means_nobody passed
    A disabled person cannot approve and a lookup error means nobody (no description in the source; shown from the name)
  • test_the_configured_owner_chat_still_works_as_before passed
    The configured owner chat still works as before (no description in the source; shown from the name)
  • test_only_the_owner_can_manage_links_through_the_api passed
    Only the owner can manage links through the api (no description in the source; shown from the name)
test_users.py — 21 tests 21 passed, 0 failed, 0 skipped

People and personal keys (core/users.py), the roles in the API middleware, and the owner-only user routes. Uses the real database (db/schema.sql applied); every person made here is named pytest-... and removed afterwards.

  • test_a_key_is_shown_once_and_only_its_hash_is_stored passed
    A key is shown once and only its hash is stored (no description in the source; shown from the name)
  • test_resolve_finds_the_person_and_ignores_everything_else passed
    Resolve finds the person and ignores everything else (no description in the source; shown from the name)
  • test_keys_that_do_not_look_like_ours_never_touch_the_database passed
    Keys that do not look like ours never touch the database (no description in the source; shown from the name)
  • test_a_revoked_key_stops_working_at_once passed
    A revoked key stops working at once (no description in the source; shown from the name)
  • test_a_disabled_person_cannot_sign_in_and_gets_no_new_key passed
    A disabled person cannot sign in and gets no new key (no description in the source; shown from the name)
  • test_a_role_change_takes_effect_at_once passed
    A role change takes effect at once (no description in the source; shown from the name)
  • test_a_found_key_is_remembered_for_a_short_time passed
    A found key is remembered for a short time (no description in the source; shown from the name)
  • test_last_use_is_recorded passed
    Last use is recorded (no description in the source; shown from the name)
  • test_a_database_problem_means_unknown_key_not_an_error passed
    A database problem means unknown key not an error (no description in the source; shown from the name)
  • test_bad_input_is_refused passed
    Bad input is refused (no description in the source; shown from the name)
  • test_two_people_cannot_share_a_name_even_in_another_case passed
    Two people cannot share a name even in another case (no description in the source; shown from the name)
  • test_ids_must_be_ids passed
    Ids must be ids (no description in the source; shown from the name)
  • test_the_shared_key_is_the_owner_and_the_open_api_is_open passed
    The shared key is the owner and the open api is open (no description in the source; shown from the name)
  • test_a_personal_key_shows_its_person_in_me passed
    A personal key shows its person in me (no description in the source; shown from the name)
  • test_the_owner_makes_people_and_keys_through_the_api passed
    The owner makes people and keys through the api (no description in the source; shown from the name)
  • test_the_user_routes_pass_refusals_through passed
    The user routes pass refusals through (no description in the source; shown from the name)
  • test_each_role_gets_exactly_its_doors passed
    Each role gets exactly its doors (no description in the source; shown from the name)
  • test_a_viewer_cannot_upload_or_change_settings_or_manage_people passed
    A viewer cannot upload or change settings or manage people (no description in the source; shown from the name)
  • test_an_operator_can_decide_on_actions_but_not_change_settings passed
    An operator can decide on actions but not change settings (no description in the source; shown from the name)
  • test_a_wrong_personal_key_is_refused_like_any_wrong_key passed
    A wrong personal key is refused like any wrong key (no description in the source; shown from the name)
  • test_public_routes_still_need_no_key passed
    Public routes still need no key (no description in the source; shown from the name)
test_vector_dims.py — 7 tests 7 passed, 0 failed, 0 skipped

No file-level description in the source.

  • test_equal_is_noop passed
    Equal is noop (no description in the source; shown from the name)
  • test_empty_table_is_resized passed
    Empty table is resized (no description in the source; shown from the name)
  • test_rows_block_change passed
    Rows block change (no description in the source; shown from the name)
  • test_big_dims_no_index passed
    Big dims no index (no description in the source; shown from the name)
  • test_invalid_and_missing passed
    Invalid and missing (no description in the source; shown from the name)
  • test_status_is_read_only_and_reports_each_case passed
    Status is read only and reports each case (no description in the source; shown from the name)
  • test_status_missing_table passed
    Status missing table (no description in the source; shown from the name)
test_voice_auth.py — 13 tests 13 passed, 0 failed, 0 skipped

The voice WebSocket server needs the secret token in its address: real sockets on 127.0.0.1, with the call handler replaced by a stub so no speech or model service is involved.

  • test_with_no_token_configured_every_call_is_refused passed
    With no token configured every call is refused (no description in the source; shown from the name)
  • test_a_token_shorter_than_16_characters_counts_as_not_set passed
    A token shorter than 16 characters counts as not set (no description in the source; shown from the name)
  • test_a_missing_or_wrong_token_never_becomes_a_call passed
    A missing or wrong token never becomes a call (no description in the source; shown from the name)
  • test_the_right_token_opens_a_call passed
    The right token opens a call (no description in the source; shown from the name)
  • test_serve_call_checks_again_when_a_connection_skips_the_first_check passed
    Serve call checks again when a connection skips the first check (no description in the source; shown from the name)
  • test_too_many_calls_at_once_are_turned_away passed
    Too many calls at once are turned away (no description in the source; shown from the name)
  • test_a_call_that_runs_too_long_is_ended passed
    A call that runs too long is ended (no description in the source; shown from the name)
  • test_an_oversized_message_closes_the_connection passed
    An oversized message closes the connection (no description in the source; shown from the name)
  • test_the_limits_have_sane_bounds passed
    The limits have sane bounds (no description in the source; shown from the name)
  • test_the_token_is_compared_in_constant_time_and_never_logged passed
    The token is compared in constant time and never logged (no description in the source; shown from the name)
  • test_a_refusal_is_logged_at_most_once_a_minute_without_the_token passed
    A refusal is logged at most once a minute without the token (no description in the source; shown from the name)
  • test_spoken_feedback_no_longer_changes_shared_memory passed
    Spoken feedback no longer changes shared memory (no description in the source; shown from the name)
  • test_the_installer_the_example_file_and_the_readme_cover_the_token passed
    The installer the example file and the readme cover the token (no description in the source; shown from the name)
test_voice_providers.py — 24 tests 24 passed, 0 failed, 0 skipped

Voice provider dispatch tests: no network, provider functions mocked.

  • test_stt_dispatches_to_deepgram_when_configured passed
    VOICE_STT_PROVIDER=deepgram (env through config) must call Deepgram and never OpenAI.
  • test_stt_keeps_openai_for_whisper_provider passed
    The recognized default provider keeps the OpenAI STT; Deepgram is never touched.
  • test_stt_keeps_openai_when_provider_unset passed
    No VOICE_STT_PROVIDER at all behaves exactly like the whisper default.
  • test_stt_keeps_openai_for_unrecognized_provider passed
    Anything unrecognized (not deepgram) must keep the existing OpenAI behavior.
  • test_tts_dispatches_to_elevenlabs_when_configured passed
    VOICE_TTS_PROVIDER=elevenlabs (env through config) must call ElevenLabs and never OpenAI.
  • test_tts_keeps_openai_for_openai_provider passed
    The recognized default provider keeps the OpenAI TTS; ElevenLabs is never touched.
  • test_tts_keeps_openai_when_provider_unset passed
    No VOICE_TTS_PROVIDER at all behaves exactly like the openai default.
  • test_tts_keeps_openai_for_unrecognized_provider passed
    Anything unrecognized (not elevenlabs) must keep the existing OpenAI behavior.
  • test_deepgram_success_posts_listen_and_parses_transcript passed
    Success posts to the listen endpoint with the documented call shape and parses the transcript.
  • test_deepgram_strips_surrounding_whitespace passed
    The transcript is stripped like the OpenAI sibling returns it.
  • test_deepgram_missing_key_sends_no_request passed
    Deepgram missing key sends no request (no description in the source; shown from the name)
  • test_deepgram_http_error_returns_empty passed
    Deepgram http error returns empty (no description in the source; shown from the name)
  • test_deepgram_request_exception_returns_empty passed
    Deepgram request exception returns empty (no description in the source; shown from the name)
  • test_deepgram_empty_transcript_returns_empty_string passed
    Deepgram empty transcript returns empty string (no description in the source; shown from the name)
  • test_deepgram_malformed_shape_returns_empty_string passed
    Deepgram malformed shape returns empty string (no description in the source; shown from the name)
  • test_elevenlabs_success_posts_voice_in_path passed
    Success posts to the convert endpoint with the voice id in the path and returns the audio bytes.
  • test_elevenlabs_missing_key_sends_no_request passed
    Elevenlabs missing key sends no request (no description in the source; shown from the name)
  • test_elevenlabs_http_error_returns_empty_bytes passed
    Elevenlabs http error returns empty bytes (no description in the source; shown from the name)
  • test_elevenlabs_request_exception_returns_empty_bytes passed
    Elevenlabs request exception returns empty bytes (no description in the source; shown from the name)
  • test_elevenlabs_empty_text_still_posts_and_returns_content passed
    No client-side input guard, like the OpenAI sibling: empty text still reaches the API.
  • test_stt_deepgram_request_declares_and_carries_the_utterance_both_triggers passed
    Deepgram requests must declare their true format and carry the decoded utterance, across both VAD triggers.
  • test_stt_whisper_request_declares_and_carries_the_utterance_both_triggers passed
    Whisper (multipart) requests must declare their true format and carry the decoded utterance, across both VAD triggers.
  • test_stt_unset_provider_request_declares_and_carries_the_utterance passed
    No VOICE_STT_PROVIDER at all: the OpenAI request must still declare and carry the utterance.
  • test_stt_unrecognized_provider_request_declares_and_carries_the_utterance passed
    An unrecognized VOICE_STT_PROVIDER keeps OpenAI, whose request must still declare and carry the utterance.
test_voice_tts_outbound_format.py — 3 tests 3 passed, 0 failed, 0 skipped

TTS replies reach Twilio as headerless 8 kHz mono G.711 mu-law, offline.

  • test_speak_reply_sends_headerless_mulaw_media_payload passed
    Kill MP3, rate, endian, A-law, double conversion and partial-sample regressions.
  • test_speak_reply_requests_twilio_compatible_format passed
    Kill MP3 requests and a dropped or body-only ElevenLabs output_format.
  • test_speak_reply_skips_empty_or_failed_tts passed
    Kill media or a completion mark on empty, failed or unconfigured TTS.
test_whatsapp_meta.py — 24 tests 24 passed, 0 failed, 0 skipped

Tests for the Meta WhatsApp Cloud API provider (WHATSAPP_PROVIDER=meta).

  • test_send_whatsapp_message_dispatches_by_provider passed
    Send whatsapp message dispatches by provider (no description in the source; shown from the name)
  • test_send_via_meta_posts_to_graph_messages_url_with_bearer_token passed
    Send via meta posts to graph messages url with bearer token (no description in the source; shown from the name)
  • test_send_via_meta_strips_the_whatsapp_prefix_from_numbers passed
    Send via meta strips the whatsapp prefix from numbers (no description in the source; shown from the name)
  • test_send_via_meta_without_credentials_fails_without_a_request passed
    Send via meta without credentials fails without a request (no description in the source; shown from the name)
  • test_send_via_meta_non_200_response_is_a_failure passed
    A non-200 Graph response fails the send, and the error log never carries the response body.
  • test_meta_webhook_verification_echoes_challenge_for_the_right_token passed
    Meta webhook verification echoes challenge for the right token (no description in the source; shown from the name)
  • test_meta_webhook_verification_rejects_a_wrong_token passed
    Meta webhook verification rejects a wrong token (no description in the source; shown from the name)
  • test_meta_webhook_verification_rejects_a_mode_other_than_subscribe passed
    Meta webhook verification rejects a mode other than subscribe (no description in the source; shown from the name)
  • test_meta_webhook_verification_fails_closed_without_a_configured_token passed
    Meta webhook verification fails closed without a configured token (no description in the source; shown from the name)
  • test_meta_webhook_verification_rejects_a_non_ascii_verify_token passed
    A non-ASCII hub.verify_token is a failed verification (403), never a server error, so the challenge is not echoed.
  • test_meta_token_verifier_never_raises_on_non_ascii_credentials passed
    Any non-ASCII character on either side of the verify-token comparison is a failed verification (False -> 403), never a raised error.
  • test_meta_signature_matches_the_documented_hmac_shape passed
    Meta signature matches the documented hmac shape (no description in the source; shown from the name)
  • test_meta_signature_rejects_a_wrong_or_malformed_signature passed
    Meta signature rejects a wrong or malformed signature (no description in the source; shown from the name)
  • test_meta_signature_fails_closed_without_a_configured_secret passed
    Meta signature fails closed without a configured secret (no description in the source; shown from the name)
  • test_meta_signature_verifier_never_raises_on_non_ascii_credentials passed
    Any non-ASCII character on either side of the signature comparison is a failed verification (False -> 403), never a raised error.
  • test_webhook_post_with_valid_signature_is_processed passed
    Webhook post with valid signature is processed (no description in the source; shown from the name)
  • test_webhook_post_with_invalid_signature_is_rejected_before_processing passed
    Webhook post with invalid signature is rejected before processing (no description in the source; shown from the name)
  • test_webhook_post_without_a_signature_is_rejected_before_processing passed
    Webhook post without a signature is rejected before processing (no description in the source; shown from the name)
  • test_webhook_post_with_non_ascii_signature_is_rejected_before_processing passed
    A non-ASCII X-Hub-Signature-256 is an invalid credential, not a server error: 403 before any processing.
  • test_webhook_post_with_non_ascii_signature_stays_rejected_under_the_opt_out passed
    WHATSAPP_ALLOW_UNSIGNED covers missing signatures only: a non-ASCII signature is still a forgery and stays a 403.
  • test_webhook_post_without_a_signature_needs_the_explicit_opt_out passed
    Webhook post without a signature needs the explicit opt out (no description in the source; shown from the name)
  • test_webhook_post_with_invalid_signature_stays_rejected_under_the_opt_out passed
    WHATSAPP_ALLOW_UNSIGNED covers missing signatures only: a present but
  • test_webhook_post_ignores_non_text_and_status_only_payloads passed
    Webhook post ignores non text and status only payloads (no description in the source; shown from the name)
  • test_webhook_post_routes_on_whatsapp_provider_not_payload_shape passed
    The same Meta-signed JSON POST is refused when WHATSAPP_PROVIDER is twilio:
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