Skip to content

Commit 1462ceb

Browse files
committed
release: 5.8.10 — live model-behavior verification; fix a false-failing memory-clear test (five packages lockstep)
Ran a representative LlmVerification PlayMode subset against a live OpenAI-compatible endpoint (LM Studio, reference model qwen3.5-4b-mtp) to audit tool-call/skill/model behavior. Fixed: - AllToolCalls_MemoryTool_WriteAppendClear asserted the clear tool REMOVED the store entry (!store.TryLoad), but the memory tool's clear action EMPTIES the document (Change("")) and keeps the record by design ("clear empties memory"). The run failed even though HasCompletedMemoryAction("clear") already proved the model emitted and completed the real memory(action=clear) call and the document was empty. It now asserts "no entry OR empty content", matching the documented semantics; the misleading "responded with text instead" warning is corrected. Verified (live, qwen3.5-4b-mtp): tool-calling, custom agents (ToolsOnly/ToolsAndChat/ChatOnly/ WithAction), skill self-service (read-then-use), skill-tool proxy, skill tool discovery, memory write/append/clear, and the execute_lua Lua-authoring pipeline (model writes correct sandbox-scoped Lua) — all pass. Verdict: the tool-call/skill design is sound; a 4B model handles the whole surface, and the tool contract explicitly guards narration-instead-of-action. (Z.AI had no balance and no spark/opencode OpenAI endpoint was available, so the documented local reference model was used.)
1 parent 3e5e5e7 commit 1462ceb

8 files changed

Lines changed: 51 additions & 17 deletions

File tree

Assets/CoreAI/CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,28 @@
22

33
## [Unreleased]
44

5+
## 5.8.10 - Live model-behavior verification; fix a false-failing memory-clear test (2026-07-13)
6+
7+
### Fixed
8+
9+
- **`AllToolCalls_MemoryTool_WriteAppendClear` no longer fails when the model clears memory correctly.** The
10+
test asserted the `clear` tool REMOVED the store entry (`!store.TryLoad(...)`), but the memory tool's
11+
`clear` action EMPTIES the document (`MemoryMutationPlan.Change("")`) and keeps the record by design
12+
("clear empties memory"). So the run failed even though `HasCompletedMemoryAction("clear")` already proved
13+
the model emitted and completed the real `memory(action=clear)` call and the document was empty. It now
14+
asserts "no entry OR empty content", matching the documented clear semantics; the misleading "model
15+
responded with text instead" warning is corrected (the model DID call the tool).
16+
17+
### Verified (live model behavior — LM Studio, reference model `qwen3.5-4b-mtp`)
18+
19+
- Ran a representative subset of the LlmVerification PlayMode suite against a live OpenAI-compatible endpoint:
20+
tool-calling, custom agents (ToolsOnly / ToolsAndChat / ChatOnly / WithAction), skill self-service
21+
(read-then-use), skill-tool proxy, skill tool discovery, memory write/append/clear, and the `execute_lua`
22+
Lua-authoring pipeline (the model writes correct sandbox-scoped Lua) — all pass. The tool-call/skill design
23+
is sound: a 4B model handles the full surface correctly, and the tool contract explicitly guards against
24+
narration-instead-of-action. (Z.AI had no balance and no spark/opencode OpenAI endpoint was available, so
25+
the documented local benchmark reference model was used.)
26+
527
## 5.8.9 - Demo/benchmark review wave: per-scene gameplay-binding seam + honest fixes (2026-07-13)
628

729
### Added

Assets/CoreAI/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "com.neoxider.coreai",
3-
"version": "5.8.9",
3+
"version": "5.8.10",
44
"displayName": "CoreAI",
55
"unity": "6000.0",
66
"description": "Portable C# core for CoreAI \u2014 LLM agents that call your game code. Orchestration, function-calling tools, agent memory, AgentBuilder, SkillSet, and production resilience (retries, timeouts, rate limits), with no UnityEngine dependency. LLM and Lua are optional modules (COREAI_NO_LLM / COREAI_NO_LUA), so the core compiles without them \u2014 install only what your game uses. Unity integration ships in com.neoxider.coreaiunity.",

Assets/CoreAIBenchmark/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "com.neoxider.coreaibenchmark",
3-
"version": "5.8.9",
3+
"version": "5.8.10",
44
"displayName": "CoreAI Benchmark",
55
"unity": "6000.0",
66
"description": "LLM game-creation benchmark harness and scenarios for CoreAI: drives execute_lua and world_command through real PlayMode scenarios (G1-G8), grades tool correctness, reasoning, instruction adherence, and determinism, and reports suite/role fitness scores. Depends on com.neoxider.coreai / com.neoxider.coreaiunity / com.neoxider.coreaimods.",

Assets/CoreAIHub/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "com.neoxider.coreaihub",
3-
"version": "5.8.9",
3+
"version": "5.8.10",
44
"displayName": "CoreAI Hub (UI Toolkit)",
55
"unity": "6000.0",
66
"description": "Optional UI Toolkit window for CoreAI: a tabbed Hub that renders pages registered into CoreAI's HubPageRegistry (Chat, Settings, Statistics, Mods, and C#/Lua-authored pages). Lazy per-tab content, live tab rebuild on register/unregister, semi-transparent runtime panel, and a future path to Unity 6.5 world-space PanelRenderer. Install this package only when you want the built-in Hub window; without it CoreAI still exposes the registry so you can render pages on your own uGUI/UITK canvas via the API. Depends on com.neoxider.coreai.",

Assets/CoreAIMods/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "com.neoxider.coreaimods",
3-
"version": "5.8.9",
3+
"version": "5.8.10",
44
"displayName": "CoreAI Mods (Lua)",
55
"unity": "6000.0",
66
"description": "Lua modding layer for CoreAI: the Lua-CSharp sandbox (managed, AOT-safe, WebGL/IL2CPP-ready — bundled, no external package), execute_lua and manage_mods tools, the Lua Modding skill, the mod runtime, persistent mod stores, gameplay bindings, and mod UI. Depends on com.neoxider.coreai / com.neoxider.coreaiunity. Install this package only when you want AI/player-authored Lua mods; without it CoreAI compiles Lua-free.",

Assets/CoreAiUnity/Tests/PlayMode/LlmVerification/AllToolCallsPlayModeTests.cs

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -306,24 +306,27 @@ public IEnumerator AllToolCalls_MemoryTool_WriteAppendClear()
306306
"Runtime clear/tool-result behavior is covered by deterministic tests; this is model/backend compliance.");
307307
}
308308

309-
// : tool call'
310-
bool memoryCleared = !store.TryLoad(BuiltInAgentRoleIds.CoreMechanic, out _);
309+
// WHY: the memory tool's `clear` action EMPTIES the document (MemoryMutationPlan.Change(""))
310+
// — it deliberately keeps the store record with Memory == "", it does not delete the entry.
311+
// So "cleared" means "no entry OR empty content", not "entry absent" (the old check wrongly
312+
// failed the run even though HasCompletedMemoryAction("clear") above already proved the model
313+
// emitted and completed the real tool call).
314+
bool memoryCleared =
315+
!store.TryLoad(BuiltInAgentRoleIds.CoreMechanic, out AgentMemoryState clearedState)
316+
|| string.IsNullOrEmpty(clearedState?.Memory);
311317

312318
if (!memoryCleared)
313319
{
314-
string currentMemory = store.TryLoad(BuiltInAgentRoleIds.CoreMechanic, out AgentMemoryState s)
315-
? s.Memory
316-
: "(none)";
317-
Debug.LogWarning($"[AllToolCalls] CLEAR FAILED: Memory NOT cleared by tool call. " +
318-
$"Current memory: '{currentMemory}'. Model responded with text instead.");
320+
Debug.LogWarning($"[AllToolCalls] CLEAR FAILED: memory(action=clear) completed but the " +
321+
$"document is not empty. Current memory: '{clearedState?.Memory}'.");
319322
}
320323
else
321324
{
322325
Debug.Log($"[AllToolCalls] Memory cleared by tool call");
323326
}
324327

325328
Assert.IsTrue(memoryCleared,
326-
"Memory must be cleared by actual tool call. Memory store should be empty.");
329+
"Memory must be emptied by the clear tool call (empty document, entry may remain).");
327330
}
328331

329332
Debug.Log("[AllToolCalls] MEMORY TOOL TEST PASSED ");

Assets/CoreAiUnity/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "com.neoxider.coreaiunity",
3-
"version": "5.8.9",
3+
"version": "5.8.10",
44
"displayName": "CoreAI Unity",
55
"unity": "6000.0",
66
"description": "Unity framework for LLM-powered NPCs and agents that call your game code \u2014 drop-in chat UI, function-calling tools, persistent memory, token-by-token streaming, and per-role LLM routing. Runs on a local GGUF model (via LLMUnity) or any OpenAI-compatible API; proven on a 4 GB local model. Unity layer for com.neoxider.coreai.",

TODO.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22

33
> Updated 2026-07-13. Tracks open work by priority. Shipped work is in `CHANGELOG.md` (both packages);
44
> non-blocking future work in `Assets/CoreAiUnity/Docs/BACKLOG.md`.
5-
> Released: 5.8.9 (2026-07-13, all five packages in lockstep). Last full verification 2026-07-13 (batchmode):
6-
> mods EditMode 119 passed / 0 failed; full EditMode green; PlayMode `FastNoLlm` 56 passed / 0 failed (with
7-
> graphics — `-nographics` fails 5 GPU/RenderTexture camera tests, environment artifact). LLM-API PlayMode
8-
> tests run against a local LM Studio OpenAI endpoint (`qwen3.5-4b-mtp`) — see the LLM-API gate below.
5+
> Released: 5.8.10 (2026-07-13, all five packages in lockstep). Last full verification 2026-07-13 (batchmode):
6+
> full EditMode 1573 passed / 0 failed; PlayMode `FastNoLlm` 56 passed / 0 failed (with graphics —
7+
> `-nographics` fails 5 GPU/RenderTexture camera tests, an environment artifact); a live LlmVerification
8+
> subset is green on the LM Studio `qwen3.5-4b-mtp` OpenAI endpoint (tools / skills / agents / memory /
9+
> execute_lua) — see the LLM-API gate below.
910
1011
## [A6] Deep audit wave (2026-07-13) — runtime / architecture / tests / security, all 22 findings fixed
1112

@@ -109,6 +110,14 @@
109110
reflection that can no-op under IL2CPP stripping (degrades gracefully).
110111
- [x] Representative local 4B live checks: memory write and real `world_command` spawn pass on
111112
`qwen3.5-4b-mtp`.
113+
- [x] **Model-behavior verification (5.8.10, LM Studio `qwen3.5-4b-mtp` OpenAI endpoint).** Ran a
114+
representative LlmVerification PlayMode subset live: tool-calling, custom agents (all 4 modes), skill
115+
self-service (read-then-use), skill-tool proxy, skill tool discovery, memory write/append/clear, and the
116+
`execute_lua` Lua-authoring pipeline (model writes correct sandbox-scoped Lua) — all pass. Verdict: the
117+
tool-call/skill design is sound (a 4B model handles the whole surface); the tool contract explicitly
118+
guards narration-instead-of-action. Found + fixed one false-failing test (memory-clear asserted entry
119+
removal vs the documented empty-document semantics). Path A LLM tests need the asset's `qwopus3.5-9b`
120+
model loaded; running 4B+9B + Unity PlayMode together OOMs this machine (env resource limit, not a bug).
112121
- [ ] Verify the AI writes mods through the Hub chat in each kept Hub-enabled demo with local 4B/9B/27B
113122
(LM Studio) and Opus 4.8 via the bundled preset (`Assets/Resources/CoreAIPresets/`,
114123
bridge: `agent.sh openai-server -e claude -m opus`). *(API models are already proven through the

0 commit comments

Comments
 (0)