Skip to content

"abandoned" session label is wrong when commits merge to main outside the session's time window #1442

Closed

Description

@P47Phoenix

Bug description

The codeburn yield command labels a session as "abandoned" if it can't find commits from that session landing on the main branch. But it only looks for those commits inside a narrow time window tied to the session itself. If the actual merge to main happens later (or gets credited to a different, nearby session), codeburn calls the work "abandoned" even though it was fully shipped.

What I observed

I ran a session that did real work on a feature branch. That branch ended up going through two pull requests, both fully merged into main. But codeburn yield still marked the session as "abandoned" — meaning it thinks none of that work ever made it to main.

The README explains that commits are matched to sessions by picking the tightest time window containing them. That's the problem — it's matching commits to sessions purely by time window, not by checking whether the branch/commits from that session ever actually reached main, whenever that happened.

Expected behavior

If the commits from a session's branch eventually get merged into main — even if that merge happens after the session ended, or even if the time-window logic assigns credit to a different overlapping session — the original session should not be labeled "abandoned." The work was completed and shipped; it just didn't merge inside the same tight time window the tool is checking.

Likely cause

This looks like a heuristic/methodology issue, not a crash or code bug. The classification logic assumes a session's commits must land on main within (or close to) that session's own time window. That assumption breaks for a very normal workflow: working on a feature branch across multiple sessions or multiple days, then merging later.

Suggested fix

Instead of relying only on timestamp-window matching, consider also correlating by branch name or commit SHA ancestry. That is: check whether any commit made during a session's branch work later shows up in main's history at all, regardless of when that merge happened or which session's window it falls into. This would avoid falsely calling completed, merged work "abandoned" just because the merge timing didn't line up with the session window.

Happy to help test or provide more detail if useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: clibug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions