REQ-STOR-004: Referential integrity, cascade cleanup, and FTS index coherence

← Requirements

What it requires

  1. Given a parent conversation with a message and a delegation, When the parent is deleted, Then both the message and the delegation rows are gone.
  2. Given messages inserted normally, When messages_fts is queried, Then the content is present; When a message is deleted, Then the FTS row is removed too.
  3. Given conversations containing known text, When search_conversations runs, Then matching conversations are returned with a snippet.
  4. Given a database with conversations and messages, When get_stats is called, Then the counts and token sum reflect the stored rows.
tier
NOT_RUN

Where it lives

  • src/storage7

See it on the map

How it is met

implemented byresults (98 tests)delete_conversationentropic_storage_delete_conversationentropic_storage_get_statsentropic_storage_search_conversationsget_statsrun_migrationssearch_conversations98 absent98 tests, a summary by result: every test is in the tests table below

Show on the map

Implemented by

Tests (98)

Reached through calls

98 tests: 98 absent

testresultlinked byimplementers exercisedcalls away
Storage C ABI rejects every NULL-handle entry-pointabsentinferred6 of 71
C API searchabsentinferred2 of 7: entropic_storage_search_conversations, search_conversations1
C API snapshot and statsabsentinferred2 of 7: entropic_storage_get_stats, get_stats1
Storage handle lists and deletes conversations through the C ABIabsentinferred2 of 7: delete_conversation, entropic_storage_delete_conversation1
Storage handle saves snapshot + queries stats through the C ABIabsentinferred2 of 7: entropic_storage_get_stats, get_stats1
Storage handle searches conversations through the C ABIabsentinferred2 of 7: entropic_storage_search_conversations, search_conversations1
Delete conversation cascadesabsentinferred1 of 7: delete_conversation1
FTS5 search returns results with snippetsabsentinferred1 of 7: search_conversations1
Storage statisticsabsentinferred1 of 7: get_stats1
Basic INSERT and SELECT round-tripabsentinferred1 of 7: run_migrations2
CASCADE delete removes messages and delegationsabsentinferred1 of 7: run_migrations2
Concurrent access does not corruptabsentinferred1 of 7: run_migrations2
Database creates file and initializesabsentinferred1 of 7: run_migrations2
FTS5 triggers clean up on DELETEabsentinferred1 of 7: run_migrations2
FTS5 triggers populate on INSERTabsentinferred1 of 7: run_migrations2
Migrations are idempotentabsentinferred1 of 7: run_migrations2
Migrations run in orderabsentinferred1 of 7: run_migrations2
C API NULL handle returns errorabsentinferred1 of 7: run_migrations4
C API handle lifecycleabsentinferred1 of 7: run_migrations4
Storage open and closeabsentinferred1 of 7: run_migrations4
entropic_storage_open rejects NULL handleabsentinferred1 of 7: run_migrations4
entropic_storage_open with NULL db_path returns INVALID_ARGUMENTabsentinferred1 of 7: run_migrations4
entropic_storage_open with NULL handle returns INVALID_HANDLEabsentinferred1 of 7: run_migrations4
entropic_storage_open with a path inside a non-existent directory absentinferred1 of 7: run_migrations4
gh#203: followup returns delegation_id and summary from real storageabsentinferred1 of 7: run_migrations4
Configure with null JSON returns errorabsentinferred1 of 7: run_migrations8
Double-configure on one handle is refusedabsentinferred1 of 7: run_migrations8
Nemotron3-Nano-4B Q8 first inference does not crash (gh#66)absentinferred1 of 7: run_migrations8
Three handles can coexistabsentinferred1 of 7: run_migrations8
Two GPU-resident handles can coexist (v2.2.8 target)absentinferred1 of 7: run_migrations8
Two handles configure independentlyabsentinferred1 of 7: run_migrations8
entropic_configure called twice on the same handle returns ALREADY_CONFIGUREDabsentinferred1 of 7: run_migrations8
entropic_configure rejects NULL config_jsonabsentinferred1 of 7: run_migrations8
entropic_configure rejects NULL handleabsentinferred1 of 7: run_migrations8
entropic_configure_dir on /dev/null subpath returns an error, not an exceptionabsentinferred1 of 7: run_migrations8
entropic_configure_dir on a tmp dir runs the loader pathabsentinferred1 of 7: run_migrations8
entropic_configure_dir rejects NULL handleabsentinferred1 of 7: run_migrations8
entropic_configure_dir with empty string path returns an error code, not an exceptionabsentinferred1 of 7: run_migrations8
entropic_configure_from_file rejects NULL handleabsentinferred1 of 7: run_migrations8
entropic_configure_from_file rejects NULL pathabsentinferred1 of 7: run_migrations8
entropic_configure_from_file rejects missing fileabsentinferred1 of 7: run_migrations8
entropic_last_error reflects most-recent operation failureabsentinferred1 of 7: run_migrations8
entropic_last_error returns per-handle state (v2.2.6)absentinferred1 of 7: run_migrations8
entropic_register_mcp_server on a configured handle absentinferred1 of 7: run_migrations8
entropic_run_messages with console logging disabled still absentinferred1 of 7: run_migrations8
entropic_seconds_since_last_activity returns 0 before any run absentinferred1 of 7: run_migrations8
gh#110: MTP engages through the real agent loop (entropic_run)absentinferred1 of 7: run_migrations8
gh#121 regression: configure populates engine's allowed_tools from identity frontmatterabsentinferred1 of 7: run_migrations8
gh#144: concurrent bridge clients queue instead of racingabsentinferred1 of 7: run_migrations8
gh#154 a tier grammar stem that cannot resolve YET still absentinferred1 of 7: run_migrations8
gh#154 a tier grammar stem that resolves still configuresabsentinferred1 of 7: run_migrations8
gh#154 a tier with no grammar is unaffectedabsentinferred1 of 7: run_migrations8
gh#154 entropic_metrics_json carries a generations arrayabsentinferred1 of 7: run_migrations8
gh#156 a frontmatter-less app_context fails configure absentinferred1 of 7: run_migrations8
gh#156 a frontmatter-less constitution fails configure tooabsentinferred1 of 7: run_migrations8
gh#156 a missing app_context path fails configureabsentinferred1 of 7: run_migrations8
gh#156 a well-formed app_context file still configuresabsentinferred1 of 7: run_migrations8
gh#156 app_context false still configuresabsentinferred1 of 7: run_migrations8
gh#156 inline app_context content still configuresabsentinferred1 of 7: run_migrations8
gh#158 entropic_interrupt_session targets exactly one runabsentinferred1 of 7: run_migrations8
gh#163 entropic_configure carries app_context into ParsedConfigabsentinferred1 of 7: run_migrations8
gh#163 entropic_configure_dir carries app_contextabsentinferred1 of 7: run_migrations8
gh#163 entropic_configure_from_file carries app_contextabsentinferred1 of 7: run_migrations8
gh#163 the object and false spellings survive configure_dir tooabsentinferred1 of 7: run_migrations8
gh#164 entropic_release_model names an unknown tierabsentinferred1 of 7: run_migrations8
gh#164 entropic_release_model refuses to unload mid-turnabsentinferred1 of 7: run_migrations8
gh#165 entropic_session_context_set guards its preconditionsabsentinferred1 of 7: run_migrations8
gh#165 entropic_session_context_set refuses the running sessionabsentinferred1 of 7: run_migrations8
gh#165 entropic_session_context_set round-trips through the C ABIabsentinferred1 of 7: run_migrations8
gh#175: a non-positive mcp.server_timeout_seconds is refused at configureabsentinferred1 of 7: run_migrations8
gh#204: an unservable http_port fails configure loudlyabsentinferred1 of 7: run_migrations8
gh#95: identity grammar: field constrains that tier's outputabsentinferred1 of 7: run_migrations8
h1.run() after h2.configure() does not segfault (v2.2.6)absentinferred1 of 7: run_migrations8
gh#158: interrupting one session leaves the other runningabsentinferred1 of 7: run_migrations9
gh#158: metrics and context reads are safe during live runsabsentinferred1 of 7: run_migrations9
gh#158: two concurrent sessions do not bleed into each otherabsentinferred1 of 7: run_migrations9
gh#164: entropic_release_model frees VRAM through the C ABIabsentinferred1 of 7: run_migrations9
gh#165 + gh#164: release the weights, keep the conversationabsentinferred1 of 7: run_migrations9
gh#165: a dropped session restored from JSON keeps answeringabsentinferred1 of 7: run_migrations9
gh#166: two workspaces on one handle do not read each other's absentinferred1 of 7: run_migrations9
gh#169: an iteration-capped delegate hands its parent the audit it absentinferred1 of 7: run_migrations9
gh#179: each workspace's sessions answer from its own app_context, absentinferred1 of 7: run_migrations9
gh#181: a delegate hard-cut by the thinking budget hands its absentinferred1 of 7: run_migrations9
gh#194: a plain generation publishes the prefill it performedabsentinferred1 of 7: run_migrations9
gh#198: a deferred handle holds no GPU memory until it runsabsentinferred1 of 7: run_migrations9
gh#204/gh#205: two HTTP clients, different session, workspace and absentinferred1 of 7: run_migrations9
gh#214: a prompt that does not fit fails the turn, typedabsentinferred1 of 7: run_migrations9
gh#216: multi-byte text at the history cut does not poison later turnsabsentinferred1 of 7: run_migrations9
gh#217: release is refused while another session is decodingabsentinferred1 of 7: run_migrations9
gh#93: autoparser family parses a multi-parameter tool callabsentinferred1 of 7: run_migrations9
gh#93: entropic_interrupt stops a long run early (cancel-bridge)absentinferred1 of 7: run_migrations9
gh#94: enable_thinking:false suppresses think blocks (facade)absentinferred1 of 7: run_migrations9
gh#99: run_as emits each tier's grammar on a shared modelabsentinferred1 of 7: run_migrations9
outside-root optional: a real model's reads outside its root absentinferred1 of 7: run_migrations9
v2.14.1: a declared server serves each workspace from its own repositoryabsentinferred1 of 7: run_migrations9
v2.14.3: release frees the model over MCP and the conversation survivesabsentinferred1 of 7: run_migrations9
v2.14.4: a model's commit message with shell syntax is text, not a commandabsentinferred1 of 7: run_migrations9
v2.14.5: a failed turn is an error carrying only its own textabsentinferred1 of 7: run_migrations9