feat(server): /props.kvflash advertises the recall capability (stacked on #963)

Draft
DU
7h ago
+3780-187

Draft. Sibling of #963 (G2, KVFlash 2.0 prefill recall), opened after #963 gates; not a stack member. Review only d98512ff0..e0c3d06fb: 2 commits, 5 files, +79 -2, against kvflash/prefill-recall at d98512ff0 (#963 is now at a21ae4883, five commits later; this branch is not rebased onto them).

Why

A launcher or client cannot tell whether a running server has KVFlash recall, or which mode, without reading its log. This adds one line to --help and one object to /props.

What it does

Paths under server/.

  • src/server/launch_profiles.h: kKvflashRecallProtocol = 1, kvflash_recall_help_line() = kvflash-recall: protocol=1, and the pure kvflash_recall_mode(arch, reselect): prefill-reselect=<4|5> on qwen35, empty on another architecture or when LUCE_KVFLASH_PREFILL_RESELECT is 0 or unset.
  • src/server/server_main.cpp: --help ends with the protocol line; with --kvflash, after the recall profile (kvflash_recall_env(arch, mode5)) is installed, the server config takes kvflash_enabled, kvflash_pool_tokens (0 for auto) and the mode.
  • src/server/http_server.cpp/.h: /props gains kvflash {enabled, pool_tokens, recall {protocol, active, mode}}; active = enabled and a non-empty mode. Without --kvflash: enabled:false, active:false.
  • Hand port of 79a6f18fb, adapted to the mode-4 / mode-5 profile of #963. feat/kvflash-ecap and -v3 are duplicates of it.

Commits

  • 2e5475509 test(server): 4 cases (help line, mode string, /props without the flag, /props with pool and recall). Red alone: the helpers and the config fields are missing.
  • e0c3d06fb feat(server): the helpers, the config fields, the /props object, the --help line.

Evidence

RTX 3090 (CUDA 12.6, sm_86), pre-rebase head 071a87f2b (maps to e0c3d06fb): build ok; test_server_unit 1389 pass / 0 fail / 6 skip; ctest 1705 of 1711 at the 120 s timeout; of the 6, 3 are timeouts that pass alone at 900 s and 3 fail on the base too (test_ds41_mmid_width_invariance, qwen4exp_prefix_cache, server_unit_entrypoint). Per commit: the test commit does not compile alone (red-first, kvflash_recall_help_line arrives with the feature commit); the feature commit builds.

Radeon AI PRO R9700 (gfx1201, ROCm 7.2.4, lucebox6), e0c3d06fb itself: HIP build ok; test_server_unit 1370 pass / 0 fail / 4 skip. A server started with --no-kv-cache --kvflash 16384 (Qwen3.8-27B IQ4_XS, no draft model) serves over HTTP /props.kvflash = {"enabled": true, "pool_tokens": 16384, "recall": {"active": true, "mode": "prefill-reselect=4", "protocol": 1}}; without --kvflash it serves {"enabled": false, "pool_tokens": 0, "recall": {"active": false, "mode": "", "protocol": 1}}; the same before and after a request.

Not run

  • /props over HTTP in mode 5, with --kvflash auto or on the slot engine (--max-concurrency): the HTTP read covers mode 4 on the serial path only.
  • The consumer: the luce_box W4 probe that reads this object has not landed.
  • HIP ctest beyond test_server_unit; gfx1151.