Skip to content

docs(api-reference): daily api-review 2026-11-10 — exchange calendars, team assignment, RUM crash-beacon knobs - #1177

Open
flashduty[bot] wants to merge 2 commits into
mainfrom
api-review/2026-11-10T0812Z
Open

flashduty[bot] wants to merge 2 commits into
mainfrom
api-review/2026-11-10T0812Z

Conversation

@flashduty

@flashduty flashduty Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

本轮审计

窗口 2026-11-09T09:16:29Z → 2026-11-10T08:12Z(约 23 小时)。两遍扫描都跑了:

  • (a) 各仓 git log --since=<窗口起点> 的非 merge 提交逐条看 git diff <commit>^1 <commit>;
  • (b) 净树 diff git diff <窗口前最后一个提交>..origin/main(忽略 merge 提交的字段虚影)。

本轮三处真实漂移中有两处只由 (b) 命中——分支写于窗口之前、合并落在窗口内:fc-pgy feat/exchange-calendar(merge 8e09b643)、fc-event feat/manual-incident-notify(merge 5da74c6de)。第三处(fc-rum feat/crash-ledger-main,merge 49ec5df)两遍都命中。

无 operation 增删,docs.json 与 en|zh/openapi/api-catalog.mdx 不动。

On-call — Calendars(updated,无新增 operation)

字段 / 位置 变更
CalendarListRequest.kind enum 新增 exchange.holiday,描述补充"共享交易所休市日历"
CalendarItem.kind enum 新增 exchange.holiday,并说明其时区即交易所时区
CalEventItem.day_end 新增,提前收盘的当地时刻(HH:MM)
CalDay.day_end 新增,仅在"工作日提前收盘"时返回
CalEventListRequest.cal_id 描述补充:kind=exchange.holiday 返回的交易所日历 ID 同样可用
CalendarCreateRequest.extra_cal_ids 描述补充:最多一个 exchange.holiday;关联后 timezone 跟随交易所并覆盖入参;关联两个返回 InvalidParameter
CalendarUpdateRequest.extra_cal_ids 同上约束
POST /calendar/create 使用说明 每账户上限 5 → 20 个日历
POST /calendar/list 使用说明 两个共享类别(region.official.holiday / exchange.holiday)都按调用方 locale 过滤;交易所日历的 cal_id 可在规则中直接引用

证据:fc-pgy/structs/calendar.go(CalKindExchangeHoliday、CalEventItem.DayEnd、CalDay.DayEnd)、fc-pgy/cmd/server/controller/calendar/calendar.go(listInput.Kind 的 binding:"oneof=region.official.holiday exchange.holiday personal"、maxCalInOneAccount = 20、linkedTradingCalendar)、fc-pgy/cmd/server/controller/calendar/event.go(calendarOf 接受交易所日历 ID)。

On-call — Escalation / Silence rules(updated,无新增 operation)

字段 变更
TimeFilter.cal_id 描述补充:设定后 start / end 按该日历的时区解读(交易所日历即交易所时区),并说明共享日历 ID 也可直接用

证据:fc-event/structs/channel.go(FnIsDayOff → FnCalDay,TimeFilter.Check 里 t = t.In(loc),注释放纽约时间语义)、fc-event/logic/incident/assign.go(cL.CalDay),随 aa61cb096 Merge pull request #3536 from feat/exchange-calendar 落在窗口内。TimeFilter 被 CreateEscalationRuleRequest、UpdateEscalationRuleRequest、CreateSilenceRuleRequest、UpdateSilenceRuleRequest、EscalateRuleItem、SilenceRuleItem 引用,属公共面行为变化。

On-call — Incidents(updated,无新增 operation)

