{
  "file": "F18-settings-and-secrets.md",
  "bullet": "Rejected PATCH bodies (`F18.patch-validation`).",
  "ids": [
    "F18.patch-validation"
  ],
  "line": 389,
  "script": "control-agent-server api PATCH /api/settings --json '{}' --expect 400 --check detail contains 'At least one of' --save F18.patch-validation/empty\ncontrol-agent-server api PATCH /api/settings --json '{\"qa_typo\": 1}' --expect 400 --save F18.patch-validation/unknown-key\ncontrol-agent-server api PATCH /api/settings --json '{\"agent_settings_diff\": {\"llm\": {\"temperature\": \"hot\", \"api_key\": \"<redacted:api_key>\"}}}' \\\n  --expect 422 --check detail eq 'Settings validation failed' --check . not-contains <redacted:api_key> --save F18.patch-validation/bad-type\ncontrol-agent-server api PATCH /api/settings --json '{\"agent_settings_diff\": \"qa-not-an-object\"}' --expect 422\ncontrol-agent-server api PATCH /api/settings --json '{\"active_profile\": \"bad name!\"}' --expect 422 --save F18.patch-validation/bad-profile-name\ncontrol-agent-server api PATCH /api/settings --json '{\"active_agent_profile_id\": \"not-a-uuid\"}' --expect 422\ncontrol-agent-server api PATCH /api/settings --json '{\"active_meta_profile\": \"bad/name\"}' --expect 422\ncontrol-agent-server api GET /api/settings --header 'X-Expose-Secrets: plaintext' --check agent_settings.llm.api_key eq \"$QA_F18_LLM_KEY\" \\\n  --check agent_settings.llm.temperature missing --check active_profile missing --check active_agent_profile_id missing --check active_meta_profile missing\n",
  "exit_code": 0,
  "elapsed_ms": 7269,
  "failed_line": null,
  "failed_command": null,
  "stdout": "{\n  \"ok\": true,\n  \"status\": 400,\n  \"request\": {\n    \"method\": \"PATCH\",\n    \"path\": \"/api/settings\",\n    \"query\": [],\n    \"auth\": \"header\",\n    \"body\": {},\n    \"files\": []\n  },\n  \"response\": {\n    \"status\": 400,\n    \"headers\": {\n      \"content-length\": \"178\",\n      \"content-type\": \"application/json\"\n    },\n    \"body\": {\n      \"detail\": \"At least one of agent_settings_diff, conversation_settings_diff, misc_settings_diff, active_profile, active_agent_profile_id, or active_meta_profile must be provided\"\n    },\n    \"truncated\": false\n  },\n  \"elapsed_ms\": 110,\n  \"checks\": [\n    {\n      \"check\": \"detail contains At least one of\",\n      \"ok\": true,\n      \"actual\": \"At least one of agent_settings_diff, conversation_settings_diff, misc_settings_diff, active_profile, active_agent_profile_id, or active_meta_profile must be provided\"\n    }\n  ],\n  \"saved\": \"/workspace/verification-artifacts/runs/20261013-021811-ba26-map-f18/evidence/F18.patch-validation/empty.json\"\n}\n{\n  \"ok\": true,\n  \"status\": 400,\n  \"request\": {\n    \"method\": \"PATCH\",\n    \"path\": \"/api/settings\",\n    \"query\": [],\n    \"auth\": \"header\",\n    \"body\": {\n      \"qa_typo\": 1\n    },\n    \"files\": []\n  },\n  \"response\": {\n    \"status\": 400,\n    \"headers\": {\n      \"content-length\": \"178\",\n      \"content-type\": \"application/json\"\n    },\n    \"body\": {\n      \"detail\": \"At least one of agent_settings_diff, conversation_settings_diff, misc_settings_diff, active_profile, active_agent_profile_id, or active_meta_profile must be provided\"\n    },\n    \"truncated\": false\n  },\n  \"elapsed_ms\": 169,\n  \"saved\": \"/workspace/verification-artifacts/runs/20261013-021811-ba26-map-f18/evidence/F18.patch-validation/unknown-key.json\"\n}\n{\n  \"ok\": true,\n  \"status\": 422,\n  \"request\": {\n    \"method\": \"PATCH\",\n    \"path\": \"/api/settings\",\n    \"query\": [],\n    \"auth\": \"header\",\n    \"body\": {\n      \"agent_settings_diff\": {\n        \"llm\": {\n          \"temperature\": \"hot\",\n          \"api_key\": \"<redacted:api_key>\"\n        }\n      }\n    },\n    \"files\": []\n  },\n  \"response\": {\n    \"status\": 422,\n    \"headers\": {\n      \"content-length\": \"39\",\n      \"content-type\": \"application/json\"\n    },\n    \"body\": {\n      \"detail\": \"Settings validation failed\"\n    },\n    \"truncated\": false\n  },\n  \"elapsed_ms\": 189,\n  \"checks\": [\n    {\n      \"check\": \"detail eq Settings validation failed\",\n      \"ok\": true,\n      \"actual\": \"Settings validation failed\"\n    },\n    {\n      \"check\": \". not-contains <redacted:api_key>\",\n      \"ok\": true,\n      \"actual\": \"{\\\"detail\\\": \\\"Settings validation failed\\\"}\"\n    }\n  ],\n  \"saved\": \"/workspace/verification-artifacts/runs/20261013-021811-ba26-map-f18/evidence/F18.patch-validation/bad-type.json\"\n}\n{\n  \"ok\": true,\n  \"status\": 422,\n  \"request\": {\n    \"method\": \"PATCH\",\n    \"path\": \"/api/settings\",\n    \"query\": [],\n    \"auth\": \"header\",\n    \"body\": {\n      \"agent_settings_diff\": \"qa-not-an-object\"\n    },\n    \"files\": []\n  },\n  \"response\": {\n    \"status\": 422,\n    \"headers\": {\n      \"content-length\": \"140\",\n      \"content-type\": \"application/json\"\n    },\n    \"body\": {\n      \"detail\": [\n        {\n          \"type\": \"dict_type\",\n          \"loc\": [\n            \"body\",\n            \"agent_settings_diff\"\n          ],\n          \"msg\": \"Input should be a valid dictionary\",\n          \"input\": \"qa-not-an-object\"\n        }\n      ]\n    },\n    \"truncated\": false\n  },\n  \"elapsed_ms\": 88\n}\n{\n  \"ok\": true,\n  \"status\": 422,\n  \"request\": {\n    \"method\": \"PATCH\",\n    \"path\": \"/api/settings\",\n    \"query\": [],\n    \"auth\": \"header\",\n    \"body\": {\n      \"active_profile\": \"bad name!\"\n    },\n    \"files\": []\n  },\n  \"response\": {\n    \"status\": 422,\n    \"headers\": {\n      \"content-length\": \"225\",\n      \"content-type\": \"application/json\"\n    },\n    \"body\": {\n      \"detail\": [\n        {\n          \"type\": \"string_pattern_mismatch\",\n          \"loc\": [\n            \"body\",\n            \"active_profile\"\n          ],\n          \"msg\": \"String should match pattern '^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$'\",\n          \"input\": \"bad name!\",\n          \"ctx\": {\n            \"pattern\": \"^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$\"\n          }\n        }\n      ]\n    },\n    \"truncated\": false\n  },\n  \"elapsed_ms\": 96,\n  \"saved\": \"/workspace/verification-artifacts/runs/20261013-021811-ba26-map-f18/evidence/F18.patch-validation/bad-profile-name.json\"\n}\n{\n  \"ok\": true,\n  \"status\": 422,\n  \"request\": {\n    \"method\": \"PATCH\",\n    \"path\": \"/api/settings\",\n    \"query\": [],\n    \"auth\": \"header\",\n    \"body\": {\n      \"active_agent_profile_id\": \"not-a-uuid\"\n    },\n    \"files\": []\n  },\n  \"response\": {\n    \"status\": 422,\n    \"headers\": {\n      \"content-length\": \"323\",\n      \"content-type\": \"application/json\"\n    },\n    \"body\": {\n      \"detail\": [\n        {\n          \"type\": \"string_pattern_mismatch\",\n          \"loc\": [\n            \"body\",\n            \"active_agent_profile_id\"\n          ],\n          \"msg\": \"String should match pattern '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'\",\n          \"input\": \"not-a-uuid\",\n          \"ctx\": {\n            \"pattern\": \"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\"\n          }\n        }\n      ]\n    },\n    \"truncated\": false\n  },\n  \"elapsed_ms\": 153\n}\n{\n  \"ok\": true,\n  \"status\": 422,\n  \"request\": {\n    \"method\": \"PATCH\",\n    \"path\": \"/api/settings\",\n    \"query\": [],\n    \"auth\": \"header\",\n    \"body\": {\n      \"active_meta_profile\": \"bad/name\"\n    },\n    \"files\": []\n  },\n  \"response\": {\n    \"status\": 422,\n    \"headers\": {\n      \"content-length\": \"229\",\n      \"content-type\": \"application/json\"\n    },\n    \"body\": {\n      \"detail\": [\n        {\n          \"type\": \"string_pattern_mismatch\",\n          \"loc\": [\n            \"body\",\n            \"active_meta_profile\"\n          ],\n          \"msg\": \"String should match pattern '^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$'\",\n          \"input\": \"bad/name\",\n          \"ctx\": {\n            \"pattern\": \"^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$\"\n          }\n        }\n      ]\n    },\n    \"truncated\": false\n  },\n  \"elapsed_ms\": 205\n}\n{\n  \"ok\": true,\n  \"status\": 200,\n  \"request\": {\n    \"method\": \"GET\",\n    \"path\": \"/api/settings\",\n    \"query\": [],\n    \"auth\": \"header\",\n    \"body\": null,\n    \"files\": []\n  },\n  \"response\": {\n    \"status\": 200,\n    \"headers\": {\n      \"content-length\": \"2722\",\n      \"content-type\": \"application/json\"\n    },\n    \"body\": {\n      \"agent_settings\": {\n        \"schema_version\": 8,\n        \"agent_kind\": \"openhands\",\n        \"agent\": \"CodeActAgent\",\n        \"llm\": {\n          \"model\": \"openai/qa-f18-model\",\n          \"api_key\": \"<redacted:api_key>\",\n          \"provider_connection_id\": null,\n          \"auth_type\": \"api_key\",\n          \"subscription_vendor\": null,\n          \"base_url\": null,\n          \"api_version\": null,\n          \"aws_access_key_id\": null,\n          \"aws_secret_access_key\": null,\n          \"aws_session_token\": null,\n          \"aws_region_name\": null,\n          \"aws_profile_name\": null,\n          \"aws_role_name\": null,\n          \"aws_session_name\": null,\n          \"aws_bedrock_runtime_endpoint\": null,\n          \"openrouter_site_url\": \"https://docs.all-hands.dev/\",\n          \"openrouter_app_name\": \"OpenHands\",\n          \"num_retries\": 5,\n          \"retry_multiplier\": 8.0,\n          \"retry_min_wait\": 8,\n          \"retry_max_wait\": 64,\n          \"timeout\": 300,\n          \"stream_idle_timeout\": 300.0,\n          \"max_message_chars\": 30000,\n          \"temperature\": null,\n          \"top_p\": null,\n          \"top_k\": null,\n          \"max_input_tokens\": null,\n          \"max_output_tokens\": null,\n          \"model_canonical_name\": null,\n          \"api_mode\": \"auto\",\n          \"capability_overrides\": {},\n          \"extra_headers\": null,\n          \"input_cost_per_token\": null,\n          \"output_cost_per_token\": null,\n          \"ollama_base_url\": null,\n          \"stream\": false,\n          \"drop_params\": true,\n          \"disable_vision\": null,\n          \"disable_stop_word\": false,\n          \"caching_prompt\": true,\n          \"log_completions\": false,\n          \"log_completions_folder\": \"logs/completions\",\n          \"custom_tokenizer\": null,\n          \"native_tool_calling\": true,\n          \"force_string_serializer\": null,\n          \"inline_image_urls\": null,\n          \"reasoning_effort\": \"high\",\n          \"reasoning_summary\": null,\n          \"enable_encrypted_reasoning\": true,\n          \"prompt_cache_retention\": \"24h\",\n          \"extended_thinking_budget\": 200000,\n          \"seed\": null,\n          \"usage_id\": \"default\",\n          \"litellm_extra_body\": {},\n          \"is_subscription\": false\n        },\n        \"tools\": null,\n        \"enable_classify_and_switch_llm_tool\": false,\n        \"active_meta_profile\": null,\n        \"meta_profile\": null,\n        \"meta_profile_llms\": {},\n        \"tool_concurrency_limit\": 1,\n        \"mcp_config\": {},\n        \"persona\": null,\n        \"agent_context\": {\n          \"skills\": [],\n          \"system_message_suffix\": null,\n          \"user_message_suffix\": null,\n          \"load_user_skills\": false,\n          \"load_public_skills\": false,\n          \"marketplace_path\": \"marketplaces/default.json\",\n          \"registered_marketplaces\": [],\n          \"load_project_skills\": false,\n          \"load_memory\": false,\n          \"disabled_skills\": [],\n          \"secrets\": null,\n          \"current_datetime\": \"2026-10-13T02:18:33.975626Z\"\n        },\n        \"condenser\": {\n          \"condenser_kind\": \"llm_summarizing\",\n          \"enabled\": true,\n          \"max_size\": 240,\n          \"max_tokens\": null,\n          \"keep_first\": 2,\n          \"minimum_progress\": 0.1,\n          \"hard_context_reset_max_retries\": 5,\n          \"hard_context_reset_context_scaling\": 0.8\n        },\n        \"verification\": {\n          \"critic_enabled\": false,\n          \"critic_mode\": \"finish_and_message\",\n          \"enable_iterative_refinement\": false,\n          \"critic_threshold\": 0.6,\n          \"max_refinement_iterations\": 3,\n          \"critic_server_url\": null,\n          \"critic_model_name\": null,\n          \"critic_api_key\": null\n        }\n      },\n      \"conversation_settings\": {\n        \"schema_version\": 1,\n        \"max_iterations\": 77,\n        \"confirmation_mode\": true,\n        \"security_analyzer\": \"llm\"\n      },\n      \"llm_api_key_is_set\": true,\n      \"active_profile\": null,\n      \"active_agent_profile_id\": null,\n      \"active_meta_profile\": null,\n      \"misc_settings\": {\n        \"qa_f18\": null\n      }\n    },\n    \"truncated\": false\n  },\n  \"elapsed_ms\": 130,\n  \"checks\": [\n    {\n      \"check\": \"agent_settings.llm.api_key eq <redacted:api_key>\",\n      \"ok\": true,\n      \"actual\": \"<redacted:api_key>\"\n    },\n    {\n      \"check\": \"agent_settings.llm.temperature missing\",\n      \"ok\": true,\n      \"actual\": \"null\"\n    },\n    {\n      \"check\": \"active_profile missing\",\n      \"ok\": true,\n      \"actual\": \"null\"\n    },\n    {\n      \"check\": \"active_agent_profile_id missing\",\n      \"ok\": true,\n      \"actual\": \"null\"\n    },\n    {\n      \"check\": \"active_meta_profile missing\",\n      \"ok\": true,\n      \"actual\": \"null\"\n    }\n  ]\n}\n",
  "stderr": ""
}
