Re-roll one composer patch that check_patches reported needs-reroll: a 3-way merge of the patch onto the installed release, returned as a new diff. Call check_patches first for the whole list; call this per patch that came back needs-reroll.
- Input: project, version, patch (text or URL), title. One patch per call. A hand-made patch without index lines is merged from the newest tag it applies to (reroll.base).
- reroll.verified true means the service already ran the check a caller would run by hand; reroll.verified_by names it (the command, the -p level, the tag). Write reroll.patch to the patch file and move on: no git apply --check, no patch --dry-run, no pristine copy of the release to diff against. composer install is the test.
- A conflicts result is not the end: send the same project, version and patch again with resolutions, one per region of reroll.conflicts[].hunks ({file, region, choice: release|patch} or {file, region, text}), and the service re-merges with your decisions and apply-checks the diff. What comes back is the finished patch file: write it and run composer install. Deciding regions this way replaces reading the release files, editing the patch by hand and dry-running it.
- reroll.status: clean (every file merged and the diff apply-checked against the release, reroll.verified true: write reroll.patch as the new patch file, no re-test needed; an empty reroll.patch with reroll.note means the release already carries the change and suggested is shipped), conflicts (reroll.patch holds the hunks that merged cleanly, apply-checked when reroll.verified is true; each file in reroll.conflicts carries hunks with the three sides of every region: release = what the release has, base = what the patch was written against, patch = what the patch wants, plus release_line and release_context, the release file's numbered lines around the region. Write the missing hunks from those and append them to reroll.patch; no download, file read or dry-run needed), unavailable (no index lines and no recent tag takes the patch; re-roll by hand from hunks_failed).
- reroll.patch paths are relative to the repository root: contrib patches apply at -p1, core patches carry core/ and apply at -p2 from web/core. patch_truncated means the diff was cut to the result budget; POST /v1/patch/check on api.tresbien.tech with reroll: true returns it whole.
- A patch that still applies (applies_at set) or is already in the release (shipped) returns its verdict with reroll null.
- core_references: as on check_patches, read from the re-rolled diff when the merge was clean: removed or moved core classes and calls whose argument count no longer fits the target signature, at target_core.