<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Aditya Roshan Sharma</title>
    <description>The latest articles on DEV Community by Aditya Roshan Sharma (@ars_dostoevsky).</description>
    <link>https://dev.to/ars_dostoevsky</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4231470%2F1ef8a97e-a7f8-46f6-9c9a-9a18d070c966.jpg</url>
      <title>DEV Community: Aditya Roshan Sharma</title>
      <link>https://dev.to/ars_dostoevsky</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ars_dostoevsky"/>
    <language>en</language>
    <item>
      <title>The Test Passed. The Coupon Was Still Wrong.</title>
      <dc:creator>Aditya Roshan Sharma</dc:creator>
      <pubDate>Sat, 07 Nov 2026 05:04:43 +0000</pubDate>
      <link>https://dev.to/ars_dostoevsky/the-test-passed-the-coupon-was-still-wrong-32ha</link>
      <guid>https://dev.to/ars_dostoevsky/the-test-passed-the-coupon-was-still-wrong-32ha</guid>
      <description>&lt;p&gt;&lt;strong&gt;Building SYNKAI with Switch: a coding agent, an independent verification boundary, and a human decision recorded in team chat.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;github.com/sisyphususesarchbtw/synkai-switch&lt;/p&gt;




&lt;p&gt;A 10% discount on a 10,000-cent cart should leave 9,000 cents.&lt;/p&gt;

&lt;p&gt;My checkout function returned 8,100.&lt;/p&gt;

&lt;p&gt;The defect was straightforward: the coupon was applied twice. What interested me was how easily the test suite could be made to accept the wrong answer.&lt;/p&gt;

&lt;p&gt;Consider this implementation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;total_after_coupon&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cents&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;percent&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;discounted&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;cents&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;percent&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;discounted&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;percent&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The correct repair is to remove the second discount. But there is another way to get a green test:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt; def test_coupon():
&lt;span class="gd"&gt;-    assert total_after_coupon(10000, 10) == 9000
&lt;/span&gt;&lt;span class="gi"&gt;+    assert total_after_coupon(10000, 10) == 8100
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The test passes. The defective implementation is unchanged.&lt;/p&gt;

&lt;p&gt;I deliberately created this false-fix candidate as a controlled fixture. It wasn't generated by an LLM, and I'm not presenting it as evidence that a particular coding model tried to cheat. It demonstrates a failure mode: &lt;strong&gt;if the same worker can modify the implementation and the test used to judge it, a passing result may no longer mean that the original requirement was satisfied.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That distinction became the starting point for SYNKAI.&lt;/p&gt;

&lt;p&gt;I wanted to let a coding agent propose a repair without giving it control over the acceptance criterion. I also wanted a human to approve that criterion before any automated repair began, with the relevant conversation and handoffs visible in the team's existing chat.&lt;/p&gt;

&lt;p&gt;I built the workflow using &lt;a href="https://github.com/sandbox-quantum/switch" rel="noopener noreferrer"&gt;Switch&lt;/a&gt;, Mattermost, Codex, Python, SQLite and Docker.&lt;/p&gt;

&lt;p&gt;The result is a narrow but functioning prototype: a real Switch-mediated repair attempt, a deliberately isolated verifier, and evidence that can be inspected rather than simply trusted.&lt;/p&gt;




&lt;h3&gt;
  
  
  The part that needed Switch
&lt;/h3&gt;

&lt;p&gt;A verifier can run independently of any chat system. The more difficult question is how a person and two separately constrained workers agree on what is being verified.&lt;/p&gt;

&lt;p&gt;Who reported the bug? Which behavior did they approve? What did the coding worker receive? Which revision came back? Did the check change between approval and execution?&lt;/p&gt;

&lt;p&gt;For SYNKAI, those decisions belong in a shared room.&lt;/p&gt;

