Writ.
Download

A fast scratchpad that opens anything.

Writ sits between a text editor and an IDE. Markdown, HTML, Mermaid and KaTeX render live, and every scratch stays searchable. Offline, keyboard-driven.

Download Writ
report.md×
settle.ts×
schema.sql×
gateway.log×

Payments service — migration analysis

Generated for svc-payments at commit a3f91c2. Scope: move the settlement path off the legacy queue and onto the new event bus without dropping idempotency guarantees.

Summary

The settlement worker is the only consumer still bound to the legacy rabbit:settle queue. Everything else already reads from the bus. Cutting it over removes the last broker dependency and lets us delete the dual-write shim in ledger/append.ts.

Cutover checklist

  • Freeze the legacy queue for new settlements
  • Point the worker at the bus
  • Delete the dual-write shim

Settlement flow today

flowchart LR
  A[Checkout] -->|charge.authorized| B(Event bus)
  B --> C[Settlement worker]
  C -->|legacy| D[(rabbit:settle)]
  C --> E[Ledger append]
  E --> F[(Postgres)]

Once the worker consumes settlement events directly from the bus, node D disappears.

Idempotency

Each settlement is keyed by (account_id, charge_id). The dedup window $w$ must cover the worst-case redelivery interval:

$$w \;\ge\; \max_i\, r_i \,+\, \Delta_{clock}$$

  • Move the idempotency key into the message body
  • Read settlements from the bus
  • Delete the dual-write shim
With the bus we expect at-least-once delivery, so the worker must stay safe under replay.
SavedLn 1, Col 1MarkdownUTF-8331 tok

Live window. Switch tabs, edit report.md, double-tap , search.

##
why-writ

A text editor opens fast but shows raw text. An IDE renders everything but is slow to reach for. Writ is the fast middle.

##
renders

Four formats, drawn live.

Source · Split · Preview. In Markdown, lists continue on Enter and checkboxes toggle when clicked. Load one into the window:

##
##
download

Always a keypress away.

A global hotkey brings Writ up over anything you're doing. Free, local-first, no account. Pick your platform: