{"uid":"cap_vp6oP-YQXUUBbNV4A9OJ9","slug":"workflow-language-inclusion-checker-912c3e36","name":"Workflow Language Inclusion Checker","description":"An agent that changes a deterministic event contract needs whether every accepted old trace is still accepted by the new contract and the shortest counterexample length.","url":"https://detect.halowerk.com/v1/workflow/workflow-language-inclusion?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"artifact":{"type":"object","required":["before","after"],"properties":{"after":{"type":"object","required":["states","initial","finals","transitions"],"properties":{"finals":{"type":"array","items":{"type":"integer","maximum":127,"minimum":0},"maxItems":8,"minItems":0},"states":{"type":"integer","maximum":8,"minimum":1},"initial":{"type":"integer","maximum":127,"minimum":0},"transitions":{"type":"array","items":{"type":"object","required":["from","to","label"],"properties":{"to":{"type":"integer","maximum":127,"minimum":0},"from":{"type":"integer","maximum":127,"minimum":0},"label":{"type":"string","maxLength":128,"minLength":1}},"additionalProperties":false},"maxItems":32,"minItems":0}},"additionalProperties":false},"before":{"type":"object","required":["states","initial","finals","transitions"],"properties":{"finals":{"type":"array","items":{"type":"integer","maximum":127,"minimum":0},"maxItems":8,"minItems":0},"states":{"type":"integer","maximum":8,"minimum":1},"initial":{"type":"integer","maximum":127,"minimum":0},"transitions":{"type":"array","items":{"type":"object","required":["from","to","label"],"properties":{"to":{"type":"integer","maximum":127,"minimum":0},"from":{"type":"integer","maximum":127,"minimum":0},"label":{"type":"string","maxLength":128,"minLength":1}},"additionalProperties":false},"maxItems":32,"minItems":0}},"additionalProperties":false}},"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_yFNGX9qxvYr1dogoda762","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":"Checks whether every trace accepted by an old event-contract automaton is still accepted by a new one, returning a verdict and shortest counterexample if not.","exampleAgentPrompt":"Check whether my updated workflow contract still accepts every trace the old one did — the old automaton has 3 states (initial: 0, finals: [2], transitions: 0->1 on 'submit', 1->2 on 'approve') and the new one has 4 states (initial: 0, finals: [3], transitions: 0->1 on 'submit', 1->2 on 'review', 2->3 on 'approve'). Tell me if language inclusion holds and if not give me the shortest counterexample.","exampleUseCases":[{"title":"Contract refactoring safety check","prompt":"I just refactored our order-processing workflow — the old contract had 2 states (initial: 0, finals: [1], transitions: 0->1 on 'place_order') and the new one has 3 states (initial: 0, finals: [2], transitions: 0->1 on 'place_order', 1->2 on 'confirm'). Does the new contract still accept everything the old one did, or is there a trace that breaks it?"},{"title":"Backward compatibility for API event protocol","prompt":"Before we ship our new API event protocol, check backward compatibility: old automaton has 3 states, initial 0, finals [2], transitions 0->1 on 'connect', 1->2 on 'ack'. New automaton has 3 states, initial 0, finals [2], transitions 0->1 on 'connect', 1->2 on 'ack', plus 1->1 on 'ping'. Does every old accepted trace still get accepted by the new spec?"},{"title":"CI gate for workflow contract change","prompt":"Run a language inclusion check as part of our CI pipeline: the before contract is 2 states, initial 0, finals [1], with one transition 0->1 on 'done'. The after contract is 2 states, initial 0, finals [1], transitions 0->1 on 'complete'. Are these contracts equivalent, or does one accept a trace the other doesn't? Give me the shortest counterexample if they differ."}],"resultDescription":"Returns a boolean indicating whether the language of the before automaton is a subset of the language of the after automaton (inclusion holds), and if not, the shortest event trace (sequence of labels) that is accepted by the before automaton but rejected by the after automaton, along with its length.","failureModes":["Invalid automaton structure (initial state out of range, finals referencing nonexistent states) — 400 Bad Request","Automaton exceeds size limits (more than 8 states or 32 transitions) — 400 validation error","Nondeterministic or malformed transition labels — may produce unexpected inclusion results","Network timeout for large or complex automata near the size boundary","Payment not attached or insufficient — 402 Payment Required"],"whenToPreferThis":"Use this endpoint when you need to formally verify backward compatibility of event-contract or workflow-automaton changes — specifically when you need to know if every trace accepted by the old contract is still accepted by the new one, and want the shortest concrete counterexample if not. Prefer this over manual testing or general model checkers when your contracts are expressible as small finite automata (up to 8 states, 32 transitions) and you need a deterministic, low-latency answer.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-04T06:39:54.895Z","isFirstParty":false,"canonicalSlug":"workflow-language-inclusion-checker-912c3e36"}