-
Notifications
You must be signed in to change notification settings - Fork 0
Fix multi-session attribution loss during checkpoint condensation #141
Description
Description
When multiple agent sessions contribute to the same checkpoint (same base commit), Partio loses per-session attribution data during condensation. The root CheckpointSummary ends up reflecting only the most recent session's attribution rather than an aggregate across all sessions. The reported agent_percentage is wrong for repositories where users run multiple short sessions before committing.
Fix the condensation logic to accumulate attribution across all contributing sessions so the final summary accurately reflects combined agent and human contributions.
Why
Attribution accuracy is a core Partio value proposition. If two sessions each contribute 50% of the changes but the summary only records one, the user sees a misleading 50%. The bug silently discards real work.
User Relevance
Users who run multiple short agent sessions before a commit get accurate attribution percentages rather than percentages that only reflect the last session — important for code review contexts where attribution data informs decisions about AI-assisted work.
Source
Inspired by entireio/cli#813
Acceptance Criteria
- When two or more agent sessions contribute to the same checkpoint, attribution data from all sessions is aggregated correctly
- The final
agent_percentagereflects contributions from all sessions, not just the most recent - A test covers a two-session scenario and asserts that attribution is summed across both
- No regression in single-session attribution calculation