docs(api): daily audit 2026-09-15 — surface template closed-card action apps, session and feed fields - #400
Merged
Merged
Conversation
…on apps, session and feed fields
This was referenced Sep 25, 2026
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.
Daily api-review run (
--mode generate --scope all --auto), docs rootflashduty-docs@main.Window: since the last successful run,
2026-09-14T08:01:36Z. Source repos pinned toorigin/main(fc-pgy
73ba28f2, fc-event1e014ec3, fc-oncallc590121, fc-rumbadb4e0, fc-statuspage0a4e799,fc-datasource
5ebd65a, go-pkge196752, fc-safariafee0f4a).Verification
auth=allnon-/event/push/rows vs 338 spec paths — 1 registry row with no spec path (theunresolveditem below), 0 spec paths with no registry rowpython3 -c "import json; json.load(...)"on all changed spec fileson-call.en/zh,safari.en/zh,openapi.en/zh)scripts/lint_openapi.pyOK: 12 spec files, no violationsHEAD, pointer by pointerDEL-KEY, 0 re-sorting, 0 value editsrequired)docs.jsonnav ↔ spec paths,{en,zh}/api-catalog.mdx↔ spec paths476 insertions / 8 deletionsacross 6 files — the 8 deletions are the unchanged property that gained a trailing comma before each insertionOperation changes
No operation added, none removed. 7 operations gained schema fields (all additive, all in
components.schemas):On-call — updated (4 operations, 5 schema fields)
TemplateItemincident_card_closed_action_apps(array of string, +required)/template/info,/template/listTemplateCreateRequestincident_card_closed_action_apps/template/createTemplateUpdateRequestincident_card_closed_action_apps/template/updateFeedItemvia,agent_session_id/alert/feedWarRoomItemchat_name(+required),integration_unavailable/incident/war-room/listAI SRE — updated (2 operations, 3 schema fields + 1 new schema)
SessionItemcreator_name,standing_tasks(+required)/safari/session/get,/safari/session/listSessionGetResponsepending_messages(+required)/safari/session/getPendingUserMessageinvocation_id,client_msg_id,person_id,steering,query,parts)SessionGetResponseMonitors / Platform / RUM — unchanged.
Evidence (all constraints come from Go
json:/binding:tags and explicit handler code; none from business-branch inference)incident_card_closed_action_apps—fc-event/structs/func.go:114([]string, noomitempty→required), set on the response path atfc-event/logic/template/template.go:74. Request side:cmd/server/controller/template/template.go:46(create,[]string) and:262(update,*[]string). The enum is the explicit validation set instructs/incident_card_hidden_fields.go:32(ValidateIncidentCardClosedActionApps):feishu_app,dingtalk_app,wecom_app,slack_app,teams_app. The field arrived with9affab5c(feat: retain custom actions on closed incident cards by template, 2026-09-10) — i.e. catch-up drift, missed by the 2026-09-14 run that touched the same template schemas.FeedItem.via/FeedItem.agent_session_id—fc-event/structs/feed.go:200-201(omitempty→ notrequired), stamped atfc-event/logic/feed/feed.go:82-83,138-139,229-230.WarRoomItem.chat_name/integration_unavailable—fc-event/structs/war_room.go:35-36;chat_namehas noomitempty→required.integration_unavailableis computed atfc-event/logic/war_room/war_room.go:91.SessionItem.creator_name/standing_tasks—fc-safari/types/session.go:440(omitempty) and:516(noomitempty→required); stamped per-response atfc-safari/cmd/api/sessions/sessions.go:706,715.standing_tasksis pinned bysessions_test.go:761(TestSessionItem_StandingTasksAlwaysPresent, "pins the wire contract").SessionGetResponse.pending_messages—fc-safari/cmd/api/sessions/sessions.go:387(noomitempty, "Empty array, never null"), populated at:552.PendingUserMessage—fc-safari/types/pending_message.go:10.partsisjson.RawMessagepassed through verbatim, emitted as an array of objects (the producer,logic/session/actor/pending.go:56, andpending_test.go:36both carry JSON arrays).docs.json / api-catalog.mdx
No page was added or removed, so per the runbook neither file is touched. Re-verified after the patch that every spec path is still reachable from both the
docs.jsonnav and the{en,zh}/openapi/api-catalog.mdxcatalog (0 missing in all three checks).Examples
No operation was added, so no new request/response example was required and none was constructed. The new fields are not injected into the existing examples either: those examples already omit the optional fields of the same schemas, so adding only the new ones would make each example inconsistent with its own convention. Real 200-response capture from
api-dev.flashcat.cloudwas not attempted — this runner cannot reference the credential environment variable.unresolved
POST /channel/incident/daily-counts(channel:read:incidentDailyCounts,Auth: "all") — registered infc-pgy/logic/api/api_test.go:606byfefd8eac(feat(api): register event channel incident daily-counts route, 2026-09-14 19:59 +0800), so it is a public row the specs do not carry. No handler exists onfc-eventorigin/main:git log --all -S daily-countsfinds it only onorigin/feat/channel-daily-incident-counts(2dfdd0ba,954fdf49) andorigin/dev. With no handler on the pinned branch there is no input/output struct to extract, so the operation was not fabricated. Re-run this audit once that branch merges — the row will then resolve.MemberItem.password(fc-pgy/structs/member.go) is populated only on the create/import path (logic/member/member.go:99,145), never on the/member/listread path — not added, as it is not part of the response contract.A2AAgentItem.description(fc-safari/types/a2a.go) carries an explicit source comment: "kept temporarily for pre-GA API clients … OpenAPI/SDK/CLI no longer expose description" — deliberately absent from the docs.MetricsBase.account_id(fc-event/structs/insight.go:80) — no serialization site found in the insight handlers (it is used only as an in-process grouping key), so there is no evidence it reaches the wire. Left out rather than documented on a guess.AssignedTo.layer_person_reset/layer_person_append/layer_webhook_reset/layer_webhook_append(fc-event/structs/channel.go:406-409) are realjson:fields but map toPersonGroup/Webhooktypes that exist nowhere in the specs; documenting them would mean inventing two new schemas for push/ServiceNow-only plumbing. Flagged rather than added.Notes / follow-ups
type X structin the pinned source repos and matching it to the schema of the same name in the committed specs by field-name overlap (ambiguous same-name types in other packages were rejected at a 0.45 overlap floor). 116 schemas resolved unambiguously; 9 showed a real field gap; the 4 deliberate ones are listed above and the 5 that were genuine drift are fixed here. This covers output-side schemas whose Go type name matches the schema name verbatim — request schemas that were hand-named in the module files (e.g.TemplateCreateRequest→ an anonymous Go input struct) are not covered by name matching, so a request-side field could still be missing. Worth restoring the generator pipeline to close that blind spot.monit-webapi/monit-edgeare not in theflashcatcloudorg, so monitor handlers cannot be re-read. The module carries itsHEADcontent unchanged; any monitor schema drift must be reviewed by hand.runbooks/api-review-daily.mdand norunbooks/api-review-apply-patches.py, and.api-review/modules/*.json(the generator's inputs) are gitignored and absent, soscripts/generate_openapi.pycannot be re-run from a clean checkout. This PR was therefore produced by the evidence-driven audit described above, with the patch script kept at/opt/scripts/api_review_apply_fields.py(dry-run by default;--applyto write). Reporting it so the missing runbook and patch script can be restored.fc-safarirepo had to be cloned as well — the safari module has visible public scopes inmapping.yamland its spec had not been regenerated since 2026-09-04, so it was inside the drift window.