phraser: the startup wait is a config field, and it is tested (V-323)
The last untested arm of startLlamaProc was `case <-time.After(60 * time.Second)`, and it could not be tested as written — a test would have had to wait a real minute. It is Config.StartupTimeout now, defaulted to 60s in DefaultConfig and surfaced as phraser.startup_timeout, so the box can raise it: a cold 1.7B loading off a spinning disk can outrun 60s and that failed the boot with nothing to turn. The test asserts the child is dead, not just that the error came back. That arm is the one most likely to leak, because the child is alive and busy loading a model rather than already gone — so the fake records its pid before it hangs. startLlamaProc 90.9% → 95.7%, package 76.9% → 77.3%.
This commit is contained in:
@@ -1233,6 +1233,13 @@ type PhraserConfig struct {
|
||||
NCtx int `json:"n_ctx,omitempty"`
|
||||
Timeout Duration `json:"timeout,omitempty"`
|
||||
|
||||
// StartupTimeout — how long the daemon waits for llama-server to print its
|
||||
// listen line at boot. Zero ⇒ the phraser's 60s default.
|
||||
//
|
||||
// It is here because a cold 1.7B loading off a spinning disk can outrun 60s,
|
||||
// and that failed the boot with no way to raise it (Vikunja #323).
|
||||
StartupTimeout Duration `json:"startup_timeout,omitempty"`
|
||||
|
||||
// LLMNudges — let the model word nudges again. Off by default: nudges are
|
||||
// worded from hand-written Russian templates now (the model broke the
|
||||
// persona and invented units). Chat, query and reminder phrasing always go
|
||||
|
||||
Reference in New Issue
Block a user