Skip to content

docs(api): daily audit 2026-09-15 — surface template closed-card action apps, session and feed fields - #400

Merged
ysyneu merged 1 commit into
mainfrom
api-review/20260915T083034Z
Sep 16, 2026
Merged

ysyneu merged 1 commit into
mainfrom
api-review/20260915T083034Z

Conversation

@flashduty

@flashduty flashduty Bot commented Sep 15, 2026

Copy link
Copy Markdown

Daily api-review run (--mode generate --scope all --auto), docs root flashduty-docs @ main.
Window: since the last successful run, 2026-09-14T08:01:36Z. Source repos pinned to origin/main
(fc-pgy 73ba28f2, fc-event 1e014ec3, fc-oncall c590121, fc-rum badb4e0, fc-statuspage 0a4e799,
fc-datasource 5ebd65a, go-pkg e196752, fc-safari afee0f4a).

Verification

Check Result
Registry public surface vs specs 339 auth=all non-/event/push/ rows vs 338 spec paths — 1 registry row with no spec path (the unresolved item below), 0 spec paths with no registry row
python3 -c "import json; json.load(...)" on all changed spec files ok (on-call.en/zh, safari.en/zh, openapi.en/zh)
scripts/lint_openapi.py OK: 12 spec files, no violations
Deep compare vs HEAD, pointer by pointer only the additions listed below; 0 DEL-KEY, 0 re-sorting, 0 value edits
EN/ZH parity (paths, methods, operationIds, schema keys, property keys, types, required) holds (excl. human-text fields, as designed)
docs.json nav ↔ spec paths, {en,zh}/api-catalog.mdx ↔ spec paths no missing path
Diff shape 476 insertions / 8 deletions across 6 files — the 8 deletions are the unchanged property that gained a trailing comma before each insertion

Operation 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)

Schema Added Operations
TemplateItem incident_card_closed_action_apps (array of string, + required) /template/info, /template/list
TemplateCreateRequest incident_card_closed_action_apps /template/create
TemplateUpdateRequest incident_card_closed_action_apps /template/update
FeedItem via, agent_session_id /alert/feed
WarRoomItem chat_name (+ required), integration_unavailable /incident/war-room/list

AI SRE — updated (2 operations, 3 schema fields + 1 new schema)

Schema Added Operations
SessionItem creator_name, standing_tasks (+ required) /safari/session/get, /safari/session/list
SessionGetResponse pending_messages (+ required) /safari/session/get
PendingUserMessage new schema (invocation_id, client_msg_id, person_id, steering, query, parts) reached via SessionGetResponse

Monitors / 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, no omitempty → required), set on the response path at fc-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 in structs/incident_card_hidden_fields.go:32 (ValidateIncidentCardClosedActionApps): feishu_app, dingtalk_app, wecom_app, slack_app, teams_app. The field arrived with 9affab5c (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 → not required), stamped at fc-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_name has no omitempty → required. integration_unavailable is computed at fc-event/logic/war_room/war_room.go:91.
  • SessionItem.creator_name / standing_tasks — fc-safari/types/session.go:440 (omitempty) and :516 (no omitempty → required); stamped per-response at fc-safari/cmd/api/sessions/sessions.go:706,715. standing_tasks is pinned by sessions_test.go:761 (TestSessionItem_StandingTasksAlwaysPresent, "pins the wire contract").
  • SessionGetResponse.pending_messages — fc-safari/cmd/api/sessions/sessions.go:387 (no omitempty, "Empty array, never null"), populated at :552.
  • PendingUserMessage — fc-safari/types/pending_message.go:10. parts is json.RawMessage passed through verbatim, emitted as an array of objects (the producer, logic/session/actor/pending.go:56, and pending_test.go:36 both 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.json nav and the {en,zh}/openapi/api-catalog.mdx catalog (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.cloud was not attempted — this runner cannot reference the credential environment variable.

unresolved

  • POST /channel/incident/daily-counts (channel:read:incidentDailyCounts, Auth: "all") — registered in fc-pgy/logic/api/api_test.go:606 by fefd8eac (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 on fc-event origin/main: git log --all -S daily-counts finds it only on origin/feat/channel-daily-incident-counts (2dfdd0ba, 954fdf49) and origin/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.
  • Not counted as unresolved but left unchanged on purpose, each re-checked this run:
    • 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/list read 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 real json: fields but map to PersonGroup / Webhook types 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

  • Field-level drift audit this round. Because the generator's inputs are unavailable (below), the audit was done by parsing every type X struct in 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.
  • monitors module: monit-webapi / monit-edge are not in the flashcatcloud org, so monitor handlers cannot be re-read. The module carries its HEAD content unchanged; any monitor schema drift must be reviewed by hand.
  • Skill pipeline gap (unchanged from last round). The team knowledge pack still contains no runbooks/api-review-daily.md and no runbooks/api-review-apply-patches.py, and .api-review/modules/*.json (the generator's inputs) are gitignored and absent, so scripts/generate_openapi.py cannot 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; --apply to write). Reporting it so the missing runbook and patch script can be restored.
  • Environments note: this round the fc-safari repo had to be cloned as well — the safari module has visible public scopes in mapping.yaml and its spec had not been regenerated since 2026-09-04, so it was inside the drift window.

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