Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions loop_apidoc/validate/coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ def check_manifest_coverage(

issue code 一律用 SOURCE_UNVERIFIED;location 用來源 relative_path
(§6 穩定來源識別碼)。修正循環會將之分類為 UNFIXABLE。

訊息一律繁體中文:validation 報告是產品輸出,依 AGENTS.md 的語言政策屬 zh-TW
那一側(英文是教學/推廣文件的語言)。這裡曾經三筆中文、一筆英文,同一份報告
因此以兩種語言對 operator 說話。新增檢查時沿用中文,不要各寫各的。
"""
issues: list[Issue] = []
for source in manifest.unreadable():
Expand Down Expand Up @@ -69,10 +73,10 @@ def check_manifest_coverage(
code=IssueCode.SOURCE_UNVERIFIED,
severity=Severity.WARNING,
location=document_id,
evidence="source has no material citation in provenance",
evidence="來源在 provenance 中沒有任何實質引用",
suggested_fix=(
"Re-read the source and cite its material claims, or explicitly "
"exclude it when it is not API evidence."
"重讀這份來源並引用它的實質主張;"
"若它不是 API 證據,請明確排除。"
),
)
)
Expand Down
2 changes: 1 addition & 1 deletion tests/validate/test_coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def test_supported_source_without_material_citation_is_warning() -> None:
assert issues[0].code is IssueCode.SOURCE_UNVERIFIED
assert issues[0].severity is Severity.WARNING
assert issues[0].location == "codes.pdf"
assert "material citation" in issues[0].evidence
assert "實質引用" in issues[0].evidence


def test_successful_standalone_url_without_material_citation_is_warning() -> None:
Expand Down