MIDWRITE
Partial-failure static analyzer for TypeScript backends
- Project
- Self-initiated · Open source
- Scope
- Design · Engineering · Evaluation · Release
- Technology
- Rust / TypeScript / Oxc / PostgreSQL / npm

Overview
When a crash, restart or timeout lands between two separately committed side effects, a system is left half-done — the database says an order is paid, but the order.completed event was never published. MIDWRITE is a self-initiated open-source tool that reads TypeScript backend source to find these places. The experimental v0.1.0 was released on npm and GitHub in November 2026.
Objective
It runs locally without executing the code, and with no account, network or telemetry. Rather than claiming every warning is a bug, the goal is to show a failure window that really exists, with the evidence, and leave the developer to decide whether it is intentional.
Design Approach
Each warning comes with its location and confidence, the order in which the failure plays out, and a direction for fixing it (a transactional outbox, a reconciliation job and so on). Diagnostics are split into MW1001–MW1005 by the order of database commits and external effects, and what could not be analyzed gets its own code (MW9001) so gaps in coverage are never hidden.
Technical Implementation
Built as a Rust workspace that parses TypeScript with Oxc. It separates database calls, centered on Drizzle ORM, from external effects such as payments and message publishing, and follows calls across modules and helper functions. It outputs text, JSON and SARIF plus an HTML trace report, ships prebuilt binaries for six platforms through npm, and comes with a GitHub Action that shows only the warnings a pull request adds.
- Side-effect ordering across modules and helpers
- Diagnostics with failure sequences and fixes
- HTML trace reports and SARIF output
- npm release and a baseline-aware GitHub Action
Summarized from the public repository, its README and the released v0.1.0. The images are real output from analyzing the repository's example app (shop-app). The four issues reported to open-source projects are all still unconfirmed, and the tool is presented as experimental.
Screenshots
Real output from the published midwrite 0.1.0, run on an example app included in its repository. The first image is the CLI's text output; the ones below are the HTML report generated by midwrite report, captured as is.


Source Code
An experimental open-source project, released under the MIT or Apache-2.0 license.
Looking for a project
like this one?
Just leave a short note on what you have in mind.
We'll work out the details together.