&lt;p&gt;Switch 0.31.0 connects my local Mattermost channel to two registered identities:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Identity&lt;/th&gt;
&lt;th&gt;Responsibility&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;synkai-verifier&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Deterministic Python supervisor responsible for approval, handoffs and verification&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;synkai-fixer&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Containerized coding worker that invokes Codex to propose a patch&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;There is only one generative coding model in this arrangement. The Verifier is ordinary Python, with explicit state transitions and executable checks. Calling it a second AI model would misrepresent the design.&lt;/p&gt;

&lt;p&gt;The workflow looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;MATTERMOST ROOM (through Switch)
  |
  +-- 1. Human reports defect
  v
SYNKAI VERIFIER
  |
  +-- 2. Presents pre-authored invariant contract
  +-- 3. Human sends explicit approval
  +-- 4. Reproduces original failure on base commit
  v
Switch targeted handoff
  v
SYNKAI FIXER (Codex)
  |
  +-- 5. Proposes schema-constrained source patch
  v
Switch targeted handoff
  v
SYNKAI VERIFIER
  |
  +-- 6. Executes frozen check in Docker (--network=none)
  +-- 7. Evidence returned to room
  v
HUMAN OPERATOR
  |
  +-- 8. Reviews patch and diff; sends final acceptance
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Switch is responsible for communication, agent identities, room context and message delivery. SYNKAI provides the application-specific authorization rules and the independent execution boundary.&lt;/p&gt;

&lt;p&gt;If I removed Switch, the underlying Docker tests could still run. The collaborative workflow would lose its actual room-based event transport, identity-linked approvals and agent handoff mechanism. Those are the parts for which I chose Switch.&lt;/p&gt;




&lt;h3&gt;
  
  
  Getting the room to remember the agreement
&lt;/h3&gt;

&lt;p&gt;The first useful Switch feature I integrated was room context.&lt;/p&gt;

&lt;p&gt;SYNKAI creates a GitHub reference pointing to the public implementation and attaches it to the room through the Switch operations API:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;reference&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;bridge&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;operation&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;create_reference&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;type&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;github&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;name&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Synkai implementation&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;description&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Public implementation and checkout example.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;value&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;urls&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://github.com/sisyphususesarchbtw/synkai-switch&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;bridge&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;operation&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;attach_reference_to_room&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;room_id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;room_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;reference_id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;reference&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The reference is shared context. It does not grant the Fixer repository credentials or access to the private verification harness.&lt;/p&gt;

&lt;p&gt;Once the human approves a behavioral requirement, the Verifier also creates a room document containing the case ID, approved behavior, base revision, check digest, approval message ID and approver identity.&lt;/p&gt;

&lt;p&gt;That document is useful because the agreement remains visible beyond a single agent response.&lt;/p&gt;

&lt;p&gt;It is important, however, to distinguish the room document from the actual security boundary. The document describes the contract. A separately frozen, read-only test harness enforces it.&lt;/p&gt;

&lt;p&gt;The first distinction is social and operational. The second is executable.&lt;/p&gt;




&lt;h3&gt;
  
  
  An approval is a particular event
&lt;/h3&gt;

&lt;p&gt;The interaction begins with a message in Mattermost:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@synkai-verifier A 10% coupon is applied twice. On a 10000-cent cart I expect 9000 cents. Please investigate and ask me before freezing the check.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I used &lt;strong&gt;Wispr Flow&lt;/strong&gt; while building SYNKAI to dictate prompts and technical instructions, including the kind of numerical requirement shown here. Speaking complex edge cases naturally into the room at rapid speed eliminated the friction of drafting manual tickets. The chat interface was useful because I could express the behavior in the exact place where the workers would eventually coordinate its verification.&lt;/p&gt;

&lt;p&gt;In this release, the executable invariant is pre-authored for the checkout example. The Verifier presents it to the operator; it does not synthesize an arbitrary new test suite from natural language.&lt;/p&gt;

&lt;p&gt;The operator then approves it with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@synkai-verifier approve coupon-01
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;SYNKAI checks the actual Switch event. The message must come from the linked operator identity, belong to the expected room, be addressed to the Verifier and match the required command. The current harness digest must also match the proposed contract.&lt;/p&gt;

