You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BUG-45: GET /admin/kpi differs from the KPI definitions: one mixed lead time, another auto-approval formula, no approval turnaround, no schema #174
In-QAPull request open to the integration branch: review rounds, ruling and CI runningbugSomething isn't workingclass:INVInnovation: a new feature, design, idea or methodsev:mediumIncorrect data, a weak control or a slow service, with no direct lossstatus:openNo fix yet
What is wrong: The KPI rows of GET /api/v1/admin/kpi differ from the definitions of docs/01 and of docs/17-kpis.md in four ways. (1) "Lead time p90 (all)" mixes auto-approved and approved requests, whose targets are 10 minutes and 1 business day. (2) "Auto-approval rate" divides by all requests, and the design divides by the requests that matched a policy. (3) The approval turnaround is not in the response. (4) The response model is dict[str, Any] for each part, so the OpenAPI document has no schema of a KPI row, and a row has no stable ID.
How to prove it: Tests in cmapi/tests/service/test_kpis.py: with one auto-approved and one approved synced request, the two lead times differ; with one request that a guard stopped, the auto-approval rate is 0.5; each row has an id that docs/17 lists as live.
Measured or inferred: Read from the code and measured with the recorded sample on 2026-11-13, in the KPI review.
Severity: Medium.
What must hold after the fix: Each live KPI of docs/17 is one row with a stable id, the designed formula, a unit, a target and targetStatus. The response has typed models. A test fails when a live KPI of docs/17 is missing from the response.
Research:docs/17-kpis.md has the definitions and their sources.
Solution (inline, not applied): Not written here. Where the tag is In-Progress, the fix is on branch kpis.
Class: INV. The fix adds the KPI contract and its check.
In-QA: pull request #177 closes this issue. Its tests failed before the change and pass after it; GitHub's checks on its head were not read yet when this was written.
In-QAPull request open to the integration branch: review rounds, ruling and CI runningbugSomething isn't workingclass:INVInnovation: a new feature, design, idea or methodsev:mediumIncorrect data, a weak control or a slow service, with no direct lossstatus:openNo fix yet
Activity
ephico2real2 commentedon Nov 13, 2026
In-QA: pull request #177 closes this issue. Its tests failed before the change and pass after it; GitHub's checks on its head were not read yet when this was written.