Type
Files to change
internal/resolver/resolver_test.go
Description
TestSplitServiceInput and TestServiceFromBranch in internal/resolver/resolver_test.go cover the happy path and a few prefixed cases, but several edge cases are not exercised:
G2 — SplitServiceInput edge cases
- Empty string input
"" — should return ("", "") without panicking
- Input with only a separator character (e.g.,
"/") — candidate and variant parts are both empty
- Input with multiple separator characters (e.g.,
"auth/v2/beta") — only the first separator should split; the rest belong to the variant
- Leading/trailing whitespace in input
G3 — ServiceFromBranch edge cases
- Branch name with no matching prefix — should return
("", "", "") cleanly
- Branch name where the prefix matches but the task part is empty (e.g.,
"feat/")
- Multiple prefixes where the longer one matches vs. the shorter one (prefix-ordering sensitivity)
- Branch name that is exactly equal to a prefix with no trailing task name
These gaps are low-risk but improve confidence when the resolver is extended.
Acceptance
Bundles
Original candidates folded into this issue:
- G2 (
internal/resolver/resolver_test.go:189): SplitServiceInput missing edge-case table rows.
- G3 (
internal/resolver/resolver_test.go:226): ServiceFromBranch missing edge-case table rows (empty-prefix match, prefix-ordering, empty task segment).
Type
Files to change
internal/resolver/resolver_test.goDescription
TestSplitServiceInputandTestServiceFromBranchininternal/resolver/resolver_test.gocover the happy path and a few prefixed cases, but several edge cases are not exercised:G2 —
SplitServiceInputedge cases""— should return("", "")without panicking"/") — candidate and variant parts are both empty"auth/v2/beta") — only the first separator should split; the rest belong to the variantG3 —
ServiceFromBranchedge cases("", "", "")cleanly"feat/")These gaps are low-risk but improve confidence when the resolver is extended.
Acceptance
TestSplitServiceInputcovering the G2 cases listed above.TestServiceFromBranchcovering the G3 cases listed above.make test).Bundles
Original candidates folded into this issue:
internal/resolver/resolver_test.go:189):SplitServiceInputmissing edge-case table rows.internal/resolver/resolver_test.go:226):ServiceFromBranchmissing edge-case table rows (empty-prefix match, prefix-ordering, empty task segment).