"""Run only with this isolated dev server stopped. Changes ONLY the fixture outbox row."""
from pathlib import Path
import sqlite3,datetime,json
root=Path('/home/ubuntu/wt/issue-25636')
assert root.resolve()!=Path('/home/ubuntu/t3code').resolve()
c=sqlite3.connect(root/'.t3/userdata/statev2.sqlite')
thread=c.execute("select thread_id from orchestration_v2_effect_outbox where effect_id='effect:repro:stop'").fetchone()[0]
now=datetime.datetime.now(datetime.timezone.utc).isoformat(timespec='milliseconds').replace('+00:00','Z')
with c:
 c.execute("delete from orchestration_v2_effect_outbox where effect_id='effect:repro:stop'")
 c.execute("""insert into orchestration_v2_effect_outbox(effect_id,command_id,thread_id,effect_type,payload_json,status,attempt_count,available_at,created_at,updated_at) values(?,?,?,?,?,'pending',0,?,?,?)""",('effect:repro:stop','command:repro:stop',thread,'delegated-tasks.stop',json.dumps({'type':'delegated-tasks.stop'}),now,now,now))
print('Inserted only effect:repro:stop, pending attempt 0, at',now)
