docs(api): daily audit 2026-09-25 — document the new /integration API family - #471
Closed
flashduty[bot] wants to merge 1 commit into
Closed
flashduty[bot] wants to merge 1 commit into
flashduty[bot] wants to merge 1 commit into
Conversation
… family Nine public operations registered in fc-pgy after the last regeneration (merged with #1025, 2026-09-22) are now documented: the /integration/* family manages alert- and change-source integrations through app_key — type/list, list, info, create, update, delete, enable, disable, key/rotate. Handlers live on fc-datasource main (cmd/datasource/routes.go:70); the read permission is Integrations Read, the writes Integrations Manage (on-call). Also repairs the on-call notification-template contract: TemplateCreateRequest, TemplateUpdateRequest and TemplateItem were missing dingtalk_app_war_room_enabled and slack_app_war_room_enabled, which fc-event's template structs and the DingTalk/Slack card renderer have carried since e43bbcbf5. Operations were added, so docs.json (both languages) and both api-catalog.mdx files were reconciled: On-call 193 -> 202, total 338 -> 347. Diff is purely additive (1359/0 per spec file under --minimal) with every pre-existing key keeping its relative order; EN/ZH structurally identical.
Author
|
Superseded by #472: the new operations are inserted near the head of the spec's |
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-09-25
--mode generate --scope all --auto. Registry baseline:fc-pgy/logic/api/api_test.go@6e4013f0(default branchmain, fetched 2026-09-25T08:06Z).Operations changed
Added — a new public family,
POST /integration/*(9 operations, 13 new schemas).These rows landed in the fc-pgy registry after the last regeneration, via
3caa6d8d("Merge pull request #1025 from flashcatcloud/feat/integration-api-sync-20260915", merged 2026-09-22 15:16 +0800), and the handlers are live onfc-datasourcemain(cmd/datasource/routes.go:70integrationG := restSrv.Engine.Group("/integration/", BackAuth())):POST /integration/type/list→integration-api-read-type-listPOST /integration/list→integration-api-read-listPOST /integration/info→integration-api-read-infoPOST /integration/create→integration-api-write-createPOST /integration/update→integration-api-write-updatePOST /integration/delete→integration-api-write-deletePOST /integration/enable→integration-api-write-enablePOST /integration/disable→integration-api-write-disablePOST /integration/key/rotate→integration-api-write-rotate-keyEvidence and constraints come from
fc-datasource/cmd/datasource/controller/integration_{contract,query,mutation,lifecycle,settings}.go; permission names (Integrations Read/Integrations Manage, scopeon-call) fromfc-pgylogic/permission/permission_test.goids 1400/1401 (b4a9a396); per-op rate limits from the registry rows (AQps 20 / AQpm 300on the six writes,50 / 1000on the three reads). Notable behaviors documented:plugin_typemust carrysupports_api_create: true;integration_keyis returned only bycreateandkey/rotate;updateis a partial update whosesettingsobject replaces the stored one except that entries left out or sent back as the masked******keep their stored value;deletereturns HTTP 400ReferenceExistwithdata.refswhen something still references the integration.Updated — on-call template schemas (3 schemas, 2 new properties each).
TemplateCreateRequest,TemplateUpdateRequest,TemplateItemnow carrydingtalk_app_war_room_enabledandslack_app_war_room_enabled, alongside the already-documented Feishu sibling. Source:fc-event/cmd/server/controller/template/template.go:38-40(create input, plainbool),:256-258(update input,*bool→ nullable, not required),structs/func.go:106-108(item, always serialized → required); button visibility rule fromcmd/engine/controller/notify/app_war_room.go:46-53(hidden when the incident is closed or has no responders).Nav / catalog reconciliation (required, operations were added)
docs.json: +9"POST /integration/..."entries under the on-call Integrations sub-group, in both the EN and the ZH navigation.{en,zh}/openapi/api-catalog.mdx: +9 rows each;<Accordion title="On-call (193 endpoints)">→ 202 endpoints; intro total 338 → 347.Verified with the Step 5.5 check: every path in every split spec is present in
docs.jsonand in both catalogs (nav_missing=none,catalog_missing=nonefor all five modules).Diff discipline
git diff --numstat --minimal— purely additive, no deletions anywhere:Purely additive with no key reordering: every pre-existing key in
paths/components.schemas/ each touched schema'spropertiesandrequiredkeeps its exact relative order (checked mechanically againstgit show HEAD:<path>). The 2-line deletions indocs.jsonand the catalogs are the two anchor lines that gained a trailing comma / were re-headed. EN and ZH are structurally identical for all new content (same paths, operationIds, schema keys,required, types, enums) — differences limited to summary/description/sidebar title/tag label/rendered body — and request/response examples use the same values in both files. All new examples were validated against their schemas (every example key resolves to a schema property).python3 -c "import json; json.load(...)"passes on all four spec files.mint broken-linkswas not run —mintis not installed in this environment.Unresolved
POST /channel/incident/daily-counts(registry rowchannel:read:incidentDailyCounts,auth=all, providerevent, added infefd8eac2026-09-14) has no handler onfc-eventmain. The implementation exists only on unmerged branches (origin/codex/aliyun-dataworks-op,origin/codex/checkly-alert-integration-dev:cmd/server/controller/channel/daily_incident_counts.go). Not documented — it needs the fc-event route onmainfirst. No route path was invented.monit-webapi/monit-edgeare not on GitHub (as in previous rounds), so the monitors module was left at its committedHEADcontent and not re-audited.mapping.yamlclaims neither/integration(nopath_prefix) nor, at module level,/monit/query,/route,/rum/data|field|resource,/oncall/license/list,/member/notify,/calendar/*,/status-page/*(the last four fail theprovidersfilter: the mapping sayspgy/event/statuspagewhile the registry rows saypgy/event/status-page). 17auth=allrows are unclaimed. The new/integration/*family is in that set, so it was written directly into the spec; the next generator run needsmapping.yamlupdated orguard_no_path_drop()will abort on these 9 paths.fc-event/cmd/server/controller/incident/inter.go(InterSimilarAmong, internal no-app_key route),logic/ai_sre/*(runtime internals),structs/channel.goAssignedTo.EffectivePersonIDs(push-event payload type, not in any public schema),fc-datasource/logic/data_source/plug_jira.gostatus_mapping(the Jira settings schema is not part of the public surface — every/datasource/jira/*row isauth=jwt),fc-rum/model/event/view.goFirstViewTime(json:"-").Open finding, not changed in this PR (needs a decision)
147 public operations document a rate limit that does not match their registry row (
AQps/AQpm): 136 of them document the account default1,000/minute; 50/secondwhile the row declares20/second, 300/minute(on-call 115 of them: platform 13, monitors 7, safari 7, rum 5). The other 11 are tuned in both directions — e.g./status-page/subscriber/importdocuments20/minute; 2/secondagainst a registry3/second, 60/minute, and/safari/artifact/streamdocuments100/minute; 10/secondagainst50/second, 1000/minute. Because 43 of the 45 operations that do carry a per-op cell are audited writes, the convention looks like "mirror the registry row", but the 11 non-20/300rows show the module data was also hand-tuned, so which side is authoritative is a product call. Not touched here — it is a 147-endpoint change and would bury the new-API diff.Examples are constructed, not captured
The dev API (
https://api-dev.flashcat.cloud) was not called: this environment cannot reference$FLASHDUTY_APP_KEY, so no real responses were captured. Every request and 200-response example for the 9 new operations is constructed from the Go types with realistic values (integration6113996590131, team1467226103121, 24-hexa_…ref IDs, a 32-hex + 3-digit integration key, ISO-free Unix-second stamps). No"string"placeholders. Values are consistent between the request and response example of the same operation.Environment prerequisite is missing (same blocker as the last six rounds)
This skill's mandated per-round pre-step — apply
runbooks/api-review-apply-patches.py(mapping.yaml alignment + generator baseline-fidelity patches) and followrunbooks/api-review-daily.md— could not run: neither file exists in the team knowledge pack. Checked against the platform this session (fduty safari knowledge-file-list --data '{"pack_id":"kpk_csftf5pZZ7tim6R8843eyL"}'): 26 files, none matchingapi-review. The reason it matters:scripts/generate_openapi.pyreads its module inputs from.api-review/modules/*.json, which are gitignored and absent from a fresh checkout, whileguard_no_path_drop()refuses to write a spec that would lose committed paths — so the generator cannot be re-run here without the missing prerequisite, and running it "with one hand tied" would silently drop ~330 endpoints. The changes above were therefore made as targeted edits to the split + consolidated specs, with the additive-only, key-order-preserving diff verified mechanically, which is the same shape as the previously merged daily audits (#400, #405). Restoring the two knowledge files (or changing the Automation prompt to drop the patch pre-step) unblocks the generator path for future rounds.