From 155f1fec9882874953ff06e50fddbb48a1c0920d Mon Sep 17 00:00:00 2001 From: shankar0123 Date: Thu, 14 May 2026 13:06:57 +0000 Subject: [PATCH] =?UTF-8?q?ci(arch-h1):=20Phase=2013=20Sprint=2013.7=20?= =?UTF-8?q?=E2=80=94=20tighten=20rest-deferred=20floor=20from=20monotonic-?= =?UTF-8?q?decrease=20to=20hard=20zero-exact=20pin;=20close=20ARCH-H1=20+?= =?UTF-8?q?=20ARCH-M1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closure commit for Phase 13 (ARCH-H1 OpenAPI ↔ handler gap + ARCH-M1 per-process rate-limit ceiling). Tightens the parity-script CI guard to a HARD zero-exact pin on the rest-deferred bucket: any future PR adding a new REST route MUST author its OpenAPI op or fail CI. The `category: rest-deferred` escape hatch is now closed for good. The sibling monotonic-decrease guard (openapi-rest-deferred- monotonic.sh) stays in tree as belt-and-suspenders — both must hold. The monotonic guard catches baseline-drift accidents (operator edits the baseline up without surfacing rationale); this guard catches the underlying rest-deferred bucket re-growing at all. Phase 13 commit chain (six prior commits, ordered): 67f346cd Sprint 13.1 — two-bucket exception categorization + monotonic guard (rest-deferred=28 baseline, wire-protocol=36, fail-on-drift) c8347d74 Sprint 13.2 — ARCH-M1 Postgres sliding-window limiter (SELECT FOR UPDATE arbitration) + migration 000046 rate_limit_buckets + falsifiable multi-replica integration test (TestRateLimit_PostgresBackend_CapEnforced AcrossReplicas: 100 concurrent allows across 3 limiters cap=10 → exactly 10 succeed / 90 ErrRateLimited) a41fc2d7 Sprint 13.3 — backend selector (CERTCTL_RATE_LIMIT_BACKEND={memory|postgres}) + scheduler janitor sweeping updated_at 0: + print(f"::error::rest-deferred bucket is non-empty ({bucket_counts['rest-deferred']} entries) — Phase 13 Sprint 13.7 closure pins this at zero.") + print() + print("Every entry in api/openapi-handler-exceptions.yaml with") + print("`category: rest-deferred` represents a REST-shaped route whose") + print("OpenAPI op was deferred. Author the OpenAPI op in api/openapi.yaml") + print("with a request/response schema mirroring the Go handler's") + print("projection types, then delete the exception entry.") + print() + print("Offending entries:") + for entry in (exc_doc.get('documented_exceptions') or []): + if entry.get('category') == 'rest-deferred': + print(f" {entry['route']}") + fail = True + # Routes in router but NOT in openapi AND NOT in exceptions = drift router_only_undocumented = router_set - oapi_set - exception_set if router_only_undocumented: