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.
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:
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.Merged as: <squash-sha> (PR #<n>)when known.Cheap version: even just a free-text
merged_asfield settable after the fact would remove the archaeology.