CI / test (push) Successful in 1m43s
Two defects, both of the same kind: something the CLI knew and the rest of the system did not. A profile can be edited while a replica is running against the old one. The reconciler deliberately leaves it alone — churning a replica that is serving costs more than the imperfection — but there was no way to see it, so the cluster could disagree with its own configuration indefinitely and read as healthy. Profile now carries a fingerprint, a replica records the one it was placed with, and both the API and `ctl replicas` say "stale profile" when they differ. An empty fingerprint is not stale: it means a replica adopted from an older agent, which is unknown rather than wrong. Adding a model from the admin page skipped the source check `ctl model add` has done all along, so a typo or a mirror that is down became a replica failing on a node minutes later, with an error naming the node. The check moves out of the CLI into a package both use. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
17 lines
470 B
Go
17 lines
470 B
Go
package cli
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
func TestTheNoteSaysWhereTheAnswerCameFrom(t *testing.T) {
|
|
// The control plane's network is not the nodes' network. The check catches
|
|
// typos and a mirror that is down; it is not proof the fetch will work,
|
|
// and the wording must not suggest it is.
|
|
note := sourceNote("http://models.internal/x.gguf", 1<<30)
|
|
if !strings.Contains(note, "from here") {
|
|
t.Errorf("the note overstates what was checked: %s", note)
|
|
}
|
|
}
|