Bugs

Compute a per-module defect heatmap (count + week-over-week trend) for a chosen window

Changed on

Bearer atc:read (or cookie session). Mirrors GET /api/v1/projects/{id}/metrics/recovery-cycles. One SECURITY DEFINER RPC (bunkai_report_project_defect_heatmap) resolves the Project's workspace and re-checks ACTIVE membership in-band; any role reads, viewers included. No pagination or filters: the whole-project rollup is small and bounded. Each module's defect_count rolls up its full descendant subtree (path-prefix match); archived modules are excluded from the heatmap by default but a filed defect against a since-archived descendant still counts toward an active ancestor. A Project with zero bugs returns every active module at Clean/0 (never a 404) — a 404 means the Project itself is missing, foreign, or unreadable.

get/api/v1/projects/{id}/bugs/heatmap

Request

  • Base URL: http://localhost:3000
  • URL: http://localhost:3000/api/v1/projects/{id}/bugs/heatmap
  • Auth: one of:
    • API key in cookie sb-fmbpikzpkafptqximhxn-auth-token
    • HTTP bearer

Path parameters

idstring uuid required

The Project whose defect heatmap to read.

Query parameters

window'7d' | '30d' | '90d'

The rollup window for defect_count. Defaults to 30d. An unsupported value is a 400 bad_request (not the repo's usual validation_failed/422 — AC-11's explicit wording for this error).

Response

The defect heatmap report.

window'7d' | '30d' | '90d' required
generated_atstring date-time required

Freshness timestamp for this read — a live, unpaginated query, not a cached snapshot.

Changes

    • warning

      added the new test_outside_plan_project enum value to the / response property for the response status

    • warning

      added the new test_outside_plan_project enum value to the / response property for the response status

    • warning

      added the new test_outside_plan_project enum value to the / response property for the response status

    • warning

      added the new test_outside_plan_project enum value to the / response property for the response status

    • info

      removed the test_outside_plan_project enum value from the / response property for the response status

    • info

      removed the test_outside_plan_project enum value from the / response property for the response status

    • info

      removed the test_outside_plan_project enum value from the / response property for the response status

    • info

      removed the test_outside_plan_project enum value from the / response property for the response status