REQ-INFER-018: Same-prefix batch generation is gated, per-request-constrained and seq-safe

← Requirements

What it requires

  1. Given N sequences, Then batch_shared_prefix_len returns the common prefix capped one below the shortest and 0 for <2 sequences, any empty sequence, a single-token shortest, or no common first token.
  2. Given each viability condition individually violated (hybrid, n<2, no shared prefix, n > n_parallel, suffixes over n_batch), Then batch_is_viable is false.
  3. Given an empty pool, Then successive allocate_temp_seq_id calls return distinct ids and released ids are reused.
  4. Given a real batch, Then the batched decode step count is about the longest output, not the serial sum; on a hybrid arch it falls back to serial.
tier
NOT_RUN

Where it lives

  • src/inference2
  • src/facade1

See it on the map

How it is met

implemented bytestsresultentropic_inference_stateentropic_run_batchplan_batch_kventropic_inference_state returns COLD for NULL handleabsententropic_inference_state returns the backend's state enumabsentgh#158: a batch never clears the whole KV cacheabsentgh#158: a batch never writes a sequence a session ownsabsentgh#158: the single-session default is unchangedabsent

Show on the map

Implemented by

Tests (5)

Reached through calls

5 tests: 5 absent

testresultlinked byimplementers exercisedcalls away
entropic_inference_state returns COLD for NULL handleabsentinferred1 of 3: entropic_inference_state1
entropic_inference_state returns the backend's state enumabsentinferred1 of 3: entropic_inference_state1
gh#158: a batch never clears the whole KV cacheabsentinferred1 of 3: plan_batch_kv1
gh#158: a batch never writes a sequence a session ownsabsentinferred1 of 3: plan_batch_kv1
gh#158: the single-session default is unchangedabsentinferred1 of 3: plan_batch_kv1