link_commit(
ctx,commit) ->linked,skipped,err
Record a commit against the issues it references
commit is the table read_commit returns. Every reference lands in one
of the two lists with a reason: silence about a reference that went
nowhere is the one outcome a caller cannot explain. err is set only
when commit carries no sha. A commit recorded on an earlier run is
skipped, so linking twice records it once.
A linked item is { key, closed, refused, failed }. closed is true
when this commit closed the issue. refused says why a closing
reference left the issue open: the gate that refused it, or the store's
error. A settled issue is neither closed nor refused.
A skipped item is { key, reason, failed }. The reason is
no such issue, already recorded, or the store's error for a commit
event it refused.
failed marks an item whose write the store refused. Such a write is
reported, not raised. Nothing closes an issue whose commit event failed.