字段 / 位置 变更
AssignedTo.team_ids 新增,1–20,展开为启用成员并入 person_ids;展开后上限 100;落存不保留(响应不返回)
AssignedTo 描述 请求可设置项补 team_ids
CreateIncidentRequest.assigned_to.team_ids 新增(内联副本,与 AssignedTo 同语义)
CreateIncidentRequest.assigned_to.notify.template_id 描述补充:模板必须存在于账户,否则 InvalidParameter
AddIncidentResponderRequest person_ids 移出 required(改为"person_ids 与 team_ids 至少一个")、加 maxItems: 100;新增 team_ids(最多 20)

证据:fc-event/structs/channel.go(AssignedTo.TeamIDs,binding:"omitempty,gt=0,lte=20")、fc-event/cmd/server/controller/incident/action.go(Create 的 notify 校验/默认值、addRspdInput.PersonIDs 由 required 改为 omitempty,lte=100、addRspdInput.Validate、createFormAssignValues 纳入 TeamIDs)、fc-event/logic/incident/assign.go(scopeAssignTargets 团队展开 + 100 人上限、resolveResponderPersonIDs、scoped.TeamIDs = nil 快照语义)。

RUM — Applications(updated,无新增 operation)

字段 变更
RemoteConfigValues.crashBeaconEnabled 新增,boolean | null
RemoteConfigValues.crashBeaconTimeoutMs 新增,integer | null,minimum 500 / maximum 2000

