{"id":"stable-sort-indices-check","version":"1.0.0","description":"Check that claimed source indices are the exact ascending stable order for supplied integer keys.","supported_operations":["check stable sort indices","validate claimed sorting permutation","check argsort stability","detect first index order discrepancy","validate stable ordering certificate","check sorted source positions"],"unsupported_operations":["generate an argsort result","accept partial or one based indices"],"semantics":["Keys are canonical base-10 integer strings; negative zero is rejected, and null follows every integer.","The expected permutation orders by key and then by ascending source index for ties, implementing ECMA-262 sort stability.","Claimed indices are zero-based; the first mismatch is the lowest claim position and no replacement permutation is returned.","Every verdict names ECMA-262-2026-draft-Array.prototype.sort."],"limits":{"max_items":4096,"max_key_chars":40},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["source_keys","claimed_indices"],"properties":{"source_keys":{"type":"array","minItems":1,"maxItems":4096,"items":{"type":["string","null"],"maxLength":40,"pattern":"^(0|-?[1-9][0-9]*)$"}},"claimed_indices":{"type":"array","minItems":1,"maxItems":4096,"items":{"type":"integer","minimum":0,"maximum":4095}}}},"output_schema":{"type":"object","additionalProperties":false,"required":["valid","reference_version"],"properties":{"valid":{"type":"boolean"},"reason":{"type":"string","minLength":1,"maxLength":80},"discrepancy":{"type":"object","additionalProperties":false,"required":["path","expected","actual"],"properties":{"path":{"type":"string","minLength":1,"maxLength":120},"expected":{},"actual":{}}},"reference_version":{"const":"ECMA-262-2026-draft-Array.prototype.sort"}}},"examples":[{"input":{"source_keys":["2","1","1"],"claimed_indices":[1,2,0]},"output":{"valid":true,"reference_version":"ECMA-262-2026-draft-Array.prototype.sort"}},{"input":{"source_keys":["1","1"],"claimed_indices":[1,0]},"output":{"valid":false,"reason":"index_mismatch","discrepancy":{"path":"/claimed_indices/0","expected":0,"actual":1},"reference_version":"ECMA-262-2026-draft-Array.prototype.sort"}}],"execute_url":"/v1/tools/stable-sort-indices-check/versions/1.0.0/execute"}