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
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ Per-code severity and the structured-routing fields (`target_file`/`field_path`/

- Python `>=3.11`, managed with `uv` (no `pip`). Deps: typer, pydantic v2, httpx, pyyaml, openapi-spec-validator, jsonschema, pymupdf.
- Prefer immutable patterns (return new values; pure functions outside the I/O modules above).
- The skill file `skills/loop-apidoc/SKILL.md` is written in **English** (token economy); generated *product* output remains `zh-TW`.
- The skill file `skills/loop-apidoc/SKILL.md` is written in **English** (token economy); generated *product* output remains `zh-TW`. Validation issue text (`evidence`, `suggested_fix`, `fix_once`) is product output, so it is `zh-TW` too — one report must not address the operator in two languages, which is what happened while `validate/coverage.py` and `validate/response_contract.py` each chose their own.
- Docsentry governs the selected Markdown documents in `.docsentry.json`: it checks local links and documented package scripts against checked-in evidence. It does not validate HTML manuals, external URLs, prose style, translations, or generated run output.
- **Documentation language policy (for wider adoption/promotion):** teaching, promotion, and reference docs are **English-primary, Traditional-Chinese-secondary** — write the canonical copy in English so the project reaches the broadest audience, and provide zh-TW as the supporting/localized layer (e.g. `README.md` zh-TW ↔ `README.en.md` English). This applies to the human-facing docs listed under "Release: keep teaching & promotion docs in sync". The only content that stays `zh-TW`-first is *generated product output* (the `api-guide.zh-TW.md` guide and other run artifacts).

Expand Down
6 changes: 3 additions & 3 deletions loop_apidoc/validate/response_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ def analyze_response_contracts(openapi: dict) -> ResponseContractAnalysis:
code=IssueCode.REQUIRED_INFO_MISSING,
severity=Severity.WARNING,
location=location,
evidence="successful response has no usable schema contract",
evidence="成功 response 沒有可用的 schema 契約",
suggested_fix=(
"Re-read the endpoint response envelope and record its schema; "
"when the source is silent, keep this delivery gap visible."
"重讀這個端點的回應封包並記下它的 schema"
"若來源確實未載明,就讓這個交付缺口留在報告裡。"
),
target_file="endpoints/",
field_path="responses",
Expand Down
4 changes: 1 addition & 3 deletions tests/validate/test_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@ def test_hollow_success_response_warns_at_operation_boundary():
if issue.location == "paths./users.get" and issue.field_path == "responses"
]
assert len(response_warnings) == 1
assert response_warnings[0].evidence == (
"successful response has no usable schema contract"
)
assert response_warnings[0].evidence == "成功 response 沒有可用的 schema 契約"


def test_missing_method_makes_report_not_ok():
Expand Down