{"uid":"cap_EKffHenoeqU3ZdgYz_kPc","slug":"regular-trace-edit-distance-verifier-fb0b5a30","name":"Regular Trace Edit Distance Verifier","description":"An agent that repairs a finite event trace against a regular contract needs its claimed minimum insertion deletion and substitution cost checked over every accepted trace.","url":"https://detect.halowerk.com/v1/workflow/workflow-regular-trace-edit-distance?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"artifact":{"type":"object","required":["states","alphabet","initial","finals","transitions","trace","claimed_cost"],"properties":{"trace":{"type":"array","items":{"type":"integer","maximum":7,"minimum":0},"maxItems":128,"minItems":0},"finals":{"type":"array","items":{"type":"integer","maximum":31,"minimum":0},"maxItems":32,"minItems":0},"states":{"type":"integer","maximum":32,"minimum":1},"initial":{"type":"integer","maximum":31,"minimum":0},"alphabet":{"type":"integer","maximum":8,"minimum":1},"transitions":{"type":"array","items":{"type":"object","required":["from","to","symbol"],"properties":{"to":{"type":"integer","maximum":31,"minimum":0},"from":{"type":"integer","maximum":31,"minimum":0},"symbol":{"type":"integer","maximum":7,"minimum":0}},"additionalProperties":false},"maxItems":256,"minItems":0},"claimed_cost":{"type":"integer","maximum":160,"minimum":-1}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_LdpDq76BGOwpbH9bGkGo-","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Verifies the minimum edit distance (insertions, deletions, substitutions) between a finite event trace and a regular language defined by a finite automaton","exampleAgentPrompt":"Check if the claimed minimum edit cost of 3 is correct for repairing the trace [0, 1, 2, 1] against this 4-state automaton with alphabet size 3, initial state 0, accepting states [3], and transitions [{from:0,to:1,symbol:0},{from:1,to:2,symbol:1},{from:2,to:3,symbol:2}].","exampleUseCases":[{"title":"Validate automated trace repair agent","prompt":"My trace repair agent says it found a minimum cost of 5 to fix the event trace [0,2,1,3,0,2] against our compliance automaton with 6 states, alphabet size 4, initial state 0, final states [5], and these transitions — can you verify that claimed cost is actually the minimum?"},{"title":"Audit event log conformance cost","prompt":"I need to audit whether a claimed edit distance of 2 is correct for the trace [1,0,3] against a 3-state regular contract with alphabet size 4, initial state 0, accepting states [2], and transitions [{from:0,to:1,symbol:1},{from:1,to:2,symbol:0}]."},{"title":"Verify sequence correction in protocol testing","prompt":"In our protocol testing pipeline, the agent claims the minimum number of insertions, deletions, and substitutions needed to bring trace [0,0,1,2,0] into compliance with our 5-state FSM (alphabet 3, initial 0, finals [4]) is 4 — please verify this is correct and not an underestimate."}],"resultDescription":"Returns whether the claimed minimum edit distance (insertions, deletions, substitutions) between the supplied trace and the nearest accepted string in the regular language is correct, along with the true minimum cost computed over all accepted traces of the automaton.","failureModes":["Claimed cost of -1 may indicate an unknown/uncomputed cost — endpoint treats it as a probe","Trace length exceeding 128 items rejected","Alphabet size or state count out of range causes validation error","Transition references to non-existent states or symbols rejected","Automaton with no accepting states results in infinite distance"],"whenToPreferThis":"Use this endpoint when you need to formally verify the minimum edit distance between a finite event trace and a regular language (DFA/NFA), especially when an agent or automated system has produced a claimed repair cost that must be independently audited. Preferred over general string-distance tools when the target language is defined by a finite automaton rather than a fixed reference string, and when correctness of the cost claim is critical for compliance or trust.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-04T06:39:42.425Z","isFirstParty":false,"canonicalSlug":"regular-trace-edit-distance-verifier-fb0b5a30"}