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_succeedspassed
Retries the same provider once then succeeds (no description in the source; shown from the name)test_falls_back_to_the_next_providerpassed
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_providerpassed
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_errorpassed
All providers failing raises the last error (no description in the source; shown from the name)test_all_empty_returns_empty_stringpassed
All empty returns empty string (no description in the source; shown from the name)test_service_without_a_chain_uses_the_primarypassed
Service without a chain uses the primary (no description in the source; shown from the name)test_unusable_chain_object_falls_back_to_the_primarypassed
Unusable chain object falls back to the primary (no description in the source; shown from the name)test_plan_action_survives_a_busy_primarypassed
Plan action survives a busy primary (no description in the source; shown from the name)test_agent_loop_model_call_uses_the_fallbackpassed
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_requestpassed
Webhook unknown target fails without request (no description in the source; shown from the name)test_webhook_known_target_posts_without_redirectspassed
Webhook known target posts without redirects (no description in the source; shown from the name)test_webhook_non_public_addresses_blockedpassed
Webhook non public addresses blocked (no description in the source; shown from the name)test_webhook_http_scheme_blockedpassed
Webhook http scheme blocked (no description in the source; shown from the name)test_webhook_non_2xx_is_failurepassed
Webhook non 2xx is failure (no description in the source; shown from the name)test_webhook_request_exception_returns_falsepassed
Webhook request exception returns false (no description in the source; shown from the name)test_slack_requires_slack_hosted_urlpassed
Slack requires slack hosted url (no description in the source; shown from the name)test_slack_posts_when_configuredpassed
Slack posts when configured (no description in the source; shown from the name)test_email_empty_allowlist_sends_nothingpassed
Email empty allowlist sends nothing (no description in the source; shown from the name)test_email_unlisted_recipient_blockedpassed
Email unlisted recipient blocked (no description in the source; shown from the name)test_email_header_injection_and_multiple_recipients_blockedpassed
Email header injection and multiple recipients blocked (no description in the source; shown from the name)test_email_allowed_address_sendspassed
Email allowed address sends (no description in the source; shown from the name)test_email_domain_allowlist_is_exact_domainpassed
Email domain allowlist is exact domain (no description in the source; shown from the name)test_email_subject_line_conventionpassed
Email subject line convention (no description in the source; shown from the name)test_email_smtp_failure_returns_falsepassed
Email smtp failure returns false (no description in the source; shown from the name)test_autonomy_dispatch_reports_sent_or_failed_for_new_channelspassed
Autonomy dispatch reports sent or failed for new channels (no description in the source; shown from the name)test_autonomy_unknown_channel_still_unsupportedpassed
Autonomy unknown channel still unsupported (no description in the source; shown from the name)test_plain_address_rulespassed
Plain address rules (no description in the source; shown from the name)test_pathological_address_is_rejected_fast_and_length_cappedpassed
Pathological address is rejected fast and length capped (no description in the source; shown from the name)test_crm_action_wired_into_the_action_surfacepassed
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_rulepassed
Crm is an outbound tool for the taint rule (no description in the source; shown from the name)test_crm_unconfigured_refuses_without_requestpassed
Crm unconfigured refuses without request (no description in the source; shown from the name)test_crm_token_missing_with_allowlists_set_refuses_without_requestpassed
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_requestpassed
Crm malformed content refused before any request (no description in the source; shown from the name)test_crm_allowlist_refusals_happen_before_any_requestpassed
Crm allowlist refusals happen before any request (no description in the source; shown from the name)test_crm_allowlist_is_exact_match_fixed_point_breakerspassed
Crm allowlist is exact match fixed point breakers (no description in the source; shown from the name)test_crm_allowlisted_unicode_name_agrees_exactlypassed
Crm allowlisted unicode name agrees exactly (no description in the source; shown from the name)test_crm_allowlist_entries_may_carry_whitespace_in_configpassed
Crm allowlist entries may carry whitespace in config (no description in the source; shown from the name)test_crm_success_sends_exact_modeled_patchpassed
Crm success sends exact modeled patch (no description in the source; shown from the name)test_crm_model_target_is_never_the_destinationpassed
Crm model target is never the destination (no description in the source; shown from the name)test_crm_value_at_the_size_cap_still_sendspassed
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_upsertspassed
Crm not found fails closed and never upserts (no description in the source; shown from the name)test_crm_redirect_status_is_not_successpassed
Crm redirect status is not success (no description in the source; shown from the name)test_crm_http_errors_fail_closed_without_raisingpassed
Crm http errors fail closed without raising (no description in the source; shown from the name)test_crm_secrets_never_hit_the_logpassed
Crm secrets never hit the log (no description in the source; shown from the name)test_crm_client_exception_details_never_reach_the_logpassed
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_codepassed
Crm status failure logs only the status code (no description in the source; shown from the name)test_crm_tool_offered_only_when_fully_configuredpassed
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_allowlistpassed
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_endpassed
Autonomy dispatch updates crm record end to end (no description in the source; shown from the name)test_autonomy_dispatch_reports_failed_for_crmpassed
Autonomy dispatch reports failed for crm (no description in the source; shown from the name)test_autonomy_crm_dispatch_without_config_fails_closedpassed
Autonomy crm dispatch without config fails closed (no description in the source; shown from the name)test_calendar_action_wired_into_the_action_surfacepassed
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_rulepassed
Calendar is an outbound tool for the taint rule (no description in the source; shown from the name)test_calendar_unconfigured_refuses_without_requestpassed
Calendar unconfigured refuses without request (no description in the source; shown from the name)test_calendar_malformed_content_refused_before_any_requestpassed
Calendar malformed content refused before any request (no description in the source; shown from the name)test_parse_rfc3339_rejects_malformed_and_naive_formspassed
Parse rfc3339 rejects malformed and naive forms (no description in the source; shown from the name)test_calendar_naive_start_refused_before_any_requestpassed
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_refusedpassed
Parse event duplicate and empty first start end refused (no description in the source; shown from the name)test_calendar_sends_exact_modeled_requestspassed
Calendar sends exact modeled requests (no description in the source; shown from the name)test_calendar_model_target_never_chooses_the_destinationpassed
Calendar model target never chooses the destination (no description in the source; shown from the name)test_calendar_no_attendees_still_schedules_without_attendee_fieldpassed
Calendar no attendees still schedules without attendee field (no description in the source; shown from the name)test_calendar_screening_passes_case_and_whitespace_variantspassed
Calendar screening passes case and whitespace variants (no description in the source; shown from the name)test_calendar_disallowed_attendee_refuses_whole_eventpassed
Calendar disallowed attendee refuses whole event (no description in the source; shown from the name)test_calendar_attendee_screening_fixed_point_breakerspassed
Calendar attendee screening fixed point breakers (no description in the source; shown from the name)test_calendar_google_errors_fail_closed_without_raisingpassed
Calendar google errors fail closed without raising (no description in the source; shown from the name)test_calendar_secrets_never_hit_the_logpassed
Calendar secrets never hit the log (no description in the source; shown from the name)test_calendar_http_exception_text_never_reaches_the_logpassed
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_exceptionspassed
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_linepassed
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_logpassed
Calendar shy exception args never reach the log (no description in the source; shown from the name)test_calendar_status_code_logging_is_untouchedpassed
Calendar status code logging is untouched (no description in the source; shown from the name)test_calendar_tool_offered_only_when_fully_configuredpassed
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_targetpassed
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_endpassed
Autonomy dispatch schedules calendar event end to end (no description in the source; shown from the name)test_autonomy_dispatch_reports_failed_for_calendarpassed
Autonomy dispatch reports failed for calendar (no description in the source; shown from the name)test_autonomy_calendar_dispatch_without_config_fails_closedpassed
Autonomy calendar dispatch without config fails closed (no description in the source; shown from the name)test_webhook_exception_text_never_reaches_the_logpassed
Webhook exception text never reaches the log (no description in the source; shown from the name)test_webhook_exception_log_message_is_constant_across_exceptionspassed
Webhook exception log message is constant across exceptions (no description in the source; shown from the name)test_webhook_status_code_logging_is_untouchedpassed
Webhook status code logging is untouched (no description in the source; shown from the name)test_slack_exception_text_never_reaches_the_logpassed
Slack exception text never reaches the log (no description in the source; shown from the name)test_slack_exception_log_message_is_constant_across_exceptionspassed
Slack exception log message is constant across exceptions (no description in the source; shown from the name)test_slack_status_code_logging_is_untouchedpassed
Slack status code logging is untouched (no description in the source; shown from the name)test_email_exception_text_never_reaches_the_logpassed
Email exception text never reaches the log (no description in the source; shown from the name)test_email_exception_log_message_is_constant_across_exceptionspassed
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_configuredpassed
Available tools none when nothing configured (no description in the source; shown from the name)test_available_tools_lists_configured_without_secretspassed
Available tools lists configured without secrets (no description in the source; shown from the name)test_available_tools_partial_configurationpassed
Available tools partial configuration (no description in the source; shown from the name)test_parse_plan_variantspassed
Parse plan variants (no description in the source; shown from the name)test_validate_rejects_bad_planspassed
Validate rejects bad plans (no description in the source; shown from the name)test_validate_accepts_good_plans_and_ignores_model_slack_targetpassed
Validate accepts good plans and ignores model slack target (no description in the source; shown from the name)test_validate_email_subject_cannot_inject_headerspassed
Validate email subject cannot inject headers (no description in the source; shown from the name)test_plan_action_happy_pathpassed
Plan action happy path (no description in the source; shown from the name)test_plan_action_no_tools_makes_no_llm_callpassed
Plan action no tools makes no llm call (no description in the source; shown from the name)test_plan_action_none_tool_returns_nonepassed
Plan action none tool returns none (no description in the source; shown from the name)test_plan_action_empty_reply_retried_with_bigger_budgetpassed
Plan action empty reply retried with bigger budget (no description in the source; shown from the name)test_plan_action_provider_failure_returns_nonepassed
Plan action provider failure returns none (no description in the source; shown from the name)test_prompt_hides_urls_and_marks_untrusted_textpassed
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_gatepassed
Run action passes role and action type to the gate (no description in the source; shown from the name)test_describe_action_variantspassed
Describe action variants (no description in the source; shown from the name)test_maybe_act_none_and_runspassed
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_modelpassed
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_runpassed
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_backpassed
Single step then done feeds the result back (no description in the source; shown from the name)test_observation_cannot_close_its_own_fencepassed
Observation cannot close its own fence (no description in the source; shown from the name)test_step_cap_and_duplicate_stoppassed
Step cap and duplicate stop (no description in the source; shown from the name)test_budget_block_mid_run_stops_cleanlypassed
Budget block mid run stops cleanly (no description in the source; shown from the name)test_taint_forces_approval_for_outbound_even_in_full_modepassed
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_modepassed
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_askedpassed
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_resultpassed
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_modelpassed
Rejection ends the run without calling the model (no description in the source; shown from the name)test_approved_fetch_taints_the_resumed_runpassed
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_approvalpassed
Switching the loop off stops a waiting run after approval (no description in the source; shown from the name)test_unrelated_approvals_are_unaffectedpassed
Unrelated approvals are unaffected (no description in the source; shown from the name)test_routespassed
Routes (no description in the source; shown from the name)test_chat_uses_the_loop_module_and_describe_runpassed
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_needpassed
Manifest has what the catalog and scanner need (no description in the source; shown from the name)test_skill_file_is_well_formed_and_plainpassed
Skill file is well formed and plain (no description in the source; shown from the name)test_script_has_no_dynamic_code_or_shellpassed
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_sourcespassed
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_printedpassed
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_onespassed
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_hostpassed
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_httppassed
Key is allowed over https and to local http (no description in the source; shown from the name)test_bad_addresses_are_rejectedpassed
Bad addresses are rejected (no description in the source; shown from the name)test_a_key_with_odd_characters_is_refusedpassed
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_leakpassed
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_bodypassed
Http errors are explained without echoing the body (no description in the source; shown from the name)test_non_json_unexpected_and_unreachablepassed
Non json unexpected and unreachable (no description in the source; shown from the name)test_question_and_role_are_validated_before_any_requestpassed
Question and role are validated before any request (no description in the source; shown from the name)test_json_output_has_only_the_expected_fieldspassed
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_existpassed
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_twicepassed
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_listedpassed
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_orderpassed
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_limitedpassed
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_actionpassed
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_alonepassed
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_flaggedpassed
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_runspassed
Finished and unknown runs (no description in the source; shown from the name)test_a_failing_child_does_not_stop_the_restpassed
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_steppassed
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_actionpassed
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_unchangedpassed
An unflagged run is unchanged (no description in the source; shown from the name)test_the_routes_and_the_permission_rulespassed
The routes and the permission rules (no description in the source; shown from the name)test_a_cancelled_run_is_finished_for_retentionpassed
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_gracefullypassed
Missing token fails gracefully (no description in the source; shown from the name)test_missing_endpoint_fails_gracefullypassed
Missing endpoint fails gracefully (no description in the source; shown from the name)test_connection_successpassed
Connection success (no description in the source; shown from the name)test_airtable_api_error_surfaces_messagepassed
Airtable api error surfaces message (no description in the source; shown from the name)test_fetch_flattens_fieldspassed
Fetch flattens fields (no description in the source; shown from the name)test_fetch_paginates_using_offsetpassed
Fetch paginates using offset (no description in the source; shown from the name)test_fetch_uses_filter_formula_when_query_template_setpassed
Fetch uses filter formula when query template set (no description in the source; shown from the name)test_fetch_bad_endpoint_format_raisespassed
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_unsetpassed
Health exempt when key unset (no description in the source; shown from the name)test_health_exempt_even_when_key_setpassed
Health exempt even when key set (no description in the source; shown from the name)test_protected_route_open_when_key_unsetpassed
Protected route open when key unset (no description in the source; shown from the name)test_protected_route_rejects_missing_header_when_key_setpassed
Protected route rejects missing header when key set (no description in the source; shown from the name)test_protected_route_rejects_wrong_keypassed
Protected route rejects wrong key (no description in the source; shown from the name)test_protected_route_accepts_correct_keypassed
Protected route accepts correct key (no description in the source; shown from the name)test_key_comparison_is_exact_not_prefix_or_substringpassed
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_setpassed
The middleware itself must not block /webhook/* when a key is configured --test_middleware_function_directly_open_when_unsetpassed
Middleware function directly open when unset (no description in the source; shown from the name)test_middleware_function_directly_blocks_when_set_and_missingpassed
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_oncepassed
Two simultaneous approvals run the effect once (no description in the source; shown from the name)test_approve_and_reject_at_once_have_one_winnerpassed
Approve and reject at once have one winner (no description in the source; shown from the name)test_single_approval_still_executes_oncepassed
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_approvalpassed
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_runspassed
A recent pending action still runs (no description in the source; shown from the name)test_rejecting_an_old_pending_action_still_workspassed
Rejecting an old pending action still works (no description in the source; shown from the name)test_the_limit_can_be_changed_and_turned_offpassed
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_channelpassed
A harmless label cannot carry a file channel (no description in the source; shown from the name)test_a_file_label_cannot_use_another_channelpassed
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_checkpassed
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_modepassed
Request access still waits for approval in full mode (no description in the source; shown from the name)test_forced_approval_covers_every_file_channelpassed
Forced approval covers every file channel (no description in the source; shown from the name)test_the_execute_route_refuses_a_mismatched_pairpassed
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_repliespassed
Default message asks for chat replies (no description in the source; shown from the name)test_replies_off_points_to_the_inboxpassed
Replies off points to the inbox (no description in the source; shown from the name)test_other_values_keep_chat_repliespassed
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_approvepassed
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_targetpassed
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_ownerpassed
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_eitherpassed
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_privatepassed
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_privatepassed
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_targetpassed
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_targetpassed
Owner matches configured channel and target (no description in the source; shown from the name)test_whatsapp_number_formats_are_normalisedpassed
Whatsapp number formats are normalised (no description in the source; shown from the name)test_wrong_channel_is_not_ownerpassed
Wrong channel is not owner (no description in the source; shown from the name)test_wrong_sender_is_not_ownerpassed
Wrong sender is not owner (no description in the source; shown from the name)test_unconfigured_target_means_nobody_is_ownerpassed
Unconfigured target means nobody is owner (no description in the source; shown from the name)test_owner_check_never_raises_and_fails_closedpassed
Owner check never raises and fails closed (no description in the source; shown from the name)test_non_owner_cannot_approve_and_is_told_nothingpassed
Non owner cannot approve and is told nothing (no description in the source; shown from the name)test_owner_approval_is_delegatedpassed
Owner approval is delegated (no description in the source; shown from the name)test_non_owner_approval_attempt_is_loggedpassed
Non owner approval attempt is logged (no description in the source; shown from the name)test_telegram_router_passes_channel_and_senderpassed
Telegram router passes channel and sender (no description in the source; shown from the name)test_whatsapp_router_passes_channel_and_senderpassed
Whatsapp router passes channel and sender (no description in the source; shown from the name)test_discord_router_passes_channel_and_senderpassed
Discord router passes channel and sender (no description in the source; shown from the name)test_telegram_without_secret_is_rejectedpassed
Telegram without secret is rejected (no description in the source; shown from the name)test_telegram_without_secret_can_be_opted_out_for_local_testingpassed
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_strictlypassed
Telegram with secret still compares strictly (no description in the source; shown from the name)test_whatsapp_request_without_signature_is_rejectedpassed
Whatsapp request without signature is rejected (no description in the source; shown from the name)test_whatsapp_unsigned_allowed_only_with_explicit_opt_outpassed
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_acceptedpassed
Whatsapp invalid signature is rejected and valid is accepted (no description in the source; shown from the name)test_whatsapp_valid_twilio_signature_is_processedpassed
A correctly computed signature verifies through the real verifier and the handler runs.test_twilio_signature_verifier_accepts_only_the_documented_signaturepassed
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_credentialspassed
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_processingpassed
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_recordedpassed
What is recorded (no description in the source; shown from the name)test_an_event_has_the_person_the_request_and_the_answerpassed
An event has the person the request and the answer (no description in the source; shown from the name)test_recording_never_raisespassed
Recording never raises (no description in the source; shown from the name)test_the_list_is_newest_first_and_limitedpassed
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_notpassed
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_changepassed
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_notpassed
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_requestpassed
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_ownerspassed
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_itpassed
An approval names the person who gave it (no description in the source; shown from the name)test_a_rejection_names_the_person_toopassed
A rejection names the person too (no description in the source; shown from the name)test_the_shared_key_is_named_as_suchpassed
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_chatpassed
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_personpassed
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_personpassed
The activity log shows the person (no description in the source; shown from the name)test_logging_still_works_before_the_schema_is_appliedpassed
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_appliedpassed
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_statuspassed
Filters by method path prefix and status (no description in the source; shown from the name)test_the_path_filter_takes_percent_and_underscore_literallypassed
The path filter takes percent and underscore literally (no description in the source; shown from the name)test_since_and_untilpassed
Since and until (no description in the source; shown from the name)test_before_id_reads_the_next_pagepassed
Before id reads the next page (no description in the source; shown from the name)test_a_bad_time_is_a_clear_errorpassed
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_timepassed
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_textpassed
Emit writes hash and never the text (no description in the source; shown from the name)test_emit_can_be_turned_off_and_never_raisespassed
Emit can be turned off and never raises (no description in the source; shown from the name)test_execution_and_rejection_lines_carry_the_approverpassed
Execution and rejection lines carry the approver (no description in the source; shown from the name)test_skip_and_proposal_linespassed
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_failurespassed
Lockout after max failures (no description in the source; shown from the name)test_lockout_expirespassed
Lockout expires (no description in the source; shown from the name)test_failures_outside_the_window_do_not_add_uppassed
Failures outside the window do not add up (no description in the source; shown from the name)test_success_resets_the_countpassed
Success resets the count (no description in the source; shown from the name)test_missing_key_is_not_countedpassed
Missing key is not counted (no description in the source; shown from the name)test_throttle_can_be_turned_offpassed
Throttle can be turned off (no description in the source; shown from the name)test_spoofed_forwarded_header_does_not_evade_the_limitpassed
Spoofed forwarded header does not evade the limit (no description in the source; shown from the name)test_trusted_proxy_separates_real_clientspassed
Trusted proxy separates real clients (no description in the source; shown from the name)test_public_page_and_health_stay_reachable_during_lockoutpassed
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_trustedpassed
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_hoppassed
Client id takes the rightmost untrusted hop (no description in the source; shown from the name)test_client_id_falls_back_on_garbagepassed
Client id falls back on garbage (no description in the source; shown from the name)test_client_id_normalises_and_handles_a_missing_peerpassed
Client id normalises and handles a missing peer (no description in the source; shown from the name)test_settings_are_clamped_and_fall_backpassed
Settings are clamped and fall back (no description in the source; shown from the name)test_record_failure_locks_at_the_limit_and_reset_clearspassed
Record failure locks at the limit and reset clears (no description in the source; shown from the name)test_tracking_is_boundedpassed
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_offpassed
Default settings are off (no description in the source; shown from the name)test_set_and_get_settings_roundtrippassed
Set and get settings roundtrip (no description in the source; shown from the name)test_off_mode_skips_everythingpassed
Off mode skips everything (no description in the source; shown from the name)test_action_allowlist_blocks_disallowed_actionpassed
Action allowlist blocks disallowed action (no description in the source; shown from the name)test_channel_allowlist_blocks_disallowed_channelpassed
Channel allowlist blocks disallowed channel (no description in the source; shown from the name)test_full_mode_executes_via_custom_fn_and_logspassed
Full mode executes via custom fn and logs (no description in the source; shown from the name)test_semi_mode_creates_pending_and_approval_flowpassed
Semi mode creates pending and approval flow (no description in the source; shown from the name)test_process_approval_response_ignores_non_approval_messagespassed
Process approval response ignores non approval messages (no description in the source; shown from the name)test_process_approval_response_unknown_idpassed
Process approval response unknown id (no description in the source; shown from the name)test_sensitive_role_forces_full_to_semipassed
core.employees.defaults.SENSITIVE_DOMAIN_ROLES enforcement: a roletest_non_sensitive_role_full_mode_executes_normallypassed
A role NOT in SENSITIVE_DOMAIN_ROLES should behave exactly liketest_role_is_persisted_in_autonomy_logpassed
Role is persisted in autonomy log (no description in the source; shown from the name)test_role_is_persisted_through_semi_approval_flowpassed
Role is persisted through semi approval flow (no description in the source; shown from the name)test_role_optional_backward_compatiblepassed
Existing callers that never pass role must keep working exactlytest_crm_off_mode_skips_with_no_sender_callpassed
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_callpassed
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_callpassed
Crm channels allowlist blocks with no sender call (no description in the source; shown from the name)test_crm_full_mode_executes_and_logspassed
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_pathpassed
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_semipassed
Crm sensitive role forces full to semi (no description in the source; shown from the name)test_crm_non_sensitive_role_stays_fullpassed
Crm non sensitive role stays full (no description in the source; shown from the name)test_crm_gate_product_matrixpassed
Crm gate product matrix (no description in the source; shown from the name)test_crm_rejection_still_logs_through_the_same_pathpassed
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_callpassed
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_callpassed
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_callpassed
Calendar channels allowlist blocks with no sender call (no description in the source; shown from the name)test_calendar_full_mode_executes_and_logspassed
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_pathpassed
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_semipassed
Calendar sensitive role forces full to semi (no description in the source; shown from the name)test_calendar_non_sensitive_role_stays_fullpassed
Calendar non sensitive role stays full (no description in the source; shown from the name)test_calendar_gate_product_matrixpassed
Calendar gate product matrix (no description in the source; shown from the name)test_calendar_rejection_still_logs_through_the_same_pathpassed
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_firstpassed
List shows full content newest first (no description in the source; shown from the name)test_approve_runs_the_action_and_removes_itpassed
Approve runs the action and removes it (no description in the source; shown from the name)test_reject_discards_without_runningpassed
Reject discards without running (no description in the source; shown from the name)test_bad_or_unknown_ids_return_nonepassed
Bad or unknown ids return none (no description in the source; shown from the name)test_pending_still_stored_when_no_approval_targetpassed
Pending still stored when no approval target (no description in the source; shown from the name)test_processing_error_text_is_not_leakedpassed
Processing error text is not leaked (no description in the source; shown from the name)test_routespassed
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_gracefullypassed
Missing connection string fails gracefully (no description in the source; shown from the name)test_invalid_json_fails_gracefullypassed
Invalid json fails gracefully (no description in the source; shown from the name)test_missing_project_id_without_override_fails_gracefullypassed
Missing project id without override fails gracefully (no description in the source; shown from the name)test_connection_successpassed
Connection success (no description in the source; shown from the name)test_fetch_data_requires_query_templatepassed
Fetch data requires query template (no description in the source; shown from the name)test_fetch_data_maps_rowspassed
Fetch data maps rows (no description in the source; shown from the name)test_fetch_data_uses_named_parameter_for_user_identifierpassed
Fetch data uses named parameter for user identifier (no description in the source; shown from the name)test_connection_failure_surfaces_messagepassed
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_executorpassed
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_usepassed
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_shrinkpassed
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_violationpassed
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_patternpassed
The scanner catches each forbidden pattern (no description in the source; shown from the name)test_the_scanner_ignores_comments_and_strings_and_harmless_codepassed
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_failpassed
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_foundpassed
An executor referenced in another module is found (no description in the source; shown from the name)test_configuration_helpers_are_not_executorspassed
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_channelpassed
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_reasonedpassed
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_expirypassed
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_flagpassed
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_shortpassed
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_broadpassed
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_activepassed
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_flagpassed
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_onlypassed
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_namespassed
A broad listing hides dot names and secret looking names (no description in the source; shown from the name)test_a_normal_listing_is_unchangedpassed
A normal listing is unchanged (no description in the source; shown from the name)test_a_broad_read_refuses_thempassed
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_filespassed
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_acceptspassed
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_limitpassed
A broad folder needs the flag and a time limit (no description in the source; shown from the name)test_the_time_limit_is_boundedpassed
The time limit is bounded (no description in the source; shown from the name)test_some_folders_stay_refused_with_the_flagpassed
Some folders stay refused with the flag (no description in the source; shown from the name)test_the_flag_on_a_normal_folder_is_refusedpassed
The flag on a normal folder is refused (no description in the source; shown from the name)test_the_normal_flow_is_unchangedpassed
The normal flow is unchanged (no description in the source; shown from the name)test_the_docs_describe_broad_folderspassed
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_tokenspassed
Estimate tokens (no description in the source; shown from the name)test_record_usage_uses_reported_tokenspassed
Record usage uses reported tokens (no description in the source; shown from the name)test_record_usage_estimates_when_provider_reports_nothingpassed
Record usage estimates when provider reports nothing (no description in the source; shown from the name)test_record_usage_partial_usage_estimates_the_missing_partpassed
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_raisespassed
Record usage can be disabled and never raises (no description in the source; shown from the name)test_no_caps_means_no_database_accesspassed
No caps means no database access (no description in the source; shown from the name)test_global_daily_cap_blocks_and_under_cap_passespassed
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_finepassed
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_rolepassed
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_unlimitedpassed
Role overrides and zero means unlimited (no description in the source; shown from the name)test_bad_env_values_are_ignoredpassed
Bad env values are ignored (no description in the source; shown from the name)test_check_fails_open_on_database_errorpassed
Check fails open on database error (no description in the source; shown from the name)test_warning_logged_at_eighty_percentpassed
Warning logged at eighty percent (no description in the source; shown from the name)test_call_provider_wrapper_records_and_returns_unchangedpassed
Call provider wrapper records and returns unchanged (no description in the source; shown from the name)test_call_provider_wrapper_survives_recording_failurepassed
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_itpassed
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_normallypassed
Ask not blocked runs normally (no description in the source; shown from the name)test_ask_auto_checks_global_first_then_the_routed_rolepassed
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_reachedpassed
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_textpassed
Stream records estimated usage from streamed text (no description in the source; shown from the name)test_stream_interrupted_still_records_what_was_spentpassed
Stream interrupted still records what was spent (no description in the source; shown from the name)test_stream_recording_failure_never_breaks_the_streampassed
Stream recording failure never breaks the stream (no description in the source; shown from the name)test_ask_stream_blocked_by_budget_makes_no_callspassed
Ask stream blocked by budget makes no calls (no description in the source; shown from the name)test_ask_stream_not_blocked_streams_normallypassed
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_cleanlypassed
Telegram router imports cleanly (no description in the source; shown from the name)test_whatsapp_router_imports_cleanlypassed
Whatsapp router imports cleanly (no description in the source; shown from the name)test_discord_router_imports_cleanlypassed
Discord router imports cleanly (no description in the source; shown from the name)test_voice_router_imports_cleanlypassed
Voice router imports cleanly (no description in the source; shown from the name)test_all_channel_routers_reference_tool_registrypassed
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_successpassed
Ask records a trace on success (no description in the source; shown from the name)test_ask_records_a_trace_with_role_and_fallbackpassed
Ask records a trace with role and fallback (no description in the source; shown from the name)test_ask_records_a_trace_on_embedding_failurepassed
Ask records a trace on embedding failure (no description in the source; shown from the name)test_ask_records_error_when_all_providers_failedpassed
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_rolepassed
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_flaggedpassed
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_groundedpassed
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_rolepassed
No point running a grounding check against an answer that's justtest_ask_sensitive_role_uses_reasoning_mode_and_traces_reasoningpassed
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_modepassed
Ask non sensitive uses no reasoning mode (no description in the source; shown from the name)test_ask_passes_tot_mode_through_and_defaults_offpassed
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_untrustedpassed
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_throughpassed
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_modepassed
Ask auto routed to sensitive role gets reasoning mode (no description in the source; shown from the name)test_ask_without_auto_never_calls_supervisorpassed
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_pipelinepassed
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_teampassed
Ask without team never calls run team (no description in the source; shown from the name)test_ask_actions_off_by_defaultpassed
Ask actions off by default (no description in the source; shown from the name)test_ask_allow_actions_trusted_runs_and_appends_notepassed
Ask allow actions trusted runs and appends note (no description in the source; shown from the name)test_ask_allow_actions_untrusted_never_planspassed
Ask allow actions untrusted never plans (no description in the source; shown from the name)test_ask_no_action_proposed_leaves_answer_untouchedpassed
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_actionspassed
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_offpassed
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_looppassed
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_contextpassed
Without role, _build_system_prompt returns (base_system_prompt, [])test_ask_without_role_system_prompt_passthroughpassed
Without role, the system_prompt passed to generate_answer is exactlytest_ask_with_valid_role_injects_personalitypassed
With a valid role, _build_system_prompt should include the role'stest_ask_with_valid_role_returns_memory_idspassed
ask() should return role_memory_ids from _build_system_prompt.test_ask_with_nonexistent_role_no_errorpassed
A role not in DEFAULT_ROLES or DB should not raise — falls back totest_augment_query_with_reminder_appends_owner_instructionspassed
_augment_query_with_reminder should append owner instructions to thetest_augment_query_without_role_returns_query_unchangedpassed
Without role, _augment_query_with_reminder returns query as-is.test_augment_query_with_role_but_no_owner_instructionspassed
With role but no owner instructions, query is returned unchanged.test_ask_with_role_and_owner_instructions_in_augmented_querypassed
End-to-end: owner instructions set via PATCH /profile should appeartest_build_system_prompt_no_role_returns_basepassed
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_nonepassed
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_personalitypassed
Build system prompt with role and personality (no description in the source; shown from the name)test_build_system_prompt_with_owner_instructions_in_contextpassed
When role_context contains OWNER INSTRUCTIONS, they should betest_sensitive_role_triggers_reflectionpassed
Sensitive roles should trigger check_grounding (reflection).test_chat_route_forwards_role_to_askpassed
Chat route forwards role to ask (no description in the source; shown from the name)test_chat_route_without_role_forwards_nonepassed
Pre-#133 behaviour: no role parameter means no role context.test_chat_route_rejects_a_blank_question_before_the_model_is_calledpassed
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_limitpassed
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_itpassed
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_textpassed
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_nonepassed
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_crashingpassed
A failure mid-stream cannot become a 500 — the status line is already ontest_chat_stream_route_rejects_a_blank_question_before_streamingpassed
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_reinforcespassed
Backward compatibility: existing callers that only sendtest_feedback_with_conversation_fields_also_learnspassed
Feedback with conversation fields also learns (no description in the source; shown from the name)test_feedback_failure_still_calls_learn_with_resolved_falsepassed
A failed outcome still calls learn_from_conversation (withtest_feedback_partial_conversation_fields_skips_learningpassed
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_tokenpassed
Enabled needs flag and token (no description in the source; shown from the name)test_happy_path_request_shapepassed
Happy path request shape (no description in the source; shown from the name)test_refusals_make_no_http_callpassed
Refusals make no http call (no description in the source; shown from the name)test_flags_busy_errors_and_truncationpassed
Flags busy errors and truncation (no description in the source; shown from the name)test_network_error_never_raisespassed
Network error never raises (no description in the source; shown from the name)test_run_code_listed_only_when_enabledpassed
Run code listed only when enabled (no description in the source; shown from the name)test_validate_plan_run_codepassed
Validate plan run code (no description in the source; shown from the name)test_send_via_channel_code_dispatchespassed
Send via channel code dispatches (no description in the source; shown from the name)test_full_mode_runs_immediatelypassed
Full mode runs immediately (no description in the source; shown from the name)test_semi_mode_pends_then_yes_runspassed
Semi mode pends then yes runs (no description in the source; shown from the name)test_sensitive_role_forced_to_semipassed
Sensitive role forced to semi (no description in the source; shown from the name)test_spec_is_locked_downpassed
Spec is locked down (no description in the source; shown from the name)test_code_travels_only_in_env_never_in_commandpassed
Code travels only in env never in command (no description in the source; shown from the name)test_spec_ignores_everything_but_codepassed
Spec ignores everything but code (no description in the source; shown from the name)test_demux_splits_streamspassed
Demux splits streams (no description in the source; shown from the name)test_compose_sandbox_service_is_isolatedpassed
Compose sandbox service is isolated (no description in the source; shown from the name)test_run_in_sandbox_happy_path_and_cleanuppassed
Run in sandbox happy path and cleanup (no description in the source; shown from the name)test_timeout_kills_then_cleans_uppassed
Timeout kills then cleans up (no description in the source; shown from the name)test_failures_raise_and_still_clean_uppassed
Failures raise and still clean up (no description in the source; shown from the name)test_http_health_and_authpassed
Http health and auth (no description in the source; shown from the name)test_http_validation_and_successpassed
Http validation and success (no description in the source; shown from the name)test_http_busy_returns_429passed
Http busy returns 429 (no description in the source; shown from the name)test_runner_refuses_to_start_without_tokenpassed
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_400passed
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_storedpassed
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_workspassed
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_trippassed
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_readpassed
Older plain header rows still read (no description in the source; shown from the name)test_the_identifier_is_a_plain_value_in_the_filterpassed
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_operatorspassed
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_filledpassed
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_pinspassed
Lock lines are exact pins (no description in the source; shown from the name)test_lock_covers_every_requirementpassed
Lock covers every requirement (no description in the source; shown from the name)test_dockerfile_installs_from_the_lock_and_runs_unprivilegedpassed
Dockerfile installs from the lock and runs unprivileged (no description in the source; shown from the name)test_dockerignore_keeps_the_lock_filepassed
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_namespassed
Refuses non test names (no description in the source; shown from the name)test_allows_test_databasespassed
Allows test databases (no description in the source; shown from the name)test_ci_and_explicit_override_skip_the_checkpassed
Ci and explicit override skip the check (no description in the source; shown from the name)test_unset_url_is_not_blockedpassed
Unset url is not blocked (no description in the source; shown from the name)test_message_never_contains_credentialspassed
Message never contains credentials (no description in the source; shown from the name)test_session_start_exits_for_production_namepassed
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_rolespassed
No duplicate roles in default roles (no description in the source; shown from the name)test_new_role_registered_in_role_choicespassed
New role registered in role choices (no description in the source; shown from the name)test_new_role_has_skill_tagspassed
New role has skill tags (no description in the source; shown from the name)test_new_role_has_complete_default_entrypassed
New role has complete default entry (no description in the source; shown from the name)test_sensitive_domain_roles_are_a_subset_of_role_choicespassed
Sensitive domain roles are a subset of role choices (no description in the source; shown from the name)test_sensitive_domain_roles_include_all_expectedpassed
Sensitive domain roles include all expected (no description in the source; shown from the name)test_existing_nine_roles_untouchedpassed
Existing nine roles untouched (no description in the source; shown from the name)test_no_role_in_default_roles_is_missing_from_role_choicespassed
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_46passed
Total role count at least 46 (no description in the source; shown from the name)test_every_real_role_has_core_and_owner_instruction_tagspassed
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_acceptedpassed
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_signaturepassed
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_refusedpassed
A far future timestamp is refused (no description in the source; shown from the name)test_a_timestamp_that_is_not_a_number_is_refusedpassed
A timestamp that is not a number is refused (no description in the source; shown from the name)test_a_bad_signature_is_still_refusedpassed
A bad signature is still refused (no description in the source; shown from the name)test_the_limit_can_be_changed_and_turned_offpassed
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_imagepassed
Dockerignore keeps update backups out of the image (no description in the source; shown from the name)test_dockerignore_does_not_hide_the_schemapassed
Dockerignore does not hide the schema (no description in the source; shown from the name)test_redact_url_hides_user_and_passwordpassed
Redact url hides user and password (no description in the source; shown from the name)test_the_connected_log_line_has_no_passwordpassed
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_keypassed
Document routes need the key (no description in the source; shown from the name)test_list_shows_a_new_document_with_zero_chunkspassed
List shows a new document with zero chunks (no description in the source; shown from the name)test_delete_removes_the_document_then_404passed
Delete removes the document then 404 (no description in the source; shown from the name)test_delete_with_unknown_or_malformed_id_is_404passed
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_documentpassed
Chunks are counted and removed with the document (no description in the source; shown from the name)test_dashboard_has_the_documents_tabpassed
Dashboard has the documents tab (no description in the source; shown from the name)test_dashboard_script_parses_with_nodepassed
Dashboard script parses with node (no description in the source; shown from the name)test_graph_delete_removes_document_then_orphan_entitiespassed
Graph delete removes document then orphan entities (no description in the source; shown from the name)test_graph_delete_without_entities_only_removes_the_documentpassed
Graph delete without entities only removes the document (no description in the source; shown from the name)test_graph_delete_is_skipped_without_a_driverpassed
Graph delete is skipped without a driver (no description in the source; shown from the name)test_graph_delete_failure_never_raisespassed
Graph delete failure never raises (no description in the source; shown from the name)test_document_store_maps_graph_resultspassed
Document store maps graph results (no description in the source; shown from the name)test_delete_route_reports_the_graph_statuspassed
Delete route reports the graph status (no description in the source; shown from the name)test_unknown_document_does_not_touch_the_graphpassed
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_retrypassed
Embed text succeeds first try no retry (no description in the source; shown from the name)test_embed_text_retries_on_429_then_succeedspassed
Embed text retries on 429 then succeeds (no description in the source; shown from the name)test_embed_text_retries_on_503_then_succeedspassed
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_errorpassed
A 401/403 (bad key) or 400 (malformed request) should fail fast,test_embed_text_gives_up_after_max_retriespassed
Embed text gives up after max retries (no description in the source; shown from the name)test_embed_batch_retries_on_transient_errorpassed
Embed batch retries on transient error (no description in the source; shown from the name)test_embed_batch_empty_input_returns_empty_no_api_callpassed
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_callpassed
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_authpassed
Ollama defaults no auth (no description in the source; shown from the name)test_openai_sends_bearerpassed
Openai sends bearer (no description in the source; shown from the name)test_batching_and_orderpassed
Batching and order (no description in the source; shown from the name)test_retry_on_429_then_successpassed
Retry on 429 then success (no description in the source; shown from the name)test_wrong_size_returns_nonepassed
Wrong size returns none (no description in the source; shown from the name)test_http_500_returns_none_without_retrypassed
Http 500 returns none without retry (no description in the source; shown from the name)test_config_errorspassed
Config errors (no description in the source; shown from the name)test_configured_dimensionspassed
Configured dimensions (no description in the source; shown from the name)test_empty_text_nonepassed
Empty text none (no description in the source; shown from the name)test_gemini_path_unchangedpassed
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_answerspassed
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_providerpassed
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_oncepassed
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_usepassed
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_textpassed
Generate answer failure does not leak error text (no description in the source; shown from the name)test_execute_or_request_error_does_not_leakpassed
Execute or request error does not leak (no description in the source; shown from the name)test_autonomy_daily_report_does_not_leakpassed
Autonomy daily report does not leak (no description in the source; shown from the name)test_rejection_report_does_not_leakpassed
Rejection report does not leak (no description in the source; shown from the name)test_observability_report_does_not_leakpassed
Observability report does not leak (no description in the source; shown from the name)test_streaming_paths_do_not_interpolate_exception_textpassed
Streaming paths do not interpolate exception text (no description in the source; shown from the name)test_api_http_errors_do_not_interpolate_exception_textpassed
Api http errors do not interpolate exception text (no description in the source; shown from the name)test_send_via_channel_exception_does_not_leakpassed
Send via channel exception does not leak (no description in the source; shown from the name)test_sync_endpoint_failure_returns_fresh_generic_dictpassed
Sync endpoint failure returns fresh generic dict (no description in the source; shown from the name)test_sync_endpoint_success_returns_only_known_fieldspassed
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_failurepassed
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_chatpassed
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_setpassed
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_messagepassed
A 401 stops with a clear message (no description in the source; shown from the name)test_the_server_address_can_be_changedpassed
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_contentspassed
Read results are logged without file contents (no description in the source; shown from the name)test_list_results_keep_only_the_summary_linepassed
List results keep only the summary line (no description in the source; shown from the name)test_errors_and_other_tools_are_unchangedpassed
Errors and other tools are unchanged (no description in the source; shown from the name)test_the_real_pause_flag_removes_the_toolspassed
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_flightpassed
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_hardeningpassed
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_unchangedpassed
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_nothingpassed
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_targetspassed
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_headpassed
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_modepassed
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_deletedpassed
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_touchedpassed
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_refusedpassed
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_refusedpassed
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_cutpassed
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_folderpassed
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_folderpassed
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_deletepassed
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_hostpassed
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_winpassed
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_containerpassed
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_switchpassed
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_namepassed
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_deletepassed
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_onepassed
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_namespassed
Restore refuses unknown ids links and protected names (no description in the source; shown from the name)test_trash_ignores_links_and_odd_thingspassed
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_onespassed
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_backpassed
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_workpassed
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_grantpassed
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_onespassed
A good plan and the bad ones (no description in the source; shown from the name)test_it_is_outbound_style_and_not_external_contentpassed
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_pathpassed
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_callpassed
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_errorspassed
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_checkpassed
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_headpassed
A binary file stores no head (no description in the source; shown from the name)test_a_missing_or_refused_file_creates_no_pending_actionpassed
A missing or refused file creates no pending action (no description in the source; shown from the name)test_autonomy_off_asks_the_runner_nothingpassed
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_startpassed
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_fieldpassed
The pending list carries a display field (no description in the source; shown from the name)test_the_log_and_learning_keep_no_file_contentpassed
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_runnerpassed
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_movedpassed
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_callpassed
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_refusedpassed
With either switch off an approved delete is refused (no description in the source; shown from the name)test_a_runner_crash_never_raisespassed
A runner crash never raises (no description in the source; shown from the name)test_the_docs_describe_the_delete_tool_and_its_switchpassed
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_unchangedpassed
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_valuespassed
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_hashespassed
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_createdpassed
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_matchedpassed
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_correctlypassed
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_sopassed
A long diff is cut and says so (no description in the source; shown from the name)test_the_reader_refuses_odd_targetspassed
The reader refuses odd targets (no description in the source; shown from the name)test_a_file_over_the_size_limit_is_refused_not_cutpassed
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_filepassed
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_mountpassed
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_startspassed
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_startspassed
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_fieldpassed
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_countpassed
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_grantspassed
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_refusedpassed
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_textpassed
The call sends only op grant path and text (no description in the source; shown from the name)test_refusals_and_errors_are_plainpassed
Refusals and errors are plain (no description in the source; shown from the name)test_identical_text_says_there_would_be_no_changepassed
Identical text says there would be no change (no description in the source; shown from the name)test_dispatch_taint_and_external_contentpassed
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_defaultpassed
Off by default (no description in the source; shown from the name)test_offered_without_any_grant_when_file_tools_are_onpassed
Offered without any grant when file tools are on (no description in the source; shown from the name)test_a_good_request_is_validpassed
A good request is valid (no description in the source; shown from the name)test_bad_grant_names_are_rejectedpassed
Bad grant names are rejected (no description in the source; shown from the name)test_empty_reason_is_rejectedpassed
Empty reason is rejected (no description in the source; shown from the name)test_the_reason_is_cleaned_and_cappedpassed
The reason is cleaned and capped (no description in the source; shown from the name)test_approving_grants_nothing_and_only_shows_a_commandpassed
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_ownerpassed
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_defaultpassed
Off by default (no description in the source; shown from the name)test_tools_need_a_grantpassed
Tools need a grant (no description in the source; shown from the name)test_tools_are_offered_with_grant_names_onlypassed
Tools are offered with grant names only (no description in the source; shown from the name)test_plans_for_good_paths_are_validpassed
Plans for good paths are valid (no description in the source; shown from the name)test_bad_plans_are_rejectedpassed
Bad plans are rejected (no description in the source; shown from the name)test_the_call_sends_only_op_grant_and_pathpassed
The call sends only op grant and path (no description in the source; shown from the name)test_list_outputpassed
List output (no description in the source; shown from the name)test_refusals_errors_and_busypassed
Refusals errors and busy (no description in the source; shown from the name)test_dispatch_goes_to_the_clientpassed
Dispatch goes to the client (no description in the source; shown from the name)test_file_tools_taint_the_run_but_are_not_outboundpassed
File tools taint the run but are not outbound (no description in the source; shown from the name)test_real_results_count_as_external_contentpassed
Real results count as external content (no description in the source; shown from the name)test_runner_grants_reply_round_trips_to_namespassed
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_taintspassed
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_hardeningpassed
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_onlypassed
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_everywherepassed
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_trashpassed
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_modepassed
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_touchedpassed
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_refusedpassed
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_trashpassed
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_doespassed
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_trashpassed
Identical text changes nothing and leaves no trash (no description in the source; shown from the name)test_odd_existing_targets_are_refused_unchangedpassed
Odd existing targets are refused unchanged (no description in the source; shown from the name)test_a_big_old_file_is_refused_not_cutpassed
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_refusedpassed
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_filepassed
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_readerpassed
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_hostpassed
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_winspassed
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_containerpassed
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_textpassed
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_busypassed
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_flagpassed
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_grantpassed
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_onespassed
A good plan and the bad ones (no description in the source; shown from the name)test_it_is_outbound_style_and_not_external_contentpassed
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_textpassed
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_callpassed
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_errorspassed
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_previewpassed
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_dashpassed
A new file has base dash (no description in the source; shown from the name)test_identical_or_refused_previews_create_no_pending_actionpassed
Identical or refused previews create no pending action (no description in the source; shown from the name)test_autonomy_off_asks_the_runner_nothingpassed
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_diffpassed
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_previewpassed
Other channels keep the old 300 character preview (no description in the source; shown from the name)test_the_pending_list_carries_a_display_fieldpassed
The pending list carries a display field (no description in the source; shown from the name)test_the_log_and_learning_keep_no_file_textpassed
The log and learning keep no file text (no description in the source; shown from the name)test_the_dashboard_prefers_the_display_fieldpassed
The dashboard prefers the display field (no description in the source; shown from the name)test_dispatch_and_the_exact_call_to_the_runnerpassed
Dispatch and the exact call to the runner (no description in the source; shown from the name)test_a_new_file_is_reported_as_createdpassed
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_writtenpassed
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_callpassed
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_refusedpassed
With the kill switch off an approved write is refused (no description in the source; shown from the name)test_a_runner_crash_never_raisespassed
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_askedpassed
Without a token nothing is asked (no description in the source; shown from the name)test_grants_are_listed_by_name_without_any_host_pathpassed
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_offpassed
Paused runner shows no grants and control off (no description in the source; shown from the name)test_runner_errors_and_outagespassed
Runner errors and outages (no description in the source; shown from the name)test_tools_flag_is_reportedpassed
Tools flag is reported (no description in the source; shown from the name)test_the_page_has_the_files_tab_and_no_add_controlpassed
The page has the files tab and no add control (no description in the source; shown from the name)test_the_route_needs_the_keypassed
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_tokenpassed
Off by default and needs the runner token (no description in the source; shown from the name)test_settings_have_safe_defaults_and_limitspassed
Settings have safe defaults and limits (no description in the source; shown from the name)test_manifest_entries_are_validatedpassed
Manifest entries are validated (no description in the source; shown from the name)test_a_bad_manifest_is_ignoredpassed
A bad manifest is ignored (no description in the source; shown from the name)test_grant_names_are_checked_before_any_path_is_builtpassed
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_exactlypassed
A staged file must match the manifest exactly (no description in the source; shown from the name)test_a_symlink_in_staging_is_never_followedpassed
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_unsupportedpassed
Plan sorts files into new changed stale and unsupported (no description in the source; shown from the name)test_an_incomplete_manifest_never_plans_removalspassed
An incomplete manifest never plans removals (no description in the source; shown from the name)test_an_empty_manifest_never_plans_removalspassed
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_embedpassed
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_itpassed
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_documentpassed
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_offpassed
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_trustedpassed
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_cyclespassed
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_grantspassed
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_changespassed
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_otherspassed
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_topassed
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_alonepassed
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_overlappassed
Run cycle never raises and does not overlap (no description in the source; shown from the name)test_approve_checks_its_inputpassed
Approve checks its input (no description in the source; shown from the name)test_status_shows_names_counts_and_sizes_onlypassed
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_tokenpassed
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_documentspassed
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_databasepassed
The schema is applied in this database (no description in the source; shown from the name)test_approvals_are_recorded_and_can_be_repeatedpassed
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_nonepassed
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_appliedpassed
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_hiddenpassed
Other database errors in the list are not hidden (no description in the source; shown from the name)test_the_routes_need_the_keypassed
The routes need the key (no description in the source; shown from the name)test_approve_starts_a_cycle_without_asking_the_runner_againpassed
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_nothingpassed
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_raisespassed
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_formatspassed
Supported extensions include the package formats (no description in the source; shown from the name)test_upload_accepts_text_like_formatspassed
Upload accepts text like formats (no description in the source; shown from the name)test_upload_accepts_html_and_zippassed
Upload accepts html and zip (no description in the source; shown from the name)test_upload_still_rejects_other_typespassed
Upload still rejects other types (no description in the source; shown from the name)test_documents_lists_formats_and_url_flagpassed
Documents lists formats and url flag (no description in the source; shown from the name)test_ingest_url_needs_the_keypassed
Ingest url needs the key (no description in the source; shown from the name)test_ingest_url_rejects_bad_inputpassed
Ingest url rejects bad input (no description in the source; shown from the name)test_ingest_url_refuses_private_and_internal_addressespassed
Ingest url refuses private and internal addresses (no description in the source; shown from the name)test_ingest_url_adds_the_pagepassed
Ingest url adds the page (no description in the source; shown from the name)test_ingest_url_without_web_support_is_501passed
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_settingpassed
Private addresses are allowed only by the env setting (no description in the source; shown from the name)test_empty_page_text_is_a_400passed
Empty page text is a 400 (no description in the source; shown from the name)test_dashboard_has_the_url_box_and_dynamic_formatspassed
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_addressespassed
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_truncatedpassed
No retry when not truncated (no description in the source; shown from the name)test_retries_once_on_truncation_and_uses_retry_resultpassed
Retries once on truncation and uses retry result (no description in the source; shown from the name)test_retry_result_still_truncated_returns_it_anywaypassed
If the retry is ALSO truncated, generate_answer should still returntest_no_retry_when_already_at_max_retry_cappassed
max_tok already >= TRUNCATION_MAX_RETRY_TOKENS should not retry.test_retry_failure_falls_back_to_original_answerpassed
If the retry call itself raises, keep the original (possiblytest_ollama_style_finish_reason_triggers_retrypassed
OpenAI-compatible hosts (including Ollama) report finish_reason='length'.test_stream_no_notice_when_completepassed
Stream no notice when complete (no description in the source; shown from the name)test_stream_appends_notice_when_truncated_gemini_stylepassed
Stream appends notice when truncated gemini style (no description in the source; shown from the name)test_stream_appends_notice_when_truncated_openai_stylepassed
Stream appends notice when truncated openai style (no description in the source; shown from the name)test_stream_appends_notice_when_truncated_anthropic_stylepassed
Stream appends notice when truncated anthropic style (no description in the source; shown from the name)test_stream_no_notice_when_provider_fails_before_yieldingpassed
If a provider errors before yielding anything and before evertest_check_grounding_returns_none_when_groundedpassed
Check grounding returns none when grounded (no description in the source; shown from the name)test_check_grounding_returns_reason_when_not_groundedpassed
Check grounding returns reason when not grounded (no description in the source; shown from the name)test_check_grounding_generic_reason_when_no_colonpassed
Check grounding generic reason when no colon (no description in the source; shown from the name)test_check_grounding_returns_none_on_provider_failurepassed
Best-effort: a failure in the check itself must never propagatetest_check_grounding_uses_primary_config_not_fallback_chainpassed
Check grounding uses primary config not fallback chain (no description in the source; shown from the name)test_split_reasoning_marker_presentpassed
Split reasoning marker present (no description in the source; shown from the name)test_split_reasoning_marker_case_insensitivepassed
Split reasoning marker case insensitive (no description in the source; shown from the name)test_split_reasoning_marker_absent_falls_back_to_full_textpassed
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_backpassed
Split reasoning empty answer after marker falls back (no description in the source; shown from the name)test_generate_answer_reasoning_mode_truepassed
Generate answer reasoning mode true (no description in the source; shown from the name)test_generate_answer_reasoning_mode_false_unchangedpassed
Generate answer reasoning mode false unchanged (no description in the source; shown from the name)test_generate_answer_reasoning_mode_no_marker_never_breakspassed
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_keyspassed
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_judgepassed
Tot picks candidate chosen by judge (no description in the source; shown from the name)test_tot_garbage_judge_reply_uses_first_candidatepassed
Tot garbage judge reply uses first candidate (no description in the source; shown from the name)test_tot_judge_failure_uses_first_candidatepassed
Tot judge failure uses first candidate (no description in the source; shown from the name)test_tot_returns_none_when_fewer_than_two_candidatespassed
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_reasoningpassed
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_answerpassed
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_thoughtpassed
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_budgetpassed
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_budgetpassed
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_concernpassed
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_budgetpassed
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_gracefullypassed
Missing connection string fails gracefully (no description in the source; shown from the name)test_invalid_json_fails_gracefullypassed
Invalid json fails gracefully (no description in the source; shown from the name)test_missing_required_keys_fails_gracefullypassed
Missing required keys fails gracefully (no description in the source; shown from the name)test_connection_successpassed
Connection success (no description in the source; shown from the name)test_connection_failure_surfaces_messagepassed
Connection failure surfaces message (no description in the source; shown from the name)test_fetch_data_maps_messagespassed
Fetch data maps messages (no description in the source; shown from the name)test_fetch_data_no_messages_returns_empty_listpassed
Fetch data no messages returns empty list (no description in the source; shown from the name)test_fetch_data_appends_user_identifier_to_querypassed
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_rankpassed
Percentiles use the nearest rank (no description in the source; shown from the name)test_it_counts_requests_and_latency_per_pathpassed
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_errorspassed
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_headerpassed
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_crashpassed
A dead server gives errors not a crash (no description in the source; shown from the name)test_unreasonable_settings_are_refusedpassed
Unreasonable settings are refused (no description in the source; shown from the name)test_the_command_line_reads_the_key_from_the_environment_onlypassed
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_processespassed
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_workerspassed
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_statepassed
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_interpreterpassed
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_buildpassed
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_geminipassed
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_internetpassed
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_loadedpassed
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_refusedpassed
A missing bundle is refused (no description in the source; shown from the name)test_a_bundle_without_models_cannot_do_an_ollama_installpassed
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_messagepassed
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_itpassed
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_environmentpassed
The bundle path can come from the environment (no description in the source; shown from the name)test_the_online_install_is_unchangedpassed
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_syntaxpassed
Syntax (no description in the source; shown from the name)test_fresh_gemini_installpassed
Fresh gemini install (no description in the source; shown from the name)test_ollama_installpassed
Ollama install (no description in the source; shown from the name)test_existing_env_is_never_changedpassed
Existing env is never changed (no description in the source; shown from the name)test_existing_ollama_setup_keeps_its_service_and_modelspassed
Existing ollama setup keeps its service and models (no description in the source; shown from the name)test_existing_database_volume_keeps_its_passwordpassed
Existing database volume keeps its password (no description in the source; shown from the name)test_no_choice_and_no_terminal_skips_the_aipassed
No choice and no terminal skips the ai (no description in the source; shown from the name)test_docker_not_runningpassed
Docker not running (no description in the source; shown from the name)test_unknown_option_and_bad_providerpassed
Unknown option and bad provider (no description in the source; shown from the name)test_secrets_differ_between_installspassed
Secrets differ between installs (no description in the source; shown from the name)test_ollama_service_is_internal_onlypassed
Ollama service is internal only (no description in the source; shown from the name)test_docs_match_the_installerpassed
Docs match the installer (no description in the source; shown from the name)test_ollama_models_are_ready_before_ragleap_startspassed
Ollama models are ready before ragleap starts (no description in the source; shown from the name)test_installer_installs_the_ragleap_commandpassed
Installer installs the ragleap command (no description in the source; shown from the name)test_bundled_ollama_has_a_context_window_that_fits_rag_promptspassed
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_parsepassed
Shell scripts parse (no description in the source; shown from the name)test_installers_have_no_crlfpassed
Installers have no crlf (no description in the source; shown from the name)test_gitattributes_keeps_shell_scripts_on_lfpassed
Gitattributes keeps shell scripts on lf (no description in the source; shown from the name)test_install_sh_safety_checks_presentpassed
Install sh safety checks present (no description in the source; shown from the name)test_install_ps1_basicspassed
Install ps1 basics (no description in the source; shown from the name)test_compose_host_ports_are_configurable_with_unchanged_defaultspassed
Compose host ports are configurable with unchanged defaults (no description in the source; shown from the name)test_port_helpers_skip_a_busy_portpassed
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_portpassed
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_keypassed
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_offpassed
Open browser can be switched off (no description in the source; shown from the name)test_ragleap_key_rotate_replaces_key_and_keeps_other_settingspassed
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_linerpassed
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_hintpassed
Install sh guidance for missing requirements and windows hint (no description in the source; shown from the name)test_port_check_can_be_switched_offpassed
Port check can be switched off (no description in the source; shown from the name)test_disk_check_refuses_when_there_is_not_enough_spacepassed
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_formpassed
Readme has windows install without the wrapped form (no description in the source; shown from the name)test_readme_port_troubleshooting_points_to_env_settingspassed
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_valuespassed
Model setting values (no description in the source; shown from the name)test_auto_keeps_the_library_defaultpassed
Auto keeps the library default (no description in the source; shown from the name)test_lite_and_full_are_passed_to_the_librarypassed
Lite and full are passed to the library (no description in the source; shown from the name)test_lite_works_without_any_downloadpassed
Lite works without any download (no description in the source; shown from the name)test_failure_logs_one_hint_and_falls_backpassed
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_approvedpassed
Approved action recorded as approved (no description in the source; shown from the name)test_rejected_action_recorded_as_rejected_not_approvedpassed
Rejected action recorded as rejected not approved (no description in the source; shown from the name)test_default_approved_true_for_backward_compatibilitypassed
approved defaults to True so any other/future caller thattest_action_type_included_in_tags_for_both_outcomespassed
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_versionpassed
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_versionspassed
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_copiespassed
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_parsingpassed
Servers and allowlist parsing (no description in the source; shown from the name)test_nothing_configured_means_no_toolpassed
Nothing configured means no tool (no description in the source; shown from the name)test_configured_tool_listed_with_targetspassed
Configured tool listed with targets (no description in the source; shown from the name)test_happy_path_sequence_and_headerspassed
Happy path sequence and headers (no description in the source; shown from the name)test_no_token_means_no_auth_headerpassed
No token means no auth header (no description in the source; shown from the name)test_empty_content_sends_empty_argumentspassed
Empty content sends empty arguments (no description in the source; shown from the name)test_event_stream_reply_is_parsedpassed
Event stream reply is parsed (no description in the source; shown from the name)test_tool_reported_error_is_flaggedpassed
Tool reported error is flagged (no description in the source; shown from the name)test_result_is_truncatedpassed
Result is truncated (no description in the source; shown from the name)test_not_allowlisted_is_refused_without_any_httppassed
Not allowlisted is refused without any http (no description in the source; shown from the name)test_non_public_server_is_refused_without_httppassed
Non public server is refused without http (no description in the source; shown from the name)test_arguments_must_be_json_objectpassed
Arguments must be json object (no description in the source; shown from the name)test_invalid_json_arguments_fail_safelypassed
Invalid json arguments fail safely (no description in the source; shown from the name)test_http_error_server_error_and_oversize_fail_safelypassed
Http error server error and oversize fail safely (no description in the source; shown from the name)test_network_exception_never_raisespassed
Network exception never raises (no description in the source; shown from the name)test_validate_plan_mcp_callpassed
Validate plan mcp call (no description in the source; shown from the name)test_send_via_channel_mcp_dispatchespassed
Send via channel mcp dispatches (no description in the source; shown from the name)test_full_mode_executes_immediatelypassed
Full mode executes immediately (no description in the source; shown from the name)test_semi_mode_pends_then_yes_dispatches_same_channelpassed
Semi mode pends then yes dispatches same channel (no description in the source; shown from the name)test_sensitive_role_forced_to_semipassed
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_rolespassed
Baseline: with tags=None (the old default behavior), search istest_semantic_search_with_tags_excludes_other_rolespassed
The actual fix: passing tags restricts results to entries sharingtest_get_role_skills_passes_role_tags_to_semantic_searchpassed
skills.py's get_role_skills() must actually pass the role's owntest_get_role_skills_with_ids_passes_role_tags_to_semantic_searchpassed
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_runpassed
Seeds all default memory seeds on first run (no description in the source; shown from the name)test_second_run_is_a_nooppassed
Second run is a noop (no description in the source; shown from the name)test_compliance_seeds_present_with_correct_tagspassed
Compliance seeds present with correct tags (no description in the source; shown from the name)test_healthcare_seed_explicitly_excludes_veterinarypassed
Regression guard for the cross-role tag-bleed risk: healthcare_intaketest_all_seven_sensitive_roles_have_a_compliance_seedpassed
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_histogrampassed
The text has counters and a cumulative histogram (no description in the source; shown from the name)test_the_number_of_label_combinations_is_cappedpassed
The number of label combinations is capped (no description in the source; shown from the name)test_odd_methods_and_quotes_cannot_break_the_formatpassed
Odd methods and quotes cannot break the format (no description in the source; shown from the name)test_request_ids_are_kept_only_when_safepassed
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_ownerpassed
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_rolepassed
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_pathpassed
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_offpassed
Nothing is counted while metrics are off (no description in the source; shown from the name)test_every_response_carries_a_request_idpassed
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_filepassed
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_fallbackpassed
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_aboutpassed
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_aboutpassed
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_loggedpassed
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_offpassed
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_passwordpassed
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_gracefullypassed
Missing token fails gracefully (no description in the source; shown from the name)test_connection_successpassed
Connection success (no description in the source; shown from the name)test_notion_api_error_surfaces_messagepassed
Notion api error surfaces message (no description in the source; shown from the name)test_fetch_database_defaultpassed
Fetch database default (no description in the source; shown from the name)test_fetch_database_requires_endpointpassed
Fetch database requires endpoint (no description in the source; shown from the name)test_fetch_pagepassed
Fetch page (no description in the source; shown from the name)test_fetch_search_no_endpoint_neededpassed
Fetch search no endpoint needed (no description in the source; shown from the name)test_unsupported_query_template_raisespassed
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_rowpassed
Record trace inserts a row (no description in the source; shown from the name)test_record_trace_with_no_role_and_an_errorpassed
Record trace with no role and an error (no description in the source; shown from the name)test_record_trace_with_reflection_concernpassed
Record trace with reflection concern (no description in the source; shown from the name)test_record_trace_never_raises_on_bad_connectionpassed
record_trace() must be best-effort - a DB failure should nevertest_report_with_no_traces_todaypassed
Report with no traces today (no description in the source; shown from the name)test_report_aggregates_role_provider_and_error_ratepassed
Report aggregates role provider and error rate (no description in the source; shown from the name)test_report_shows_reflection_flagged_countpassed
Report shows reflection flagged count (no description in the source; shown from the name)test_record_trace_reasoning_round_tripspassed
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_shapepassed
Overview counts and shape (no description in the source; shown from the name)test_overview_never_reports_the_approval_targetpassed
Overview never reports the approval target (no description in the source; shown from the name)test_autonomy_log_order_filter_truncation_and_clamppassed
Autonomy log order filter truncation and clamp (no description in the source; shown from the name)test_usage_summary_totals_limits_and_sensitivitypassed
Usage summary totals limits and sensitivity (no description in the source; shown from the name)test_budget_limits_helperpassed
Budget limits helper (no description in the source; shown from the name)test_static_files_and_headerspassed
Static files and headers (no description in the source; shown from the name)test_only_the_three_paths_are_servedpassed
Only the three paths are served (no description in the source; shown from the name)test_page_safety_tripwirespassed
Page safety tripwires (no description in the source; shown from the name)test_page_uses_the_expected_endpointspassed
Page uses the expected endpoints (no description in the source; shown from the name)test_app_js_is_valid_javascriptpassed
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_routespassed
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_keypassed
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_approvalpassed
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_readpassed
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_pagepassed
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_tabpassed
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_textpassed
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_barpassed
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_serverpassed
Login link never uses local storage or the server (no description in the source; shown from the name)test_login_link_uses_match_not_execpassed
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_departmentpassed
Every shipped role has exactly one department (no description in the source; shown from the name)test_regulated_department_is_exactly_the_sensitive_rolespassed
Regulated department is exactly the sensitive roles (no description in the source; shown from the name)test_department_of_rulespassed
Department of rules (no description in the source; shown from the name)test_org_chart_grouping_fields_and_open_task_countspassed
Org chart grouping fields and open task counts (no description in the source; shown from the name)test_org_route_needs_the_keypassed
Org route needs the key (no description in the source; shown from the name)test_page_uses_the_org_and_task_endpointspassed
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_itpassed
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_tablepassed
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_tabpassed
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_pagepassed
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_storedpassed
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_logpassed
Who approved is shown in the activity log (no description in the source; shown from the name)test_names_and_paths_go_in_as_textpassed
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_endpointspassed
Settings tab uses the settings endpoints (no description in the source; shown from the name)test_secret_inputs_are_password_fields_and_never_prefilledpassed
Secret inputs are password fields and never prefilled (no description in the source; shown from the name)test_lock_clears_the_settings_formpassed
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_firstpassed
Setup tab exists and is first (no description in the source; shown from the name)test_setup_tab_uses_the_status_endpointpassed
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_missingpassed
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_settingspassed
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_verifypassed
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_shouldpassed
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_forpassed
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_runspassed
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_expectspassed
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_workspassed
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_messagepassed
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_archivepassed
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_checkoutpassed
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_refusedpassed
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_servicepassed
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_elsepassed
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_existpassed
The guide names files that exist (no description in the source; shown from the name)test_the_flags_in_the_guide_exist_in_the_scriptspassed
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_defaultspassed
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_namepassed
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_unsignedpassed
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_guidepassed
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_reportedpassed
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_defaultspassed
Settings are read with safe defaults (no description in the source; shown from the name)test_unsafe_issuer_addresses_are_refusedpassed
Unsafe issuer addresses are refused (no description in the source; shown from the name)test_plain_http_is_allowed_only_for_localhost_or_when_askedpassed
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_matchpassed
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_errorspassed
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_answerspassed
The real http helpers refuse big or unreadable answers (no description in the source; shown from the name)test_a_good_token_gives_an_identitypassed
A good token gives an identity (no description in the source; shown from the name)test_tokens_with_wrong_claims_are_refusedpassed
Tokens with wrong claims are refused (no description in the source; shown from the name)test_several_audiences_need_a_matching_authorized_partypassed
Several audiences need a matching authorized party (no description in the source; shown from the name)test_a_token_signed_with_another_key_is_refusedpassed
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_usedpassed
Unsafe algorithms are refused before any key is used (no description in the source; shown from the name)test_garbage_and_huge_tokens_are_refusedpassed
Garbage and huge tokens are refused (no description in the source; shown from the name)test_ec_keys_work_toopassed
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_keypassed
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_rulepassed
The second factor rule (no description in the source; shown from the name)test_the_email_rulespassed
The email rules (no description in the source; shown from the name)test_pkce_matches_the_published_examplepassed
Pkce matches the published example (no description in the source; shown from the name)test_state_comparison_is_exactpassed
State comparison is exact (no description in the source; shown from the name)test_the_sign_in_address_has_everything_and_no_credentialpassed
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_tokenpassed
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_credentialpassed
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_crashpassed
A reply with no content does not crash (no description in the source; shown from the name)test_a_normal_reply_is_unchangedpassed
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_namespassed
Allowlist parsing drops tlds and bare names (no description in the source; shown from the name)test_host_allowed_matrixpassed
Host allowed matrix (no description in the source; shown from the name)test_enabled_needs_flag_and_domainspassed
Enabled needs flag and domains (no description in the source; shown from the name)test_validate_rejectspassed
Validate rejects (no description in the source; shown from the name)test_validate_accepts_and_normalisespassed
Validate accepts and normalises (no description in the source; shown from the name)test_resolve_public_returns_first_ippassed
Resolve public returns first ip (no description in the source; shown from the name)test_resolve_refuses_non_publicpassed
Resolve refuses non public (no description in the source; shown from the name)test_resolve_refuses_if_any_address_is_privatepassed
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_headerspassed
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_bodypassed
Request returns redirect location without body (no description in the source; shown from the name)test_request_enforces_size_cappassed
Request enforces size cap (no description in the source; shown from the name)test_html_to_text_visible_onlypassed
Html to text visible only (no description in the source; shown from the name)test_happy_path_htmlpassed
Happy path html (no description in the source; shown from the name)test_json_and_plain_pass_throughpassed
Json and plain pass through (no description in the source; shown from the name)test_redirect_within_allowlist_is_followedpassed
Redirect within allowlist is followed (no description in the source; shown from the name)test_redirect_to_forbidden_target_is_refusedpassed
Redirect to forbidden target is refused (no description in the source; shown from the name)test_too_many_redirectspassed
Too many redirects (no description in the source; shown from the name)test_private_resolution_is_refused_before_connectingpassed
Private resolution is refused before connecting (no description in the source; shown from the name)test_disabled_or_bad_url_makes_no_requestpassed
Disabled or bad url makes no request (no description in the source; shown from the name)test_status_content_type_size_and_network_errorspassed
Status content type size and network errors (no description in the source; shown from the name)test_result_is_truncatedpassed
Result is truncated (no description in the source; shown from the name)test_fetch_page_listed_only_when_enabledpassed
Fetch page listed only when enabled (no description in the source; shown from the name)test_validate_plan_fetch_pagepassed
Validate plan fetch page (no description in the source; shown from the name)test_send_via_channel_fetch_dispatchespassed
Send via channel fetch dispatches (no description in the source; shown from the name)test_full_mode_fetches_immediatelypassed
Full mode fetches immediately (no description in the source; shown from the name)test_semi_mode_pends_then_yes_fetchespassed
Semi mode pends then yes fetches (no description in the source; shown from the name)test_sensitive_role_forced_to_semipassed
Sensitive role forced to semi (no description in the source; shown from the name)test_library_error_text_never_reaches_the_resultpassed
Library error text never reaches the result (no description in the source; shown from the name)test_every_refusal_code_has_constant_wordingpassed
Every refusal code has constant wording (no description in the source; shown from the name)test_request_requires_tls_1_2_or_newerpassed
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_renderpassed
No liquid syntax in files jekyll would render (no description in the source; shown from the name)test_ansible_playbooks_are_excluded_from_pagespassed
Ansible playbooks are excluded from pages (no description in the source; shown from the name)test_kramdown_parses_markdown_inside_html_blockspassed
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_githubpassed
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_highestpassed
Roles run from lowest to highest (no description in the source; shown from the name)test_allowspassed
Allows (no description in the source; shown from the name)test_known_rulespassed
Known rules (no description in the source; shown from the name)test_anything_not_listed_needs_the_ownerpassed
Anything not listed needs the owner (no description in the source; shown from the name)test_method_is_part_of_the_rulepassed
Method is part of the rule (no description in the source; shown from the name)test_every_route_has_its_rule_or_is_publicpassed
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_existpassed
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_tablepassed
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_ownerpassed
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_getpassed
Create and get (no description in the source; shown from the name)test_rejects_bad_schedulepassed
Rejects bad schedule (no description in the source; shown from the name)test_rejects_unknown_role_and_missing_fieldspassed
Rejects unknown role and missing fields (no description in the source; shown from the name)test_update_and_validationpassed
Update and validation (no description in the source; shown from the name)test_deletepassed
Delete (no description in the source; shown from the name)test_due_filteringpassed
Due filtering (no description in the source; shown from the name)test_claim_is_atomic_and_advances_schedulepassed
Claim is atomic and advances schedule (no description in the source; shown from the name)test_run_trigger_delivers_through_gatepassed
Run trigger delivers through gate (no description in the source; shown from the name)test_run_trigger_passes_through_pending_approvalpassed
Run trigger passes through pending approval (no description in the source; shown from the name)test_run_trigger_empty_answer_not_deliveredpassed
Run trigger empty answer not delivered (no description in the source; shown from the name)test_run_trigger_skips_if_already_claimedpassed
Run trigger skips if already claimed (no description in the source; shown from the name)test_broken_trigger_does_not_raise_or_refirepassed
Broken trigger does not raise or refire (no description in the source; shown from the name)test_run_due_triggers_runs_mine_and_never_raisespassed
Run due triggers runs mine and never raises (no description in the source; shown from the name)test_full_mode_sends_to_owner_immediatelypassed
Full mode sends to owner immediately (no description in the source; shown from the name)test_semi_mode_pends_then_owner_yes_dispatches_same_channelpassed
Semi mode pends then owner yes dispatches same channel (no description in the source; shown from the name)test_semi_mode_owner_no_sends_nothingpassed
Semi mode owner no sends nothing (no description in the source; shown from the name)test_sensitive_role_forced_from_full_to_semipassed
Sensitive role forced from full to semi (no description in the source; shown from the name)test_off_mode_is_inertpassed
Off mode is inert (no description in the source; shown from the name)test_scheduler_job_never_raisespassed
Scheduler job never raises (no description in the source; shown from the name)test_routes_crud_roundtrippassed
Routes crud roundtrip (no description in the source; shown from the name)test_routes_error_codespassed
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_retriedpassed
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_quicklypassed
When every provider is too slow the call fails quickly (no description in the source; shown from the name)test_a_fast_provider_is_unaffectedpassed
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_defaultpassed
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_onpassed
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_handpassed
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_commitpassed
Every action is pinned to a commit (no description in the source; shown from the name)test_the_two_jobs_have_least_privilegepassed
The two jobs have least privilege (no description in the source; shown from the name)test_the_image_gets_attestations_and_a_signature_by_digestpassed
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_itpassed
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_tagspassed
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_saypassed
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_unsetpassed
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_reachablepassed
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_unreachablepassed
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_unsetpassed
Get queue returns none when redis url unset (no description in the source; shown from the name)test_get_queue_caches_connection_across_callspassed
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_syntaxpassed
Syntax (no description in the source; shown from the name)test_help_and_unknown_commandpassed
Help and unknown command (no description in the source; shown from the name)test_key_prints_the_linkpassed
Key prints the link (no description in the source; shown from the name)test_launch_needs_an_env_filepassed
Launch needs an env file (no description in the source; shown from the name)test_launch_plainpassed
Launch plain (no description in the source; shown from the name)test_launch_keeps_the_ollama_profile_when_env_uses_itpassed
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_apipassed
Launch ollama switches through the settings api (no description in the source; shown from the name)test_launch_ollama_leaves_embeddings_alone_when_documents_existpassed
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_unsafepassed
Launch ollama unknown row count is treated as unsafe (no description in the source; shown from the name)test_launch_ollama_when_env_already_configuredpassed
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_switchpassed
Launch ollama reports a vector size warning and a failed switch (no description in the source; shown from the name)test_stop_status_logspassed
Stop status logs (no description in the source; shown from the name)test_update_backs_up_then_pulls_then_rebuildspassed
Update backs up then pulls then rebuilds (no description in the source; shown from the name)test_update_when_already_current_changes_nothingpassed
Update when already current changes nothing (no description in the source; shown from the name)test_update_stops_when_the_backup_failspassed
Update stops when the backup fails (no description in the source; shown from the name)test_update_stops_when_the_pull_failspassed
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_acceptspassed
Add writes a grant the runner accepts (no description in the source; shown from the name)test_add_stores_the_real_path_behind_a_linkpassed
Add stores the real path behind a link (no description in the source; shown from the name)test_add_refuses_dangerous_folderspassed
Add refuses dangerous folders (no description in the source; shown from the name)test_add_refuses_missing_paths_and_plain_filespassed
Add refuses missing paths and plain files (no description in the source; shown from the name)test_add_refuses_the_install_folder_and_its_parentspassed
Add refuses the install folder and its parents (no description in the source; shown from the name)test_add_checks_names_modes_and_duplicatespassed
Add checks names modes and duplicates (no description in the source; shown from the name)test_add_expirypassed
Add expiry (no description in the source; shown from the name)test_add_warns_about_unreadable_files_and_hidden_secretspassed
Add warns about unreadable files and hidden secrets (no description in the source; shown from the name)test_a_broken_grants_file_is_never_overwrittenpassed
A broken grants file is never overwritten (no description in the source; shown from the name)test_list_remove_roundtrippassed
List remove roundtrip (no description in the source; shown from the name)test_list_marks_expired_and_invalid_entriespassed
List marks expired and invalid entries (no description in the source; shown from the name)test_off_and_on_create_and_remove_the_pause_flagpassed
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_secretspassed
Status reports the switches without printing secrets (no description in the source; shown from the name)test_the_ragleap_command_runs_the_files_helperpassed
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_onlypassed
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_imagespassed
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_gracefullypassed
Missing credentials fails gracefully (no description in the source; shown from the name)test_missing_key_secret_fails_gracefullypassed
Missing key secret fails gracefully (no description in the source; shown from the name)test_connection_successpassed
Connection success (no description in the source; shown from the name)test_razorpay_api_error_surfaces_messagepassed
Razorpay api error surfaces message (no description in the source; shown from the name)test_fetch_payments_defaultpassed
Fetch payments default (no description in the source; shown from the name)test_fetch_paginates_using_skippassed
Fetch paginates using skip (no description in the source; shown from the name)test_fetch_orders_resourcepassed
Fetch orders resource (no description in the source; shown from the name)test_unsupported_query_template_raisespassed
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_rejectionspassed
Rejection report handles no rejections (no description in the source; shown from the name)test_rejection_report_groups_and_counts_correctlypassed
Rejection report groups and counts correctly (no description in the source; shown from the name)test_rejection_report_handles_null_rolepassed
Rejection report handles null role (no description in the source; shown from the name)test_rejection_report_handles_db_error_gracefullypassed
Rejection report handles db error gracefully (no description in the source; shown from the name)test_suggest_autonomy_changes_is_explicitly_not_implementedpassed
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_defaultpassed
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_unbindpassed
Bind current and unbind (no description in the source; shown from the name)test_audit_lines_carry_the_bound_id_and_an_explicit_one_winspassed
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_formatpassed
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_itpassed
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_callspassed
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_clearpassed
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_setpassed
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_staypassed
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_neverpassed
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_settingpassed
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_nothingpassed
A dry run counts and deletes nothing (no description in the source; shown from the name)test_a_big_backlog_is_taken_in_batchespassed
A big backlog is taken in batches (no description in the source; shown from the name)test_a_purge_leaves_an_audit_log_linepassed
A purge leaves an audit log line (no description in the source; shown from the name)test_a_database_error_never_raisespassed
A database error never raises (no description in the source; shown from the name)test_the_routes_and_who_may_use_thempassed
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_boostpassed
Direct match gets graph boost (no description in the source; shown from the name)test_one_hop_indirect_match_gets_smaller_boostpassed
Neo4j -> PostgreSQL (1 hop). Doc mentions PostgreSQL, not Neo4j.test_two_hop_indirect_match_gets_smaller_boostpassed
Neo4j -> PostgreSQL -> Docker (2 hops). Doc mentions Docker only.test_direct_match_wins_over_indirect_for_same_documentpassed
A doc that is BOTH a direct match and reachable via related entitiestest_no_related_entities_falls_back_to_direct_onlypassed
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_resultspassed
If graph_service raises (e.g. Neo4j unreachable), return unboostedtest_no_vector_candidates_returns_empty_without_graph_callspassed
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_uniquepassed
Role names are unique (no description in the source; shown from the name)test_every_default_role_is_fully_definedpassed
Every default role is fully defined (no description in the source; shown from the name)test_role_choices_match_default_rolespassed
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_keyspassed
Role skill tags cover every role and have no unknown keys (no description in the source; shown from the name)test_channels_are_knownpassed
Channels are known (no description in the source; shown from the name)test_sensitive_roles_are_real_defined_rolespassed
Sensitive roles are real defined roles (no description in the source; shown from the name)test_compliance_seeds_match_sensitive_roles_and_are_well_formedpassed
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_rolepassed
Sensitive marker tags require sensitive domain role (no description in the source; shown from the name)test_guard_actually_catches_an_unguarded_rolepassed
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_orderpassed
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_safepassed
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_happenedpassed
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_twicepassed
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_limitpassed
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_plainpassed
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_fieldspassed
The run list gives the dashboard the parent fields (no description in the source; shown from the name)test_the_docs_mention_the_dashboard_viewpassed
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_defaultpassed
Computer control is off by default (no description in the source; shown from the name)test_fine_folders_can_be_grantedpassed
Fine folders can be granted (no description in the source; shown from the name)test_dangerous_or_odd_folders_are_refusedpassed
Dangerous or odd folders are refused (no description in the source; shown from the name)test_grant_fields_are_checkedpassed
Grant fields are checked (no description in the source; shown from the name)test_expired_grants_are_not_active_and_naive_times_count_as_utcpassed
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_garbagepassed
Load grants skips bad and duplicate entries and survives garbage (no description in the source; shown from the name)test_summary_never_contains_host_pathspassed
Summary never contains host paths (no description in the source; shown from the name)test_good_relative_pathspassed
Good relative paths (no description in the source; shown from the name)test_bad_relative_pathspassed
Bad relative paths (no description in the source; shown from the name)test_an_empty_path_is_only_fine_for_listpassed
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_mountpassed
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_valuespassed
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_versionpassed
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_symlinkspassed
Reader lists files and hides secrets and symlinks (no description in the source; shown from the name)test_reader_reads_text_with_a_hashpassed
Reader reads text with a hash (no description in the source; shown from the name)test_reader_truncates_big_files_and_keeps_the_answer_smallpassed
Reader truncates big files and keeps the answer small (no description in the source; shown from the name)test_reader_handles_binary_and_bad_encodingspassed
Reader handles binary and bad encodings (no description in the source; shown from the name)test_reader_refuses_protected_names_and_parent_pathspassed
Reader refuses protected names and parent paths (no description in the source; shown from the name)test_reader_refuses_symlinks_that_leave_the_folderpassed
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_folderpassed
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_folderpassed
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_operationspassed
Reader rejects wrong kinds and unknown operations (no description in the source; shown from the name)test_endpoints_need_the_tokenpassed
Endpoints need the token (no description in the source; shown from the name)test_grants_endpoint_lists_names_only_and_hides_expiredpassed
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_offpassed
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_startspassed
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_grantpassed
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_nothingpassed
Extra fields in the request change nothing (no description in the source; shown from the name)test_a_failing_read_is_reported_without_detailspassed
A failing read is reported without details (no description in the source; shown from the name)test_the_busy_lock_applies_to_file_callspassed
The busy lock applies to file calls (no description in the source; shown from the name)test_the_run_endpoint_still_needs_the_tokenpassed
The run endpoint still needs the token (no description in the source; shown from the name)test_the_disabled_flag_pauses_file_access_immediatelypassed
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_workspassed
Read works (no description in the source; shown from the name)test_list_works_and_hides_secrets_and_symlinkspassed
List works and hides secrets and symlinks (no description in the source; shown from the name)test_escapes_and_secrets_are_refusedpassed
Escapes and secrets are refused (no description in the source; shown from the name)test_the_mount_is_read_onlypassed
The mount is read only (no description in the source; shown from the name)test_the_container_has_no_networkpassed
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_mountedpassed
Sandbox is built not bind mounted (no description in the source; shown from the name)test_dockerfile_copies_the_runner_and_installs_nothingpassed
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_runnerpassed
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_volumepassed
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_stagingpassed
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_volumepassed
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_acceptspassed
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_manifestpassed
Allowed files are copied with a manifest (no description in the source; shown from the name)test_secrets_symlinks_and_other_types_are_never_stagedpassed
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_uppassed
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_gopassed
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_runpassed
The copy cap resumes on the next run (no description in the source; shown from the name)test_total_caps_mark_the_run_truncatedpassed
Total caps mark the run truncated (no description in the source; shown from the name)test_oversized_files_are_skippedpassed
Oversized files are skipped (no description in the source; shown from the name)test_a_bad_grant_name_is_refusedpassed
A bad grant name is refused (no description in the source; shown from the name)test_the_pruner_removes_staging_of_grants_that_are_gonepassed
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_switchpassed
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_prunespassed
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_prunespassed
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_stagedpassed
Use expired and unknown grants are not staged (no description in the source; shown from the name)test_extra_fields_in_the_request_change_nothingpassed
Extra fields in the request change nothing (no description in the source; shown from the name)test_failures_are_reported_without_detailspassed
Failures are reported without details (no description in the source; shown from the name)test_the_busy_lock_applies_to_stagepassed
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_onlypassed
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_themskipped
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_followedskipped
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_offpassed
Enabled by default and switch off (no description in the source; shown from the name)test_disabled_never_connectspassed
Disabled never connects (no description in the source; shown from the name)test_the_winner_keeps_one_connectionpassed
The winner keeps one connection (no description in the source; shown from the name)test_a_loser_closes_its_connection_and_retries_next_timepassed
A loser closes its connection and retries next time (no description in the source; shown from the name)test_takeover_after_the_leader_connection_diespassed
Takeover after the leader connection dies (no description in the source; shown from the name)test_connection_failure_means_not_leader_and_never_raisespassed
Connection failure means not leader and never raises (no description in the source; shown from the name)test_release_closes_the_connectionpassed
Release closes the connection (no description in the source; shown from the name)test_leader_only_runs_the_job_in_the_leader_onlypassed
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_leadpassed
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_dbpassed
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_dbpassed
Builtin non sensitive roles stay non sensitive without db (no description in the source; shown from the name)test_none_and_empty_rolepassed
None and empty role (no description in the source; shown from the name)test_runtime_role_sensitive_by_name_tokenspassed
Runtime role sensitive by name tokens (no description in the source; shown from the name)test_runtime_role_sensitive_by_tags_or_display_namepassed
Runtime role sensitive by tags or display name (no description in the source; shown from the name)test_benign_runtime_roles_and_whole_word_matchingpassed
Benign runtime roles and whole word matching (no description in the source; shown from the name)test_env_extra_forces_sensitivepassed
Env extra forces sensitive (no description in the source; shown from the name)test_env_reviewed_safe_exempts_runtime_roles_but_never_builtin_sensitivepassed
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_raisespassed
Db error falls back to name only and never raises (no description in the source; shown from the name)test_unexpected_failure_fails_closedpassed
Unexpected failure fails closed (no description in the source; shown from the name)test_markers_are_a_superset_of_the_static_guard_markerspassed
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_semipassed
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_rolepassed
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_checkpassed
Ask runtime sensitive role gets reasoning and grounding check (no description in the source; shown from the name)test_ask_benign_runtime_role_gets_neitherpassed
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_defaultpassed
Env then default (no description in the source; shown from the name)test_dashboard_wins_then_revertspassed
Dashboard wins then reverts (no description in the source; shown from the name)test_secret_encrypted_and_write_onlypassed
Secret encrypted and write only (no description in the source; shown from the name)test_secret_needs_encryption_keypassed
Secret needs encryption key (no description in the source; shown from the name)test_wrong_decrypt_key_falls_backpassed
Wrong decrypt key falls back (no description in the source; shown from the name)test_validation_rulespassed
Validation rules (no description in the source; shown from the name)test_batch_is_atomicpassed
Batch is atomic (no description in the source; shown from the name)test_database_down_falls_back_to_envpassed
Database down falls back to env (no description in the source; shown from the name)test_embedding_and_generation_read_dashboard_valuespassed
Embedding and generation read dashboard values (no description in the source; shown from the name)test_describe_flagspassed
Describe flags (no description in the source; shown from the name)test_dashboard_switches_primary_and_fallbackpassed
Dashboard switches primary and fallback (no description in the source; shown from the name)test_env_provider_still_used_without_dashboard_valuepassed
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_keypassed
Routes need the key (no description in the source; shown from the name)test_get_lists_sources_and_never_secretspassed
Get lists sources and never secrets (no description in the source; shown from the name)test_invalid_input_is_rejected_atomically_without_exception_textpassed
Invalid input is rejected atomically without exception text (no description in the source; shown from the name)test_secret_without_encryption_key_is_refusedpassed
Secret without encryption key is refused (no description in the source; shown from the name)test_blank_removes_the_dashboard_valuepassed
Blank removes the dashboard value (no description in the source; shown from the name)test_embedding_size_check_runs_only_for_embedding_provider_or_sizepassed
Embedding size check runs only for embedding provider or size (no description in the source; shown from the name)test_url_with_credentials_rejected_directlypassed
Url with credentials rejected directly (no description in the source; shown from the name)test_llm_connection_test_outcomespassed
Llm connection test outcomes (no description in the source; shown from the name)test_embedding_connection_test_outcomespassed
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_keypassed
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_dopassed
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_readypassed
Configured is ready (no description in the source; shown from the name)test_dashboard_settings_count_as_configuredpassed
Dashboard settings count as configured (no description in the source; shown from the name)test_no_secret_or_target_ever_appearspassed
No secret or target ever appears (no description in the source; shown from the name)test_vector_mismatch_blocks_ready_and_resizable_does_notpassed
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_errorpassed
A failing check never raises and never leaks the error (no description in the source; shown from the name)test_autonomy_and_approval_ping_casespassed
Autonomy and approval ping cases (no description in the source; shown from the name)test_tools_and_sandboxpassed
Tools and sandbox (no description in the source; shown from the name)test_reachable_helperpassed
Reachable helper (no description in the source; shown from the name)test_budgets_and_throttlepassed
Budgets and throttle (no description in the source; shown from the name)test_telegram_item_reports_yes_no_onlypassed
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_workingpassed
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_refusedpassed
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_outpassed
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_onpassed
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_countspassed
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_workingpassed
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_oncepassed
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_independentpassed
Flags are independent (no description in the source; shown from the name)test_run_shell_request_shapepassed
Run shell request shape (no description in the source; shown from the name)test_run_shell_refusals_make_no_http_callpassed
Run shell refusals make no http call (no description in the source; shown from the name)test_run_shell_errors_never_raisepassed
Run shell errors never raise (no description in the source; shown from the name)test_existing_run_code_labels_unchangedpassed
Existing run code labels unchanged (no description in the source; shown from the name)test_run_shell_listed_only_when_shell_enabledpassed
Run shell listed only when shell enabled (no description in the source; shown from the name)test_validate_plan_run_shellpassed
Validate plan run shell (no description in the source; shown from the name)test_shell_spec_same_lockdown_command_only_in_envpassed
Shell spec same lockdown command only in env (no description in the source; shown from the name)test_default_mode_is_still_pythonpassed
Default mode is still python (no description in the source; shown from the name)test_http_routes_shell_and_code_to_right_modepassed
Http routes shell and code to right mode (no description in the source; shown from the name)test_http_rejects_ambiguous_or_bad_bodiespassed
Http rejects ambiguous or bad bodies (no description in the source; shown from the name)test_send_via_channel_shell_dispatchespassed
Send via channel shell dispatches (no description in the source; shown from the name)test_full_mode_runs_immediatelypassed
Full mode runs immediately (no description in the source; shown from the name)test_semi_mode_pends_then_yes_runspassed
Semi mode pends then yes runs (no description in the source; shown from the name)test_sensitive_role_forced_to_semipassed
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_gracefullypassed
Missing token fails gracefully (no description in the source; shown from the name)test_connection_successpassed
Connection success (no description in the source; shown from the name)test_slack_api_error_surfaces_messagepassed
Slack api error surfaces message (no description in the source; shown from the name)test_fetch_channels_defaultpassed
Fetch channels default (no description in the source; shown from the name)test_fetch_userspassed
Fetch users (no description in the source; shown from the name)test_fetch_messages_requires_channel_idpassed
Fetch messages requires channel id (no description in the source; shown from the name)test_fetch_messages_filters_by_userpassed
Fetch messages filters by user (no description in the source; shown from the name)test_unsupported_query_template_raisespassed
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_gracefullypassed
Missing connection string fails gracefully (no description in the source; shown from the name)test_invalid_json_fails_gracefullypassed
Invalid json fails gracefully (no description in the source; shown from the name)test_missing_required_keys_fails_gracefullypassed
Missing required keys fails gracefully (no description in the source; shown from the name)test_connection_successpassed
Connection success (no description in the source; shown from the name)test_fetch_data_requires_query_templatepassed
Fetch data requires query template (no description in the source; shown from the name)test_fetch_data_maps_columnspassed
Fetch data maps columns (no description in the source; shown from the name)test_fetch_data_substitutes_user_identifierpassed
Fetch data substitutes user identifier (no description in the source; shown from the name)test_connection_failure_surfaces_messagepassed
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_offpassed
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_dopassed
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_keypassed
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_safepassed
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_matterpassed
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_messagepassed
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_expirespassed
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_sessionpassed
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_requiredpassed
The second factor rule can be required (no description in the source; shown from the name)test_too_many_pending_sign_ins_are_refusedpassed
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_disabledpassed
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_ownerpassed
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_refusedpassed
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_raisespassed
A session lookup never raises (no description in the source; shown from the name)test_only_the_owner_manages_identities_and_sessionspassed
Only the owner manages identities and sessions (no description in the source; shown from the name)test_bad_input_to_the_identity_routespassed
Bad input to the identity routes (no description in the source; shown from the name)test_revoking_all_sessions_of_a_person_ends_thempassed
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_toopassed
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_workpassed
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_codepassed
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_existspassed
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_coveredpassed
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_placespassed
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_helppassed
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_waitpassed
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_messagepassed
The callback sends the person back with a message (no description in the source; shown from the name)test_login_and_callback_have_separate_budgetspassed
Login and callback have separate budgets (no description in the source; shown from the name)test_a_switched_off_sso_does_not_use_the_budgetpassed
A switched off sso does not use the budget (no description in the source; shown from the name)test_the_switch_and_the_settingpassed
The switch and the setting (no description in the source; shown from the name)test_one_audit_line_per_client_and_minutepassed
One audit line per client and minute (no description in the source; shown from the name)test_the_number_of_tracked_clients_is_boundedpassed
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_offpassed
Nothing runs when autonomy is off (no description in the source; shown from the name)test_semi_mode_never_executes_without_approvalpassed
Semi mode never executes without approval (no description in the source; shown from the name)test_attacker_targets_are_refused_in_every_modepassed
Attacker targets are refused in every mode (no description in the source; shown from the name)test_taint_rule_holds_after_a_poisoned_pagepassed
Taint rule holds after a poisoned page (no description in the source; shown from the name)test_harness_leaves_no_rows_behindpassed
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_modepassed
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_purposepassed
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_actionpassed
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_cappassed
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_middlepassed
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_guardrailspassed
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_itpassed
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_executedpassed
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_goodpassed
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_usepassed
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_instructionpassed
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_instructionpassed
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_callspassed
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_itpassed
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_replypassed
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_proposedpassed
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_injectionpassed
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_toolpassed
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_failedpassed
The report flags a control that failed (no description in the source; shown from the name)test_the_report_confirms_a_working_controlpassed
The report confirms a working control (no description in the source; shown from the name)test_the_pause_waits_before_every_call_after_the_firstpassed
The pause waits before every call after the first (no description in the source; shown from the name)test_run_real_passes_the_pause_onpassed
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_refusedpassed
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_runspassed
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_clampedpassed
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_parentpassed
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_itselfpassed
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_existspassed
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_childpassed
Bad delegations create no child (no description in the source; shown from the name)test_the_number_of_children_is_limitedpassed
The number of children is limited (no description in the source; shown from the name)test_the_same_delegation_twice_is_refusedpassed
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_approvalpassed
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_contentpassed
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_outsidepassed
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_holdpassed
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_parentpassed
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_onpassed
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_resumespassed
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_parentpassed
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_onpassed
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_treepassed
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_workingpassed
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_startedpassed
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_childpassed
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_limitspassed
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_rolepassed
Llm pick valid role (no description in the source; shown from the name)test_reply_with_extra_words_still_parsedpassed
Reply with extra words still parsed (no description in the source; shown from the name)test_untrusted_cannot_reach_internal_role_and_prompt_hides_itpassed
Untrusted cannot reach internal role and prompt hides it (no description in the source; shown from the name)test_untrusted_cannot_reach_sensitive_rolepassed
Untrusted cannot reach sensitive role (no description in the source; shown from the name)test_trusted_can_reach_internal_and_sensitive_rolespassed
Trusted can reach internal and sensitive roles (no description in the source; shown from the name)test_empty_reply_retried_with_bigger_budgetpassed
Empty reply retried with bigger budget (no description in the source; shown from the name)test_provider_failure_falls_back_to_keywordpassed
Provider failure falls back to keyword (no description in the source; shown from the name)test_provider_failure_no_keyword_uses_channel_defaultpassed
Provider failure no keyword uses channel default (no description in the source; shown from the name)test_garbage_reply_falls_backpassed
Garbage reply falls back (no description in the source; shown from the name)test_list_roles_failure_never_raisespassed
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_skillpassed
Successful sync records learned skill (no description in the source; shown from the name)test_failed_sync_records_learned_skill_with_errorpassed
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_learnpassed
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_callspassed
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_methodpassed
Every route the tabs call exists with that method (no description in the source; shown from the name)test_lock_forgets_the_new_formspassed
Lock forgets the new forms (no description in the source; shown from the name)test_dashboard_script_still_parses_with_nodepassed
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_defaultpassed
Documents taint a run by default (no description in the source; shown from the name)test_no_documents_no_taintpassed
No documents no taint (no description in the source; shown from the name)test_the_taint_can_be_turned_offpassed
The taint can be turned off (no description in the source; shown from the name)test_run_action_passes_force_semi_to_the_gatepassed
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_documentspassed
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_toolspassed
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_minimalpassed
Create task minimal (no description in the source; shown from the name)test_create_task_requires_titlepassed
Create task requires title (no description in the source; shown from the name)test_create_task_rejects_bad_statuspassed
Create task rejects bad status (no description in the source; shown from the name)test_create_task_rejects_bad_prioritypassed
Create task rejects bad priority (no description in the source; shown from the name)test_create_task_rejects_unknown_rolepassed
Create task rejects unknown role (no description in the source; shown from the name)test_create_task_rejects_oversized_titlepassed
Create task rejects oversized title (no description in the source; shown from the name)test_get_task_roundtrippassed
Get task roundtrip (no description in the source; shown from the name)test_get_task_missing_returns_nonepassed
Get task missing returns none (no description in the source; shown from the name)test_update_task_statuspassed
Update task status (no description in the source; shown from the name)test_update_task_result_and_donepassed
Update task result and done (no description in the source; shown from the name)test_update_task_missing_returns_nonepassed
Update task missing returns none (no description in the source; shown from the name)test_update_task_rejects_bad_statuspassed
Update task rejects bad status (no description in the source; shown from the name)test_list_tasks_filters_by_statuspassed
List tasks filters by status (no description in the source; shown from the name)test_subtask_parent_linkpassed
Subtask parent link (no description in the source; shown from the name)test_create_task_rejects_unknown_parentpassed
Create task rejects unknown parent (no description in the source; shown from the name)test_send_via_channel_task_creates_a_real_taskpassed
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_safepassed
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_defaultpassed
Available tools excludes task tools by default (no description in the source; shown from the name)test_available_tools_includes_create_task_when_enabledpassed
Available tools includes create task when enabled (no description in the source; shown from the name)test_available_tools_includes_notify_owner_when_owner_configuredpassed
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_ownerpassed
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_rolepassed
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_cappedpassed
Parse subtasks valid and capped (no description in the source; shown from the name)test_parse_subtasks_garbage_returns_emptypassed
Parse subtasks garbage returns empty (no description in the source; shown from the name)test_split_empty_reply_retried_with_bigger_budgetpassed
Split empty reply retried with bigger budget (no description in the source; shown from the name)test_split_failure_returns_emptypassed
Split failure returns empty (no description in the source; shown from the name)test_run_team_happy_pathpassed
Run team happy path (no description in the source; shown from the name)test_run_team_trusted_flag_passed_throughpassed
Run team trusted flag passed through (no description in the source; shown from the name)test_single_subtask_falls_back_to_one_normal_askpassed
Single subtask falls back to one normal ask (no description in the source; shown from the name)test_split_failure_falls_back_to_single_answerpassed
Split failure falls back to single answer (no description in the source; shown from the name)test_failed_sub_answer_falls_back_to_single_answerpassed
Failed sub answer falls back to single answer (no description in the source; shown from the name)test_merge_failure_joins_answers_and_keeps_notespassed
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_encodingspassed
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_500passed
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_500passed
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_unchangedpassed
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_matchpassed
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_ownerpassed
Registry has escalate to owner (no description in the source; shown from the name)test_escalate_to_owner_parameters_schema_presentpassed
Escalate to owner parameters schema present (no description in the source; shown from the name)test_escalate_to_owner_returns_none_when_no_escalation_detectedpassed
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_skipspassed
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_pendingpassed
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_accumulatespassed
Fresh state accumulates (no description in the source; shown from the name)test_overlapping_window_does_not_double_countpassed
Overlapping window does not double count (no description in the source; shown from the name)test_old_dates_are_trimmed_to_max_keptpassed
Old dates are trimmed to max kept (no description in the source; shown from the name)test_missing_count_field_defaults_to_zero_not_crashpassed
Missing count field defaults to zero not crash (no description in the source; shown from the name)test_empty_clones_list_is_a_nooppassed
Empty clones list is a noop (no description in the source; shown from the name)test_format_message_thresholdspassed
Format message thresholds (no description in the source; shown from the name)test_load_state_missing_file_returns_defaultspassed
Load state missing file returns defaults (no description in the source; shown from the name)test_load_state_fills_missing_keyspassed
Load state fills missing keys (no description in the source; shown from the name)test_write_badge_roundtrippassed
Write badge roundtrip (no description in the source; shown from the name)test_write_state_roundtrippassed
Write state roundtrip (no description in the source; shown from the name)test_main_without_token_is_a_graceful_nooppassed
Main without token is a graceful noop (no description in the source; shown from the name)test_main_writes_badge_and_state_on_successpassed
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_crashpassed
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_emptypassed
Load state missing file returns empty (no description in the source; shown from the name)test_save_and_load_state_roundtrippassed
Save and load state roundtrip (no description in the source; shown from the name)test_skips_language_already_up_to_datepassed
Skips language already up to date (no description in the source; shown from the name)test_translates_missing_language_and_updates_statepassed
Translates missing language and updates state (no description in the source; shown from the name)test_quota_exhaustion_exits_zero_not_onepassed
Quota exhaustion exits zero not one (no description in the source; shown from the name)test_real_failure_exits_onepassed
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_timezonepassed
Next run respects the timezone (no description in the source; shown from the name)test_weekday_numbers_follow_standard_cronpassed
Weekday numbers follow standard cron (no description in the source; shown from the name)test_weekday_normalisationpassed
Weekday normalisation (no description in the source; shown from the name)test_too_frequent_is_rejectedpassed
Too frequent is rejected (no description in the source; shown from the name)test_reasonable_schedules_are_acceptedpassed
Reasonable schedules are accepted (no description in the source; shown from the name)test_invalid_cron_or_timezone_is_rejectedpassed
Invalid cron or timezone is rejected (no description in the source; shown from the name)test_create_cron_trigger_is_scheduled_for_laterpassed
Create cron trigger is scheduled for later (no description in the source; shown from the name)test_interval_triggers_are_unchangedpassed
Interval triggers are unchanged (no description in the source; shown from the name)test_need_exactly_one_schedulepassed
Need exactly one schedule (no description in the source; shown from the name)test_database_enforces_one_schedulepassed
Database enforces one schedule (no description in the source; shown from the name)test_switch_interval_to_cron_and_backpassed
Switch interval to cron and back (no description in the source; shown from the name)test_changing_the_timezone_reschedulespassed
Changing the timezone reschedules (no description in the source; shown from the name)test_update_validationpassed
Update validation (no description in the source; shown from the name)test_claim_moves_a_cron_trigger_to_its_next_slotpassed
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_runspassed
Downtime does not cause a burst of runs (no description in the source; shown from the name)test_corrupted_cron_does_not_refire_every_minutepassed
Corrupted cron does not refire every minute (no description in the source; shown from the name)test_routes_accept_cronpassed
Routes accept cron (no description in the source; shown from the name)test_gap_check_samples_distinct_fire_timespassed
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_trippassed
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_chatpassed
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_formatpassed
Whatsapp numbers are matched in every usual format (no description in the source; shown from the name)test_one_chat_belongs_to_one_personpassed
One chat belongs to one person (no description in the source; shown from the name)test_bad_input_and_unknown_or_disabled_people_are_refusedpassed
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_chatpassed
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_linkspassed
Removing a person removes their links (no description in the source; shown from the name)test_the_lookup_never_raisespassed
The lookup never raises (no description in the source; shown from the name)test_a_linked_operator_can_approve_and_is_recorded_by_namepassed
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_approvepassed
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_nobodypassed
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_beforepassed
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_apipassed
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_storedpassed
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_elsepassed
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_databasepassed
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_oncepassed
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_keypassed
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_oncepassed
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_timepassed
A found key is remembered for a short time (no description in the source; shown from the name)test_last_use_is_recordedpassed
Last use is recorded (no description in the source; shown from the name)test_a_database_problem_means_unknown_key_not_an_errorpassed
A database problem means unknown key not an error (no description in the source; shown from the name)test_bad_input_is_refusedpassed
Bad input is refused (no description in the source; shown from the name)test_two_people_cannot_share_a_name_even_in_another_casepassed
Two people cannot share a name even in another case (no description in the source; shown from the name)test_ids_must_be_idspassed
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_openpassed
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_mepassed
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_apipassed
The owner makes people and keys through the api (no description in the source; shown from the name)test_the_user_routes_pass_refusals_throughpassed
The user routes pass refusals through (no description in the source; shown from the name)test_each_role_gets_exactly_its_doorspassed
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_peoplepassed
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_settingspassed
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_keypassed
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_keypassed
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_nooppassed
Equal is noop (no description in the source; shown from the name)test_empty_table_is_resizedpassed
Empty table is resized (no description in the source; shown from the name)test_rows_block_changepassed
Rows block change (no description in the source; shown from the name)test_big_dims_no_indexpassed
Big dims no index (no description in the source; shown from the name)test_invalid_and_missingpassed
Invalid and missing (no description in the source; shown from the name)test_status_is_read_only_and_reports_each_casepassed
Status is read only and reports each case (no description in the source; shown from the name)test_status_missing_tablepassed
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_refusedpassed
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_setpassed
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_callpassed
A missing or wrong token never becomes a call (no description in the source; shown from the name)test_the_right_token_opens_a_callpassed
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_checkpassed
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_awaypassed
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_endedpassed
A call that runs too long is ended (no description in the source; shown from the name)test_an_oversized_message_closes_the_connectionpassed
An oversized message closes the connection (no description in the source; shown from the name)test_the_limits_have_sane_boundspassed
The limits have sane bounds (no description in the source; shown from the name)test_the_token_is_compared_in_constant_time_and_never_loggedpassed
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_tokenpassed
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_memorypassed
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_tokenpassed
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_configuredpassed
VOICE_STT_PROVIDER=deepgram (env through config) must call Deepgram and never OpenAI.test_stt_keeps_openai_for_whisper_providerpassed
The recognized default provider keeps the OpenAI STT; Deepgram is never touched.test_stt_keeps_openai_when_provider_unsetpassed
No VOICE_STT_PROVIDER at all behaves exactly like the whisper default.test_stt_keeps_openai_for_unrecognized_providerpassed
Anything unrecognized (not deepgram) must keep the existing OpenAI behavior.test_tts_dispatches_to_elevenlabs_when_configuredpassed
VOICE_TTS_PROVIDER=elevenlabs (env through config) must call ElevenLabs and never OpenAI.test_tts_keeps_openai_for_openai_providerpassed
The recognized default provider keeps the OpenAI TTS; ElevenLabs is never touched.test_tts_keeps_openai_when_provider_unsetpassed
No VOICE_TTS_PROVIDER at all behaves exactly like the openai default.test_tts_keeps_openai_for_unrecognized_providerpassed
Anything unrecognized (not elevenlabs) must keep the existing OpenAI behavior.test_deepgram_success_posts_listen_and_parses_transcriptpassed
Success posts to the listen endpoint with the documented call shape and parses the transcript.test_deepgram_strips_surrounding_whitespacepassed
The transcript is stripped like the OpenAI sibling returns it.test_deepgram_missing_key_sends_no_requestpassed
Deepgram missing key sends no request (no description in the source; shown from the name)test_deepgram_http_error_returns_emptypassed
Deepgram http error returns empty (no description in the source; shown from the name)test_deepgram_request_exception_returns_emptypassed
Deepgram request exception returns empty (no description in the source; shown from the name)test_deepgram_empty_transcript_returns_empty_stringpassed
Deepgram empty transcript returns empty string (no description in the source; shown from the name)test_deepgram_malformed_shape_returns_empty_stringpassed
Deepgram malformed shape returns empty string (no description in the source; shown from the name)test_elevenlabs_success_posts_voice_in_pathpassed
Success posts to the convert endpoint with the voice id in the path and returns the audio bytes.test_elevenlabs_missing_key_sends_no_requestpassed
Elevenlabs missing key sends no request (no description in the source; shown from the name)test_elevenlabs_http_error_returns_empty_bytespassed
Elevenlabs http error returns empty bytes (no description in the source; shown from the name)test_elevenlabs_request_exception_returns_empty_bytespassed
Elevenlabs request exception returns empty bytes (no description in the source; shown from the name)test_elevenlabs_empty_text_still_posts_and_returns_contentpassed
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_triggerspassed
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_triggerspassed
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_utterancepassed
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_utterancepassed
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_payloadpassed
Kill MP3, rate, endian, A-law, double conversion and partial-sample regressions.test_speak_reply_requests_twilio_compatible_formatpassed
Kill MP3 requests and a dropped or body-only ElevenLabs output_format.test_speak_reply_skips_empty_or_failed_ttspassed
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_providerpassed
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_tokenpassed
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_numberspassed
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_requestpassed
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_failurepassed
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_tokenpassed
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_tokenpassed
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_subscribepassed
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_tokenpassed
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_tokenpassed
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_credentialspassed
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_shapepassed
Meta signature matches the documented hmac shape (no description in the source; shown from the name)test_meta_signature_rejects_a_wrong_or_malformed_signaturepassed
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_secretpassed
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_credentialspassed
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_processedpassed
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_processingpassed
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_processingpassed
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_processingpassed
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_outpassed
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_outpassed
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_outpassed
WHATSAPP_ALLOW_UNSIGNED covers missing signatures only: a present buttest_webhook_post_ignores_non_text_and_status_only_payloadspassed
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_shapepassed
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_gracefullypassed
Missing store url fails gracefully (no description in the source; shown from the name)test_missing_credentials_fails_gracefullypassed
Missing credentials fails gracefully (no description in the source; shown from the name)test_connection_successpassed
Connection success (no description in the source; shown from the name)test_woocommerce_api_error_surfaces_messagepassed
Woocommerce api error surfaces message (no description in the source; shown from the name)test_fetch_orders_defaultpassed
Fetch orders default (no description in the source; shown from the name)test_fetch_paginates_using_page_parampassed
Fetch paginates using page param (no description in the source; shown from the name)test_fetch_products_resourcepassed
Fetch products resource (no description in the source; shown from the name)test_unsupported_query_template_raisespassed
Unsupported query template raises (no description in the source; shown from the name)