Fifteen paragraphs of the form "this file used to hold a second copy of <cmd>: it parsed the flags again, opened a unit of work...". The fact that a second implementation existed explains nothing about the code that is there now, and the commit that removed it says so in more detail than a doc comment should. Reviewed individually rather than pattern-matched. A first pass keyed on phrases like "used to" and "this slice" flagged 130 paragraphs and would have taken out design rationale with them — it cut bootstrapper.go's "WHY ONLY THIS SLICE OF bd init IS A ROLE" because "THIS SLICE" matched a pattern meant for programme slices. That pass was reverted. Of the 69 paragraphs a tightened pass surfaced, these 15 are the ones carrying no live information; the other 54 explain an invariant, a trap, or a behaviour change a user sees, and stay.
24 lines
745 B
Go
24 lines
745 B
Go
package main
|
|
|
|
import (
|
|
"errors"
|
|
"fmt"
|
|
|
|
"github.com/steveyegge/beads/internal/storage/uow"
|
|
"github.com/steveyegge/beads/issueops"
|
|
)
|
|
|
|
// proxiedSweeper hands back the guarded bulk-clearance surface for the
|
|
// proxied-server provider, through the provider's OWN capability accessor —
|
|
// the same two-step proxiedCounter performs, and for the same reason: the
|
|
// accessor is where each layer is added.
|
|
func proxiedSweeper() (issueops.Sweeper, error) {
|
|
if uowProvider == nil {
|
|
return nil, errors.New("proxied-server UOW provider not initialized")
|
|
}
|
|
src, ok := uowProvider.(uow.SweeperSource)
|
|
if !ok {
|
|
return nil, fmt.Errorf("proxied-server provider %T does not offer the bulk-clearance surface", uowProvider)
|
|
}
|
|
return src.Sweeper()
|
|
}
|