I've been meaning to write this up. For about a year now, all my side projects have kept a TODO.org in the repo root instead of an issue tracker. Headline per bug, a state, a timestamp when it closes, and whatever notes I had at the time, including dead ends. It's committed with the code, which means git log shows the fix and the note about why in one commit, and grep finds both.
What surprised me is that I've started writing down the reasoning, because it's the same file and there's no form to fill in. When I go back after three months, it's that reasoning I want, more than the list.
None of this needs Emacs really. A plain text file would do most of it. The agenda view is nice, but I rarely open it, and if I'm honest I mostly use the search.
The downside is that nobody else can see it, or file anything, but nobody else is filing anything.