Repository navigation
docs(api): daily audit 2026-10-08 — document the incident_list dashboard panel kind - #1023
Merged
Merged
Conversation
…ard panel kind Regenerated the public API specs for the 2026-10-07 → 2026-10-08 window. New public surface (source: monit-webapi origin/main 75bf6c5, PR #135, "feat(dashboard): 支持告警汇总面板类型 incident_list", commits b60e665 + 8fb2241): - adds the `incident_list` dashboard panel visualization kind. It is queryless (QuerylessVizKind() = text | incident_list in types/dashboard/contract.go, and the panel switch in validate.go groups it with `text`), so it carries exactly `{kind, options}` — the wire format asserted by types/dashboard/contract_test.go#TestIncidentListVizConfigWireFormat. Documented as `DashboardIncidentListViz`, wired into the `DashboardVizConfig` oneOf + discriminator, added to the `DashboardOutlineVizConfig.kind` enum, and noted in the `DashboardPanel.queries` description. Contract fix: - `IncidentFeedItem.deleted_at` said "(ms)" instead of "milliseconds". The field is a millisecond epoch (fc-event structs/feed.go:208, written via tsMilli at logic/feed/feed.go:85,141), and generate.md Step 3 requires the description to contain `milli` for the go-flashduty SDK to map it to TimestampMilli. It was the only such outlier among the 214 epoch int64 fields in the corpus; its two siblings in the same schema already say "milliseconds". No operations were added, removed, or re-versioned this round: the fc-pgy registry is unchanged at 366 `auth: "all"` rows and the committed path set is still 365, so `docs.json` and both `api-catalog.mdx` files are deliberately untouched. Files: 5 (+126/-18; identical counts under `git diff --minimal`, i.e. no reordering).
6 tasks
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-reference audit — 2026-10-08
Scope:
--mode generate --scope all --auto. Round drawn againstflashduty-docsmain=fa6e962a.Window analysis
Window start = the 2026-10-06 round's analysis point (
docs mainmerge of #1022 at2026-10-06T08:37:15Z). Base-diffed each source repo from the last commit before that instant toorigin/main, so commits merged in-window with older author dates are not missed:origin/main41b236a75bf6c5types/dashboard/*+ runtime + tests + plan docs)ac1e2bc8ac1e2bc8知识rename merged 2026-10-06 was already handled by #1022)monit-webapi75bf6c5= merge of PR #135feat/dashboard-incident-list-panel(commitsb60e665,8fb2241).Operation changes per module
No operation was added, removed, or re-versioned. The fc-pgy registry is unchanged at 366
auth: "all"rows, and the committed public path set is still 365; the only registered public path with no module handler remains/channel/incident/daily-counts(see unresolved, below). Because there is no page add/delete,docs.jsonand both{en,zh}/openapi/api-catalog.mdxare deliberately untouched (no nav or catalog edit is needed, and a no-op edit would only produce a large diff).What changed
1. New dashboard panel visualization kind
incident_list—monitorssplit + both consolidated files, EN and ZH.Source of truth in
monit-webapimain:types/dashboard/variants.go—VizConfig.UnmarshalJSONgainscase "incident_list", decoding onlyvizCommonand rejecting unknown fields, so the wire shape is exactly{kind, options}.types/dashboard/contract.go— newQuerylessVizKind(kind) bool=text | incident_list.types/dashboard/validate.go— the panel switch groupscase "text", "incident_list"(no queries, nodatasource_ref) and runsdatasourceRefvalidation only when!QuerylessVizKind(kind).logic/logic_dashboard_runtime.go—PanelRun/PanelPreview/resolvePanelQueryPlannow reject any queryless kind, with the message built from the kind.types/dashboard/contract_test.go#TestIncidentListVizConfigWireFormat— asserts{"kind":"incident_list"}and{"kind":"incident_list","options":{...}}decode, thatmarkdown/value_fields/ unknown fields are rejected, and that marshal emits{"kind":"incident_list","options":{...}}.misc/plan/dashboard/implementation/contracts.md— the intended enum istime_series | table | stat | bar | gauge | logs | text | incident_list, withincident_listcarrying no typed fields (settings live inoptions, rows are filled by the client from the Flashduty incident API).Spec edits, mirroring the existing per-kind style (
DashboardTextVizminusmarkdown):DashboardIncidentListViz(kindenum["incident_list"], openoptions,required: [kind, options]), inserted directly afterDashboardTextVizto match the Go variant order;DashboardVizConfig.oneOfgains the arm anddiscriminator.mappinggains"incident_list";DashboardOutlineVizConfig.kindenum + description gain the value;DashboardPanel.queriesdescription now reads "textandincident_listaccept none" (「text、incident_list不允许查询」).2.
IncidentFeedItem.deleted_atmillisecond wording —on-callsplit EN + consolidated EN (1 leaf each).It read
"Soft-delete timestamp (ms). Zero if not deleted.". The field is a millisecond epoch —fc-eventstructs/feed.go:208(DeletedAt int64) is written viatsMilliatlogic/feed/feed.go:85,141— andgenerate.mdStep 3 requires a millisecond field's description to containmilliso the go-flashduty SDK maps it toTimestampMillirather than a bareint64. It was the only such outlier among the 214 epochint64fields in the corpus; its two siblings in the same schema (created_at,updated_at) already say "milliseconds". Now"Soft-delete timestamp in milliseconds. Zero if not deleted."The ZH side already said 毫秒 and is unchanged.Verification performed
python3 -c "import json; json.load(open(path))"—monitors41 paths / 185 schemas,on-call202 / 410, consolidated 365 / 826.git show HEAD:<path>(committed baseline only, never the worktree): exactly the intended leaves changed — 1 inon-call.openapi.en.json, 15 in each of the four dashboard-bearing files. Every hunk is listed above; none is a reorder.git diff --numstatequalsgit diff --numstat --minimalfor all five files, i.e. no phantom delete/re-add.json.dumps(obj, ensure_ascii=False, indent=2) + "\n"(trailing newline probed per file) — so no incidental formatting churn.summary,description,title,x-mint,tags,name,x-enumDescriptions,examples): 0 differences across all five modules.openapi.legacy.zh.jsonuntouched.docs.jsonand in bothapi-catalog.mdx(nothing new to add — no operation changed).Constructed examples
No operation was added, so no new request/response example was required and no example was touched this round. All pre-existing examples are unchanged. This environment cannot read the credential env var, so the dev API (
https://api-dev.flashcat.cloud) was not called and no example was re-captured.Unresolved
POST /channel/incident/daily-counts— registry rowauth: "all", but no module claims the path and no handler exists in any backend repo. Fifth consecutive round unresolved; not emitted rather than fabricated./integration/*rows have nomapping.yamlprefix. They are already present in the committed specs; the skill's working copy ofmapping.yamlis behind. Not a documentation gap.mint broken-linkscould not run (no node/npx in this environment); the skill's Step 5.5 reachability check was used instead and reports no gap.Known pre-existing split/consolidated inconsistencies (recorded, not touched)
Identical at
HEADbefore this round, so not drift introduced here; both were already adjudicated in earlier rounds and remain human decisions:DutyError.reason— present in the consolidated specs plus themonitors/rumsplits (carrying the deliberatex-flashduty-preserve-absence: truemarker, 76 occurrences corpus-wide) but absent from theon-call/platform/safarisplits.go-pkgmainsrv/error.gohas onlycode/message, andmonit-webapi's envelope error is{Code, Message}(theReasonfield lives on the unrelatedtypes/dashboard/runtime.goRuntimeError). Per the standing decision not to erase human-marked content, it is left as-is.on-callWorkItemItem/ListWorkItemRequest— the split and the consolidated side disagree onassignees/agent_session_id/agent_session_venue/assignee_type.fc-eventmainstructs/work_item.go:47has neither (AssigneeIDs []int64 json:"assignee_ids"only) — the supporting commit7eff20f30is onorigin/feat/work-item-ai-sreandorigin/dev. Neither side can be aligned frommain, so no change was made.Round note (known environment gaps)
The knowledge pack's
runbooks/api-review-daily.mdandrunbooks/api-review-apply-patches.pyare still absent, so the "apply baseline-preservation patches, then runscripts/generate_openapi.py" pipeline could not be used — this is the fifth round affected..api-review/modules/*.jsonis gitignored and absent, so the generator cannot run. This round therefore used the established fallback: committed-baseline (git show HEAD:<path>) reconstruction plus a targeted, dry-run-first minimal-diff patch script, verified by the leaf-level deep compare above.