&lt;p&gt;This prevents an ordinary quoted command or an unrelated user's message from being treated as approval.&lt;/p&gt;

&lt;p&gt;The verifier then attempts to reproduce the defect against the original commit. If the expected assertion does not fail, repair is blocked.&lt;/p&gt;

&lt;p&gt;This matters more than it might initially appear. A candidate passing a check is weak evidence when the check never detected the original bug.&lt;/p&gt;




&lt;h3&gt;
  
  
  The handoff problem I hadn't appreciated
&lt;/h3&gt;

&lt;p&gt;The next challenge was getting the Fixer to act on a message without allowing arbitrary chat content to impersonate a trusted agent command.&lt;/p&gt;

&lt;p&gt;The Verifier sends a targeted message through Switch, addressed to &lt;code&gt;@synkai-fixer&lt;/code&gt;. The payload contains a command ID, the requested action, the case ID and the approved base commit.&lt;/p&gt;

&lt;p&gt;A receiving agent cannot authorize the operation merely because the message body contains recognizable JSON.&lt;/p&gt;

&lt;p&gt;SYNKAI records its outbound delivery and checks the returned Switch event identity against the incoming message:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;matching&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;any&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;command_id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;command&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;command_id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;agent&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;expected_sender&lt;/span&gt;
    &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;room_id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;room_id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;status&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;delivered&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;remote_id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;payload&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;message_id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;receipts&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A copied command pasted by another participant has a different message ID. It does not satisfy this check.&lt;/p&gt;

&lt;p&gt;I ended up treating the delivery receipt as part of the authorization decision, rather than merely a confirmation that an HTTP request succeeded.&lt;/p&gt;

&lt;p&gt;This is where Switch became especially useful. I had both an event stream carrying the room conversation and server responses identifying delivered messages. I could connect those observations to the application's own persisted state.&lt;/p&gt;




&lt;h3&gt;
  
  
  The delivery race and state recovery
&lt;/h3&gt;

&lt;p&gt;During testing, I encountered a delivery race involving concurrent retries of the same outbound action.&lt;/p&gt;

&lt;p&gt;The fix was not another prompt instruction. I serialized outbound sends per bridge instance and persisted command delivery state in SQLite.&lt;/p&gt;

&lt;p&gt;SYNKAI also maintains a connection ID, WebSocket cursor and connection generation. The listener stores addressed events in a durable inbox and tracks completed work so reconnects do not simply rerun every command they encounter.&lt;/p&gt;

&lt;p&gt;These details are easy to ignore when prototyping an agent that answers one message at a time. They become difficult to ignore when a message can start a container, consume a model invocation or authorize a code change.&lt;/p&gt;

&lt;p&gt;My advice to anyone building a custom Switch integration is to inspect the actual events early. Check the fields you rely on, understand what an addressed message looks like, and design idempotency before connecting expensive operations to the stream.&lt;/p&gt;

&lt;p&gt;In the 0.31.0 integration I used, inbound events came through a WebSocket connection and outbound actions through HTTP. Older examples I encountered described a different event transport. Checking the running server and the relevant release prevented me from building against the wrong assumptions.&lt;/p&gt;




&lt;h3&gt;
  
  
  The invariant has to live outside the patch
&lt;/h3&gt;

&lt;p&gt;Once the human approves the behavior, the Verifier freezes the harness separately from the candidate workspace.&lt;/p&gt;

&lt;p&gt;The crucial check is small:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;test_coupon_applies_once&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="n"&gt;cart&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;total_after_coupon&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;9000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;A 10% coupon on 10000 cents must leave 9000, not apply twice.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two adjacent checks cover a zero-percent coupon and an empty cart.&lt;/p&gt;

&lt;p&gt;The point is not the complexity of these tests. They are intentionally simple. The point is who controls them.&lt;/p&gt;

