evaluate_patch
Verify a unified git diff patch against architectural constraints and functional test results before allowing merge, then append audit records and cryptographic seals for ctxfw.
Instructions
Verify a unified git diff patch (diff_text) against SWE-Gate architectural constraints (max_cyclomatic_delta, forbid_type_ignores, disallowed_import_modules) and functional test results (tests_passed, tests_failed, functional_verdict) 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.
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 |