dc28b63ad8
executus CI / test (push) Successful in 36s
The tool registry core (registry, permission model, Invocation, gated-tool wrapper, ssrf guard, hmac, encryption, argcoerce, helpers, rootrun, session_tools, webhook_rate_limit) had zero mort coupling — it imports only majordomo/llm + x/crypto/hkdf — so it moves verbatim with a package rename (skilltools -> tool). All same-package tests came along and pass; the SSRF, gated-wrapper, encryption and output-pattern invariants are re-anchored here. majordomo re-enters the module graph (now pinned to the latest, incl. the front-loaded-output fix). model/ + llmmeta + structured follow next. Docs: CLAUDE.md now requires README/examples to stay in sync with changes in the same commit; CI skips docs/example-only pushes via paths-ignore. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
19 lines
480 B
Go
19 lines
480 B
Go
package tool
|
|
|
|
import "testing"
|
|
|
|
type fakeAccessor struct{ s RunState }
|
|
|
|
func (f fakeAccessor) RunState() RunState { return f.s }
|
|
|
|
func TestInvocationRunState_NilSafe(t *testing.T) {
|
|
var inv Invocation
|
|
if inv.RunState != nil {
|
|
t.Fatal("RunState should default nil")
|
|
}
|
|
inv.RunState = fakeAccessor{s: RunState{Iteration: 3, MaxIterations: 10}}
|
|
if got := inv.RunState.RunState(); got.Iteration != 3 || got.MaxIterations != 10 {
|
|
t.Fatalf("unexpected RunState: %+v", got)
|
|
}
|
|
}
|