&lt;p&gt;The coding worker receives the small checkout project's source files and the approved behavior. Codex is instructed to return a schema-constrained JSON proposal containing a replacement &lt;code&gt;cart.py&lt;/code&gt; and a brief summary.&lt;/p&gt;

&lt;p&gt;A supervisor applies the proposed source, creates a Git commit and validates its relationship to the approved base. The current patch format restricts what is applied; the project also checks candidate ancestry and an allowlist of permissible repository paths.&lt;/p&gt;

&lt;p&gt;The verifier's harness is never mounted into the coding worker.&lt;/p&gt;

&lt;p&gt;For execution, SYNKAI uses a separate Docker runner with strict constraints:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--network&lt;/span&gt; none &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--read-only&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--cap-drop&lt;/span&gt; ALL &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--security-opt&lt;/span&gt; no-new-privileges &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--user&lt;/span&gt; 65534:65534 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--cpus&lt;/span&gt; 1 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--memory&lt;/span&gt; 512m &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--pids-limit&lt;/span&gt; 64 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="c"&gt;# source and harness mounted read-only&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The coding worker has a different network configuration because Codex requires outbound connectivity for model inference. Its authentication file is mounted read-only, and it does not receive the host Docker socket.&lt;/p&gt;

&lt;p&gt;The verification runner, by contrast, needs no network connection.&lt;/p&gt;

&lt;p&gt;This separation limits the Fixer's authority over the test being run. It is not a claim that arbitrary hostile Python code is safe to execute or that a passing result establishes general program correctness.&lt;/p&gt;




&lt;h3&gt;
  
  
  Three executions, one decision
&lt;/h3&gt;

&lt;p&gt;The verification policy is implemented in Python.&lt;/p&gt;

&lt;p&gt;For a repair to be classified as &lt;code&gt;VERIFIED&lt;/code&gt;, the original revision must fail the expected assertion, the candidate must pass it, and the adjacent checks must pass. Missing, skipped, erroneous or otherwise incomplete execution cannot produce a verified result.&lt;/p&gt;

&lt;p&gt;The core classifier is short enough to show:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;classify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;base&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;candidate&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;regression&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;expected_assertion&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="nf"&gt;all&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;executable&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;base&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;candidate&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;regression&lt;/span&gt;&lt;span class="p"&gt;)):&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;INCONCLUSIVE&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;base&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;outcome&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;failed&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;base&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;assertion&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="n"&gt;expected_assertion&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;INCONCLUSIVE&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;candidate&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;outcome&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;failed&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;regression&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;outcome&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;failed&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;REJECTED&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;VERIFIED&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This produces a clean, observable distinction in our controlled fixture:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Execution Stage&lt;/th&gt;
&lt;th&gt;Authored False Fix&lt;/th&gt;
&lt;th&gt;Genuine Repair&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Original Revision&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Expected check fails (8100 != 9000)&lt;/td&gt;
&lt;td&gt;Expected check fails (8100 != 9000)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Candidate Revision&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Check still fails (8100 != 9000)&lt;/td&gt;
&lt;td&gt;Check passes (9000 == 9000)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Adjacent Checks&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Pass (2/2)&lt;/td&gt;
&lt;td&gt;Pass (2/2)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;SYNKAI Result&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;REJECTED&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;VERIFIED&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Both candidates were authored for the controlled demonstration. Neither required a model invocation.&lt;/p&gt;

&lt;p&gt;The false fix is particularly instructive because its own repository test passes after the assertion is weakened, while the frozen external test still rejects it.&lt;/p&gt;

&lt;p&gt;The controlled execution records are available in &lt;a href="https://github.com/sisyphususesarchbtw/synkai-switch/blob/main/docs/evidence/controlled-docker-run.json" rel="noopener noreferrer"&gt;controlled-docker-run.json&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The workspace exposes the recorded execution stages and evidence instead of reducing the outcome to an agent's statement that the fix worked.&lt;/p&gt;




&lt;h3&gt;
  
  
  Then I ran it with a real coding agent
&lt;/h3&gt;

