API governance
API governance shows API coverage across every endpoint Qodex knows about. Use it to answer practical questions: which endpoints are tested, which are untested, which are failing, and where Qodex should generate more coverage.How it works
Governance reads the same endpoint rows used by imports, the endpoint catalog, the API Playground, and discovery. There is no separate coverage database, so the catalog you see and the numbers the agent uses stay aligned. For every endpoint, governance shows:- Method and path.
- Tag and module (from the spec).
- Coverage status: tested, untested, or failing.
- Number of scenarios covering it, broken out by category: functional, security, pentest.
- Last test verdict (pass or fail) across all scenarios covering it.
- Open findings tied to scenarios covering this endpoint.
- Observed auth type and any missing security headers.
How endpoints enter the catalog
Endpoints arrive from three places:- Spec import: every operation in an OpenAPI or Swagger document, plus every request in a Postman collection. Spec-derived fields (
request_schema,response_schema,parameters,summary) populate at import time. - Auto-discovery: the deterministic crawler (
crawl_app) walks your app and captures every API call the UI makes. New method/path pairs upsert intoapi_endpointswith their observed headers, status, and body shape. - Live runs: every scenario execution syncs the endpoints it touched back to the catalog (
endpoint-sync.ts), incrementingtestCountand updating last-tested timestamps.
is_edited flag. Playground-owned fields (name, headers, body, auth when edited) stay; spec-only fields (parameters, request_schema, summary) refresh.
Coverage status definitions
| Status | What it means |
|---|---|
| Tested | At least one scenario touches this endpoint via a non-cleanup step, and the last run passed. |
| Untested | Zero scenarios touch this endpoint, or scenarioCount == 0. |
| Failing | At least one scenario covers it and the last run failed. |
The fill-coverage scan mode
fill-coverage is a scan mode that targets endpoints with zero scenarios. The agent:
- Calls
endpoint_describewithaction="gaps"to get the uncovered set. - Clusters the uncovered endpoints by tag or path prefix into groups of 5 to 8.
- Spawns up to 5 parallel sub-agents (one per cluster) to author scenarios.
- Re-queries gaps between waves to converge on full coverage.
When governance matters
- Use it for quarterly QA review: what is covered, what is not, and what changed.
- Use it before a release: are any critical endpoints failing?
- Use it after a spec import: which new endpoints have zero coverage?
- Use it for security sweeps: which auth-required endpoints have no security tests?
When not to use it
- Single-endpoint debugging. Use the API Playground for that. The catalog is the bird’s-eye view.
- Real-time alerting. Governance reflects state at view time. For real-time pass/fail signals, watch test-run dashboards.
On the roadmap
Related
Endpoint catalog
The queryable list of every endpoint.
Scenarios
The unit being counted as coverage.
Auth profiles
How role-aware coverage gets clean.
Findings
What surfaces when a covering scenario fails.