docs(api): daily audit 2026-10-02 — align the RUM ZH example payloads with the English values - #938
Open
flashduty[bot] wants to merge 1 commit into
Open
flashduty[bot] wants to merge 1 commit into
flashduty[bot] wants to merge 1 commit into
Conversation
… with the English values The api-review bilingual contract keeps request/response examples identical in both language files: field keys and values are English API payloads, not UI text. Three `reason` example values in the ZH RUM spec were Chinese translations of the EN values; every other module's ZH spec has none. Split + consolidated only.
This branch has not been deployed
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.
api-review daily audit — 2026-10-02
--mode generate --scope all --auto. Scope: rows withAuth == "all", path not starting/event/push/, module nothidden: true.Registry baseline.
fc-pgy@origin/main86ea9900vs the previous round's baseline1ab03856: 348 public rows on both sides — 0 added, 0 removed, 0 auth reclassifications. Total registry rows grew 1090 → 1182, and the entire delta isintegrationrows (+92) — the alert/change push registrations, which are out of public scope. No operation was added or removed anywhere.Operations changed
No path was added or removed, so
docs.jsonand{en,zh}/openapi/api-catalog.mdxare deliberately untouched (they only need reconciling when the operation set changes). Re-verified as a cross-check: every spec path is present in both thedocs.jsonnav and both catalogs (0 missing for all five modules), and the catalog counts still agree with the specs — On-call 193, Monitors 23, RUM 41, AI SRE 53, Platform 28, total 338.1. rum — the ZH spec's payload examples were Chinese, EN's were not
The bilingual contract (
generate.md, "Examples are mandatory") requires request and response examples to use the same values in both language files: field keys and values are API payloads, not UI text — "Do NOT create separate Chinese examples." Threereasonexample values in the ZH RUM spec were Chinese renderings of the EN ones:POST /rum/application/remote-config/update(request)Tighten replay sampling for the Q4 launchQ4 上线前收紧回放采样POST /rum/application/remote-config/history/revert(request)Rolled back after the Q4 launch incidentQ4 上线故障后回滚POST /rum/application/remote-config/history/list(200data.items[0])Tighten replay sampling for the Q4 launchQ4 上线前收紧回放采样Only the values moved; the EN file is the reference and is byte-identical before and after. The ZH
reasonwas introduced ina16105f7(2026-09-03, the RUM remote-config generation) and no open PR touches it (#581's RUM delta adds the error-session switches,#778's adds a/rum/issue/infousage note; neither mentions these values). Every other module's ZH spec carries zero non-ASCII example values, so RUM was the only outlier. After the change, a mask-insensitive whole-document walk of every module's EN vs ZH files returns 0 structural differences.Constructed examples: nothing new was authored this round. The three values inserted are the existing English values already in the EN spec — themselves constructed rather than captured from the dev API (this environment cannot read the credential env var), so they should not be read as a live capture.
Why the generator did not run (environment fact — rule 6 stop condition)
The automation's baseline-fidelity patches could not be applied, so
scripts/generate_openapi.pywas not run in a damaged state:runbooks/api-review-daily.mdandrunbooks/api-review-apply-patches.pydo not exist in the team knowledge pack. The pack's own sentinel lists 25 files / 5 runbooks, none of them api-review; a filesystem-wide search for either name returns nothing..api-review/is gitignored and absent in the docs repo, so the generator has nomodules/<scope>.jsoninputs, and itsguard_no_path_drop()aborts when a path present in the committed spec is missing from the new output.api-review-consolidated-vs-split-drift-direction.md, 2026-10-01): public surface diffed via the pgy registry, source window diffed viagit diff <ref> origin/main(which, unlike--since, catches commits whose author date predates the window but which were merged into main inside it), edits applied togit show HEAD:<path>baselines never to the working file, then a whole-tree deep compare.Ruled out this round (window 2026-09-30T15:51:55Z → 2026-10-02T01:56Z)
cmd/engine/controller/{alert,change}/(the/event/push/*push handlers, out of scope) the only files touched arecmd/server/controller/channel/channel.go,structs/{change,severity}.go,logic/change/{change,change_event}.go,model/change/change_event.go,cmd/engine/routes.go,deploy/event.sql+ one mongosh migration.channel.goadds the UTF-8 guard onquery/channel_name(commitf33573374, 2026-09-17, merge-carried into main inside this window). No new drift: open PR docs(api): daily audit 2026-09-29 — RUM remote-config error-session switches, channel filter UTF-8 note #581 already documents it on both fields ("Must be valid UTF-8 — invalid byte sequences are rejected withInvalidParameter"), and main's specs do not yet carry that text only because docs(api): daily audit 2026-09-29 — RUM remote-config error-session switches, channel filter UTF-8 note #581 is still open.structs/change.gowidensChangeEvent.ChangeStatustooneof=... Failedand addsIsChangeStatusTerminal;structs/severity.godropsSupportChangeStatus. Already documented —ChangeItem.change_statusandChangeEventItem.change_statusin both the on-call split and the consolidated files already carry["Planned","Ready","Processing","Canceled","Done","Failed"]inoneoforder.ChangeEventitself is the push payload, reached only from/event/push/*.deploy/event.sql+2026-09-29_change_key_scope_per_integration.sql+logic/change/change.go+model/change/change_event.gomove the change lookup/uniqueness key to{account_id, channel_id, data_source_id, change_key}and add a stale-event guard. Index and behaviour only — no request or response field, nobinding:tag, no enum.cmd/engine/routes.goregisters onlyevG.POST("alert/...")push routes. Out of public scope.cmd/server/controller/wallet/*,logic/bill/*,logic/charge/*,model/bill/*,structs/bill.go,logic/transfer.goare allplatform/wallet, which ishidden: true("Billing-only; not customer-facing public API").structs/i18n.gochanges email body strings.deploy/permission.sqlandlogic/permission/permission_test.goadd permission factors forjwt/buttonroutes.logic/api/api_test.gois the registry — public row set unchanged. No public-contract change; verified no wallet/billing type name (TransItem,BalanceItem,matched_amount,CostBreakdown) and no/walletor/marketplacepath appears in any spec file.structs/plugin.go+logic/data_source/plug_{alert,change,im_slack}.goadd alert-source plugin constants (wazuh.alert,aikido.alert, …); no plugin name appears in any spec.cmd/datasource/controller/warroom.goswaps a hand-written Slack scope list fordata_source.SlackAISREBotScopes();missing_scopesis not a documented field anywhere. No public-contract change.Committed internal drift found (rule 7) — all of it is already carried by an open PR
Comparing every split file against the consolidated file at
HEADturns up exactly the set the previous round's PR #778 already records, so nothing here is duplicated:AlertItem/AlertInfodetail_url(consolidated only) — split fix is in docs(api): daily audit 2026-09-30 — alert detail_url into the rendered on-call spec, RUM issue-detail team_id semantics #778, still open.DutyError.reason(consolidated + monitors splits only; absent from on-call/platform/rum/safari) — reported in docs(api): daily audit 2026-09-30 — alert detail_url into the rendered on-call spec, RUM issue-detail team_id semantics #778, left for a human decision. Re-confirmed againstgo-pkgorigin/mainsrv/error.go:type Erroris exactlycode,message,raw_message,omitempty— there is noreasonfield.WorkItemItem.assignees/agent_session_id/agent_session_venue,create/resetassignees,listassignee_type,WorkItemAssignee) — reported in docs(api): daily audit 2026-09-30 — alert detail_url into the rendered on-call spec, RUM issue-detail team_id semantics #778, not touched in either direction. Re-verified the reasoning independently:fc-eventorigin/mainstructs/work_item.go:47definesWorkItemItemwithAssigneeIDs []int64carrying the JSON tagassignee_ids, and noassignees,assignee_type,agent_session_idoragent_session_venue;assignee_typematches nothing in any main commit and the supporting commit7eff20f30exists only onorigin/devandorigin/feat/work-item-ai-sre. The rendered split is therefore correct as committed; the consolidated copy documents a feature that has not landed.monitorsis byte-identical between its split and consolidated forms (monit-webapi is not on GitHub, so it cannot be re-derived here and was left alone).unresolved (unchanged from the previous rounds)
POST /channel/incident/daily-counts(channel:read:incidentDailyCounts,Auth == "all", mapped toon-call/channel) — no handler exists infc-eventmain and no spec documents it. Left undocumented rather than guessed; not indocs.json, not rendered.POST /integration/*rows — public, but no non-hidden module inmapping.yamlclaims the/integrationprefix. Covered by open PR docs(api): daily audit 2026-09-25 — document the new /integration API family #472; not duplicated.POST /enrichment/mapping/data/uploadandPOST /safari/skill/uploadhave norequestBodyexample (multipart/form-data), andPOST /monit/datasource/tools/invokehas neither a JSON request example nor a 200 example. The monitors one cannot be reconciled here (monit-webapi is not on GitHub).Verification
python3 -c "import json; json.load(open(path))".HEAD(baseline read fromgit show HEAD:<path>, never the working tree) over all 13api-reference/*.jsonfiles: exactly 6 changed leaves in 2 files, all intended —rum.openapi.zh.jsonandopenapi.zh.json, each…/example/reasonunderPOST /rum/application/remote-config/update,…/history/revertand…/history/list. The other 11 files, includingopenapi.legacy.zh.json,openapi.en.jsonandrum.openapi.en.json, are byte-identical.docs.jsonis unmodified. Total diff: 6 insertions, 6 deletions.0a7dand the consolidated file still ends7d0a(the two files historically differ on the trailing newline), and the edit was a literal string substitution, so no key order or formatting moved.