Skip to content

Instantly share code, notes, and snippets.

@captivus
captivus / METHODOLOGY.md
Created May 28, 2026 19:31
Handy memory leak bugfix methodology

A Methodology for Identifying and Fixing Hard Bugs in Complex Multi-Process Software

A reproducible procedure for diagnosing bugs that resist normal debugging: bugs that span process boundaries, manifest over hours, or have no obvious cause from logs alone. Worked example throughout: a sustained memory leak in WebKitWebProcess on Linux in a Tauri 2 desktop application (issue #1279 in the cjpais/Handy repository), eventually narrowed to WebKit C++ allocations driven by high-frequency JS event traffic, then fixed with a three-part patch validated by bisect.

@captivus
captivus / INSTRUMENTATION.md
Created May 28, 2026 19:31
Handy memory leak bugfix instrumentation

Mapping Handy's End-to-End Execution Flow

This document is a standalone, validated procedure for instrumenting Handy and producing a complete, cross-correlated trace of one or more transcription cycles — from process boot, through trigger, through the recording steady state, through VAD finalization and Whisper inference, through paste, back to idle.

It is written without assuming prior context. Every environment variable, flag, and structural decision in this document is one that has been