{"uid":"cap_mM2JOPuL2eveiPW2-Q_Of","slug":"writerslogic-json-patch-conflict-detector-6470eb57","name":"WritersLogic JSON Patch Conflict Detector","description":"Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.","url":"https://agents.writerslogic.com/api/v1/json-patch-conflict?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"patches":{"type":"array","items":{"type":"object","required":["ops"],"properties":{"ops":{"type":"array","items":{"description":"A JSON Patch operation object: {op, path, value?, from?}."},"maxItems":100},"name":{"type":"string","maxLength":80}},"additionalProperties":false},"maxItems":4,"minItems":2},"document":{"description":"The base document both patches were written against (any JSON value)."}}},"responseSchema":{"type":"json"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_MoKN1TLU0lbKyBuqc2YTo","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Analyzes 2–4 JSON Patch (RFC 6902) operation lists against a base document and reports, per pair, whether they commute—detecting same-path writes, ancestor/descendant overlaps, array-index shifts, concurrent `-` appends, invalidated `test` ops, and operations that fail after another patch runs.","exampleAgentPrompt":"Check whether these two JSON Patch operation lists commute when applied to my base document — patch A adds a 'status' field and patch B removes an array element at index 2 — and tell me exactly where they conflict and what each patch would hit after the other runs.","exampleUseCases":[{"title":"Concurrent editor conflict detection","prompt":"Two users edited the same JSON config file at the same time — one patched the 'servers' array by inserting a new entry at index 1, the other removed index 3. Check whether those two patches commute and tell me exactly which array elements each patch would hit after the other has already run."},{"title":"Safe collaborative API schema merge","prompt":"We have a base OpenAPI spec document and three separate teams submitted JSON Patch lists to update it. Can you check all pairs of those patches for conflicts — specifically same-path writes and any test operations one patch might invalidate — so I know which ones can be merged safely?"},{"title":"Detecting `-` append ordering issues","prompt":"Two agents are concurrently appending items to the 'comments' array in a JSON document using the `-` pointer. Run the conflict check on their patches against the base document and tell me whether the final order of appended elements depends on which patch is applied first."}],"resultDescription":"A per-pair conflict report indicating whether each pair of patches commutes, with witnesses for each detected conflict type: the exact JSON Pointer where the conflict occurs, what each patch intended to address versus what it would actually hit (especially for index shifts), which test operations are invalidated, and whether any operations fail after the other patch has run. Also includes the applied results of both ordering permutations for comparison.","failureModes":["Patch operations reference paths not present in the base document — ops may fail application and be reported as failures","More than 4 patch lists supplied — rejected by schema (maxItems: 4)","Patch list contains more than 100 operations — rejected by schema (maxItems: 100)","JSON Merge Patch (RFC 7396) format supplied instead of RFC 6902 — not supported, will be misinterpreted","Malformed JSON Patch operation object missing required 'op' or 'path' fields — parse or application error","Base document is not valid JSON — request will fail"],"whenToPreferThis":"Use this endpoint when you need to determine whether two or more RFC 6902 JSON Patch lists written against the same base document are safe to apply in any order. It is the right choice when agents or users are making concurrent edits to a shared JSON document and you need to know precisely which paths conflict before attempting a merge. Prefer this over manual diffing when you need machine-verifiable witnesses with exact JSON Pointers, especially for array-index shift detection which is notoriously subtle. Do not use if you need the patches to actually be merged or rebased — this endpoint only detects and reports conflicts, it does not resolve them.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-19T06:37:34.724Z","isFirstParty":false,"canonicalSlug":"writerslogic-json-patch-conflict-detector-6470eb57"}