MCPcopy Create free account

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

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

Methodtest_groq_ainvoke_structured
Test structured output from Groq
chapter9/browser-use-rpa/browser-use/browser_use/llm/tests/test_chat_models.py:205
Methodtest_grounded_claims_pass
A claim whose tokens appear in a prior tool result is grounded.
tests/test_ch8_trajectory_consistency_checker.py:39
Methodtest_grounded_claims_pass
A claim whose tokens appear in a prior tool result is grounded.
tests/test_ch9_trajectory_consistency_checker.py:39
Methodtest_guard_dangerous_action
Test guarding a potentially dangerous action.
chapter4/collaboration-tools/test_intelligence_tools.py:118
Methodtest_guard_safe_action
Test guarding a safe action.
chapter4/collaboration-tools/test_intelligence_tools.py:102
Functiontest_guest_cannot_modify_task
(pm_store, project_admin, guest)
chapter5/permission-embedded-data-objects/tests/test_scenarios.py:278
Methodtest_hallucinated_results_detected
claimed_tool_result differing from tool_result is hallucinated.
tests/test_ch8_trajectory_consistency_checker.py:148
Methodtest_hallucinated_results_detected
claimed_tool_result differing from tool_result is hallucinated.
tests/test_ch9_trajectory_consistency_checker.py:148
Functiontest_hallucination_is_an_unconditional_veto
()
chapter3/user-memory-evaluation/test_structured_rubric.py:45
Functiontest_handle_barge_in_entrypoint
Verify direct invocation of handle_barge_in entrypoint.
tests/test_ch6_interruption_manager.py:96
Functiontest_handle_barge_in_entrypoint
Verify direct invocation of handle_barge_in entrypoint.
tests/test_ch9_interruption_manager.py:96
Functiontest_handoff_rejection_is_recorded_as_vendor_error
(monkeypatch)
chapter5/provider-failover/tests/test_offline.py:241
Methodtest_harakat_do_not_force_an_extra_wrapped_line
(self)
book-ar/test_svg_lib.py:11
Functiontest_hash_item_dict_different_key_value_pairs
Reassigning values across keys must change dictionary identity.
chapter2/prompt-engineering/test_hash_item_dict_collision.py:42
Functiontest_hash_item_dict_different_values
Different values under one key must not share a canonical identity.
chapter2/prompt-engineering/test_hash_item_dict_collision.py:35
Functiontest_hash_item_dict_distinguishes_heterogeneous_key_types
Textually similar keys of different types must not collide.
chapter2/prompt-engineering/test_hash_item_dict_collision.py:95
Functiontest_hash_item_dict_heterogeneous_keys_is_order_independent
Mixed key types must normalize independently of insertion order.
chapter2/prompt-engineering/test_hash_item_dict_collision.py:56
Functiontest_hash_item_dict_nested_different_values
Differences in recursively nested values must remain observable.
chapter2/prompt-engineering/test_hash_item_dict_collision.py:49
Functiontest_hash_item_preserves_container_type
List/tuple, set/tuple, and dict/tuple inputs must remain distinct.
chapter2/prompt-engineering/test_hash_item_dict_collision.py:108
Functiontest_hash_item_set_same_repr_members_is_order_independent
Equal sets normalize identically when member sort identities collide.
chapter2/prompt-engineering/test_hash_item_dict_collision.py:84
Methodtest_head_limit
Test head_limit parameter
chapter5/coding-agent/tests/test_grep_tool.py:147
Functiontest_head_limit_one_still_caps
(system_state, sample_files)
chapter5/coding-agent/tests/test_grep_head_limit_zero.py:19
Functiontest_head_limit_zero_files_with_matches
(system_state, sample_files)
chapter5/coding-agent/tests/test_grep_head_limit_zero.py:4
Functiontest_headings_ignore_code_and_strip_inline_markup
(tmp_path)
tests/test_homepage_index.py:52
Functiontest_heuristic_quality_judge_string_expression_issues
Contract: HeuristicQualityJudge supports string items in quality_facts.expression_issues without throwing AttributeError.
tests/test_ch8_verifier_string_expression_issues.py:9
Functiontest_heuristic_quality_judge_string_expression_issues
Contract: HeuristicQualityJudge supports string items in quality_facts.expression_issues without throwing AttributeError.
tests/test_ch9_verifier_string_expression_issues.py:9
Methodtest_hidden_files_excluded
Test that hidden files (starting with .) are excluded
chapter5/coding-agent/tests/test_ls_tool.py:49
Functiontest_hidden_result_contract_follows_the_configured_style
()
chapter1/context/test_experiment_1_1.py:229
Functiontest_hidden_test_reward_pass_after_fix
修复工作区里的 bug 后宣称完成,隐藏测试通过应得 +1。
chapter8/premature-completion-dpo/test_pipeline.py:191
Functiontest_hidden_test_reward_scoring
()
chapter8/premature-completion-dpo/test_pipeline.py:184
Functiontest_hidden_tests_structure
()
chapter8/premature-completion-dpo/test_pipeline.py:174
Functiontest_hidden_tool_results_leave_the_model_with_no_observations
()
chapter1/context/test_grounding.py:42
Methodtest_high_risk_calls_are_flagged
(self)
chapter9/harness-safety-gate/test_evolution.py:71
Functiontest_high_risk_confirmation_gate
()
tests/test_ch8_safety_policy_gate.py:93
Functiontest_high_risk_confirmation_gate
()
tests/test_ch9_safety_policy_gate.py:93
Functiontest_high_risk_git_force_push
()
tests/test_ch8_safety_policy_gate.py:120
Functiontest_high_risk_git_force_push
()
tests/test_ch9_safety_policy_gate.py:120
Functiontest_high_risk_sql_query
()
tests/test_ch8_safety_policy_gate.py:133
Functiontest_high_risk_sql_query
()
tests/test_ch9_safety_policy_gate.py:133
Functiontest_hiring_manager_cannot_modify_candidate
(hiring_store, recruiter, hiring_manager, system_ctx)
chapter5/permission-embedded-data-objects/tests/test_scenarios.py:114
Functiontest_historical_report_parser_retains_complete_six_cell_matrix
()
chapter8/MiniMind-pretrain/validation/test_training_report_audit.py:25
Functiontest_history_limit_zero_omits_history
()
chapter3/contextual-retrieval/test_history_limit_zero.py:7
Functiontest_history_limit_zero_omits_history
()
chapter3/agentic-rag/test_history_limit_zero.py:8
Functiontest_hitl_human_approval_before_timeout
Test Human-in-the-Loop decision approval submitted before timeout.
tests/test_ch4_notification_dispatcher.py:40
Functiontest_hitl_human_rejection_before_timeout
Test Human-in-the-Loop decision rejection submitted before timeout.
tests/test_ch4_notification_dispatcher.py:77
Functiontest_hitl_timeout_fallback_auto_approve
Test HITL timeout triggering auto-approve fallback policy.
tests/test_ch4_notification_dispatcher.py:107
Functiontest_hitl_timeout_fallback_auto_reject
Test HITL timeout triggering auto-reject fallback policy.
tests/test_ch4_notification_dispatcher.py:126
Functiontest_hitl_timeout_fallback_escalate
Test HITL timeout triggering escalation fallback policy and escalation notification.
tests/test_ch4_notification_dispatcher.py:145
Functiontest_human_role_is_actually_randomized_by_the_shared_shuffle
()
chapter10/voice-werewolf/test_live_human.py:91
Functiontest_hybrid_requires_at_least_one_core_card
()
chapter7/user-memory-system-evaluation/test_experiment.py:155
Functiontest_hybrid_resident_context_contains_only_explicit_core_cards
()
chapter7/user-memory-system-evaluation/test_experiment.py:147
Functiontest_identical_timestamps_return_one_slice
Two battles at the same unix second (weekly interval) -> one slice.
chapter7/elo-leaderboard/tests/test_time_slices_short_span.py:17
Methodtest_ignore_null_lists_directory
JSON null ignore must not break listing (agent omits optional array).
chapter5/coding-agent/tests/test_ls_tool.py:200
Methodtest_ignore_patterns
Test ignore parameter with glob patterns
chapter5/coding-agent/tests/test_ls_tool.py:70
Methodtest_image_file_handling
Test image file handling
chapter5/coding-agent/tests/test_read_tool.py:120
Functiontest_image_tag_is_kept_verbatim_including_extra_attributes
()
tests/test_mkdocs_figure_captions.py:70
Methodtest_incomplete_prefix_has_no_replacement_char
(self)
chapter2/attention_visualization/test_token_labels.py:76
Functiontest_independent_asean_reference_is_kuala_lumpur_singapore
()
chapter1/search-codegen/test_responses_agent.py:100
Functiontest_index_graphrag_data_none_id_fallback
Verify items with explicit id=None fall back to entity_id/relation_id/community_id.
tests/test_ch3_hybrid_structured_retriever.py:260
Functiontest_index_raptor_nodes_id_zero
Verify node ID 0 is not dropped during index_raptor_nodes.
tests/test_ch3_hybrid_structured_retriever.py:242
Methodtest_individual_parameters_no_browser
Test action with individual parameters, no special injection
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:119
Methodtest_individual_parameters_with_browser
Test action with individual parameters plus browser_session injection
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:133
Functiontest_inference_requires_loaded_model
()
chapter6/end-to-end-speech/tests/test_speech_model.py:14
Functiontest_infinite_loop_page_blocking
Test that pages with infinite JavaScript loops are detected as unresponsive.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_watchdog_crash.py:184
Methodtest_init
Test CloudSync initialization.
chapter9/browser-use-rpa/browser-use/tests/ci/test_sync_client_auth.py:319
Methodtest_init_creates_config_dir
Test that initialization creates config directory.
chapter9/browser-use-rpa/browser-use/tests/ci/test_sync_client_auth.py:50
Methodtest_init_with_default_generates_random_secret
(self)
chapter9/harness-safety-gate/test_safety_policy_gate.py:118
Methodtest_init_with_env_var
(self)
chapter9/harness-safety-gate/test_safety_policy_gate.py:113
Methodtest_init_with_parameter
(self)
chapter9/harness-safety-gate/test_safety_policy_gate.py:108
Functiontest_initial_dispatch_timeout_does_not_block_hitl_timeout
Regression: a slow initial dispatch must not prevent the HITL timeout. The initial dispatch_all() is bounded by the same deadline as the HITL
tests/test_ch4_notification_dispatcher.py:736
Functiontest_initial_rating
Test that models start with initial rating.
chapter7/elo-leaderboard/tests/test_elo.py:15
Functiontest_initialize_sandbox_isolated_and_hashed
(tmp_path: Path)
chapter2/system-hint/test_experiment_2_8.py:48
Functiontest_injection_attack_dataclass_defaults
()
tests/test_ch2_prompt_injection_robustness.py:49
Methodtest_inline_element_mostly_offscreen
Test clicking an inline element that's mostly outside the viewport.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_event_ClickElementEvent.py:359
Functiontest_inline_images_and_images_without_alt_are_left_alone
()
tests/test_mkdocs_figure_captions.py:92
Methodtest_input
(params: InputTextAction, browser_session: BrowserSession)
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:497
Methodtest_insert_at_beginning
Test inserting at beginning when cell_id not specified
chapter5/coding-agent/tests/test_notebook_edit_tool.py:107
Methodtest_insert_cell
Test edit_mode=insert
chapter5/coding-agent/tests/test_notebook_edit_tool.py:68
Methodtest_insert_file_content
Test inserting content into file.
chapter4/execution-tools/test_terminal_controller.py:145
Functiontest_instrumentation_executes_only_the_configured_action_prefix
()
chapter7/openvla-robotwin2-eval/test_experiment.py:58
Functiontest_integer_ids_and_children_type_safety
Verify integer children and entity_ids do not raise TypeError during citation building.
tests/test_ch3_hybrid_structured_retriever.py:183
Methodtest_interactive_human_failure_is_not_mislabeled_as_blocked
(self)
chapter4/collaboration-tools/test_run_experiment_4_5.py:133
Methodtest_internal_urls_allowed_even_when_prohibited
Internal new-tab/blank URLs are always allowed regardless of prohibited list.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_watchdog_security2.py:361
Functiontest_introduction_overview_figure_uses_current_chapter_numbers
fig0-1 must agree with fig0-2 on where each chapter sits. The figure was corrected in #1111 (issue #1079); this locks the 2.0 numbering in so
tests/test_chapter_numbering_consistency.py:176
Functiontest_introduction_uses_two_parts_and_current_chapter_numbers
()
tests/test_chapter_numbering_consistency.py:76
Functiontest_invalid_configuration_fails_closed
(values: dict[str, str], message: str)
chapter6/computer-use-open-model/tests/test_config.py:41
Methodtest_invalid_notebook_format
Test error with invalid JSON notebook
chapter5/coding-agent/tests/test_notebook_edit_tool.py:190
Methodtest_invalid_parameters
Test handling of invalid parameters
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:419
Functiontest_invalid_priority
(pm_store, project_admin, member)
chapter5/permission-embedded-data-objects/tests/test_scenarios.py:234
Methodtest_invalid_regex
Test invalid regex pattern
chapter5/coding-agent/tests/test_grep_tool.py:204
Functiontest_invalid_status_transition
(hiring_store, recruiter, system_ctx)
chapter5/permission-embedded-data-objects/tests/test_scenarios.py:76
Functiontest_invalid_task_item_validation
Regression test: invalid task item raises ValueError.
tests/test_ch9_hermes_downstream_ablation.py:210
Functiontest_invalid_task_item_validation
Regression test: invalid task item raises ValueError.
tests/test_ch8_hermes_downstream_ablation.py:210
Functiontest_invalid_task_transition
(pm_store, project_admin, member)
chapter5/permission-embedded-data-objects/tests/test_scenarios.py:215
Functiontest_invalid_trajectory_type_raises
()
tests/test_ch6_cost_efficiency_analyzer.py:459
Functiontest_invalid_trajectory_type_raises
()
tests/test_ch7_cost_efficiency_analyzer.py:459
Methodtest_invalid_values_use_default
(self)
chapter7/model-action-threshold/tasks/localized_timeout/repo/tests/test_config.py:13
Methodtest_invented_receipt_fails
(self)
chapter6/astra-async-steering/test_judging.py:60
Methodtest_invented_receipt_fails
(self)
chapter6/astra-async-steering/validation/runs/exp6-14-20260905-formal/source/test_judging.py:60
Functiontest_inventory_timeout_uses_cache_within_deadline
(order_service: str)
chapter5/log-diagnosis/test_campaign_orchestrator.py:43
← previousnext →11,201–11,300 of 13,003, ranked by callers