&lt;p&gt;The controlled comparison establishes that the verification policy detects the authored false fix. It does not establish that Codex can complete the Switch-mediated repair workflow.&lt;/p&gt;

&lt;p&gt;I tested that separately on November 6, 2026.&lt;/p&gt;

&lt;p&gt;The operator reported the doubled coupon in Mattermost, approved the behavior, and the Verifier handed the repair to the Fixer through Switch.&lt;/p&gt;

&lt;p&gt;The first coding attempt failed before producing a committed candidate. The recorded failure includes a Git commit command returning a nonzero status. My build notes discuss restrictions involving nested shell isolation inside the container, although the published record alone does not independently establish that as the complete root cause.&lt;/p&gt;

&lt;p&gt;I kept the failure in the evidence instead of presenting a manufactured first attempt.&lt;/p&gt;

&lt;p&gt;A retry was explicitly delegated by the operator through Codex chat, with its assistant-sent origin reflected in the room record. That provenance matters: it should not be mistaken for a directly typed Mattermost retry command.&lt;/p&gt;

&lt;p&gt;On the second attempt, Codex returned a structured source proposal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt; def total_after_coupon(cents, percent):
&lt;span class="gd"&gt;-    discounted = cents * (100 - percent) // 100
-    return discounted * (100 - percent) // 100
&lt;/span&gt;&lt;span class="gi"&gt;+    return cents * (100 - percent) // 100
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The supervisor committed the candidate as &lt;code&gt;87ea36f955dd8d32843a30f9edddce3ea77179ff&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The frozen verification harness then produced:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Original revision  --&amp;gt; FAILED (8100 != 9000)
Candidate revision --&amp;gt; PASSED (9000 == 9000)
Adjacent behavior  --&amp;gt; PASSED (zero-coupon &amp;amp; empty-cart)
Status: VERIFIED
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The successful proposal took &lt;strong&gt;17.183 seconds&lt;/strong&gt; according to the recorded telemetry. Independent container verification took &lt;strong&gt;13.111 seconds&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Those are single measurements from one local run, not averages or performance benchmarks. The proposal duration excludes the earlier failed attempt, setup and operator time.&lt;/p&gt;

&lt;p&gt;The record contains two model attempts. It also preserves the approved base identity, candidate identity, check digest, runner image identity and execution output.&lt;/p&gt;

&lt;p&gt;The captured lifecycle ends at &lt;code&gt;AWAITING_REVIEW&lt;/code&gt;. The application supports final acceptance through an addressed operator command, but the published run should not be represented as evidence that this final acceptance was completed.&lt;/p&gt;

