Skip to content

docs(api): api-review daily audit 2026-09-01 — localize english text in ZH specs (336 ops, zero surface change) - #333

Merged
ysyneu merged 1 commit into
mainfrom
api-review/20260901082637
Sep 1, 2026
Merged

docs(api): api-review daily audit 2026-09-01 — localize english text in ZH specs (336 ops, zero surface change)#333
ysyneu merged 1 commit into
mainfrom
api-review/20260901082637

Conversation

@flashduty

@flashduty flashduty Bot commented Sep 1, 2026

Copy link
Copy Markdown

api-review daily audit — 2026-09-01 (UTC)

Mode: --mode generate --scope all --auto (equivalent to /api-review --mode generate --scope all --auto)
Registry source: fc-pgy/logic/api/api_test.go @ a21dfb3 (2026-09-01 13:26 +0800), 926 rows parsed
Docs baseline: main @ e50f58f

Operation surface: zero drift

Public-scope filter (Auth == "all", path not /event/push/*, non-hidden module) yields 336 operations; the committed specs contain exactly the same 336 (method, path) pairs. Set equality was verified both directions.

Module Ops in spec added updated (schema/shape) removed
on-call 192 0 0 0
monitors 39 0 0 0
rum 36 0 0 0
platform 27 0 0 0
safari 42 0 0 0
total 336 0 0 0

The only registry change since the last run (2026-08-31) is PR #879 feat/huawei-aom, which adds 4 Huawei cloud push rows (/event/push/alert/huaweiyun/aom, -apm, /ces, /lts). All four are auth: integration, so they are out of public API scope by design and correctly absent from the specs — no new public endpoint to document.

Handler-side scan across fc-event, fc-oncall, fc-pgy, fc-rum, fc-statuspage, fc-datasource, go-pkg for commits since 2026-08-31T08:12Z found no change to any public API request/response shape: the fc-event work is AI SRE IM-card/feedback rendering (logic/ai_sre/*), fc-oncall/fc-rum/fc-statuspage/go-pkg had none in controller or struct paths, and the fc-datasource change is PlugTeams attachment download.

What this PR changes: bilingual-contract text drift (146 lines, text-only)

No structural change — verified by full-tree deep compare: paths keys, components.schemas keys, operationId list and tags-entry shape are all byte-identical to HEAD. Only four leaf text fields moved, and only these:

Count Change Class
104 200-response description: "Success""成功" (in the .zh files) ZH file carrying English text
30 op tags[0]: "On-call/Incidents""On-call/故障管理" English tag in ZH file, and undeclared in the ZH tags[] list
6 tags[] name + 4 op tags[0]: "RUM/Session replay""RUM/RUM 会话回放" English tag in ZH file, diverging from mapping.yaml
2 /account/info 200 description: "OK""Success" (EN) / "成功" (ZH) one-off against the 330/331-file convention
2 /rum/issue/export 200 description"成功。CSV 附件,非 JSON 信封。" English text in ZH file; wording copied from the sibling ZH export ops

Files touched: on-call.openapi.zh.json (26), safari.openapi.zh.json (41), rum.openapi.zh.json (4), platform.openapi.{en,zh}.json (1 each), plus the two consolidated copies kept in sync (openapi.zh.json 72, openapi.en.json 1). Total: 7 files, 146 insertions / 146 deletions.

Rationale for the ZH tag renames: mapping.yaml is the authority for tag labels (<parent_zh>/<tag_zh>). on-call/incident declares tag_zh: 故障管理, and 40 of its 55 ZH ops already carried On-call/故障管理 — the other 15 (/incident/feed, /incident/comment, comment-type/*, work-item/*) carried the English label, which Mintlify renders as a separate English sidebar group. rum/session-replay declares tag_zh: RUM 会话回放; the spec carried the English form. RUM/RUM Sourcemap was left alone — it looks untranslated but is exactly mapping.yaml's declared tag_zh ("RUM Sourcemap").

Not changed (deliberate exemptions, all evidence-checked)

  • docs.json and {en,zh}/openapi/api-catalog.mdx: untouched. Zero operations were added or removed, and every one of the 336 spec paths is already present in the nav allow-list and in both catalogs (verified programmatically) — the 0-endpoint-change case where 防错铁律 3 forbids nav edits.
  • openapi.legacy.zh.json: untouched (read-only reference).
  • 16 "missing 200 example" + 4 "missing request example" audit hits are false positives: those operations are non-JSON by design (text/csv, application/octet-stream, application/x-ndjson responses; multipart/form-data requests). The repo's own scripts/lint_openapi.py codifies exactly this exemption and passes.
  • 30 "epoch wording" audit hits are false positives. After disambiguating durations from epochs, the only remaining flags are genuine durations that correctly omit epoch wording: ScheduleNotify.advance_in_time (lead time in seconds), ServiceMap*.max_age_ms / report_interval_ms (data age / reporting interval). Zero-milli violations among real ms-epoch fields.

Verification run in this session

  • python3 scripts/lint_openapi.pyOK: 12 spec files, no violations
  • All 12 output JSON files parse (json.load), with path/schema counts printed per file
  • Full-tree leaf compare vs git show HEAD:<path> → 146 diffs, every one in the allow-listed table above; zero unexplained
  • paths / schemas / operationId / tags-shape identical to HEAD (no structural or ordering churn)
  • split ↔ consolidated: 336/336 ops, 0 content-differing, both languages
  • registry ↔ spec set equality: 336 == 336, new=[], stale=[]
  • Baseline fidelity: all 12 files are byte-identical under a json.dumps(indent=2, ensure_ascii=False) + trailing newline round-trip, so no reformatting could leak into the diff. Every edit was applied as an assertion-guarded line replacement (expected count per file per class had to match exactly, or nothing was written).

findings.unresolved / environment notes

  • runbooks/api-review-apply-patches.py and runbooks/api-review-daily.md are still absent from the team knowledge pack (same as the 2026-08-28 note), so 防错铁律 6's "patch first" step could not run. Baseline fidelity was instead guaranteed by the round-trip proof + assertion-guarded line edits described above. No full regeneration was attempted with the unpatched generator.
  • mapping.yaml coverage gap (skill-side, not fixed here): 13 paths that are auth: all in the registry and already documented in the specs are claimed by no path_prefixes entry, so a --scope all analyze run would drop them: monitors/monit/query/data, /monit/query/diagnose, /monit/targets, /monit/tools/catalog, /monit/tools/invoke, /monit/servicemap/{status,summary,topology,fleet,fleet/summary}; rum/rum/data/query, /rum/field/list, /rum/resource/info. Recommend adding these prefixes to mapping.yaml (or to the missing patch script) before the next generate, otherwise a regeneration would delete 13 live endpoints.
  • monit-webapi / monit-edge are not on GitHub (flashcatcloud org), so the monitors module could not be re-extracted from handler source this round and carries forward unchanged from HEAD apart from nothing (0 lines touched).
  • No constructed examples were added this round (no new operations), so there is no synthetic-example caveat.

Registry (auth=all, non-push) and committed specs both hold exactly 336
operations: zero added, zero removed. The only registry change since the
last run is the Huawei AOM push rows, which are auth=integration and out
of public scope.

Text-only bilingual-contract fixes (146 lines, no structural change):
- 52 ZH ops had responses.200.description 'Success' instead of '成功'
- 15 on-call ZH ops carried the English tag 'On-call/Incidents', which is
  also undeclared in the ZH tags list; mapping.yaml tag_zh is 故障管理
- 2 rum ZH ops + their tag declaration carried 'RUM/Session replay'
  instead of mapping.yaml's 'RUM/RUM 会话回放'
- /account/info 200 description 'OK' -> 'Success' (EN) / '成功' (ZH)
- /rum/issue/export ZH 200 description translated to match sibling exports

docs.json and both api-catalog.mdx files are untouched: no operation was
added or removed, and all 336 paths are already present in the nav and
catalogs. lint_openapi.py passes; split and consolidated stay identical.
@ysyneu
ysyneu merged commit 32ab2bc into main Sep 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant