From 678e2814e68b4829e7d579668dce9bf712ba315f Mon Sep 17 00:00:00 2001 From: lotherk Date: Sat, 21 Nov 2026 21:27:25 +0000 Subject: [PATCH] engine: the plugin host exists even when no plugin is configured The host is what carries the registry to the core compactor. A plugin-less run had none, so a conversation over max_bytes was refused instead of compacted - the compaction that would have saved it could not be reached. The fix landed in f712088; this is the check that keeps it. --- src/backend/engine.c | 2 +- tests/test_engine.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/backend/engine.c b/src/backend/engine.c index 73b8d28..9546034 100644 --- a/src/backend/engine.c +++ b/src/backend/engine.c @@ -3097,7 +3097,7 @@ load_plugins(struct sp_engine *e, const struct sp_engine_opts *o, /* * The host is created even without a single plugin: it is what carries - * the registry to the core compactor and the gate to the tools. Skiping + * the registry to the core compactor and the gate to the tools. Skipping * it here left a plugin-less run with no compactor at all, so max_bytes * killed every turn whose conversation was over the ceiling - the * compaction that was supposed to save it could not be reached. diff --git a/tests/test_engine.c b/tests/test_engine.c index e057f3b..9424c3a 100644 --- a/tests/test_engine.c +++ b/tests/test_engine.c @@ -197,6 +197,14 @@ main(void) fprintf(stderr, "engine: %s\n", err.p != NULL ? err.p : "?"); return 1; } + /* + * The host exists even with no plugin configured. It is what carries the + * registry to the core compactor; without it a plugin-less run had no + * compactor at all and every conversation over max_bytes was refused + * instead of compacted (seen 2026-11-21 on a 90 KB session, budget + * 8000, "nothing sent"). + */ + CHECK(sp_engine_host(eng) != NULL); /* * The prompt knows this directory has history and says how to read it; * the default prompt tells the model to use the knowledge tools (tasks,