Skip to content

Fix attribution inflation from intermediate commits in squash workflows #197

@jcleira

Description

@jcleira

Summary

When a developer squashes multiple commits into one (e.g., via git merge --squash or interactive rebase), intermediate commits can inflate agent attribution. The final squashed commit contains only the net changes, but attribution may be calculated against accumulated intermediate diffs.

What to implement

Ensure attribution is calculated against the actual diff of the final commit (parent-to-commit), not accumulated from intermediate commits. When the post-commit hook runs after a squash, it should compare the committed tree against its direct parent only.

Context

  • internal/attribution/ — attribution calculation logic
  • internal/hooks/postcommit.go — post-commit hook that triggers attribution
  • internal/session/ — session state that may carry intermediate attribution data

Why

Squash workflows are common in teams that use feature branches. Inflated attribution makes the agent appear responsible for more code than it actually wrote, undermining the accuracy of the audit trail that Partio provides.

Inspired by: entireio/cli changelog 0.5.4 — "Attribution inflation from intermediate commits during squash workflows"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions