Skip to content

yield: timestamp-window commit attribution can cross-credit parallel sessions and states results as fact #641

Description

@avs-io

Problem

A commit is attributed to a session if its timestamp falls inside [firstTimestamp, lastTimestamp + 1h] (src/yield.ts:154). Attribution is per repo, falling back to cwd when projectPath is missing. Two sessions overlapping in the same repo each see the other's commits inside their window, so a session that shipped nothing can land in the productive bucket. The rendered output then states the classification as fact ("sessions shipped to main", src/yield.ts:236-238) with no caveat; the only hedge is the word (experimental) in --help, which never appears in the report itself.

Evidence

  • src/yield.ts:152-160 (window), :199-205 (repo/cwd fallback), :236-238 (unhedged wording)
  • Verified on main at 1a75484.

Proposed fix

  1. Put a one-line attribution caveat in the text report and a field in the JSON.
  2. Mark sessions with overlapping windows in the same repo as ambiguous instead of double-crediting.
  3. Optionally tighten correlation (branch match, or commit author-time strictly inside the session span) before the +1h grace applies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions