Skip to content
HALOWERK

File Formats and Conversion

unified diff placement ambiguity

Patch context search returns how many exact placements of a selected old-side hunk occur in supplied text. Use it when an agent needs a check for ambiguous or displaced patch anchors.

POST https://format.halowerk.com/v1/unified-diff-placement-ambiguity

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
textstringYes
originalstringYes
hunkintegerYes
Show full input schema
{
  "type": "object",
  "properties": {
    "text": {
      "type": "string",
      "maxLength": 32000,
      "minLength": 1
    },
    "original": {
      "type": "string",
      "maxLength": 30000
    },
    "hunk": {
      "type": "integer",
      "minimum": 1,
      "maximum": 200
    }
  },
  "required": [
    "text",
    "original",
    "hunk"
  ],
  "additionalProperties": false
}

Open original schema

Published input example

{
  "text": "--- a/pop.csv\n+++ b/pop.csv\n@@ -1,2 +1,2 @@\n country,value\n-DEU,83287273\n+DEU,83516593\n",
  "original": "country,value\nDEU,83287273\n",
  "hunk": 1
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-19 UTC.

More endpoints in this hub

All endpoints in this hub โ†’