Skip to content

docs(api): daily audit 2026-08-25 — align stale envelope schemas (safari + consolidated) - #310

Merged
ysyneu merged 1 commit into
mainfrom
api-review/20260825-081059
Aug 25, 2026
Merged

docs(api): daily audit 2026-08-25 — align stale envelope schemas (safari + consolidated)#310
ysyneu merged 1 commit into
mainfrom
api-review/20260825-081059

Conversation

@flashduty

@flashduty flashduty Bot commented Aug 25, 2026

Copy link
Copy Markdown

Summary

Daily api-review audit (2026-08-25). The full generate pipeline was not run this round: the knowledge pack is missing runbooks/api-review-apply-patches.py and runbooks/api-review-daily.md (confirmed by the pack sentinel: 20 files, no api-review runbook; established since 2026-08-24), so per iron rule 6 the generator stays blocked. Per the documented fallback, a deterministic audit on HEAD was performed instead (fixed content below), then surgical fixes applied.

Audit results (HEAD, all deterministic)

  • Registry fc-pgy/logic/api/api_test.go @ 08c824a4: 920 rows, 337 auth: all; public set (auth=all, path not /event/push/) = 337 unique paths.
  • Specs (per-module split files @ eba0b02): on-call 191, platform 27, monitors 42, rum 35, safari 42 = 337 — registry ↔ spec comparison is a perfect match in both directions (0 registry-only, 0 spec-only).
  • Consolidated openapi.en/zh.json: 337 paths, identical to split union; en/zh parity: 0 path / operationId / schema-name diffs (all 5 modules).
  • docs.json pages allow-list covers 191/27/42/35/42 ops (pages-only = 0, spec-only = 0); en/openapi/api-catalog.mdx: 337 rows, stated 337, module counts 191/42/35/42/27; zh same 337 rows.
  • Lint: all 12 spec files load as JSON, $refs resolve, no duplicate operationIds, OpenAPI 3.1.0 → no endpoint added or removed → no docs.json / api-catalog.mdx changes needed.

Drift found and fixed (1 finding)

Stale lean envelope schemas in safari.openapi.{en,zh}.json + consolidated openapi.{en,zh}.json — committed internal drift:

  • ErrorCode: missing x-enumDescriptions (per-value descriptions for all 20 wire codes), missing example, and a plain description instead of the canonical code/HTTP/meaning table.
  • DutyError: missing properties.message.example; zh files carried English descriptions.
  • ErrorResponse: zh files carried English description.

Canonical truth = the on-call split, which is byte-identical to platform/monitors/rum (verified). Fix: replaced the three schema definitions in the 4 stale files with the canonical objects (+112/−16 lines across 4 files):

File Change
api-reference/safari.openapi.en.json ErrorCode + DutyError → enriched
api-reference/safari.openapi.zh.json ErrorCode + DutyError + ErrorResponse → enriched (zh text)
api-reference/openapi.en.json ErrorCode + DutyError → enriched
api-reference/openapi.zh.json ErrorCode + DutyError + ErrorResponse → enriched (zh text)

Verification: sort-key deep compare vs HEAD yields exactly 22 differences, every one in the three envelope schemas (no order churn); after the fix all 12 spec files carry an identical canonical envelope (explicit cross-file check); path counts unchanged (337); re-run JSON validation passes.

Notes

@ysyneu
ysyneu merged commit ab80f4a into main Aug 25, 2026
2 checks passed
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.

1 participant