[FIX] restore the prompt vocabulary check, the empty --api-key refusal and scored steps' issue-ahead rule

33108e48 (the preempted-prefill gate's wait bound) was cut from an older main and, landing, took
back three changes that had merged before it:

- a28221eb: a prompt id outside the vocabulary is refused at admission (Scheduler::add_locked),
  never staged into a pass where the embedding gather faults the device and stops the engine; and
  its test, a_prompt_names_real_vocabulary_rows.
- b9c685a9: --api-key "" is a startup error, not a server that looks guarded and answers every
  keyless request; and the guide's lines on it and on the loopback-only routes.
- ed1e5caf: a scored row the step in flight finishes gets no step issued ahead; and its two tests,
  the non-scored one with a token left after the step in flight so that a step ahead exists (#349).

The wait bound itself, the lookup index and the rest of 33108e48 are unchanged. sched_test 176,
config_test 62 and server_test 177 cases pass.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qthwau4zwWgAaD8vZrycp1
This commit is contained in:
DeadcodeandClaude Opus 5.5 committed 2026-10-30 12:18:29 +01:00
1 parent 8df9240d65
commit d773992abc
4 files changed
+104 -5

No files matched your search

+8 -1
View File
@@ -821,7 +821,14 @@ int config_parse(int argc, char** argv, Config* c) {
}
else if (S("--host")) { if (!(v = need(i))) return RAD_E_INVAL; c->host = v; }
else if (S("--port")) { if (!num(0, 65535, &c->port)) return RAD_E_INVAL; }
else if (S("--api-key")) { if (!(v = need(i))) return RAD_E_INVAL; c->api_key = v; }
else if (S("--api-key")) {
if (!(v = need(i))) return RAD_E_INVAL;
/* An empty key is no key: --api-key "" or --api-key "$UNSET_VAR" must not start a
* server that looks guarded and answers everything keyless. */
if (!*v) { RAD_ERR("--api-key takes a non-empty key; an empty value guards nothing");
return RAD_E_INVAL; }
c->api_key = v;
}
else if (S("--served-model-name")) {
if (!(v = need(i))) return RAD_E_INVAL;
if (!*v) { RAD_ERR("--served-model-name takes a non-empty name"); return RAD_E_INVAL; }