Repository navigation
docs(api-reference): api-review 2026-10-20 — document high_cardinality on RUM fields - #1085
Merged
Merged
Conversation
fc-rum added types.FieldItem.HighCardinality (json:"high_cardinality") in 91194b9 (2026-10-15, feat(dashboard): restrict grouping by high-cardinality fields); /rum/field/list returns it via logic.FieldTableToItem. The field has no apidoc:omit, so it belongs in the published RumFieldItem schema. Adds the property and its required entry to the rum split specs and the consolidated reference copies, EN + ZH, and to the /rum/field/list response example.
3 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.
api-review 每日审计(--mode generate --scope all --auto)
基线:
flashduty-docsmaincc51de68(2026-10-19 20:17 +08),实现仓均取origin/main(fc-pgy
d416a2c1、fc-eventc16eade92、fc-oncallc76999b、fc-rumc6f3e84、fc-statuspageedf9dad、monit-webapi
d287bf1、fc-datasource55a1320、go-pkg5028f42、fc-safari077d7f1e、monit-edgefb7e4cb)。本轮结论
auth=all且非/event/push/的公开行 380 条,文档 operation 379 个,差集仍只有 1 条已知 unresolved(见下)。无接口增删,故未改
docs.json与{en,zh}/openapi/api-catalog.mdx(按铁律 3)。各模块 operation 变化
RumFieldItem+/rum/field/list响应示例)本次修复(唯一一处,diff
+24 / -0,4 个文件)RumFieldItem.high_cardinality(boolean)缺失:fc-rumtypes/field.go的FieldItem.HighCardinality bool \json:"high_cardinality"`, 由logic/transfer.go#FieldTableToItem赋值,/rum/field/list的 handler (cmd/server/controller/field/field.go#List)把它作为items返回;该字段**无**apidoc:"omit", 故属公开契约。引入提交91194b9(2026-10-15,feat(dashboard): restrict grouping by high-cardinality fields`),已在主干,属窗口外历史遗留漂移(本轮窗口起点为 docs main HEAD 的 2026-10-19 12:17Z,故按「读源码定方向」单独修)。
api-reference/rum.openapi.{en,zh}.json与api-reference/openapi.{en,zh}.json的components.schemas.RumFieldItem增加该属性,required追加high_cardinality(Go 中无omitempty,故与非指针标量一致列入 required),并同步
/rum/field/list的 200 响应示例。group与is_facet之间;required按 Go 结构体顺序插在is_facet之后。落盘用「committed 内容 →json.loads→ 插入 →json.dumps(indent=2)」,已逐文件验证无损往返(四个文件均为
ensure_ascii=False, indent=2+ 结尾换行),diff 只含上述新增。本轮核查过、判定不改的项(每轮重算,不照抄上一轮)
POST /channel/incident/daily-counts(findings.unresolved,1 条):注册表auth=all有行,但 fc-event 主干仍无 handler 与路由(
cmd/server/controller/channel/daily_incident_counts.go只在origin/dev),按 skill 记 unresolved、不写任何 spec。e76de3a97(窗口内):iFilter删除range_by/orderby/by_intersection,三者原本就带
apidoc:"omit",文档/incident/list请求体从未包含它们,无需改。无 schema 字段变化;
structs/webhook.go的新增integration_id/data_source_id是函数内匿名结构体,structs/alert.go的event_id属/event/push/入站面(非公开),均不动。c185199:account_domain.go的account_id/domain/in_use/dns01对应路由在注册表是
jwt/none,非公开面。907ad6d/c1561f0:im_setup.go(step/setup_checks/integration_idrequired)与plug_teams.go(user_idrequired)对应路由为jwt(如/datasource/im/setup/confirm),非公开面。868f512(rc_wait):只进model/session与 datadog 入站结构,公开的/rum/session-replay/*用的是回放表;
types/field.go除high_cardinality外只是 gofmt 对齐。c273b73:model/edge_instance.go的heartbeat_age_seconds/online,/monit/edge/*不在公开注册表;model/active_alerts.go的改动是json:"-"。8fa80ba:account_id只加在callee/pgy.go的 pgy 客户端类型上。logic/environment/redis_bus.go的A2AFramePayload(task_id/source_instance_id/replay_count)是跨实例 Redis 中继帧,不在公开 spec;logic/tool/builtin/*.go的jsonschema:文本是Agent 工具入参 schema,不进 OpenAPI。
DutyError:consolidated 有reason(x-flashduty-preserve-absence: true的手改标记),split 没有;按既定约定不动,仅记录。
components.responses:BadRequest/Forbidden示例与其他 4 个 split 不一致(含 safari 专有字段),判定为有意定制,不动。
monitors的/monit/rule/move、safari的/safari/artifact/gallery/{list,get,update}在 ZH 规格里用了中文示例值(如「移动成功」「支付接口延迟复盘报告」),与 skill「双语示例取值必须一致」相悖。这批中文示例由
4eaf43df(2026-10-17,docs(api-reference): align every operation with server behavior)一次性写入,属近期有意为之;改回去要动 4 个 operation 的用户可见示例,方向需人定,故本轮只记录不改(默认以 split 为准的原则在此不适用——两侧都是「有意为之」)。
ScheduleNotify.advance_in_time描述不含 Unix/epoch:该字段是「提前多少秒」的时长而非时间点,按 skill 的判据本就应该保持
integer,不是缺口(其余 0 处 Unix/epoch 缺口)。一致性校验结果
唯一差异是
ErrorCode.x-enumDescriptions(人类文本,应当本地化)与上述第 12 条示例取值。$ref悬空:0。advance_in_time见上,属时长)。docs.json导航与两份api-catalog.mdx覆盖:5 个模块的 path 全部命中,none缺失。构造示例说明
本环境无法调用
api-dev.flashcat.cloud(拿不到FLASHDUTY_APP_KEY),因此本轮没有回填真实响应示例;所有示例均按 schema 构造。本轮新增内容只有 schema 属性
high_cardinality与其在/rum/field/list既有示例里的一个布尔值,未构造新的业务取值。未覆盖项 / 限制
mint,mint broken-links未运行;本轮只改既有 schema 属性、无新增路径,不可能产生新链接。origin/main中提交时间晚于 docs main HEAD 的提交 + 其与第一父的 diff)只覆盖窗口内变化;本轮据 21 天
json:/binding:增量的补充扫描,找出第 1 条那处窗口外遗留。更早的历史漂移仍需全量源码 vs 文档对照,未在本轮展开。
mapping.yaml把on-call/calendar的 provider 指为event(实际 handler 自 2023 年起在 fc-pgy),属已知配置缺陷,按既定政策只报告不改 skill 本体。