Skip to main content

Quality Gates

Quality gates keep search and planning improvements measurable.

Use gates to decide whether a change is ready for a release, not to prove that every possible API call succeeds. A good gate makes both success and failure diagnosable.

Development Loop

Use quick deterministic checks during implementation:

make quick
poetry run pytest tests/test_graphify_metadata.py tests/test_openapi_readiness.py -q

Use larger OpenAPI and LLM checks only when retrieval, selector, or plan logic changes materially.

Gate Levels

LevelPurposeTypical Commands
quicklocal contract and regression loopmake quick
docsdocumentation typecheck/build/search indexcd website && npm run build
collectionOpenAPI readiness and search casesQuality Lab or fixture replay
releasefull lint/test/build and selected benchmarksmake release-check plus benchmark gate

Suggested Metrics

For large OpenAPI collections:

  • semantic action known rate
  • primary resource assigned rate
  • path/module assigned rate
  • search Hit@K
  • plan target hit rate
  • execute read success rate
  • structured failure classification rate
  • uncaught server error count

The goal is not to make every API call succeed in CI. The goal is to make every success and failure explainable.

Acceptance Record

Keep a compact record for each gate run:

{
"gate": "xgen-scale-semantic",
"version": "0.32.1",
"case_count": 50,
"search_hit_at_8": 1.0,
"plan_hit_rate": 0.86,
"uncaught_server_errors": 0,
"artifact": "/tmp/gtc-quality-gate.json"
}

Failure Taxonomy

Failures should be classified before the gate result is interpreted:

FailureMeaning
not_retrievedexpected tool not in candidate set
selector_mismatchcandidate exists but final target is wrong
unsatisfied_fieldplan cannot fill a required value
auth_context_requiredexecution blocked before API call
auth_faileddownstream API rejected credentials
http_4xx / http_5xxdownstream API failure
uncaught_server_erroradapter or service bug

When To Run Expensive Gates

Run model-in-the-loop or live API gates when:

  • retrieval/selector/plan logic changes
  • public README or docs benchmark claims change
  • release candidate is being cut
  • a production incident points to ranking or planning quality

Use snapshot replay for ordinary docs or wording changes.