Skip to content

friction log: commit references dangle after squash-merge — record the PR / post-merge SHA #75

Description

@geuben

Problem

Friction logs and the ledger reference commits by the SHAs created on the run's worktree branch. Under a squash-merge workflow those branches are deleted after merge (correctly), so every commit reference in the log dangles — an auditor reading a log weeks later finds that git show <sha> resolves only if a stale branch happens to survive, and the mapping from a run to what actually landed on the main branch is reconstruction work (searching merge commits by message).

Proposal

Record the durable identifiers once they exist:

  • A post-merge hook or lightweight command (tdd run link --pr <n> or auto-detection via the remote's merged-PR lookup) that stamps the run row with the PR number and the squash/merge SHA on the default branch.
  • The friction-log render shows both: per-cycle worktree SHAs (fine for freshness) plus a header line Merged as: <squash-sha> (PR #<n>) when known.
  • Optionally, degrade gracefully in the render: mark worktree SHAs that no longer resolve as such, so a reader doesn't chase them.

Cheap version: even just a free-text merged_as field settable after the fact would remove the archaeology.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions