You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Needs a live model: verify typed-question routing on the local agent (prompt dump, eval scenarios) #4245
Split from #4200. The routing fix is merged: a typed question in a chat bound to a node now takes a read-only lookup route led by the pinned skill (change requests and non-English or polite requests keep the old route and their write tools), and the type skill says to answer from the stored schema, which is read first. What is left can only be shown on the local model.
What remains
A prompt dump (NODESPACE_PROMPT_DUMP) of both turns in the Software Project type chat on the local native model, confirming a read-only tool set and the lookup route.
An eval scenario for each of the two questions.
The live check: "Does this type extend another type?" names the parent, and "Explain this type" does not contradict the opening description.
Model runs are not done on the shared dev Mac. Run these where a model may be loaded.
Done when
Both questions answer correctly on the local model and the eval scenarios pin them.
PR #4267: unrun live scaffolding plus a NODESPACE_FORCE_CPU switch. Deterministic stub tests pass (3/3). No model run done yet, so no checkbox is claimed.
GPU-off: load_tensors: offloaded 0/27 layers to GPU, CPU_Mapped model buffer 2024 MiB, CPU compute buffer 29 MiB, no Metal model/KV/compute buffers. Caveat: llama.cpp still initialises the Metal device at start-up (ggml_metal_library_init: loaded in 15.590 sec); nothing is allocated or computed on it. So: no GPU compute and no GPU memory, not 'Metal untouched'.
The test live_typed_question_routing::typed_questions_in_the_software_project_chat_take_the_read_only_lookup_route FAILED before any prompt was rendered: Chat template error: Failed to apply chat template: ffi error -3. Likely a template limitation of this model with the real type-chat history, which starts with an assistant message (inference, not tested). The production history was not changed.
NOT observed: prompt dump of either turn, the two answers, tool-set confirmation. No checkbox is claimed.
Next: run the same test on gemma-4-E4B-it-Q4_K_M (CPU-only, symlinked into a scratch models dir) when load < 8 and >= 8 GiB memory headroom; then tighten the declaration matcher in the test against the real dump. PR CPU-only switch and unrun live scaffolding for typed-question routing and stale-CLI stop (refs #4245, #4256) #4267 holds the scaffolding.
Observed 2026-11-12 (main c2c6d58, CPU-only NODESPACE_FORCE_CPU=1, 4 threads, Qwen2.5-1.5B-Instruct Q4_K_M chat + nomic-embed Q8_0 embed; log shows offloaded 0/29 layers to GPU, Metal device still initialised by llama.cpp but nothing offloaded): cargo test -p nodespace-agent --features testing --test it live_typed_question_routing::typed_questions -- --ignored --nocapture --test-threads=1
Result: FAILED (58 s). The chat template error from Ministral is gone: both turns ran. Q1 "Does this type extend another type?" generations=1 calls=[] REPLY "I'd like to help with that. Could you confirm what you'd like me to do?"; Q2 "Explain this type" identical reply, calls=[]. Failures: reply does not name Project as the parent; reply leaves out the field repository.
The 1.5B model never calls a tool, so the read-only lookup route is NOT observed. This is a model-capability result, not evidence for or against the routing. No checkbox claimed; issue stays open (needs a tool-calling-capable model, e.g. gemma-4-E4B, which is not a small model).
Observed 2026-11-13 (main c2c6d58, CPU-only NODESPACE_FORCE_CPU=1, 4 threads, Qwen2.5-7B-Instruct Q4_K_M (bartowski) chat + nomic-embed Q8_0; offloaded 0/29 layers to GPU): cargo test -p nodespace-agent --features testing --test it live_typed_question_routing::typed_questions -- --ignored --nocapture --test-threads=1 with NODESPACE_PROMPT_DUMP. Result: FAILED (224 s), one assertion: "Does this type extend another type?: the reply does not name Project as the parent".
Observed with the 7B: the model now calls tools. The prompt dump shows the lookup route on all three generations with a read-only declared set (get_node, get_node_context, get_related_nodes, run_query, search_nodes, search_semantic); the route checks passed. Q1 generation 1 called search_nodes (query "* extends *", 0 results); generation 2's raw response was "The Software Project type does not extend another custom schema. It extends the built-in Project." - a correct answer naming the parent. Q2 made no call and answered from the opening, listing repository and the Project-inherited fields.
But the user-visible Q1 reply was the canned "I'd like to help with that. Could you confirm what you'd like me to do?" That is CONFIRMATION_REQUEST substituted by the fabricated-id guard (agent_loop.rs ~4636-4663): the model linked the type's own id nodespace://software-project, which appears only in the Assistant-role opening message. system_written_node_uris grounds only tool and system messages, and the link is hyphenated so the type-name unlink repair does not cover it. So this is not a model limit: a correct, id-faithful answer is dropped, and the opening that the app itself writes is an Assistant message (bound_chat.rs ~247), so the same would happen in the app. Not yet fixed here; the fix would be to ground ids of the chat's bound/pinned node (or of the opening message) - a decision for the owner of the guard. Checkbox for the live check is NOT claimed (Q1 does not pass); prompt dump of both turns and tool-set confirmation ARE now observed. Issue stays open.
Observed pass on the local model (CPU-only, NODESPACE_FORCE_CPU=1, offloaded 0/29 layers to GPU): Qwen2.5-7B-Instruct Q4_K_M, live_typed_question_routing::typed_questions_in_the_software_project_chat_take_the_read_only_lookup_route — test result: ok. 1 passed; 0 failed in 402 s. Run was on main with #4269 (opening-message ids grounded) plus the harness change in #4270 (seeds the pinned-nodes record the app writes). Prompt dump (NODESPACE_PROMPT_DUMP) was written for both turns and confirms the lookup route with a read-only tool set. Earlier failure on this model was a real guard bug (#4269), not a model limit. Leaving this open until #4270 merges, since the pass depends on it.
Activity
mstomar125 commentedon Nov 12, 2026
PR #4267: unrun live scaffolding plus a NODESPACE_FORCE_CPU switch. Deterministic stub tests pass (3/3). No model run done yet, so no checkbox is claimed.
CPU-only switch and unrun live scaffolding for typed-question routing…
mstomar125 commentedon Nov 12, 2026
Observed 2026-11-12 (CPU-only, NODESPACE_FORCE_CPU=1, Ministral-3-3B Q4_K_M, 4 threads, n_ctx 16384, scratch home):
load_tensors: offloaded 0/27 layers to GPU, CPU_Mapped model buffer 2024 MiB, CPU compute buffer 29 MiB, no Metal model/KV/compute buffers. Caveat: llama.cpp still initialises the Metal device at start-up (ggml_metal_library_init: loaded in 15.590 sec); nothing is allocated or computed on it. So: no GPU compute and no GPU memory, not 'Metal untouched'.live_typed_question_routing::typed_questions_in_the_software_project_chat_take_the_read_only_lookup_routeFAILED before any prompt was rendered:Chat template error: Failed to apply chat template: ffi error -3. Likely a template limitation of this model with the real type-chat history, which starts with an assistant message (inference, not tested). The production history was not changed.Next: run the same test on gemma-4-E4B-it-Q4_K_M (CPU-only, symlinked into a scratch models dir) when load < 8 and >= 8 GiB memory headroom; then tighten the declaration matcher in the test against the real dump. PR CPU-only switch and unrun live scaffolding for typed-question routing and stale-CLI stop (refs #4245, #4256) #4267 holds the scaffolding.
mstomar125 commentedon Nov 12, 2026
Observed 2026-11-12 (main c2c6d58, CPU-only NODESPACE_FORCE_CPU=1, 4 threads, Qwen2.5-1.5B-Instruct Q4_K_M chat + nomic-embed Q8_0 embed; log shows
offloaded 0/29 layers to GPU, Metal device still initialised by llama.cpp but nothing offloaded):cargo test -p nodespace-agent --features testing --test it live_typed_question_routing::typed_questions -- --ignored --nocapture --test-threads=1Result: FAILED (58 s). The chat template error from Ministral is gone: both turns ran. Q1 "Does this type extend another type?" generations=1 calls=[] REPLY "I'd like to help with that. Could you confirm what you'd like me to do?"; Q2 "Explain this type" identical reply, calls=[]. Failures: reply does not name Project as the parent; reply leaves out the field
repository.The 1.5B model never calls a tool, so the read-only lookup route is NOT observed. This is a model-capability result, not evidence for or against the routing. No checkbox claimed; issue stays open (needs a tool-calling-capable model, e.g. gemma-4-E4B, which is not a small model).
mstomar125 commentedon Nov 13, 2026
Observed 2026-11-13 (main c2c6d58, CPU-only NODESPACE_FORCE_CPU=1, 4 threads, Qwen2.5-7B-Instruct Q4_K_M (bartowski) chat + nomic-embed Q8_0;
offloaded 0/29 layers to GPU):cargo test -p nodespace-agent --features testing --test it live_typed_question_routing::typed_questions -- --ignored --nocapture --test-threads=1with NODESPACE_PROMPT_DUMP. Result: FAILED (224 s), one assertion: "Does this type extend another type?: the reply does not name Project as the parent".Observed with the 7B: the model now calls tools. The prompt dump shows the lookup route on all three generations with a read-only declared set (get_node, get_node_context, get_related_nodes, run_query, search_nodes, search_semantic); the route checks passed. Q1 generation 1 called search_nodes (query "* extends *", 0 results); generation 2's raw response was "The Software Project type does not extend another custom schema. It extends the built-in Project." - a correct answer naming the parent. Q2 made no call and answered from the opening, listing repository and the Project-inherited fields.
But the user-visible Q1 reply was the canned "I'd like to help with that. Could you confirm what you'd like me to do?" That is CONFIRMATION_REQUEST substituted by the fabricated-id guard (agent_loop.rs ~4636-4663): the model linked the type's own id
nodespace://software-project, which appears only in the Assistant-role opening message.system_written_node_urisgrounds only tool and system messages, and the link is hyphenated so the type-name unlink repair does not cover it. So this is not a model limit: a correct, id-faithful answer is dropped, and the opening that the app itself writes is an Assistant message (bound_chat.rs ~247), so the same would happen in the app. Not yet fixed here; the fix would be to ground ids of the chat's bound/pinned node (or of the opening message) - a decision for the owner of the guard. Checkbox for the live check is NOT claimed (Q1 does not pass); prompt dump of both turns and tool-set confirmation ARE now observed. Issue stays open.mstomar125 commentedon Nov 13, 2026
Claiming the fabricated-id guard fix (opening-message ids dropped a correct reply on the live 7B run). PR to follow.
mstomar125 commentedon Nov 13, 2026
Observed pass on the local model (CPU-only, NODESPACE_FORCE_CPU=1,
offloaded 0/29 layers to GPU): Qwen2.5-7B-Instruct Q4_K_M,live_typed_question_routing::typed_questions_in_the_software_project_chat_take_the_read_only_lookup_route—test result: ok. 1 passed; 0 failedin 402 s. Run was on main with #4269 (opening-message ids grounded) plus the harness change in #4270 (seeds the pinned-nodes record the app writes). Prompt dump (NODESPACE_PROMPT_DUMP) was written for both turns and confirms the lookup route with a read-only tool set. Earlier failure on this model was a real guard bug (#4269), not a model limit. Leaving this open until #4270 merges, since the pass depends on it.mstomar125 commentedon Nov 13, 2026
Closing: the observed pass above is now reproducible from main — #4269 (guard fix) and #4270 (harness seeds the pinned-nodes record) are both merged.