Summarize test coverage across a whole workspace
Changed onBearer atc:read (or cookie session) — coverage is a workspace-wide inventory of test assets, the same class of read the sibling Home endpoints (/recent-projects, /active-runs, /open-bugs) are gated on. Computed by summing bunkai_report_project_coverage — the SAME rollup behind GET /api/v1/projects/{id}/coverage and the project Metrics screen — over every project in the workspace, so the two endpoints can never disagree about whether an acceptance criterion is covered. The workspace figure is AC-weighted (sum(ac_bound) / sum(ac_total)), not an average of per-project percentages. The shortfall is reported as TWO separate figures on purpose: ac_not_run (test cases bound, awaiting execution) and ac_uncovered (nothing bound at all) are different problems and a single percentage conflates them. Execution state is POINT-IN-TIME, not cumulative — each ATC counts by its most recent run only, and joining a new run resets it to pending — so ac_executed and executed_coverage_percent fall when a regression run opens and are not a history of what has ever been tested; ac_coverage_percent is the figure that only moves when coverage itself does. A successful response may be up to 60 seconds stale (the rollup is memoized per workspace to keep this off the hot path of every landing-page load); adding or removing a project invalidates it at once. NO trend or prior-period delta is returned: nothing in the schema records when an ATC was bound to an acceptance criterion or when a step was executed, so a historical coverage figure cannot be sourced without inventing one. Runs entirely under the caller's own RLS, so a foreign, nonexistent, or lost-membership workspace id returns the SAME zeroed 200 (with null percentages) that an empty workspace does — never an existence echo. A read that FAILS answers 500, never zeroes.
Request
- Base URL: http://localhost:3000
- URL: http://localhost:3000/api/v1/workspaces/{id}/coverage
- Auth: one of:
- API key in cookie sb-fmbpikzpkafptqximhxn-auth-token
- HTTP bearer
Path parameters
Response
The workspace's coverage rollup. Percentages are null when the workspace holds no acceptance criteria.
Changes
- warning
added the new
test_outside_plan_projectenum value to the/response property for the response status - warning
added the new
test_outside_plan_projectenum value to the/response property for the response status - warning
added the new
test_outside_plan_projectenum value to the/response property for the response status - warning
added the new
test_outside_plan_projectenum value to the/response property for the response status
- warning
- info
removed the
test_outside_plan_projectenum value from the/response property for the response status - info
removed the
test_outside_plan_projectenum value from the/response property for the response status - info
removed the
test_outside_plan_projectenum value from the/response property for the response status - info
removed the
test_outside_plan_projectenum value from the/response property for the response status
- info