From 264533324bd99b35ae882d9c10e84b2e3c82c175 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9B=90=E7=B2=92=20Yanli?= Date: Wed, 29 Apr 2026 03:38:50 +0800 Subject: [PATCH] update AGENTS.md --- dify-agent/AGENTS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/dify-agent/AGENTS.md b/dify-agent/AGENTS.md index 44b71fbbe4..035eb46f6f 100644 --- a/dify-agent/AGENTS.md +++ b/dify-agent/AGENTS.md @@ -137,6 +137,7 @@ class Example: - documented invariants, error mapping, and output/input shape guarantees - When asserting dependency interactions, assert only the parts of the request or response that are part of the real boundary contract. Do not over-specify incidental details that callers or dependencies do not rely on. - It is acceptable to mock dependencies in unit tests, but only when the mock represents a real contract, schema, documented behavior, or known regression. +- Tests may use line-scoped type-ignore comments when intentionally exercising runtime validation paths that static typing would normally reject. Keep the ignore on the exact invalid call. - Do not use unit tests to prove real integration, network wiring, serialization, framework configuration, or third-party runtime behavior; cover those in higher-level tests. - Meaningless unit tests include: - tests that only mirror the current implementation or must be updated whenever internal code changes even though the contract did not change