Repository navigation
docs(api): daily audit 2026-10-06 — localize the remaining English text in the zh specs - #1022
Merged
Merged
Conversation
…xt in the zh specs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
本轮结论
--mode generate --scope all --auto的每日审计。新增/删除/变更的公开 API operation 均为 0;本轮唯一落地的是中文规格里残留的英文人类可读文本(60 处,纯文本值替换,不动任何 key、schema、示例值)。scope 与公开面判定
--scope all,公开面判定按 skill:auth == "all"、路径不以/event/push/开头、模块未标hidden: true。fc-pgy logic/api/api_test.go)共 1209 行,其中auth == "all"366 行,与上一轮(PR docs(api): daily audit 2026-10-05 — document the Monitors dashboard family (18 new app_key operations) #1011)完全一致 → 无 auth 翻转。mapping.yaml认领;另 34 行(/monit/dashboard/*17、/monit/query/*2、/integration/*9、/route/*3、/rum/data|field|resource3)未被 skill 内mapping.yaml认领,但这些路径已全部在 committed spec 中(由已合并的 docs(api): daily audit 2026-09-25 — document the new /integration API family #472、docs(api): daily audit 2026-10-05 — document the Monitors dashboard family (18 new app_key operations) #1011 落地),只是本 skill 的工作副本mapping.yaml未同步 —— 不是文档缺口,已在本轮 PR body 记录(见「环境事实」)。窗口 diff(2026-10-05T08:25Z → 2026-10-06T08:25Z)
对 8 个源仓库做窗口 diff(
git rev-list -1 --before=... origin/main+git diff --name-only <base> origin/main,后者用于兜住「作者日期在窗口前、窗口内被 merge 进 main」的提交):ac1e2bc82a93b64f/d6f5d743/c25a23a6)fc-pgy 的 3 个提交只改
logic/api/api_test.go、deploy/permission.sql、logic/permission/permission_test.go,内容是 Knowledge Pack → Knowledge 的中文改名:5 行NameCN(知识.知识包:X→知识.知识:X)、权限 4004/4009 的知识库→知识。path / method / auth 未变。对 spec 无影响:committed 的 5 个 split + 2 个 consolidated 中
知识包/Knowledge Pack/knowledge pack残留为 0 处,ZH summary 早已是「查看账户知识 / 查询知识列表 / 删除知识 / 确保知识存在 / 更新知识」。operationId 由 registryname(knowledge.pack:*,未变)派生,也不受影响。→ 本轮不为这个改名改任何东西。各模块 operation 变化
openapi.zh.jsondocs.json与{en,zh}/openapi/api-catalog.mdx未改动:无页面增删,按规则 3 不动(改导航顺序也会造成大 diff)。本轮改了什么(规则 7 的类别)
ZH 规格中没有中文字符的人类可读文本(
description/summary/allOf[].properties.data.description等文档字段,不含example/examples载荷值)。判据是仓库里已有既成中文译文,属于「同一字段在不同模块被翻译、在少数模块漏翻」的漂移:AppKeyAuth、BadRequest/Unauthorized/Forbidden/TooManyRequests/ServerError、ResponseEnvelope在 safari 是英文,而在 on-call/monitors/platform/rum 四个 ZH split 中早已是逐字相同的中文。修法是从既成译文照抄(如Status page ID.→状态页 ID。,Invalid request — …→请求非法 — 通常是参数缺失或格式不正确。),不新造措辞。Always null on success.有 6 处英文,同一文件里同类字段另有 7 处已是中文成功时恒为 null。→ 按多数派取值统一。parameters[].description为英文(/status-page/*、/incident/post-mortem/info)。/rum/issue/export的 CSV schema 与X-Export-Total/X-Export-Truncated响应头、/rum/session-replay/segments的 NDJSON schema)。openapi.zh.json:同上 27 处。改动脚本
/tmp/apirev/apply-zh.py:只替换「非 example 块内、且取值恰好等于英文原文」的description/summary/title/x-mint.content,不新建、不删除、不重排任何 key;默认 dry-run,--apply才落盘。规则 4:PR 前全树深比较
git show HEAD:<path>)与工作区的递归叶比较,共 60 个叶变化,全部落在description/summary/title且均不在 example 块内(脚本断言,非本地化字段的变化数 = 0)。git diff --numstat→16/16、27/27、4/4、13/13git diff --numstat --minimal→ 完全相同(没有出现大块「先删后加」)git diff --name-only无*.en.json,无openapi.legacy.zh.json。改后复核(全部重跑)
summary/description/title/x-mint/tags/name/x-enumDescriptions/examples后)= 0 差异。*_at/*_time/ts/timestamp均含 Unix/epoch/timestamp 字样,go-flashduty SDK 约定满足)。servers[0].description = "Flashduty Open API"(服务名,与 EN 一致且五个模块一致,按 skeleton 不本地化)。docs.jsonnav / en catalog / zh catalog 全部 0 缺口,catalog 计数与 spec path 数一致(202/41/28/41/53,总 365)。json.load();mint broken-links未能执行(本环境无 node/npx),已用 skill 的 Step 5.5 可达性检查替代。仍按原样保留的 committed 内部漂移(未动,附判据)
DutyError.reason:存在于 monitors split + 两份 consolidated,缺于 on-call/platform/rum/safari 四个 split。skill 的references/response-envelope.md明确要求DutyError恰好只有code+message;go-pkg mainsrv/error.go的Error结构体也是code/message/raw_message,没有reason。未删的原因:该字段带"x-flashduty-preserve-absence": true标记,而该标记在本仓库是既成约定(76 处,涉及 monitors/rum/consolidated,由d1c68d0e docs(monit): define datasource diagnostics and host-only agent tools等多个人工提交引入),属人工有意为之而非生成漂移;直接按「以 split 为准」删掉会抹掉人工内容。→ 建议人工裁决:若reason不在公开契约内则应统一移除(含 monitors split),否则应补齐到其余四个 split 并放宽 reference。WorkItemItem.required含assignees(13 项 vs split 12 项)、work-item 的 example 载荷带assignees数组、x-mint使用说明多出assignee_type/ai_sre两条 —— split 均无。未动的原因:fc-event main 的structs/work_item.go没有WorkItemItem.assignees/agent_session_id/agent_session_venue,createWorkItemIn没有assignees,listWorkItemIn没有assignee_type(logic/post_incident的CreateInput/ListInput同样没有);支撑该特性的提交落在origin/feat/work-item-ai-sre、不在 main。所以两侧都与 main 不一致,无法用「哪一侧对」来单向对齐 —— 该特性是否已上线本环境无法验证,属开放假设。注意:split 与 consolidated 都有这些 properties 与WorkItemAssigneeschema,差异仅在required/example/使用说明文本,所以 Mintlify 渲染面已存在该字段,不是本轮引入。git clone https://github.com/flashcatcloud/monit-webapi.git成功,origin/main = 41b236a(窗口内未变动)。monitors 的 handler/schema 提取已可直接取源码。unresolved 清单
POST /channel/incident/daily-countsauth=all,找不到 handler;skill 要求记入findings.unresolved,不编造路径构造示例说明
本轮没有新增任何 operation(365 个 path 全部沿用 committed 内容),因此没有新构造的示例值。本环境无法调用 dev API 抓真实响应(不能引用凭据环境变量),若未来新增 operation,其示例将按 schema 构造并在 PR body 注明,不会使用
"string"占位符。环境事实与阻塞项(影响本轮做法)
runbooks/api-review-daily.md与runbooks/api-review-apply-patches.py(2026-09-30 起连续 3 轮确认缺失)。因此「每轮先打补丁再运行」这一步无法执行;skill 工作副本的mapping.yaml因缺少该补丁仍是旧版(未认领/monit/dashboard、/monit/query、/integration、/route、/rum/data|field|resource前缀)。scripts/generate_openapi.py跑不起来:它读取.api-review/modules/<scope>.json,而.api-review/在.gitignore中且不存在;重建这些 module 数据文件正是上述缺失补丁脚本的职责。其自带guard_no_path_drop()会在路径丢失时中止(设计如此,不能带伤运行)。git show HEAD:<path>)+ registry 集合双向比对 + 定向最小 diff。sync_skill未调用)—— 与既往轮次一致,避免未来从其他来源同步 skill 时约束丢失。mint broken-links无法执行(无 node/npx)。复核命令