&lt;p&gt;You can inspect the &lt;a href="https://github.com/sisyphususesarchbtw/synkai-switch/blob/main/docs/evidence/live-switch-run.json" rel="noopener noreferrer"&gt;live Switch record&lt;/a&gt;, the &lt;a href="https://github.com/sisyphususesarchbtw/synkai-switch/blob/main/docs/evidence/live-candidate.patch" rel="noopener noreferrer"&gt;generated patch&lt;/a&gt;, and the &lt;a href="https://github.com/sisyphususesarchbtw/synkai-switch/blob/main/docs/evidence/live-candidate.bundle" rel="noopener noreferrer"&gt;Git bundle containing the relevant revisions&lt;/a&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  What the evidence fingerprint means (and doesn't mean)
&lt;/h3&gt;

&lt;p&gt;SYNKAI computes a SHA-256 fingerprint over an execution identity containing the base commit, candidate commit, harness digest, runner image digest and execution environment.&lt;/p&gt;

&lt;p&gt;This binds a recorded result to a particular set of inputs.&lt;/p&gt;

&lt;p&gt;It is not a digital signature, and it does not prove that every possible behavior of the candidate is correct. It lets the application detect when the inputs underlying an earlier evaluation no longer match the inputs currently being considered.&lt;/p&gt;

&lt;p&gt;The public evidence records redact local filesystem paths. Consequently, their original fingerprints cannot be recomputed from those redacted JSON files alone.&lt;/p&gt;

&lt;p&gt;The repository includes an evidence validation script (&lt;a href="https://github.com/sisyphususesarchbtw/synkai-switch/blob/main/scripts/validate-evidence.py" rel="noopener noreferrer"&gt;&lt;code&gt;scripts/validate-evidence.py&lt;/code&gt;&lt;/a&gt;) that checks the published records' structural and stage consistency, compares the recorded harness digest with the available harness, and recomputes fingerprints where the complete identity is unredacted. It explicitly reports the verification limitation for redacted records and fails closed on any tampered digest or unexpected stage outcome.&lt;/p&gt;

&lt;p&gt;That distinction is deliberate. A trustworthy evidence system should be clear about what a check establishes and what it cannot establish.&lt;/p&gt;




&lt;h3&gt;
  
  
  Reproducing SYNKAI
&lt;/h3&gt;

&lt;p&gt;The project is open source on GitHub:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Repository:&lt;/strong&gt; &lt;a href="https://github.com/sisyphususesarchbtw/synkai-switch" rel="noopener noreferrer"&gt;https://github.com/sisyphususesarchbtw/synkai-switch&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The recorded live environment used Windows with WSL 2 and Docker. The repository also documents Linux and macOS setup commands, although the recorded live Switch/Codex run was performed on Windows.&lt;/p&gt;

&lt;p&gt;For Windows, you need Git, Python 3.12+, Node 22.18+, Docker Desktop with Linux containers, and an authenticated Codex CLI.&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Run the controlled demonstration
&lt;/h4&gt;

&lt;p&gt;Clone the repository and install the dependencies:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;clone&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;https://github.com/sisyphususesarchbtw/synkai-switch.git&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;synkai-switch&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;py&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-3&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-m&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;venv&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;venv&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;\.venv\Scripts\python.exe&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-m&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pip&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;install&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-r&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;requirements.lock&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;\.venv\Scripts\python.exe&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-m&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pip&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;install&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-e&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--no-deps&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;npm.cmd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--prefix&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;web&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;ci&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;npm.cmd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--prefix&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;web&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;run&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;build&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Build the verification runner image:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;\scripts\build-runner.ps1&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Start the local application:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;\scripts\start.ps1&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open &lt;code&gt;http://127.0.0.1:8787&lt;/code&gt;. This mode contains the authored fixture and allows the false-fix and genuine-repair candidates to be evaluated without model calls or live Switch infrastructure.&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Connect the live Switch workflow
&lt;/h4&gt;

&lt;p&gt;First, authenticate your Codex CLI and prepare the local Switch/Mattermost stack:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;\scripts\setup-switch.ps1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-AuthFile&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$&lt;/span&gt;&lt;span class="nn"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;USERPROFILE&lt;/span&gt;&lt;span class="s2"&gt;\.codex\auth.json"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Start the supervisor in one terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;\scripts\start-live.ps1&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Keep the local workspace API running in a second terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;\scripts\start.ps1&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open Mattermost at &lt;code&gt;http://localhost:8792&lt;/code&gt;. Generated credentials are stored in &lt;code&gt;.local/switch/login.txt&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;In the &lt;strong&gt;Synkai Evidence Room&lt;/strong&gt;, report the defect to &lt;code&gt;@synkai-verifier&lt;/code&gt;. The Verifier presents the authored invariant contract.&lt;/p&gt;

&lt;p&gt;Approve it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@synkai-verifier approve coupon-01
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inspect the handoff, the proposed patch and the resulting verification evidence.&lt;/p&gt;

&lt;p&gt;If the case reaches &lt;code&gt;AWAITING_REVIEW&lt;/code&gt;, review the diff and accept it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@synkai-verifier accept coupon-01
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  3. Run the automated test suite
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Unit tests, evidence validation, and negative tamper checks&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;\.venv\Scripts\python.exe&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-m&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pytest&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-q&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;python&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;scripts/validate-evidence.py&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;npm.cmd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--prefix&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;web&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;test&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;npm.cmd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--prefix&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;web&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;run&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;build&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="c"&gt;# Include real Docker container execution&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nv"&gt;$&lt;/span&gt;&lt;span class="nn"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;SYNKAI_DOCKER_TESTS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'1'&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;\.venv\Scripts\python.exe&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-m&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pytest&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-q&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The suite reports &lt;strong&gt;76 backend tests&lt;/strong&gt; (77 with Docker enabled), &lt;strong&gt;9 evidence validation checks&lt;/strong&gt;, and &lt;strong&gt;5 frontend tests&lt;/strong&gt;, all passing with zero failures.&lt;/p&gt;




&lt;h3&gt;
  
  
  What I would build differently
&lt;/h3&gt;

&lt;p&gt;I initially treated coordination as something that could be added after the verifier worked.&lt;/p&gt;

&lt;p&gt;That was a mistake.&lt;/p&gt;

&lt;p&gt;Once a repair could be initiated from chat, &lt;strong&gt;message provenance became part of the execution policy.&lt;/strong&gt; The sender, room, approval and delivered command ID all affected whether an expensive or privileged operation should begin.&lt;/p&gt;

&lt;p&gt;I would design those boundaries before connecting the coding worker if I started again.&lt;/p&gt;

&lt;p&gt;I also learned to keep the verifier deliberately uninteresting. The Fixer can be probabilistic. The supervisor should have explicit rules for what constitutes a reproduced defect, a valid candidate and a result worth showing to the human.&lt;/p&gt;

&lt;p&gt;The current implementation remains deliberately limited to one operator and a small Python checkout scenario. Its behavioral check is authored in advance. It does not generate general-purpose verification contracts, support arbitrary repositories, or establish that the runner is safe for hostile workloads.&lt;/p&gt;

&lt;p&gt;A more useful next experiment than adding another agent would be to ask an independent developer to define a different behavioral case, reproduce the setup and attempt to falsify the evidence. That would reveal more about the architecture than another polished demonstration of the same coupon bug.&lt;/p&gt;




&lt;h3&gt;
  
  
  Where this leaves SYNKAI
&lt;/h3&gt;

&lt;p&gt;The interesting output of SYNKAI is a candidate revision accompanied by a record of what was agreed, what was executed and what passed.&lt;/p&gt;

&lt;p&gt;Switch carries the human decisions and agent handoffs around that work. Docker and the frozen harness provide a separate execution boundary. The final decision remains with the operator.&lt;/p&gt;

&lt;p&gt;For this prototype, the problem was only a double-applied coupon. The broader design question is harder:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When a coding agent tells us a defect is fixed, who controlled the definition of "fixed"?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I wanted the answer to survive beyond the agent's own response.&lt;/p&gt;

&lt;p&gt;That is why I built SYNKAI.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Source:&lt;/strong&gt; &lt;a href="https://github.com/sisyphususesarchbtw/synkai-switch" rel="noopener noreferrer"&gt;SYNKAI on GitHub&lt;/a&gt; | &lt;strong&gt;Artifacts:&lt;/strong&gt; &lt;a href="https://github.com/sisyphususesarchbtw/synkai-switch/blob/main/docs/evidence/live-switch-run.json" rel="noopener noreferrer"&gt;Live Record&lt;/a&gt; | &lt;a href="https://github.com/sisyphususesarchbtw/synkai-switch/blob/main/docs/evidence/controlled-docker-run.json" rel="noopener noreferrer"&gt;Controlled Comparison&lt;/a&gt; | &lt;a href="https://github.com/sisyphususesarchbtw/synkai-switch/blob/main/docs/evaluation.md" rel="noopener noreferrer"&gt;Technical Evaluation&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Built by Stillpoint for the WeMakeDevs x SandboxAQ Flip the Switch Hackathon | #HowISwitch | #SwitchAI&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>automation</category>
      <category>debugging</category>
    </item>
  </channel>
</rss>
