유대선
프로젝트로
·기술 회고·3

749 swallowed errors, ~18 that mattered — auditing the silent failures

After a logging bug reported a dead service as healthy, audited the critical paths for error-swallows that hide real failures. The point wasn't the 749 raw `let _ =` sites — it was the ~18 where a genuine failure of a critical operation vanished with no trace.

Why

A launchd bug had just reported the AI brain "(re)loaded" while it was actually down — a green lie in the log. The founder's response was the right one: a product's logging is broken if an important failure doesn't show up in it. Audit the critical paths.

First, the honest size of the problem. Across the Rust source:

But 749 is not "749 bugs," and saying so would be its own kind of lie. Most are benign by design: an env var with a sane default, an expected-absent lookup, a cosmetic value. The real question is narrower and harder: where does a failure of a CRITICAL operation vanish with no trace?

The audit

Four read-only subagents, one per subsystem (memory store, terminal/session, connectors, agent push / remote), each told to flag ONLY swallows that hide a real failure of: persisting important state, PTY/terminal lifecycle, git, subprocess spawn, or network ingest — and to explicitly exclude the benign pattern. They came back with ~18 HIGH/MED findings. The worst:

Each got a warn! with a target: and structured fields, so it lands in ~/Library/Logs/DalkkakAI/runtime.log where it can actually be seen.

Verified

The lesson

let _ = has two faces. Discarding an expected-absent is fine. Discarding a failure of a critical operation — a persist, a spawn, a network ingest, a lifecycle kill — is a silent data-loss or zombie bug wearing the same syntax. You can't grep your way to the difference; you audit by what the operation is, not by counting the pattern. 749 raw sites, ~18 that actually mattered. A log you can trust is one where the important failures are guaranteed to appear.