evaluate_patch
Verify a git diff patch against architectural constraints and functional test results before merge, then append immutable audit records and seal cryptographic trace blocks.
Instructions
Verify a unified git diff patch (diff_text, with optional commit_sha, author_kind 'AGENT'|'HUMAN', pr_id, diff_size_bytes, repo_name, and repo_id) against SWE-Gate architectural constraints (max_cyclomatic_delta default 10, forbid_type_ignores default true, disallowed_import_modules) and functional test results (tests_passed default 1, tests_failed default 0, functional_verdict 'PASSED'|'FAILED') before allowing merge. Appends immutable audit records (EVL-...) in SweGateStore and seals cryptographic blocks in TraceKitStore; use query_audit_ledger to retrieve or verify persisted records.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"diff_text": "<diff_text>"
},
"name": "evaluate_patch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pr_id | No | Pull request identifier (>= 1) | |
| repo_id | No | Optional repository identifier (REPO-...) | |
| diff_text | Yes | Unified diff text of the candidate patch | |
| repo_name | No | Repository name (e.g. 'heuristico/ctxfw') | heuristico/ctxfw |
| commit_sha | No | 40-character lowercase hex commit SHA | |
| author_kind | No | Patch author kind: 'AGENT' or 'HUMAN' | AGENT |
| tests_failed | No | Count of failing functional tests | |
| tests_passed | No | Count of passing functional tests | |
| diff_size_bytes | No | Exact UTF-8 byte length of diff_text | |
| functional_verdict | No | Functional test suite verdict: 'PASSED' or 'FAILED' | |
| forbid_type_ignores | No | Whether introducing '# type: ignore' is forbidden | |
| max_cyclomatic_delta | No | Maximum allowed cyclomatic complexity delta | |
| disallowed_import_modules | No | List of banned module names that the patch must not import |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | JSON-serialized SWE-Gate verification report or rejection message | |
| isError | Yes | True if the patch was rejected by SWE-Gate or failed validation |