Repository navigation
docs(api): daily audit 2026-10-14 — schedule cycles, release_limited, work-item status enums - #1052
Merged
Merged
Conversation
… work-item status enums Three source-verified fixes to the on-call specs, split + consolidated, EN + ZH: 178 insertions / 30 deletions. No path added or removed, so docs.json and the api catalog are untouched. No key reordering (order-sensitive HEAD -> worktree walk: 14 intended node changes per file, zero KEY_ORDER diffs). - ScheduleFixedTimeNotifyInfo: fc-oncall d581345 supports cycle day|week|month and adds `days`; the docs still said cycle=day only. Enum widened, `days` added. - LicenseListResponse: fc-event eebe84b61 makes /oncall/license/list always return `release_limited`. Field added, required, example updated. - Work-item statuses: fc-event df07bf805 restricts status to open|in_progress|done|cancelled and complete's target_status to `done`. Enums added to the four request schemas; the stale "client-defined / no fixed state machine" wording removed.
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.
What this is
Daily
api-review --mode generate --scope all --autoaudit of the public OpenAPI 3.1 specs.fc-pgy@9a12713a(logic/api/api_test.go, 1,212 rows, 366 withAuth: all).fc-event@03b3d09b1,fc-oncall@366de55,fc-rum@c9d1923,fc-statuspage@69ca45f,monit-webapi@87308c1,fc-datasource@c4c17f9,go-pkg@e56c64e(origin/main, fetched this run).flashduty-docs@e92b8695(main).unresolvedhandler lookups: 1 (listed below). No module failed to generate.Operation changes
No path was added or removed, so
docs.jsonand{en,zh}/openapi/api-catalog.mdxare deliberately untouched (no nav or catalog edit is due this round).Fixes (each one read from the Go source, not inferred)
1.
ScheduleFixedTimeNotifyInfo— week/month fixed-time cycles.fc-oncallcommitd581345("feat(schedule): support week/month cycles for fixed-time duty notification", merged 2026-10-14),models/schedule.go:Validate()requires a non-emptydaysforweek(each 0-6) and formonth(each 1-31); a short month without that date is skipped. The docs still saidcyclewas a single-value enum["day"]with "onlydayis supported" and nodaysat all — so a documented-valid request is the only thing the docs allowed, whileweek/monthwere unrepresentable.cycleenum["day"]->["day","week","month"], description rewritten.daysproperty (array of integer). Not added torequired, because it is only required forweek/month; the condition is stated in the description.2.
/oncall/license/list—release_limited.fc-eventcommiteebe84b61("feat(license): cap license releases per billing window"),cmd/server/controller/license/info.go: all three success branches ofLicenseListnow returngin.H{"total": ..., "items": ..., "release_limited": ...}. An account may release at mostlicense_cnt x 10seats per 30-day window; once the quota is used, releasing a seat is rejected withNoLicense(reasonrelease limitedin theFlashcat-No-Licenseheader).LicenseListResponse: newrelease_limited(boolean), added torequired(the handler always sets it), plus the field in the operation's 200 example.3. Work-item statuses.
fc-eventcommitdf07bf805("fix(work-item): accept only the four work-item statuses"),logic/post_incident/work_item.go+structs/work_item.go:WorkItemStatusOpen|InProgress|Done|Cancelled. Create rejects anything outside the four (blank defaults toopen), update rejects anything outside the four (including empty), complete'starget_statusmust be exactlydone, convert accepts the four.The docs described all four fields as free-form ("client-defined status", "There is no fixed state machine") — actively wrong for
complete, where any other value is a 400.CreateWorkItemRequest.status: enum[open, in_progress, done, cancelled]+ default note.UpdateWorkItemRequest.status: same enum.CompleteWorkItemRequest.target_status: enum[done], "There is no fixed state machine" removed.ConvertWorkItemRequest.target_status: same four-value enum (stays nullable).Note: the two nullable
status/target_statusfields keep their existing["string","null"]type union and get an enum withoutnull, which is the convention already used by the 20 other nullable-enum properties in this repo (e.g.CreateStatusPageChangeRequest.updates[].status). No new convention introduced.Diff discipline
api-reference/on-call.openapi.{en,zh}.json,api-reference/openapi.{en,zh}.json) — larger than the usual 100-line budget because this round carries three independent schema fixes; no file rewrite, no reformatting.json.dumps(..., indent=2, ensure_ascii=False)before editing, and each new key was inserted at the position the file's own local ordering calls for (Go order in the split specs, alphabetical in the consolidated copies).git show HEAD:<path>against the working tree: exactly the 14 intended nodes change per file, zeroKEY_ORDERdiffs, no unintended key-set or type change.python3 -c "import json; json.load(open(path))".mintis not installed in this environment, somint broken-linkswas not run; only existing paths were edited, so no link can have changed.Constructed examples
No new operation and no new operation-level example this round. The one example edit is adding the literal
"release_limited": falseto the/oncall/license/list200 example so it matches the field the handler now always returns. The dev API (api-dev.flashcat.cloud) is not callable from this environment, so examples remain schema-derived; nothing else was touched.unresolved (recorded, not written into any spec)
/channel/incident/daily-counts(channel:read:incidentDailyCounts,Auth: all) is in thefc-pgyregistry but has no route and no handler anywhere onfc-eventorigin/main(git grep -n 'daily-counts' origin/mainis empty); the controller exists only onorigin/devand feature branches. Same finding as the 2026-10-12 round. Needs a human: add the handler to main, or drop the registry row.Recorded but not fixed (needs a human decision on direction)
assigneesfrom the 7/incident/work-item/*response examples while the consolidated copy includes it, even thoughWorkItemItem.requiredcontainsassignees. Aligning either way is ~200 lines and the two existing conventions disagree ("split is the rendering truth" vs "a field in the backend struct belongs in both"), so it stays out of a daily-audit diff. Unchanged by this PR.DutyError.reason: the consolidated copies carry an extrareasonproperty markedx-flashduty-preserve-absence: true; the split specs do not. That marker is the established hand-edit convention, so the hand-edit was left alone and only recorded here. Unchanged by this PR.api-reference/safari.openapi.*.jsondiverges from the consolidated copy (and from the other four split specs) in 4 places insidecomponents.responses— an extrasummaryon the BadRequest example, askill_id-specific BadRequest message,accessDeniedvsnoEditPermissionon Forbidden, and a shorter TooManyRequests description. Theskill_idin the message looks deliberate (safari-specific), so this was not "fixed". Unchanged by this PR.flashcatcloud/flashduty-docs#1051documents App Key leak handling, but thefc-pgyfeature it documents was merged and then reverted the same day (35130657then9f39515c/9a12713a), so its subject is no longer onfc-pgymain. Not touched here — it is someone else's open PR. A maintainer should close or rework it.