main landed b5fc63786 (bd-paurh) while this series was in flight, fixing the
SAME defect wave 4 fixed: proxied `bd delete` passing Cascade:true
unconditionally and refusing --cascade, so `bd delete <gate> --force` destroyed
the bead it had just unblocked.
TWO ROUTES TO ONE BEHAVIOUR. main implements EnforceCascadePolicy in the domain
deleteMany and keeps the old proxied code path. This series routes that path
through issueops.Deleter, which is conformance-tested at three backends. They
converge because the uow Deleter runs through the same domain layer, so main's
policy work is underneath the role rather than beside it.
Kept the role-based CLI implementation and took MAIN'S TESTS AS THE SPEC — they
encode the user-visible contract, and making them pass over a different
implementation is the strongest evidence the reconciliation is right. All of
them do:
TestProxiedServerDelete, DeleteWisp, DeleteConcurrent, DeleteForceOrphans,
DeleteBlockedJSONSingleDoc, TestProxiedServerCascadeParity (all three
subtests), the output-contract suite and the input tests.
WHAT THE ROLE PATH WAS MISSING, ported from main's fix:
- The dependents refusal now renders the PREVIEW FIRST and then the refusal,
which is what classic does and what tells a caller both what would go and
how to proceed. The role path returned the bare error, printing the second
half only.
- `cascade`, `would_orphan` and `error` on the JSON preview.
- The single-JSON-document contract on a blocked --json preview: the payload
already carries the refusal in its "error" key, so a second doc on stdout
is the bug main's follow-up commit had to correct.
The two refusal messages turned out to be BYTE-IDENTICAL — issueops'
DependentsOutsideRequestError and domain's DeleteBlockedError were written
independently and say the same sentence — so main's prose assertions pass
against the role's error unchanged.
Also reconciled: main's EnforceCascadePolicy field and policy block are taken
whole; this series' countDeletedDependencies (the cross-plane edge count fix)
survives on top of it, since main only moved the `result` declaration earlier.
Two same-named TestProxiedServerDeleteForceOrphans tests collided; main's is
the more thorough (it seeds a descendant) and is the one kept.