Start-editing packet for one function
get_function_briefRetrieve a chosen function's editing packet: its score, uncovered lines, and test, gate, and verify commands. Get the exact details needed to start work without executing any commands.
Instructions
Returns one function's start-editing packet from the newest trusted run: scored row, uncovered lines and the refresh, test, gate and verify command lines, none of them run. Use it once a function is chosen. Skip it for picking what to fix, that is get_next_item, and for a score across runs, get_function_history. Every call shingles the repo for twins, seconds on a large corpus. name must live in path. name takes the long name, a bare identifier, a start line or NAME#2, exact match first. A miss lists the file's functions instead of erroring.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | the bare identifier (classify, or route for a Rust `route cmd : & Cmd`) or the whole long_name get_next_item printed (classify( score , late )); both resolve, exact match first | |
| path | Yes | repo-relative source file, forward slashes | |
| repo | No | path to the scored repo's root (default: the repo the server was started in) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lane | No | the lane whose artifact produced cov and uncovered_lines, verbatim from the config; null when no lane covers the scope | |
| path | No | the resolved file, repo-relative | |
| churn | No | the file's churn, or null when it had no commits in the window | |
| notes | No | prose the config carries for whoever edits here | |
| stale | No | true when the run's commit is not HEAD, so every number here describes an older tree; run commands.refresh first | |
| commit | No | that run's commit, full sha | |
| handle | No | short name form: the bare identifier or (anonymous)#N, the same value get_next_item prints | |
| params | No | parameters in declaration order, so a test can call the function without opening the file | |
| remedy | No | decompose, split-lines, add-tests or ok: the branch the session takes; scored.remedy carries the same value | |
| run_id | No | id of the run these numbers come from: the newest trusted run (a coverage run, or a verify run whose verdict passed) | |
| schema | No | payload schema version, 1 | |
| scored | No | the whole scored row from the run | |
| source | No | the function's own text, start to end inclusive, newlines intact: editable without reading the file | |
| target | No | this scope's effective ccn ceiling, the same value as gate_rule.ceiling | |
| attempts | No | every claim ever taken on this function, oldest first; [] on a first attempt, and a row with closed null is a claim still open | |
| commands | No | the rest of the loop as whole command lines for this file and scope; run them as given | |
| coupling | No | up to 5 change-coupling partners at support 5 and confidence 0.5, strongest first; empty when none qualify; list_coupled_files has the repo-wide list | |
| function | No | the resolved lizard long name, whichever name form was asked with | |
| regrowth | No | did this get fixed before | |
| versions | No | what produced these numbers | |
| gate_rule | No | what check_gate will judge this edit by | |
| est_splits | No | 0 when ccn <= target, else ceil(ccn / target) | |
| file_totals | No | the file rolled up | |
| ratchet_mark | No | the committed ratchet mark, or null when the function carries none or the repo has no ratchet file | |
| file_functions | No | every scored function in the same file: where an extracted helper lands, and which names are taken | |
| uncovered_lines | No | line numbers no test ran; [] when the span is fully covered; null when no artifact could answer, then uncovered_lines_note says why | |
| duplication_twins | No | up to 10 near-duplicate functions at similarity 0.8, best first; empty is normal; list_duplicate_functions has the repo-wide pairs | |
| est_uncovered_paths | No | round((1 - cov) x ccn) | |
| uncovered_lines_note | No | present only when uncovered_lines is null: the reason and the move (stale artifact, no test imports the file, coverage_optional scope) |