mirror of
https://github.com/proffesor-for-testing/agentic-qe.git
synced 2026-09-19 08:45:47 +08:00
dc6fce5e70
Versioned, additive-only verdict envelopes for agent/MCP handoffs:
RiskDecision (quality gates), FindingVerdict (review findings with
adversarial refutations), CoverageGap (risk-weighted gaps).
- src/contracts/verdicts.ts: dependency-free validators (source of
truth) + mirrored draft-07 JSON Schemas; no zod/ajv runtime deps
(light-install posture preserved)
- quality_assess MCP boundary now attaches a validated riskDecision
envelope derived from the gate outcome (approve/block, escalate when
indeterminate) — additive, existing payload unchanged; direct and
wrapped handlers share the same mapToResult so MCP parity is inherent
- schemas/*.schema.json published via scripts/generate-verdict-schemas.mjs
for external ajv validation and workflow agent({schema}) enforcement
(consumed by improvement 5)
17 contract tests (goldens validate; mutations rejected with field-level
errors; builder always emits valid envelopes). E2E: envelope emitted by
the compiled boundary builder validates with stock ajv against the
published schema; mutated sample rejected. tsc + eslint clean.
Part of #520 (improvement 6/7, Tier 3).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
42 lines
770 B
JSON
42 lines
770 B
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"$id": "https://agentic-qe.dev/schemas/coverage-gap.schema.json",
|
|
"title": "CoverageGap",
|
|
"type": "object",
|
|
"required": [
|
|
"contract",
|
|
"file",
|
|
"riskScore",
|
|
"suggestedTests"
|
|
],
|
|
"additionalProperties": true,
|
|
"properties": {
|
|
"contract": {
|
|
"const": "coverage-gap@1"
|
|
},
|
|
"file": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"rangeStart": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"rangeEnd": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"riskScore": {
|
|
"type": "number",
|
|
"minimum": 0,
|
|
"maximum": 1
|
|
},
|
|
"suggestedTests": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|