REQ-INFER-001: Backend lifecycle is a three-state machine with gated generation

← Requirements

What it requires

  1. Given a COLD backend, When load/activate/deactivate/unload are driven in valid and invalid orders, Then the observed state follows the documented machine and repeated calls are no-ops.
  2. Given a non-ACTIVE backend, When any generation or evaluation entry point is called, Then it returns ENTROPIC_ERROR_INVALID_STATE and never crashes.
  3. Given a failing do_load, Then the backend remains COLD.
tier
NOT_RUN

Where it lives

  • src/inference2

See it on the map

How it is met

implemented bytestsresultentropic_inference_generateentropic_inference_generate_with_cancelentropic_inference_generate catches backend exceptionsabsententropic_inference_generate rejects NULL handleabsententropic_inference_generate rejects NULL result pointerabsententropic_inference_generate returns error_code on backend failureabsententropic_inference_generate returns serialized JSON resultabsententropic_inference_generate_with_cancel aborts mid-decode when flag setabsententropic_inference_generate_with_cancel completes when not cancelledabsententropic_inference_generate_with_cancel honors a NULL cancel pointerabsententropic_inference_generate_with_cancel rejects NULL handle / resultabsentinference C ABI: exception paths + parse_params field sweepabsent

Show on the map

Implemented by

Tests (10)

Reached through calls

10 tests: 10 absent

testresultlinked byimplementers exercisedcalls away
entropic_inference_generate catches backend exceptionsabsentinferred1 of 2: entropic_inference_generate1
entropic_inference_generate rejects NULL handleabsentinferred1 of 2: entropic_inference_generate1
entropic_inference_generate rejects NULL result pointerabsentinferred1 of 2: entropic_inference_generate1
entropic_inference_generate returns error_code on backend failureabsentinferred1 of 2: entropic_inference_generate1
entropic_inference_generate returns serialized JSON resultabsentinferred1 of 2: entropic_inference_generate1
entropic_inference_generate_with_cancel aborts mid-decode when flag setabsentinferred1 of 2: entropic_inference_generate_with_cancel1
entropic_inference_generate_with_cancel completes when not cancelledabsentinferred1 of 2: entropic_inference_generate_with_cancel1
entropic_inference_generate_with_cancel honors a NULL cancel pointerabsentinferred1 of 2: entropic_inference_generate_with_cancel1
entropic_inference_generate_with_cancel rejects NULL handle / resultabsentinferred1 of 2: entropic_inference_generate_with_cancel1
inference C ABI: exception paths + parse_params field sweepabsentinferred1 of 2: entropic_inference_generate1