The infra#179 partial_failure message and the tool descriptor told callers to "Finalize locally with `hyperguild new-project`" — but that command does not exist (the hyperguild CLI only has tier/brain/mode; it was specced, never built). It pointed users at a dead end. Extracted the message into a pure infra179FinalizeMessage() and reworded it to name the actual remaining work — cloning the repo and substituting the leftover __PROJECT_NAME__ / __MODULE_PATH__ placeholders, or retrying — with no reference to any scaffolding CLI. Descriptor updated to match. Unit-tested the wording. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
23 lines
784 B
Go
23 lines
784 B
Go
package tools
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
// #46: the infra#179 finalize guidance must not point at a non-existent command
|
|
// (`hyperguild new-project` was never built). It should name the real remaining
|
|
// work — substituting the placeholders — so the caller isn't sent to a dead end.
|
|
func TestInfra179FinalizeMessage(t *testing.T) {
|
|
msg := infra179FinalizeMessage("main", 5, 2, "branch does not exist")
|
|
|
|
for _, want := range []string{"infra#179", "__PROJECT_NAME__", "__MODULE_PATH__", "branch does not exist"} {
|
|
if !strings.Contains(msg, want) {
|
|
t.Errorf("message missing %q\ngot: %s", want, msg)
|
|
}
|
|
}
|
|
if strings.Contains(msg, "hyperguild new-project") {
|
|
t.Errorf("message must not reference the defunct `hyperguild new-project` command\ngot: %s", msg)
|
|
}
|
|
}
|