Test files: 51. Test functions: 580. Described by their authors (docstring or @DisplayName): 27. Where there is no description, the line shows the test name in words and says so.
Latest result: core-tests passed 755 passed, 0 skipped, 0 failed CI job
test_action_fallback.py — 9 tests 9 passed, 0 failed, 0 skipped
Tests for actions.call_with_fallback: the planner and the agent loop survive a busy provider (retry once, then the LLM_FALLBACK_PROVIDERS chain). Fake service; no network.
test_retries_the_same_provider_once_then_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 — 19 tests 19 passed, 0 failed, 0 skipped
Tests for core/action_senders.py: no network, DNS/HTTP/SMTP mocked.
test_webhook_unknown_target_fails_without_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_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_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_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_sender.py — 18 tests 18 passed, 0 failed, 0 skipped
Approval sender check and webhook fail-closed behaviour. No network: settings, senders and signatures mocked.
test_owner_matches_configured_channel_and_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_autonomy.py — 14 tests 14 passed, 0 failed, 0 skipped
Tests for core/autonomy.py - the single-tenant Autonomous Loop. Requires a Postgres DB with db/schema.sql applied, reachable via the DATABASE_URL env var (same convention as core/employees/_db.py).
test_default_settings_are_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 exactly
test_autonomy_inbox.py — 7 tests 7 passed, 0 failed, 0 skipped
Tests for the approval inbox: autonomy.list_pending / resolve_pending and the /autonomy/pending routes. Approve and reject go through process_approval_response, the same path as a chat "YES/NO <id>" reply. No LLM or network; sending is stubbed.
test_list_shows_full_content_newest_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_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 — 21 tests 21 passed, 0 failed, 0 skipped
Tests for core/chat.py's ask() - specifically its wiring to core.observability.record_trace() (item #2 of the 9-pattern agentic-architecture build). No prior test file covered core.chat.ask() at all before this.
test_ask_records_a_trace_on_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_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_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_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_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_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_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_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_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_filespassed
Exempt paths are exactly the page files (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_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_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_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_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_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_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_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_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_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_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_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_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_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)