证据:fc-rum/types/remote_config.go(两个指针字段、Min/MaxCrashBeaconTimeoutMs = 500/2000、Validate 的取值校验、Merge、IsEmpty);该结构经 /rum/application/remote-config/{get,update,preview,history/*} 的 config.values 出入公共面。

removed

无。

不改项与依据

  1. fc-safari mid-turn / model-error-feedback(12 个提交,含 merge 8ae9d4e21、b3b5de47b)——改动全在内部件:cmd/api/runtime/*、logic/session/actor/*、logic/runner/*、logic/runtime/*、types/{steering.go(删除),turn_diagnostics.go,stream.go,drain.go,compact.go}。公共面 /safari/session/{get,list,delete,export} 的 EventItem 早已含 error_code / error_message / status,PendingUserMessage 早已含 steering,本轮无新字段可写。RunRequest / UserMessageBody 的 Steering 语义变化是进程内调用协议,不是 app_key 入参。
  2. fc-event ai_sre steering 收尾(4 个提交)——logic/ai_sre/* 运行时状态机,无 json/binding 变化。
  3. fc-statuspage 442cc9c(保留 incident ID、ID 冲突重试)——只动 model/change、model/structure、model/id_insert_log、types/id.go 与唯一约束探测,无字段标签变化,公共 status-page 请求/响应结构不变。
  4. monit-webapi a95a480(alert-rule outbox claim 死锁)——加锁顺序修复,无字段变化。
  5. fc-rum crash ledger 的数据面(6a6da88 / 11cb98e / e67af7b)——新增内部表 t_crash_ledger 与 field scope crash_ledger,但公共 scope 枚举没有扩:/rum/facet/count 的 oneof 仍是 session view action error resource long_task vital issue sourcemap(fc-rum/cmd/server/controller/facet/count.go),types/dashboard/validate.go 的 rumScopes 与 types/nlquery.go 的 NLQueryScopes 均未变,故不写 crash scope。同批新增的 launch_time / beacon 字段在 Datadog intake 协议(SDK 上报)里,不在 app_key 公共面。
  6. fc-pgy holiday 侧——/calendar/holiday/list、/calendar/holiday/event/sync registry auth=none,不在公共面,其 day_end 校验不写;is-day-off 不在 registry。
  7. go-pkg 83c2516(IsDayOff 返回时区)——内部 RPC 契约,公共面无对应 operation。
  8. fc-oncall / fc-datasource / monit-edge——窗口内零提交。

unresolved(维持不写入 spec)

  • POST /channel/incident/daily-counts
  • POST /change/info
  • 6 个 /safari/session/masking/* 与 SessionItem.masking_enabled——registry Auth: "all"、handler 在 main,但 fc-safari/etc/masking.yml 为 enabled: false,属 pre-GA 待产品定,保持 flagged。

registry 差集

scripts/parse_pgy_registry.py 解析 fc-pgy/logic/api/api_test.go 共 1262 行,过滤(auth == "all"、非 /event/push/、模块未 hidden)得公开面 357 行。按 gin :param ↔ {param} 归一后与 5 个 split 的 paths 求差,spec 缺 8 条,全部是上面的 unresolved 组(daily-counts + change/info + 6 个 masking),没有需要新增的 operation。

另需说明:skill 目录下发的 mapping.yaml 副本仍是旧的(缺 /integration、/route、/oncall/license、/monit/dashboard、/rum/dashboard、/rum/data/query、/rum/field/list、/rum/resource/info、/monit/query/* 等前缀),所以这些前缀的 registry 行在差集里表现为"spec 有、registry 无归属"。逐一核对后它们都已在对应 spec 中,与 claude-plugins-flashduty#101 的 mapping 更新一致,只是本地副本尚未同步——本轮不需要新增或删除 operation。

示例

未新增 operation,既有 request/response 示例一律保留未动。本轮未取 dev API 凭据,新增字段均落在既有 schema 上且不要求示例体同步:team_ids 是可选请求字段(响应不含),day_end / crashBeacon* 在各自响应示例中可缺省(schema 均非 required)。故无构造示例。

校验

  • 13 个 spec JSON 全部 json.load 通过(12 个 *.openapi.*.json + openapi.legacy.zh.json)。
  • python3 scripts/lint_openapi.py → OK: 12 spec files, no violations,exit 0。
  • python3 scripts/api_path_redirects.py --check → exit 0。
  • split ↔ consolidated 深比较(EN、ZH 各一遍,忽略 dict 键序):与改动前基线完全一致,仅剩两处已知手改——DutyError.reason(consolidated 独有)与 safari 的 BadRequest / Forbidden 示例如名差异,均未触碰。
  • EN / ZH 结构对等:本轮触及的 11 个 schema 与 2 个 x-mint 块逐项比对 shape 一致,只有人类可读文本不同。

与开放 PR 的关系

Flashduty AI-SRE added 2 commits November 10, 2026 08:12
…, team assignment, RUM crash beacon

Audit window 2026-11-09T09:16:29Z → 2026-11-10T08:12Z.

On-call calendars (fc-pgy feat/exchange-calendar, merged 8e09b643):
- CalendarListRequest.kind / CalendarItem.kind gain `exchange.holiday`.
- CalEventItem.day_end and CalDay.day_end document the early-close wall clock.
- extra_cal_ids: at most one exchange calendar, and linking one sets `timezone`.
- calendar/create usage: the per-account cap is 20, not 5.

On-call incidents (fc-event feat/manual-incident-notify, merged 5da74c6de):
- AssignedTo.team_ids and CreateIncidentRequest.assigned_to.team_ids (1–20).
- AddIncidentResponderRequest: person_ids no longer required, maxItems 100, new team_ids.
- assigned_to.notify.template_id must exist in the account.

RUM remote config (fc-rum feat/crash-ledger-main, merged 49ec5df):
- RemoteConfigValues gains crashBeaconEnabled and crashBeaconTimeoutMs (500–2000).

No paths added or removed, so docs.json and api-catalog.mdx are untouched.
…e calendar timezone

fc-event feat/channel-calendar (merged aa61cb096) changed TimeFilter.Check so
that a calendar decides the day and the calendar's timezone the wall clock
`start`/`end` are read in: a rule on a US trading calendar means New York
time wherever the service runs. TimeFilter is used by the escalation-rule and
silence-rule request/response bodies.

Also says how /calendar/list filters the shared exchange calendars by locale.

This branch has not been deployed

No deployments
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.

0 participants