beads/cmd/bd/count_proxied_server.go
CI Bot eee1a14b00 Delete the duplication narration git history already holds
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.
2026-08-06 06:59:33 +00:00

24 lines
741 B
Go

package main
import (
"errors"
"fmt"
"github.com/steveyegge/beads/internal/storage/uow"
"github.com/steveyegge/beads/issueops"
)
// proxiedCounter hands back the guarded issue-count surface for the
// proxied-server provider, through the provider's OWN capability accessor —
// the same two-step proxiedCommenter performs, and for the same reason: the
// accessor is where each layer is added.
func proxiedCounter() (issueops.Counter, error) {
if uowProvider == nil {
return nil, errors.New("proxied-server UOW provider not initialized")
}
src, ok := uowProvider.(uow.CounterSource)
if !ok {
return nil, fmt.Errorf("proxied-server provider %T does not offer the issue-count surface", uowProvider)
}
return src.Counter()
}