Remove unused captured state and orphan helpers

This commit is contained in:
2026-11-05 14:33:04 +00:00
parent a91bc1608b
commit 7db5572b62
14 changed files with 16 additions and 74 deletions

View File

@@ -184,7 +184,6 @@ type Backend struct {
SmokeTests *BackendSmokeTestConfig
ConcurrencyLimit int
QueueCapacity int
QueueCapacitySet bool
}
// BackendCapacityPolicy describes normalized run and generation capacity for

View File

@@ -31,14 +31,6 @@ func qualifyResourceID(id, namespace string) (string, bool) {
return namespace + "/" + id, true
}
func resourceNamespaceFromID(id string) (string, bool) {
if !validResourceID(id) || !strings.Contains(id, "/") {
return "", false
}
namespace, _, _ := strings.Cut(id, "/")
return namespace, true
}
// IsValidResourceID reports whether id is an unqualified resource ID or one
// valid namespace/local-ID pair.
func IsValidResourceID(id string) bool { return validResourceID(id) }

View File

@@ -86,25 +86,3 @@ func TestQualifyResourceID(t *testing.T) {
})
}
}
func TestResourceNamespaceFromID(t *testing.T) {
tests := []struct {
name string
id string
namespace string
wantOK bool
}{
{name: "qualified", id: "team/item", namespace: "team", wantOK: true},
{name: "same-prefix namespace stays distinct", id: "team-extra/item", namespace: "team-extra", wantOK: true},
{name: "unqualified", id: "item", wantOK: false},
{name: "malformed", id: "team/sub/item", wantOK: false},
}
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
got, ok := resourceNamespaceFromID(test.id)
if got != test.namespace || ok != test.wantOK {
t.Fatalf("resourceNamespaceFromID(%q) = (%q, %t), want (%q, %t)", test.id, got, ok, test.namespace, test.wantOK)
}
})
}
}