bd ado push deleted Related and Predecessor/Successor links on the work
items it pushed (and on a re-asserted parent), causing silent data loss in
Azure DevOps. PushLinks built the desired relation set only from the
forward-direction link types beads emits (Dependency-Forward,
Hierarchy-Forward, Related) targeting beads-tracked items, then removed any
System.LinkTypes.* relation not in that set. That swept away:
- reverse-direction links (Dependency-Reverse = predecessor/successor,
Hierarchy-Reverse = parent), which beads represents via the forward link
on the *other* work item and so never appear in the desired set; and
- Related/forward links pointing at items beads does not track (e.g. links
a human created in ADO outside the synced set).
Make push read-merge-write: only remove a current relation when beads owns
it — its type is one beads emits (removableRelTypes) AND its target is a
beads-tracked work item (managedTargets). All other relations are left
untouched. Adds TestPushLinks_PreservesUnmanagedLinks and threads the
managed-target set from pushADOLinks.
Fixes#4522
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>