MCPcopy Create free account

hub / github.com/bojieli/ai-agent-book / functions

Functions13,003 in github.com/bojieli/ai-agent-book

Functiontest_replace_sensitive_data_with_missing_keys
Test that _replace_sensitive_data handles missing keys gracefully
chapter9/browser-use-rpa/browser-use/tests/ci/test_agent_sensitive_data.py:40
Methodtest_replacement_and_update_activation_are_separate_metrics
(self)
chapter9/self-evolution-eval/test_longitudinal.py:36
Functiontest_replay_preserves_retrieved_choices_and_adds_only_distractors
(task)
chapter4/active-tool-discovery/test_selection_ablation.py:12
Functiontest_report_dataclass_defaults
()
tests/test_ch8_sft_data_auditor.py:350
Functiontest_report_dataclass_defaults
()
tests/test_ch7_sft_data_auditor.py:350
Functiontest_report_dataclass_shape
()
tests/test_ch6_cost_efficiency_analyzer.py:464
Functiontest_report_dataclass_shape
()
tests/test_ch7_cost_efficiency_analyzer.py:464
Functiontest_report_issues_non_dict
()
chapter10/book-translation/tests/test_proofread_non_dict.py:11
Functiontest_report_labels_historical_and_hypothetical_numbers
()
chapter7/android-world/test_experiment.py:327
Functiontest_report_skips_non_object_json_and_keeps_valid_runs
(tmp_path, unrelated_json)
tests/test_ch2_kv_cache_offline_report.py:16
Functiontest_reporting_environment_call_null_arguments
JSON null tool arguments should behave like an empty object.
chapter7/public-health-reporting-eval/tests/test_blank_csv_int.py:64
Functiontest_representative_retained_runs_use_current_identifiers
()
tests/test_chapter_numbering_consistency.py:150
Functiontest_reproduction_contract_separates_original_and_improved_sources
()
chapter8/MiniMind-pretrain/validation/test_vlm_training_report_audit.py:62
Functiontest_reproduction_pin_tampering_fails_even_after_resealing
(tmp_path)
chapter8/MiniMind-pretrain/validation/test_vlm_training_report_audit.py:153
Functiontest_request_uses_official_responses_tool_shapes
()
chapter1/search-codegen/test_responses_agent.py:13
Functiontest_required_611_cells_excludes_only_preflight_failures
()
chapter7/user-memory-system-evaluation/test_run_full.py:76
Functiontest_required_nonpassing_record_refuses_with_exact_evidence
()
chapter5/agent-creator/reference_agent/tests/test_domain_policy.py:28
Functiontest_reroute_keeps_an_unmapped_model_id
Falling back for credential reasons must not change which model runs. A reader who named a native model and has only an OpenRouter key should see
tests/test_providers.py:751
Functiontest_resend_is_judged_on_its_own_output_others_on_the_splice
()
chapter5/provider-failover/tests/test_offline.py:201
Functiontest_reset
Test that reset clears all data.
chapter7/elo-leaderboard/tests/test_elo.py:152
Methodtest_reset_during_game
Test resetting the board during a game.
chapter4/collaboration-tools/test_chess_tools.py:475
Functiontest_resolve_backend_whitespace_model_uses_default
()
tests/test_resolve_backend_whitespace_model.py:4
Functiontest_resolve_gemini_model_handles_null_models
Ensure _resolve_gemini_model returns default model without TypeError when models key is None.
chapter7/tts-quality-eval/tests/test_resolve_gemini_model_null.py:12
Functiontest_resolve_negative_layer
()
chapter2/attention_visualization/test_attention_experiment.py:6
Functiontest_resolved_backend_aliases_real_endpoint_for_generated_agents
()
chapter5/agent-creator/test_creator.py:228
Functiontest_resource_limit_exceeded
()
tests/test_ch8_safety_policy_gate.py:72
Functiontest_resource_limit_exceeded
()
tests/test_ch9_safety_policy_gate.py:72
Methodtest_restored_timer_resumes_count_and_persists_completion
(self)
chapter4/collaboration-tools/test_timer_tools.py:106
Functiontest_result_verifier_tolerates_null_and_invalid_fields
Contract: ResultVerifier safely handles None, non-dict, empty dict, or nested null expected_outcome and final_state. Locks out AttributeError ('N
chapter9/trajectory-verifier/test_verifier_null_fields.py:55
Functiontest_results_merged_by_score_not_source
Verify results are ranked by score, not interleaved by source type (Finding 1).
tests/test_ch3_hybrid_structured_retriever.py:303
Functiontest_resume_cursor_is_the_one_next_to_the_newest_star
Contract: the next run resumes after the newest star, whichever shard happened to hold it.
tests/test_gen_star_history_iso_formats.py:152
Functiontest_resume_rejects_changed_configuration
()
chapter7/android-world/test_experiment.py:382
Functiontest_resume_rejects_changed_pair_seed
()
chapter7/android-world/test_experiment.py:427
Functiontest_retained_2026_07_29_campaign_is_explicitly_legacy_evidence
The old receipt must not be mistaken for SDK v2/current-protocol proof.
chapter4/perception-tools/test_real_experiment_4_2_evidence.py:51
Methodtest_retained_human_decision_redacts_free_form_notes
(self)
chapter4/collaboration-tools/test_run_experiment_4_5.py:90
Methodtest_retained_publication_authorization_matches_accepted_mcp_result
(self)
chapter4/collaboration-tools/test_run_experiment_4_5.py:150
Functiontest_retention_does_not_count_query_words
Regression: evaluate_retention must only check expected_answer, not query fallback. Old code used query words when no expected_answer was given, i
tests/test_ch2_benchmark_compression.py:150
Functiontest_retention_uses_expected_answer_only
Regression: retention scoring uses expected_answer words, not query words.
tests/test_ch2_benchmark_compression.py:161
Functiontest_retrieval_metrics_use_source_selected_gold
()
chapter7/user-memory-system-evaluation/test_experiment.py:139
Methodtest_retrieve_background_output
Test retrieving output from background job
chapter5/coding-agent/tests/test_bash_output_tool.py:16
Functiontest_retro_compatibility_does_not_hide_other_sqlite_errors
()
chapter7/android-world/test_experiment.py:64
Functiontest_retro_missing_queue_schema_becomes_empty_observation
()
chapter7/android-world/test_experiment.py:57
Methodtest_review_route_excludes_risky_case_from_learning
(self)
chapter9/trajectory-verifier/test_real_campaign.py:18
Functiontest_revise_bounds_null_start_keeps_current
修正区间为 null/缺失时维持当前值,正常数值仍生效。
chapter5/video-edit/test_agents_llm_json.py:44
Functiontest_risk_distribution_keys_complete
risk_distribution always has all four levels, even when some are zero.
tests/test_ch5_sandbox_evaluator.py:210
Functiontest_rl_agent_evaluate_zero_episodes
()
tests/test_ch1_learning_agents_empty_eval_windows.py:18
Functiontest_rl_evaluate_zero_episodes_no_zero_division
()
chapter1/learning-from-experience/tests/test_zero_episodes.py:23
Functiontest_rl_train_zero_episodes_no_zero_division
()
chapter1/learning-from-experience/tests/test_zero_episodes.py:17
Functiontest_rls_cross_org_no_query_params_enforced
Regression test: verify cross-tenant read is denied even without query_params.
tests/test_ch5_pedo_live_security_eval.py:186
Functiontest_robustness_report_defaults
()
tests/test_ch2_prompt_injection_robustness.py:56
Methodtest_rollback_failed_violation_type
(self)
chapter9/harness-safety-gate/test_safety_policy_gate.py:230
Methodtest_root_cause_targets_dispatch_layer
(self)
chapter9/harness-safety-gate/test_evolution.py:57
Functiontest_rounding_is_not_fabrication_but_a_third_of_a_percent_is
()
chapter1/context/test_grounding.py:37
Functiontest_row_level_security_enforcement
Test evaluating row-level security boundaries for authorized vs cross-tenant access.
tests/test_ch5_pedo_live_security_eval.py:66
Functiontest_rrf_scoring_order_and_fusion
Verify Reciprocal Rank Fusion combines RAPTOR and GraphRAG rankings.
tests/test_ch3_hybrid_structured_retriever.py:77
Functiontest_rtl_helpers_use_requested_language_and_keep_code_ltr
()
tests/test_flatten_epub_toc.py:120
Functiontest_run_ablation_campaign_custom_agents_and_tasks
Test running ablation campaign with custom baseline/evolved agents and task list.
tests/test_ch9_hermes_downstream_ablation.py:65
Functiontest_run_ablation_campaign_custom_agents_and_tasks
Test running ablation campaign with custom baseline/evolved agents and task list.
tests/test_ch8_hermes_downstream_ablation.py:65
Functiontest_run_ablation_campaign_defaults
Test running ablation campaign with default sample agents and task suite.
tests/test_ch9_hermes_downstream_ablation.py:42
Functiontest_run_ablation_campaign_defaults
Test running ablation campaign with default sample agents and task suite.
tests/test_ch8_hermes_downstream_ablation.py:42
Functiontest_run_benchmark_entrypoint
()
tests/test_ch2_benchmark_compression.py:96
Functiontest_run_benchmark_single_context_and_task
()
tests/test_ch2_benchmark_compression.py:129
Functiontest_run_command_reports_missing_bash_instead_of_raising
(monkeypatch)
chapter4/execution-tools/test_bash_lookup.py:46
Functiontest_run_custom_fn_missing_fields_non_dict_and_none_backoff
Findings #1/#7: run() must not crash on records missing fields, non-dict records, or None backoff. Regression: the pre-fix code used ``r["ttft_se
tests/test_ch7_rate_ramp_benchmark.py:216
Functiontest_run_custom_fn_missing_fields_non_dict_and_none_backoff
Findings #1/#7: run() must not crash on records missing fields, non-dict records, or None backoff. Regression: the pre-fix code used ``r["ttft_se
tests/test_ch6_rate_ramp_benchmark.py:216
Functiontest_run_evaluation_empty_dataset
()
tests/test_ch7_evaluate_multilingual.py:146
Functiontest_run_evaluation_empty_dataset
()
tests/test_ch8_evaluate_multilingual.py:146
Functiontest_run_evaluation_end_to_end
()
tests/test_ch7_evaluate_multilingual.py:113
Functiontest_run_evaluation_end_to_end
()
tests/test_ch8_evaluate_multilingual.py:113
Functiontest_run_group_resume_archives_and_retries_one_incomplete_attempt
(tmp_path)
chapter4/active-tool-discovery/test_exact_experiment.py:127
Functiontest_run_group_resume_refuses_third_real_attempt
(tmp_path)
chapter4/active-tool-discovery/test_exact_experiment.py:170
Functiontest_run_group_resume_reuses_only_compatible_receipt
(tmp_path)
chapter4/active-tool-discovery/test_exact_experiment.py:103
Functiontest_run_skill_script_rejects_absolute_path
run_skill_script executes the file, so it must stay inside scripts/.
chapter2/agent-skills-ppt/tests/test_dispatch.py:48
Functiontest_run_skill_script_rejects_parent_traversal
(tmp_path)
chapter2/agent-skills-ppt/tests/test_dispatch.py:58
Functiontest_run_step_summary_backoff_only_counts_throttled
Finding #4: ramp_steps avg_backoff counts only 429 requests. Regression: the pre-fix run() step summary averaged every record with backoff_se
tests/test_ch7_rate_ramp_benchmark.py:197
Functiontest_run_step_summary_backoff_only_counts_throttled
Finding #4: ramp_steps avg_backoff counts only 429 requests. Regression: the pre-fix run() step summary averaged every record with backoff_se
tests/test_ch6_rate_ramp_benchmark.py:197
Functiontest_runcrate_base_url_override
(monkeypatch)
tests/test_providers.py:253
Functiontest_runcrate_keeps_model_ids_unchanged
(monkeypatch)
tests/test_providers.py:248
Functiontest_runcrate_key_uses_runcrate_endpoint_directly
(monkeypatch)
tests/test_providers.py:238
Functiontest_runner_creates_movement_directory_after_fork
()
chapter10/generative-agents/tests/test_campaign_storage.py:9
Methodtest_runner_requires_accelerator_by_default
(self)
chapter6/xlerobot-teleoperation/test_validator.py:30
Functiontest_runtime_guard_blocks_injected_target_but_allows_user_target
(tmp_path: Path)
chapter2/prompt-injection/test_campaign.py:30
Functiontest_safe_code_no_risk_patterns
Pure arithmetic with no I/O is classified safe with no patterns.
tests/test_ch5_sandbox_evaluator.py:57
Functiontest_safe_code_recommendation_adequate
Safe code yields a single 'configuration adequate' recommendation.
tests/test_ch5_sandbox_evaluator.py:64
Functiontest_safe_files_accepts_direct_allowlisted_mapping_and_structured_json
()
chapter5/agent-creator/test_creator.py:193
Functiontest_safe_files_accepts_one_known_wrapper_without_relaxing_paths
(wrapper: str)
chapter5/agent-creator/test_creator.py:207
Functiontest_safe_files_does_not_treat_arbitrary_payload_as_file_mapping
()
chapter5/agent-creator/test_creator.py:220
Methodtest_safe_path_rejects_escape
(self)
chapter7/model-action-threshold/tests/test_experiment.py:16
Functiontest_salary_out_of_range
(hiring_store, recruiter, system_ctx)
chapter5/permission-embedded-data-objects/tests/test_scenarios.py:102
Functiontest_same_tenant_read_and_create_with_inferred_org
(store)
tests/test_ch5_pedo_tenant_isolation.py:104
Methodtest_same_turn_tool_success_does_not_ground_the_claim
Tool execution cannot retroactively support text emitted with its call.
chapter9/trajectory-verifier/test_claim_action_order.py:64
Functiontest_same_user_same_assistant_not_near_duplicate
()
tests/test_ch8_sft_data_auditor.py:186
Functiontest_same_user_same_assistant_not_near_duplicate
()
tests/test_ch7_sft_data_auditor.py:186
Methodtest_save_and_load_credentials
Test saving and loading credentials.
chapter9/browser-use-rpa/browser-use/tests/ci/test_sync_client_auth.py:64
Functiontest_save_checkpoint_creates_nested_directories
Ensure save_checkpoint automatically creates parent directories when saving.
chapter6/async-agent/test_checkpoint_robustness.py:18
Methodtest_save_conversation_path
Test saving conversation with different path types.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_session_output_paths.py:145
Methodtest_save_extracted_content
Test saving extracted content with auto-numbering.
chapter9/browser-use-rpa/browser-use/tests/ci/test_filesystem.py:479
Functiontest_save_history_with_empty_history_dir
CONVERSATION_HISTORY_DIR='' makes history_file a bare filename; save must persist.
chapter3/user-memory/test_makedirs_bare_filename.py:36
Functiontest_save_memory_with_empty_storage_dir
MEMORY_STORAGE_DIR='' makes memory_file a bare filename; save must persist.
chapter3/user-memory/test_makedirs_bare_filename.py:26
Functiontest_save_trajectory_default_params_no_nameerror
(tmp_path, monkeypatch)
chapter2/attention_visualization/test_save_trajectory.py:48
← previousnext →12,201–12,300 of 13,003, ranked by callers