Commit gate verdict for an edited file
check_gateVerify an edited source file passes the commit gate by comparing changed functions' complexity against their allowed ceiling. Use after an edit to confirm gate.ok before committing.
Instructions
Checks whether an edited file clears the hook's commit gate: fresh ccn per changed function against its scope's ceiling less pardoned ratchet debt. Call it after an edit once get_function_brief states the rule. CLI verify gives the repo-wide verdict. It runs no tests, and a breach reads gate.ok false, not an error. path is repo-relative or absolute inside repo, outside or missing is a config error. A tracked file is judged on its diff from HEAD, an untracked one in full, an unchanged or unscoped one judges 0. repo may be any directory under the checkout.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | repo-relative source file to judge as edited | |
| repo | No | path to the scored repo's root (default: the repo the server was started in) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gate | No | the verdict block | |
| note | No | fixed reminder that coverage is the baseline run's and complexity the working tree's; crapkit verify gives the real verdict | |
| schema | No | payload schema version, 1 | |
| functions | No | every function in the file, rescored | |
| baseline_run | No | id of the run whose coverage was reused | |
| baseline_commit | No | that run's commit, full sha |