REQ-API-002: Handle lifecycle — create, configure, destroy, NULL-safe teardown

← Requirements

What it requires

  1. GIVEN a NULL out-pointer WHEN entropic_create is called THEN it returns ENTROPIC_ERROR_INVALID_ARGUMENT and does not crash.
  2. GIVEN a created handle WHEN entropic_destroy is called THEN resources release cleanly; calling entropic_destroy(NULL) afterwards is a safe no-op.
  3. GIVEN a created-but-unconfigured handle THEN every subsystem entry point reports INVALID_STATE rather than dereferencing a null subsystem pointer.
tier
NOT_RUN

Where it lives

  • src/facade3

See it on the map

How it is met

implemented byresults (56 tests)entropic_createentropic_destroyentropic_run56 absent56 tests, a summary by result: every test is in the tests table below

Show on the map

Implemented by

Tests (56)

Reached through calls

56 tests: 56 absent

testresultlinked byimplementers exercisedcalls away
Nemotron3-Nano-4B Q8 first inference does not crash (gh#66)absentinferred3 of 3: entropic_create, entropic_destroy, entropic_run1
Two GPU-resident handles can coexist (v2.2.8 target)absentinferred3 of 3: entropic_create, entropic_destroy, entropic_run1
gh#110: MTP engages through the real agent loop (entropic_run)absentinferred3 of 3: entropic_create, entropic_destroy, entropic_run1
gh#95: identity grammar: field constrains that tier's outputabsentinferred3 of 3: entropic_create, entropic_destroy, entropic_run1
h1.run() after h2.configure() does not segfault (v2.2.6)absentinferred3 of 3: entropic_create, entropic_destroy, entropic_run1
Configure with null JSON returns errorabsentinferred2 of 3: entropic_create, entropic_destroy1
Create and destroy lifecycleabsentinferred2 of 3: entropic_create, entropic_destroy1
Double destroy is safeabsentinferred2 of 3: entropic_create, entropic_destroy1
Double-configure on one handle is refusedabsentinferred2 of 3: entropic_create, entropic_destroy1
Three handles can coexistabsentinferred2 of 3: entropic_create, entropic_destroy1
Two handles configure independentlyabsentinferred2 of 3: entropic_create, entropic_destroy1
entropic_last_error returns per-handle state (v2.2.6)absentinferred2 of 3: entropic_create, entropic_destroy1
entropic_register_mcp_server on a configured handle absentinferred2 of 3: entropic_create, entropic_destroy1
entropic_run_messages with console logging disabled still absentinferred2 of 3: entropic_create, entropic_destroy1
entropic_seconds_since_last_activity returns 0 before any run absentinferred2 of 3: entropic_create, entropic_destroy1
gh#121 regression: configure populates engine's allowed_tools from identity frontmatterabsentinferred2 of 3: entropic_create, entropic_destroy1
gh#144: concurrent bridge clients queue instead of racingabsentinferred2 of 3: entropic_create, entropic_destroy1
gh#164: entropic_release_model frees VRAM through the C ABIabsentinferred2 of 3: entropic_create, entropic_run1
gh#175: a non-positive mcp.server_timeout_seconds is refused at configureabsentinferred2 of 3: entropic_create, entropic_destroy1
gh#198: a deferred handle holds no GPU memory until it runsabsentinferred2 of 3: entropic_create, entropic_run1
gh#203: followup returns delegation_id and summary from real storageabsentinferred2 of 3: entropic_create, entropic_destroy1
gh#204: an unservable http_port fails configure loudlyabsentinferred2 of 3: entropic_create, entropic_destroy1
queue: NULL message argument is rejectedabsentinferred2 of 3: entropic_create, entropic_destroy1
queue: NULL out-pointer on depth is rejectedabsentinferred2 of 3: entropic_create, entropic_destroy1
queue: clear on unconfigured handle is OK no-opabsentinferred2 of 3: entropic_create, entropic_destroy1
queue: depth on unconfigured handle reads zeroabsentinferred2 of 3: entropic_create, entropic_destroy1
queue: enqueue on idle handle returns INVALID_STATEabsentinferred2 of 3: entropic_create, entropic_destroy1
queue: observer registration is allowed pre-configureabsentinferred2 of 3: entropic_create, entropic_destroy1
entropic_create rejects NULL out-pointerabsentinferred1 of 3: entropic_create1
entropic_destroy on NULL is a no-opabsentinferred1 of 3: entropic_destroy1
entropic_run on configured handle without active model returns errorabsentinferred1 of 3: entropic_run1
entropic_run on unconfigured handle returns INVALID_STATEabsentinferred1 of 3: entropic_run1
entropic_run rejects NULL handleabsentinferred1 of 3: entropic_run1
gh#169: an iteration-capped delegate hands its parent the audit it absentinferred2 of 3: entropic_create, entropic_run2
gh#181: a delegate hard-cut by the thinking budget hands its absentinferred2 of 3: entropic_create, entropic_run2
gh#194: a plain generation publishes the prefill it performedabsentinferred2 of 3: entropic_create, entropic_run2
gh#93: autoparser family parses a multi-parameter tool callabsentinferred2 of 3: entropic_create, entropic_run2
gh#93: entropic_interrupt stops a long run early (cancel-bridge)absentinferred2 of 3: entropic_create, entropic_run2
gh#94: enable_thinking:false suppresses think blocks (facade)absentinferred2 of 3: entropic_create, entropic_run2
outside-root optional: a real model's reads outside its root absentinferred2 of 3: entropic_create, entropic_run2
gh#158: interrupting one session leaves the other runningabsentinferred1 of 3: entropic_create2
gh#158: metrics and context reads are safe during live runsabsentinferred1 of 3: entropic_create2
gh#158: two concurrent sessions do not bleed into each otherabsentinferred1 of 3: entropic_create2
gh#165 + gh#164: release the weights, keep the conversationabsentinferred1 of 3: entropic_create2
gh#165: a dropped session restored from JSON keeps answeringabsentinferred1 of 3: entropic_create2
gh#166: two workspaces on one handle do not read each other's absentinferred1 of 3: entropic_create2
gh#179: each workspace's sessions answer from its own app_context, absentinferred1 of 3: entropic_create2
gh#204/gh#205: two HTTP clients, different session, workspace and absentinferred1 of 3: entropic_create2
gh#214: a prompt that does not fit fails the turn, typedabsentinferred1 of 3: entropic_create2
gh#216: multi-byte text at the history cut does not poison later turnsabsentinferred1 of 3: entropic_create2
gh#217: release is refused while another session is decodingabsentinferred1 of 3: entropic_create2
gh#99: run_as emits each tier's grammar on a shared modelabsentinferred1 of 3: entropic_create2
v2.14.1: a declared server serves each workspace from its own repositoryabsentinferred1 of 3: entropic_create2
v2.14.3: release frees the model over MCP and the conversation survivesabsentinferred1 of 3: entropic_create2
v2.14.4: a model's commit message with shell syntax is text, not a commandabsentinferred1 of 3: entropic_create2
v2.14.5: a failed turn is an error carrying only its own textabsentinferred1 of 3: entropic_create2

Flows through it